aboutsummaryrefslogtreecommitdiff
path: root/examples/python2.7/patches/setup-modules.dpatch
diff options
context:
space:
mode:
Diffstat (limited to 'examples/python2.7/patches/setup-modules.dpatch')
-rw-r--r--examples/python2.7/patches/setup-modules.dpatch75
1 files changed, 75 insertions, 0 deletions
diff --git a/examples/python2.7/patches/setup-modules.dpatch b/examples/python2.7/patches/setup-modules.dpatch
new file mode 100644
index 0000000..c12ec0b
--- /dev/null
+++ b/examples/python2.7/patches/setup-modules.dpatch
@@ -0,0 +1,75 @@
+#! /bin/sh -e
+
+# DP: Modules/Setup.dist: patches to build some extensions statically
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ ;;
+ *)
+ echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
+ exit 1
+esac
+exit 0
+
+--- Modules/_elementtree.c~ 2008-11-27 10:01:33.000000000 +0100
++++ Modules/_elementtree.c 2008-11-27 10:03:30.000000000 +0100
+@@ -1837,7 +1837,10 @@
+ static struct PyExpat_CAPI* expat_capi;
+ #define EXPAT(func) (expat_capi->func)
+ #else
+-#define EXPAT(func) (XML_##func)
++#define EXPAT(func) (PyExpat_XML_##func)
++#define PyExpat_XML_GetErrorLineNumber PyExpat_XML_GetCurrentLineNumber
++#define PyExpat_XML_GetErrorColumnNumber PyExpat_XML_GetCurrentColumnNumber
++#define PyExpat_XML_GetErrorByteIndex PyExpat_XML_GetCurrentByteIndex
+ #endif
+
+ typedef struct {
+--- Modules/Setup.dist~ 2008-11-27 10:59:37.000000000 +0100
++++ Modules/Setup.dist 2008-11-27 11:00:26.000000000 +0100
+@@ -165,7 +165,7 @@
+ #itertools itertoolsmodule.c # Functions creating iterators for efficient looping
+ #atexit atexitmodule.c # Register functions to be run at interpreter-shutdown
+ #_functools _functoolsmodule.c # Tools for working with functions and callable objects
+-#_elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI _elementtree.c # elementtree accelerator
++#_elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H _elementtree.c # elementtree accelerator
+ #_pickle _pickle.c # pickle accelerator
+ #datetime datetimemodule.c # date/time type
+ #_bisect _bisectmodule.c # Bisection algorithms
+@@ -257,6 +257,7 @@
+ #_sha256 sha256module.c
+ #_sha512 sha512module.c
+
++#_hashlib _hashopenssl.c -lssl -lcrypto
+
+ # SGI IRIX specific modules -- off by default.
+
+@@ -341,6 +341,7 @@
+ #DBLIB=$(DB)/lib
+ #_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER)
+
++#_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/stgdict.c _ctypes/cfield.c _ctypes/malloc_closure.c -Wl,-Bstatic -lffi -Wl,-Bdynamic
+
+ # Helper module for various ascii-encoders
+ #binascii binascii.c
+@@ -382,7 +382,7 @@
+ #
+ # More information on Expat can be found at www.libexpat.org.
+ #
+-#pyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI
++#pyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H
+
+ # Hye-Shik Chang's CJKCodecs
+