summaryrefslogtreecommitdiff
path: root/package/python2/patches
diff options
context:
space:
mode:
Diffstat (limited to 'package/python2/patches')
-rw-r--r--package/python2/patches/patch-Makefile_pre_in2
-rw-r--r--package/python2/patches/patch-configure_ac22
-rw-r--r--package/python2/patches/patch-setup_py38
3 files changed, 57 insertions, 5 deletions
diff --git a/package/python2/patches/patch-Makefile_pre_in b/package/python2/patches/patch-Makefile_pre_in
index e4f59f0ba..8c6aba5c2 100644
--- a/package/python2/patches/patch-Makefile_pre_in
+++ b/package/python2/patches/patch-Makefile_pre_in
@@ -1,5 +1,5 @@
--- Python-2.7.5.orig/Makefile.pre.in 2013-05-12 05:32:49.000000000 +0200
-+++ Python-2.7.5/Makefile.pre.in 2013-10-29 08:12:25.000000000 +0100
++++ Python-2.7.5/Makefile.pre.in 2013-10-30 14:10:07.000000000 +0100
@@ -227,6 +227,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
##########################################################################
# Parser
diff --git a/package/python2/patches/patch-configure_ac b/package/python2/patches/patch-configure_ac
new file mode 100644
index 000000000..0ec10f1de
--- /dev/null
+++ b/package/python2/patches/patch-configure_ac
@@ -0,0 +1,22 @@
+--- Python-2.7.5.orig/configure.ac 2013-05-12 05:32:54.000000000 +0200
++++ Python-2.7.5/configure.ac 2013-10-30 15:33:30.000000000 +0100
+@@ -19,7 +19,7 @@ AC_SUBST(host)
+ if test "$cross_compiling" = yes; then
+ AC_MSG_CHECKING([for python interpreter for cross build])
+ if test -z "$PYTHON_FOR_BUILD"; then
+- for interp in python$PACKAGE_VERSION python2 python; do
++ for interp in python; do
+ which $interp >/dev/null 2>&1 || continue
+ if $interp -c 'import sys;sys.exit(not (sys.version_info@<:@:2@:>@ >= (2,7) and sys.version_info@<:@0@:>@ < 3))'; then
+ break
+@@ -1066,9 +1066,7 @@ then
+ if test "$Py_DEBUG" = 'true' ; then
+ # Optimization messes up debuggers, so turn it off for
+ # debug builds.
+- OPT="-g -O0 -Wall $STRICT_PROTO"
+- else
+- OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
++ OPT="$STRICT_PROTO"
+ fi
+ ;;
+ *)
diff --git a/package/python2/patches/patch-setup_py b/package/python2/patches/patch-setup_py
index f8f2fa1c0..0cb811de9 100644
--- a/package/python2/patches/patch-setup_py
+++ b/package/python2/patches/patch-setup_py
@@ -1,5 +1,5 @@
--- Python-2.7.5.orig/setup.py 2013-05-12 05:32:54.000000000 +0200
-+++ Python-2.7.5/setup.py 2013-10-29 07:33:37.000000000 +0100
++++ Python-2.7.5/setup.py 2013-10-30 14:18:23.000000000 +0100
@@ -74,7 +74,7 @@ def find_file(filename, std_dirs, paths)
'paths' is a list of additional locations to check; if the file is
found in one of them, the resulting list will contain the directory.
@@ -54,7 +54,23 @@
if os.path.join(sysroot, p[1:]) == dirname:
return [ p ]
-@@ -437,10 +437,12 @@ class PyBuildExt(build_ext):
+@@ -162,6 +162,7 @@ class PyBuildExt(build_ext):
+
+ def build_extensions(self):
+
++ self.compiler.library_dirs = []
+ # Detect which modules should be compiled
+ missing = self.detect_modules()
+
+@@ -281,6 +282,7 @@ class PyBuildExt(build_ext):
+
+ def build_extension(self, ext):
+
++
+ if ext.name == '_ctypes':
+ if not self.configure_ctypes(ext):
+ return
+@@ -437,10 +439,12 @@ class PyBuildExt(build_ext):
def detect_modules(self):
# Ensure that /usr/local is always used
@@ -70,7 +86,7 @@
# Add paths specified in the environment variables LDFLAGS and
# CPPFLAGS for header and library files.
-@@ -477,7 +479,8 @@ class PyBuildExt(build_ext):
+@@ -477,7 +481,8 @@ class PyBuildExt(build_ext):
add_dir_to_list(dir_list, directory)
if os.path.normpath(sys.prefix) != '/usr' \
@@ -80,7 +96,21 @@
# OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
# (PYTHONFRAMEWORK is set) to avoid # linking problems when
# building a framework with different architectures than
-@@ -530,7 +533,7 @@ class PyBuildExt(build_ext):
+@@ -495,8 +500,13 @@ class PyBuildExt(build_ext):
+ # lib_dirs and inc_dirs are used to search for files;
+ # if a file is found in one of those directories, it can
+ # be assumed that no additional -I,-L directives are needed.
++ if cross_compiling:
++ add_dir_to_list(self.compiler.library_dirs,
++ sysconfig.get_config_var('srcdir'))
++
+ inc_dirs = self.compiler.include_dirs[:]
+ lib_dirs = self.compiler.library_dirs[:]
++
+ if not cross_compiling:
+ for d in (
+ '/usr/include',
+@@ -530,7 +540,7 @@ class PyBuildExt(build_ext):
if host_platform == 'hp-ux11':
lib_dirs += ['/usr/lib/hpux64', '/usr/lib/hpux32']