diff --git a/dev-lang/python/patches/python3_x86-3.6.3.patchset b/dev-lang/python/patches/python3_x86-3.6.3.patchset new file mode 100644 index 000000000..c48f83944 --- /dev/null +++ b/dev-lang/python/patches/python3_x86-3.6.3.patchset @@ -0,0 +1,41 @@ +From 80df8f959af84ea3223ae9136ac4568c59420311 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Sat, 3 Feb 2018 11:33:49 +0100 +Subject: Fix include paths for secondary x86 + +This helps python find libraries and dependencies properly (openssl, +etc), so a few more modules are enabled. + +It also fixes a crash because python would try to load the gcc2 libroot +even when built with gcc5. + +diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py +index d537963..fdbb8f4 100644 +--- a/Lib/ctypes/util.py ++++ b/Lib/ctypes/util.py +@@ -264,6 +264,7 @@ elif os.name == "posix": + directory = directory.replace('%A', + os.path.dirname(os.path.abspath(sys.argv[0] or os.getcwd()))) + ++ directory.append("/x86") + if not os.path.isdir(directory): + continue + +diff --git a/setup.py b/setup.py +index 21b0de2..33ba3f3 100644 +--- a/setup.py ++++ b/setup.py +@@ -568,8 +568,8 @@ class PyBuildExt(build_ext): + # Haiku-specific library locations + if host_platform == 'haiku1': + inc_dirs += ['/boot/develop/headers/posix', +- '/boot/system/develop/headers'] +- lib_dirs += ['/boot/system/develop/lib'] ++ '/boot/system/develop/headers/x86'] ++ lib_dirs += ['/boot/system/develop/lib/x86'] + + # OSF/1 and Unixware have some stuff in /usr/ccs/lib (like -ldb) + if host_platform in ['osf1', 'unixware7', 'openunix8']: +-- +2.15.1 + diff --git a/dev-lang/python/python3-3.6.3.recipe b/dev-lang/python/python3-3.6.3.recipe index 002b146d9..52c065dcd 100644 --- a/dev-lang/python/python3-3.6.3.recipe +++ b/dev-lang/python/python3-3.6.3.recipe @@ -11,11 +11,16 @@ OSI-approved open source license. HOMEPAGE="http://www.python.org" LICENSE="Python" COPYRIGHT="1990-2017, Python Software Foundation" -REVISION="2" +REVISION="3" SOURCE_URI="https://www.python.org/ftp/python/$portVersion/Python-$portVersion.tar.xz" CHECKSUM_SHA256="cda7d967c9a4bfa52337cdf551bcc5cff026b6ac50a8834e568ce4a794ca81da" SOURCE_DIR="Python-$portVersion" PATCHES="python3-$portVersion.patchset" +if [ $secondaryArchSuffix = _x86 ] ; then + PATCHES+=" + python3_x86-$portVersion.patchset + " +fi ARCHITECTURES=" !x86_gcc2 x86 x86_64" SECONDARY_ARCHITECTURES="x86" @@ -101,7 +106,7 @@ BUILD() autoconf export OPT="" runConfigure --omit-dirs binDir,includeDir ./configure \ - --enable-shared --without-ensurepip \ + --enable-shared --without-ensurepip --with-system-ffi \ --with-system-expat --bindir=$commandBinDir --includedir=$developDir/headers # prevent make from rebuilding stuff that requires python