~ubuntu-branches/ubuntu/utopic/libdv/utopic

« back to all changes in this revision

Viewing changes to debian/patches/10_zap_config_h.dpatch

  • Committer: Package Import Robot
  • Author(s): Alessio Treglia
  • Date: 2012-02-09 02:06:17 UTC
  • Revision ID: package-import@ubuntu.com-20120209020617-ef4t0w2zt384ul0i
Tags: 1.0.0-4
* New maintainer. (Closes: #654649), thanks to Daniel Kobras
  for the great work.
* Switch packaging to 3.0 (quilt) format plus DH 7.
* Convert patches to quilt format.
* Build with Multi-Arch support. (Closes: #650994)
* Drop libc6-dev from -DEV's Depends field.
* Get rid of .la files.
* Disable the build of static libraries.
* Remove debian/libdv-bin.links, it doesn't work.
* Remove debian/README.source, it's now unneeded.
* Update debian/copyright as per DEP-5.
* YUV_420_USE_YV12 option affects the wrong encoding (Closes: #466142):
  - The build configuration option --with-pal-yuv=YV12 actually affects
    encoding of "NTSC", inconsistent with decoding. This option is not
    currently used in Debian but could affect those who rebuild it.
    Thanks to Ben Hutchings for report and patch.
* Fix binary-control-field-duplicates-source
* Fix small misspellings.
* Fix hyphen-used-as-minus-sign.
* Run wrap-and-sort -a -s.
* Add watch file.
* Bump Standards.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh -e
2
 
## 10_zap_config_h.dpatch by Daniel Kobras <kobras@debian.org>
3
 
##
4
 
## All lines beginning with `## DP:' are a description of the patch.
5
 
## DP: dv_types.h is part of the libdv API that has to be included
6
 
## DP: in application code. Therefore, it may not reference libdv's
7
 
## DP: private config.h.
8
 
## DP: Of course, config.h was included for a reason, and this patch
9
 
## DP: tries to cover it up, because at least in the scope of the
10
 
## DP: Debian package we can reliably guess at the contents of config.h.
11
 
 
12
 
if [ $# -lt 1 ]; then
13
 
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
14
 
    exit 1
15
 
fi
16
 
 
17
 
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
18
 
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
19
 
 
20
 
case "$1" in
21
 
       -patch) patch $patch_opts -p1 < $0;;
22
 
       -unpatch) patch $patch_opts -p1 -R < $0;;
23
 
        *)
24
 
                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
25
 
                exit 1;;
26
 
esac
27
 
 
28
 
exit 0
29
 
 
30
 
@DPATCH@
31
 
diff -urNad --exclude=CVS --exclude=.svn ./libdv/dv_types.h /tmp/dpep-work.X4gSie/libdv/libdv/dv_types.h
32
 
--- ./libdv/dv_types.h  2005-07-10 19:31:16.000000000 +0200
33
 
+++ /tmp/dpep-work.X4gSie/libdv/libdv/dv_types.h        2005-07-10 19:58:28.000000000 +0200
34
 
@@ -26,10 +26,11 @@
35
 
 #ifndef DV_TYPES_H
36
 
 #define DV_TYPES_H
37
 
 
38
 
-#if HAVE_CONFIG_H
39
 
-# include <config.h>
40
 
-#endif
41
 
-
42
 
+/* The Debian package is always compiled with popt support, but using it
43
 
+ * in an application is optional. Declare HAVE_LIBPOPT before including
44
 
+ * the libdv headers in order to access popt-specific entries in the
45
 
+ * libdv API.
46
 
+ */
47
 
 #if HAVE_LIBPOPT
48
 
 #include <popt.h>
49
 
 #endif // HAVE_LIBPOPT
50
 
@@ -38,11 +39,11 @@
51
 
 #include <inttypes.h>
52
 
 #include <stdio.h>
53
 
 #include <time.h>
54
 
-#if HAVE_ENDIAN_H
55
 
+/* FIXME Some systems use machine/endian.h instead. We probably ought to
56
 
+ * AC_SUBST the correct value in here. (Or use a namespace-clean dvconfig.h.)
57
 
+ * This quick fix should do for glibc-based systems.
58
 
+ */
59
 
 #include <endian.h>
60
 
-#elif HAVE_MACHINE_ENDIAN_H
61
 
-#include <machine/endian.h>
62
 
-#endif
63
 
 
64
 
 /* please tell me these are defined somewhere standard??? */
65
 
 #ifndef FALSE
66
 
@@ -61,16 +62,33 @@
67
 
 #define CLAMP(a,x,b) (MIN(b,MAX(a,x)))
68
 
 #endif
69
 
 
70
 
+/* FIXME These values indicate whether libdv was built with asm optimizations.
71
 
+ * It had better be AC_SUBSTed, but for the purpose of the Debian package, we
72
 
+ * can easily guess the correct value from standard compiler macros.
73
 
+ */
74
 
+#if !defined(ARCH_X86) && !defined(ARCH_X86_64)
75
 
+# if defined (__x86_64)
76
 
+#  define ARCH_X86 0
77
 
+#  define ARCH_X86_64 1
78
 
+# elif defined(i386)
79
 
+#  define ARCH_X86 1
80
 
+#  define ARCH_X86_64 0
81
 
+# else
82
 
+#  define ARCH_X86 0
83
 
+#  define ARCH_X86_64 0
84
 
+# endif
85
 
+#endif
86
 
+                              
87
 
 // For now assume ARCH_X86 means GCC with hints.
88
 
 #ifdef ARCH_X86
89
 
-#define HAVE_GCC 1
90
 
+#define LIBDV_HAVE_GCC 1
91
 
 #endif
92
 
 #ifdef ARCH_X86_64
93
 
-#define HAVE_GCC 1
94
 
+#define LIBDV_HAVE_GCC 1
95
 
 #endif
96
 
-//#define HAVE_GCC 0
97
 
+//#define LIBDV_HAVE_GCC 0
98
 
 
99
 
-#if HAVE_GCC
100
 
+#if LIBDV_HAVE_GCC
101
 
 #define ALIGN64 __attribute__ ((aligned (64)))
102
 
 #define ALIGN32 __attribute__ ((aligned (32)))
103
 
 #define ALIGN8 __attribute__ ((aligned (8)))