office-gobmx/external/python33/python-3.3.0-darwin.patch.1
David Ostrovsky 147cb6a2ae Bump python to 3.5
3.5 release is needed for MSVC 14.0 (aka VS 2015) support. Python 3.5
removed build toolchain support for MSVC 2013. Because we still need
to support it, we duplicate the Python directory in externals and
copy old patches and dispatch to this directory for MSVC 2013. Once
the support for MSVC 2013 is dropped on master, this directory can be
removed again.

Change-Id: Idf7bc351239582f583ecbdb53c923cbdcf968089
Reviewed-on: https://gerrit.libreoffice.org/17352
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-10-25 08:29:39 +00:00

85 lines
3 KiB
Diff

-*- Mode: diff -*-
LO needs to build both against MacOSX SDK and not produce universal binaries.
diff -ru python3.old_/configure python3/configure
--- python3.old_/configure 2012-09-29 10:00:50.000000000 +0200
+++ python3/configure 2012-11-13 16:37:26.030013256 +0100
@@ -6353,7 +6353,19 @@
if test "${enable_universalsdk}"; then
UNIVERSAL_ARCH_FLAGS=""
if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
- UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
+ # LO does not use Universal Binaries (but the only way to set a SDK
+ # here implies that, so de-universalize here...)
+ case `/usr/bin/arch` in
+ i386)
+ UNIVERSAL_ARCH_FLAGS="-arch i386"
+ ;;
+ ppc)
+ UNIVERSAL_ARCH_FLAGS=""
+ ;;
+ *)
+ as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
+ ;;
+ esac
ARCH_RUN_32BIT=""
LIPO_32BIT_FLAGS=""
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 2013-09-13 21:57:14.790962423 +0200
@@ -39,7 +39,7 @@
INSTALL_SCRIPT= @INSTALL_SCRIPT@
INSTALL_DATA=@INSTALL_DATA@
LN=@LN@
-STRIPFLAG=-s
+STRIPFLAG=
CPMAC=CpMac
APPTEMPLATE=$(srcdir)/Resources/app
--- python3/Mac/Resources/framework/Info.plist.in
+++ python3/Mac/Resources/framework/Info.plist.in
@@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
- <string>Python</string>
+ <string>@PYTHONFRAMEWORK@</string>
<key>CFBundleGetInfoString</key>
<string>Python Runtime and Library</string>
<key>CFBundleIdentifier</key>
--- python3/Mac/Resources/app/Info.plist.in
+++ python3/Mac/Resources/app/Info.plist.in
@@ -18,7 +18,7 @@
</dict>
</array>
<key>CFBundleExecutable</key>
- <string>Python</string>
+ <string>LibreOfficePython</string>
<key>CFBundleGetInfoString</key>
<string>%version%, (c) 2004-2014 Python Software Foundation.</string>
<key>CFBundleHelpBookFolder</key>