This is an automated email from the ASF dual-hosted git repository. ardovm pushed a commit to branch AOO41X in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit a7f9e8b9cc2047281ee7b12dc8708d28597a2805 Author: Arrigo Marchiori <ard...@yahoo.it> AuthorDate: Sun Oct 27 09:09:36 2024 +0100 Allow compilation under MacOS (cherry picked from commit 0774725aa1f8e85bfb763e54c8ea5a3057c0d040) --- main/icu/icu-darwin.patch | 48 ++++++++++++------------------------------ main/icu/icu4c-4_2_1-src.patch | 25 ++++++++++++++++++++++ 2 files changed, 39 insertions(+), 34 deletions(-) diff --git a/main/icu/icu-darwin.patch b/main/icu/icu-darwin.patch index 3255ab3130..8ee7976878 100644 --- a/main/icu/icu-darwin.patch +++ b/main/icu/icu-darwin.patch @@ -1,34 +1,14 @@ ---- misc/build/icu/source/configure 2009-01-15 02:46:50.000000000 -0500 -+++ misc/build/icu/source/configure 2021-07-10 16:01:04.000000000 -0400 -@@ -2326,6 +2326,7 @@ - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+#include <stdlib.h> - $ac_declaration - int - main () -@@ -2687,6 +2688,7 @@ - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+#include <stdlib.h> - $ac_declaration - int - main () -@@ -4988,6 +4990,7 @@ - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include <ctype.h> -+#include <stdlib.h> - #if ((' ' & 0x0FF) == 0x020) - # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') - # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -@@ -5635,6 +5638,7 @@ - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+#include <stdlib.h> - int - main () - { +diff -ru misc/icu/source/data/pkgdataMakefile.in misc/build/icu/source/data/pkgdataMakefile.in +--- misc/icu/source/data/pkgdataMakefile.in 2024-10-21 16:00:26.000000000 -0400 ++++ misc/build/icu/source/data/pkgdataMakefile.in 2024-10-21 16:00:35.000000000 -0400 +@@ -14,6 +14,10 @@ + + OUTPUTFILE=icupkg.inc + MIDDLE_SO_TARGET= ++# LD_SONAME must end with a path, but on Darwin this does not happen, because ++# file source/config/mh-darwin makes it end with FINAL_SO_TARGET, instead of ++# MIDDLE_SO_TARGET like other Unixes. ++LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name @executable_path/ + + all : clean + @echo GENCCODE_ASSEMBLY_TYPE=$(GENCCODE_ASSEMBLY) >> $(OUTPUTFILE) diff --git a/main/icu/icu4c-4_2_1-src.patch b/main/icu/icu4c-4_2_1-src.patch index 0cc5b58b4b..77fc719528 100644 --- a/main/icu/icu4c-4_2_1-src.patch +++ b/main/icu/icu4c-4_2_1-src.patch @@ -203,3 +203,28 @@ diff -ru misc/icu/source/tools/genuca/genuca.cpp misc/build/icu/source/tools/gen //{0x3400, 0x4DB6, UCOL_SPECIAL_FLAG | (CJK_IMPLICIT_TAG << 24) }, //3 CJK_IMPLICIT_TAG, /* 0x3400-0x4DB5*/ //{0x4E00, 0x9FA6, UCOL_SPECIAL_FLAG | (CJK_IMPLICIT_TAG << 24) }, //4 CJK_IMPLICIT_TAG, /* 0x4E00-0x9FA5*/ +--- misc/icu/source/configure 2009-07-01 14:51:26.000000000 -0400 ++++ misc/build/icu/source/configure 2024-10-19 16:35:02.000000000 -0400 +@@ -7061,8 +7061,10 @@ + # Check for potential -arch flags. It is not universal unless + # there are some -arch flags. Note that *ppc* also matches + # ppc64. This check is also rather less than ideal. ++ echo "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" + case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( +- *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; ++ *-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=no;; ++ *-arch*ppc*) ac_cv_c_bigendian=yes;; + esac + else + $as_echo "$as_me: failed program was:" >&5 +--- misc/icu/source/i18n/uspoof.cpp 2009-07-01 14:50:10.000000000 -0400 ++++ misc/build/icu/source/i18n/uspoof.cpp 2024-10-19 16:36:44.000000000 -0400 +@@ -366,7 +366,7 @@ + // u_strToUTF8() in preflight mode is an easy way to do it. + U_ASSERT(position16 <= len16); + u_strToUTF8(NULL, 0, position, text16, position16, status); +- if (position > 0) { ++ if (position) { + // position is the required buffer length from u_strToUTF8, which includes + // space for a terminating NULL, which we don't want, hence the -1. + *position -= 1;