Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / external / python3 / python-3.3.0-darwin.patch.1
blobd5cb17e339a2b778d27b96964fd45fb2e4617c73
1 -*- Mode: diff -*-
3 LO needs to build both against MacOSX SDK and not produce universal binaries.
5 diff -ru python3.orig/configure python3/configure
6 --- python3.orig/configure      2015-07-26 17:36:11.808497783 +0200
7 +++ python3/configure   2015-07-26 17:38:49.016508337 +0200
8 @@ -6794,7 +6794,20 @@
9          then
10              case "$UNIVERSAL_ARCHS" in
11              32-bit)
12 -               UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
13 +           # LO does not use Universal Binaries (but the only way to set a SDK
14 +           # here implies that, so de-universalize here...)
15 +           case `/usr/bin/arch` in
16 +           i386)
17 +               UNIVERSAL_ARCH_FLAGS="-arch i386"
18 +               ;;
19 +           ppc)
20 +               UNIVERSAL_ARCH_FLAGS=""
21 +               ;;
22 +           *)
23 +               as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
24 +               ;;
25 +           esac
27                 LIPO_32BIT_FLAGS=""
28                 ARCH_RUN_32BIT=""
29                 ;;
30 diff -ru python3.orig/Mac/Makefile.in python3/Mac/Makefile.in
31 --- python3.orig/Mac/Makefile.in        2015-07-05 18:50:07.000000000 +0200
32 +++ python3/Mac/Makefile.in     2015-07-26 17:40:14.860514100 +0200
33 @@ -43,7 +43,7 @@
34  INSTALL_SCRIPT= @INSTALL_SCRIPT@
35  INSTALL_DATA=@INSTALL_DATA@
36  LN=@LN@
37 -STRIPFLAG=-s
38 +STRIPFLAG=
39  CPMAC=CpMac
41  APPTEMPLATE=$(srcdir)/Resources/app
42 diff -ru python3.orig/Mac/Resources/app/Info.plist.in python3/Mac/Resources/app/Info.plist.in
43 --- python3.orig/Mac/Resources/app/Info.plist.in        2015-07-05 18:50:07.000000000 +0200
44 +++ python3/Mac/Resources/app/Info.plist.in     2015-07-26 17:42:00.974521224 +0200
45 @@ -18,7 +18,7 @@
46                 </dict>
47         </array>
48         <key>CFBundleExecutable</key>
49 -       <string>Python</string>
50 +       <string>LibreOfficePython</string>
51         <key>CFBundleGetInfoString</key>
52         <string>%version%, (c) 2001-2016 Python Software Foundation.</string>
53         <key>CFBundleHelpBookFolder</key>
54 diff -ru python3.orig/Mac/Resources/framework/Info.plist.in python3/Mac/Resources/framework/Info.plist.in
55 --- python3.orig/Mac/Resources/framework/Info.plist.in  2015-07-05 18:50:07.000000000 +0200
56 +++ python3/Mac/Resources/framework/Info.plist.in       2015-07-26 17:41:15.996518204 +0200
57 @@ -5,7 +5,7 @@
58         <key>CFBundleDevelopmentRegion</key>
59         <string>English</string>
60         <key>CFBundleExecutable</key>
61 -       <string>Python</string>
62 +       <string>@PYTHONFRAMEWORK@</string>
63         <key>CFBundleGetInfoString</key>
64         <string>Python Runtime and Library</string>
65         <key>CFBundleIdentifier</key>
66 diff -ru python3.orig/setup.py python3/setup.py
67 --- python3.orig/setup.py       2015-07-26 17:36:11.804497783 +0200
68 +++ python3/setup.py    2015-07-26 17:39:48.599512337 +0200
69 @@ -468,11 +468,11 @@
70          # Ensure that /usr/local is always used, but the local build
71          # directories (i.e. '.' and 'Include') must be first.  See issue
72          # 10520.
73 -        if not cross_compiling:
74 +        if not cross_compiling and host_platform != 'darwin':
75              add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
76              add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
77          # only change this for cross builds for 3.3, issues on Mageia
78 -        if cross_compiling:
79 +        if cross_compiling or host_platform == 'darwin':
80              self.add_gcc_paths()
81          self.add_multiarch_paths()