fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / external / python3 / python-3.3.0-darwin.patch.1
bloba709473d7e716e66e678a9331ef52458356db35c
1 -*- Mode: diff -*-
3 LO needs to build both against MacOSX SDK and not produce universal binaries.
5 diff -ru python3.old_/configure python3/configure
6 --- python3.old_/configure      2012-09-29 10:00:50.000000000 +0200
7 +++ python3/configure   2012-11-13 16:37:26.030013256 +0100
8 @@ -6353,7 +6353,19 @@
9             if test "${enable_universalsdk}"; then
10                 UNIVERSAL_ARCH_FLAGS=""
11                 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
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
26                    ARCH_RUN_32BIT=""
27                    LIPO_32BIT_FLAGS=""
28                  elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
30 On OS X avoid /usr/local/lib and include like the plague, we don't
31 want to accidentally get some MacPorts etc stuff.
33 On OS X, always run the compiler (which is Clang, not gcc) to find out
34 what the include paths are. On a clean modern installation, there is
35 no /usr/include.
37 --- python3/setup.py
38 +++ python3/setup.py
39 @@ -460,11 +460,11 @@
40          # Ensure that /usr/local is always used, but the local build
41          # directories (i.e. '.' and 'Include') must be first.  See issue
42          # 10520.
43 -        if not cross_compiling:
44 +        if not cross_compiling and host_platform != 'darwin':
45              add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
46              add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
47          # only change this for cross builds for 3.3, issues on Mageia
48 -        if cross_compiling:
49 +        if cross_compiling or host_platform == 'darwin':
50              self.add_gcc_paths()
51          self.add_multiarch_paths()
53 --- python3/Mac/Makefile.in.orig        2013-09-13 20:16:50.558137603 +0200
54 +++ python3/Mac/Makefile.in     2013-09-13 21:57:14.790962423 +0200
55 @@ -39,7 +39,7 @@
56  INSTALL_SCRIPT= @INSTALL_SCRIPT@
57  INSTALL_DATA=@INSTALL_DATA@
58  LN=@LN@
59 -STRIPFLAG=-s
60 +STRIPFLAG=
61  CPMAC=CpMac
63  APPTEMPLATE=$(srcdir)/Resources/app
64 --- python3/Mac/Resources/framework/Info.plist.in
65 +++ python3/Mac/Resources/framework/Info.plist.in
66 @@ -5,7 +5,7 @@
67         <key>CFBundleDevelopmentRegion</key>
68         <string>English</string>
69         <key>CFBundleExecutable</key>
70 -       <string>Python</string>
71 +       <string>@PYTHONFRAMEWORK@</string>
72         <key>CFBundleGetInfoString</key>
73         <string>Python Runtime and Library</string>
74         <key>CFBundleIdentifier</key>
75 --- python3/Mac/Resources/app/Info.plist.in
76 +++ python3/Mac/Resources/app/Info.plist.in
77 @@ -18,7 +18,7 @@
78                 </dict>
79         </array>
80         <key>CFBundleExecutable</key>
81 -       <string>Python</string>
82 +       <string>LibreOfficePython</string>
83         <key>CFBundleGetInfoString</key>
84         <string>%version%, (c) 2004-2014 Python Software Foundation.</string>
85         <key>CFBundleHelpBookFolder</key>