summaryrefslogtreecommitdiffstats
path: root/external/python3/macos-11.patch.0
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:51:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:51:28 +0000
commit940b4d1848e8c70ab7642901a68594e8016caffc (patch)
treeeb72f344ee6c3d9b80a7ecc079ea79e9fba8676d /external/python3/macos-11.patch.0
parentInitial commit. (diff)
downloadlibreoffice-upstream.tar.xz
libreoffice-upstream.zip
Adding upstream version 1:7.0.4.upstream/1%7.0.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--external/python3/macos-11.patch.059
1 files changed, 59 insertions, 0 deletions
diff --git a/external/python3/macos-11.patch.0 b/external/python3/macos-11.patch.0
new file mode 100644
index 000000000..d3dbbf605
--- /dev/null
+++ b/external/python3/macos-11.patch.0
@@ -0,0 +1,59 @@
+-*- Mode: diff -*-
+--- configure
++++ configure
+@@ -3374,7 +3374,7 @@
+ # has no effect, don't bother defining them
+ Darwin/[6789].*)
+ define_xopen_source=no;;
+- Darwin/1[0-9].*)
++ Darwin/[12][0-9].*)
+ define_xopen_source=no;;
+ # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
+ # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
+@@ -9372,6 +9275,9 @@
+ esac
+ else
+ case `/usr/bin/arch` in
++ arm64)
++ MACOSX_DEFAULT_ARCH="arm64"
++ ;;
+ i386)
+ MACOSX_DEFAULT_ARCH="x86_64"
+ ;;
+--- Mac/Tools/pythonw.c
++++ Mac/Tools/pythonw.c
+@@ -121,6 +121,8 @@
+ cpu_types[0] = CPU_TYPE_POWERPC;
+ #elif defined(__i386__)
+ cpu_types[0] = CPU_TYPE_X86;
++#elif defined(__arm64__)
++ cpu_types[0] = CPU_TYPE_ARM64;
+ #else
+ # error "Unknown CPU"
+ #endif
+--- setup.py
++++ setup.py
+@@ -670,7 +670,10 @@
+ add_dir_to_list(self.compiler.include_dirs,
+ sysconfig.get_config_var("INCLUDEDIR"))
+
+- system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib']
++ if host_platform == 'darwin':
++ system_lib_dirs = ['/usr/lib', macosx_sdk_root()+'/usr/lib']
++ else:
++ system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib']
+ system_include_dirs = ['/usr/include']
+ # lib_dirs and inc_dirs are used to search for files;
+ # if a file is found in one of those directories, it can
+--- Modules/_decimal/libmpdec/mpdecimal.h
++++ Modules/_decimal/libmpdec/mpdecimal.h
+@@ -135,6 +135,9 @@
+ #elif defined(__x86_64__)
+ #define CONFIG_64
+ #define ASM
++ #elif defined(__arm64__)
++ #define CONFIG_64
++ #define ANSI
+ #else
+ #error "unknown architecture for universal build."
+ #endif