File: 16-DynLinkExpatLib.dpatch

package info (click to toggle)
python-4suite 0.99cvs20050418-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,824 kB
  • ctags: 18
  • sloc: sh: 499; makefile: 183
file content (83 lines) | stat: -rw-r--r-- 4,217 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#! /bin/sh -e
## 16-DynLinkExpatLib.dpatch by Raphael Bossek <bossekr@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: By default 4Suite link Ft.Xml.cDomlettec staticly against a
## DP: version of Expact distributed with the sources.
## DP: This leads to version inconsistency with distribution like
## DP: Debian where a different version of Expat is installed. The
## DP: first real life problem was reported with mod_python extension
## DP: for Apache.
## DP: .
## DP: To avoid this problems in the future and to profit from fixes
## DP: in the Debian libexpat1 package the Ft.Xml.cDomlettec will be
## DP: linked dynamic against the libexpat1 shared object on Debian.
## DP: .
## DP: An another problem is are the different compile options used
## DP: by 4Suite and the Debian build. XML_UNICODE is not defined for
## DP: Debian build.

if [ $# -lt 1 ]; then
    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
    exit 1
fi

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"

case "$1" in
    -patch) patch -p1 ${patch_opts} < $0;;
    -unpatch) patch -R -p1 ${patch_opts} < $0;;
    *)
        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
        exit 1;;
esac

exit 0

@DPATCH@
diff -Nru python-4suite-0.99cvs20050329/4Suite/Ft/Xml/src/domlette/expat_module.c python-4suite-0.99cvs20050329/4Suite.new/Ft/Xml/src/domlette/expat_module.c
--- python-4suite-0.99cvs20050329/4Suite/Ft/Xml/src/domlette/expat_module.c	2005-03-25 20:23:04.000000000 +0100
+++ python-4suite-0.99cvs20050329/4Suite.new/Ft/Xml/src/domlette/expat_module.c	2005-03-30 17:35:15.945798620 +0200
@@ -2738,12 +2738,11 @@
 
   /* ensure that we're going to be using the proper Expat functions */
   if (version.major != XML_MAJOR_VERSION || 
-      version.minor != XML_MINOR_VERSION ||
-      version.micro != XML_MICRO_VERSION) {
+      version.minor != XML_MINOR_VERSION) {
     expat_library_error = 
       PyString_FromFormat("Incompatible Expat library found; "          \
-                          "version mismatch (expected %d.%d.%d, "       \
-                          "found %d.%d.%d)", XML_MAJOR_VERSION, 
+                          "version mismatch (expected %d.%d(.%d), "       \
+                          "found %d.%d(.%d))", XML_MAJOR_VERSION, 
                           XML_MINOR_VERSION, XML_MICRO_VERSION,
                           version.major, version.minor, version.micro);
     if (expat_library_error == NULL) return -1;
diff -Nru python-4suite-0.99cvs20050329/4Suite/packages/Xml.pkg python-4suite-0.99cvs20050329/4Suite.new/packages/Xml.pkg
--- python-4suite-0.99cvs20050329/4Suite/packages/Xml.pkg	2005-03-29 06:21:09.000000000 +0200
+++ python-4suite-0.99cvs20050329/4Suite.new/packages/Xml.pkg	2005-03-30 17:35:56.497650774 +0200
@@ -95,18 +95,13 @@
                                         ('HAVE_EXPAT_CONFIG_H', None),
                                         ('Domlette_BUILDING_MODULE', None),
                                         ],
-                         include_dirs=['Ft/Xml/src',
-                                       'Ft/Xml/src/expat/lib',
-                                       ],
-                         sources=['Ft/Xml/src/expat/lib/xmlparse.c',
-                                  'Ft/Xml/src/expat/lib/xmlrole.c',
-                                  'Ft/Xml/src/expat/lib/xmltok.c',
-
-                                  'Ft/Xml/src/domlette/domlette.c',
+                         include_dirs=['Ft/Xml/src'],
+						 libraries=['expat'],
+                         sources=['Ft/Xml/src/domlette/domlette.c',
                                   'Ft/Xml/src/domlette/exceptions.c',
                                   'Ft/Xml/src/domlette/reader.c',
                                   'Ft/Xml/src/domlette/nss.c',
-                                  # NodeType implementations
+								  # NodeType implementations
                                   'Ft/Xml/src/domlette/node.c',
                                   'Ft/Xml/src/domlette/attr.c',
                                   'Ft/Xml/src/domlette/element.c',