2
## 10_zap_config_h.dpatch by Daniel Kobras <kobras@debian.org>
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.
13
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
17
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
18
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
21
-patch) patch $patch_opts -p1 < $0;;
22
-unpatch) patch $patch_opts -p1 -R < $0;;
24
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
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
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
49
#endif // HAVE_LIBPOPT
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.
60
-#elif HAVE_MACHINE_ENDIAN_H
61
-#include <machine/endian.h>
64
/* please tell me these are defined somewhere standard??? */
67
#define CLAMP(a,x,b) (MIN(b,MAX(a,x)))
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.
74
+#if !defined(ARCH_X86) && !defined(ARCH_X86_64)
75
+# if defined (__x86_64)
77
+# define ARCH_X86_64 1
80
+# define ARCH_X86_64 0
83
+# define ARCH_X86_64 0
87
// For now assume ARCH_X86 means GCC with hints.
90
+#define LIBDV_HAVE_GCC 1
94
+#define LIBDV_HAVE_GCC 1
97
+//#define LIBDV_HAVE_GCC 0
101
#define ALIGN64 __attribute__ ((aligned (64)))
102
#define ALIGN32 __attribute__ ((aligned (32)))
103
#define ALIGN8 __attribute__ ((aligned (8)))