Fix python3 build on a clean OS X with no /usr/include
Change-Id: I5982c44d5995baeaffff4ff12316f1f8fa7d0ade
This commit is contained in:
@@ -32,6 +32,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\
|
|||||||
python3/python-3.3.0-ffi-clang.patch.1 \
|
python3/python-3.3.0-ffi-clang.patch.1 \
|
||||||
python3/python-3.3.0-gcc-4.8.patch.1 \
|
python3/python-3.3.0-gcc-4.8.patch.1 \
|
||||||
python3/python-3.3.0-pythreadstate.patch.1 \
|
python3/python-3.3.0-pythreadstate.patch.1 \
|
||||||
|
python3/python-3.3.0-clang.patch.1 \
|
||||||
))
|
))
|
||||||
|
|
||||||
ifneq ($(OS),WNT)
|
ifneq ($(OS),WNT)
|
||||||
|
13
python3/python-3.3.0-clang.patch.1
Normal file
13
python3/python-3.3.0-clang.patch.1
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
-*- Mode: diff -*-
|
||||||
|
|
||||||
|
--- python3/setup.py
|
||||||
|
+++ python3/setup.py
|
||||||
|
@@ -436,7 +436,7 @@
|
||||||
|
if ret >> 8 == 0:
|
||||||
|
with open(tmpfile) as fp:
|
||||||
|
for line in fp.readlines():
|
||||||
|
- if line.startswith("gcc version"):
|
||||||
|
+ if line.startswith("gcc version") or line.startswith("clang -cc1 version"):
|
||||||
|
is_gcc = True
|
||||||
|
elif line.startswith("#include <...>"):
|
||||||
|
in_incdirs = True
|
@@ -1,3 +1,5 @@
|
|||||||
|
-*- Mode: diff -*-
|
||||||
|
|
||||||
LO needs to build both against MacOSX SDK and not produce universal binaries.
|
LO needs to build both against MacOSX SDK and not produce universal binaries.
|
||||||
|
|
||||||
diff -ru python3.old_/configure python3/configure
|
diff -ru python3.old_/configure python3/configure
|
||||||
@@ -24,6 +26,30 @@ diff -ru python3.old_/configure python3/configure
|
|||||||
ARCH_RUN_32BIT=""
|
ARCH_RUN_32BIT=""
|
||||||
LIPO_32BIT_FLAGS=""
|
LIPO_32BIT_FLAGS=""
|
||||||
elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
|
elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
|
||||||
|
|
||||||
|
On OS X avoid /usr/local/lib and include like the plague, we don't
|
||||||
|
want to accidentally get some MacPorts etc stuff.
|
||||||
|
|
||||||
|
On OS X, always run the compiler (which is Clang, not gcc) to find out
|
||||||
|
what the include paths are. On a clean modern installation, there is
|
||||||
|
no /usr/include.
|
||||||
|
|
||||||
|
--- python3/setup.py
|
||||||
|
+++ python3/setup.py
|
||||||
|
@@ -460,11 +460,11 @@
|
||||||
|
# Ensure that /usr/local is always used, but the local build
|
||||||
|
# directories (i.e. '.' and 'Include') must be first. See issue
|
||||||
|
# 10520.
|
||||||
|
- if not cross_compiling:
|
||||||
|
+ if not cross_compiling and host_platform != 'darwin':
|
||||||
|
add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
|
||||||
|
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
||||||
|
# only change this for cross builds for 3.3, issues on Mageia
|
||||||
|
- if cross_compiling:
|
||||||
|
+ if cross_compiling or host_platform == 'darwin':
|
||||||
|
self.add_gcc_paths()
|
||||||
|
self.add_multiarch_paths()
|
||||||
|
|
||||||
--- python3/Mac/Makefile.in.orig 2013-09-13 20:16:50.558137603 +0200
|
--- python3/Mac/Makefile.in.orig 2013-09-13 20:16:50.558137603 +0200
|
||||||
+++ python3/Mac/Makefile.in 2013-09-13 21:57:14.790962423 +0200
|
+++ python3/Mac/Makefile.in 2013-09-13 21:57:14.790962423 +0200
|
||||||
@@ -39,7 +39,7 @@
|
@@ -39,7 +39,7 @@
|
||||||
|
Reference in New Issue
Block a user