aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Ardelean <ardeleanalex@gmail.com>2015-03-13 22:46:47 +0200
committerAlexandru Ardelean <ardeleanalex@gmail.com>2015-03-14 21:24:31 +0200
commitcfe31ca3d3791fc0559908a254427f35e725ce47 (patch)
tree89f9b0a876f47474dad9583ef02d92ff5d4c742c
parent741fdfd1e036bf758262c2ded8a31a1b4c73d8ac (diff)
python3: port some patches from python
Based on the idea that 'what-works-on-python-should-work-on-python3' because they share the same trunk, these patches have been copied over from the python package. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
-rw-r--r--lang/python3/patches/005-fix-libffi-x86-64-configure.patch31
-rw-r--r--lang/python3/patches/006-remove-debian-multiarch-support.patch12
-rw-r--r--lang/python3/patches/007-distutils-do-not-adjust-path.patch10
-rw-r--r--lang/python3/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch15
4 files changed, 68 insertions, 0 deletions
diff --git a/lang/python3/patches/005-fix-libffi-x86-64-configure.patch b/lang/python3/patches/005-fix-libffi-x86-64-configure.patch
new file mode 100644
index 000000000..ea062a350
--- /dev/null
+++ b/lang/python3/patches/005-fix-libffi-x86-64-configure.patch
@@ -0,0 +1,31 @@
+diff --git a/Modules/_ctypes/libffi/configure b/Modules/_ctypes/libffi/configure
+index 75f62a7..4d6c9f2 100755
+--- a/Modules/_ctypes/libffi/configure
++++ b/Modules/_ctypes/libffi/configure
+@@ -17257,20 +17257,12 @@ case "$host" in
+ fi
+ ;;
+
+- i?86-*-* | x86_64-*-*)
+- TARGETDIR=x86
+- if test $ac_cv_sizeof_size_t = 4; then
+- case "$host" in
+- *-gnux32)
+- TARGET=X86_64
+- ;;
+- *)
+- TARGET=X86
+- ;;
+- esac
+- else
+- TARGET=X86_64;
+- fi
++ i?86-*-*)
++ TARGET=X86; TARGETDIR=x86
++ ;;
++
++ x86_64-*-*)
++ TARGET=X86_64; TARGETDIR=x86
+ ;;
+
+ ia64*-*-*)
diff --git a/lang/python3/patches/006-remove-debian-multiarch-support.patch b/lang/python3/patches/006-remove-debian-multiarch-support.patch
new file mode 100644
index 000000000..52d52b94e
--- /dev/null
+++ b/lang/python3/patches/006-remove-debian-multiarch-support.patch
@@ -0,0 +1,12 @@
+diff --git a/setup.py b/setup.py
+index 7868b7b..9ae0ef2 100644
+--- a/setup.py
++++ b/setup.py
+@@ -444,7 +444,6 @@ class PyBuildExt(build_ext):
+ add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+ if cross_compiling:
+ self.add_gcc_paths()
+- self.add_multiarch_paths()
+
+ # Add paths specified in the environment variables LDFLAGS and
+ # CPPFLAGS for header and library files.
diff --git a/lang/python3/patches/007-distutils-do-not-adjust-path.patch b/lang/python3/patches/007-distutils-do-not-adjust-path.patch
new file mode 100644
index 000000000..49fe92629
--- /dev/null
+++ b/lang/python3/patches/007-distutils-do-not-adjust-path.patch
@@ -0,0 +1,10 @@
+--- a/Lib/distutils/command/build_scripts.py
++++ b/Lib/distutils/command/build_scripts.py
+@@ -89,6 +89,7 @@ class build_scripts (Command):
+ adjust = 1
+ post_interp = match.group(1) or ''
+
++ adjust = 0
+ if adjust:
+ log.info("copying and adjusting %s -> %s", script,
+ self.build_dir)
diff --git a/lang/python3/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch b/lang/python3/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch
new file mode 100644
index 000000000..5a106d4e8
--- /dev/null
+++ b/lang/python3/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch
@@ -0,0 +1,15 @@
+diff --git a/setup.py b/setup.py
+index 7868b7b..544fa7e 100644
+--- a/setup.py
++++ b/setup.py
+@@ -452,8 +452,9 @@ class PyBuildExt(build_ext):
+ # directly since an inconsistently reproducible issue comes up where
+ # the environment variable is not set even though the value were passed
+ # into configure and stored in the Makefile (issue found on OS X 10.3).
++ rt_lib_dirs = [] if cross_compiling else self.compiler.runtime_library_dirs
+ for env_var, arg_name, dir_list in (
+- ('LDFLAGS', '-R', self.compiler.runtime_library_dirs),
++ ('LDFLAGS', '-R', rt_lib_dirs),
+ ('LDFLAGS', '-L', self.compiler.library_dirs),
+ ('CPPFLAGS', '-I', self.compiler.include_dirs)):
+ env_val = sysconfig.get_config_var(env_var)