You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ar...@apache.org on 2024/11/02 19:21:21 UTC
(openoffice) 03/03: Allow compilation under MacOS
This is an automated email from the ASF dual-hosted git repository.
ardovm pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit 92209e56e55aa1ca39fb627c8f54a90614411820
Author: Arrigo Marchiori <ar...@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 | 14 ++++++++++++++
main/icu/icu4c-4_2_1-src.patch | 25 +++++++++++++++++++++++++
main/icu/makefile.mk | 4 ++++
3 files changed, 43 insertions(+)
diff --git a/main/icu/icu-darwin.patch b/main/icu/icu-darwin.patch
new file mode 100644
index 0000000000..8ee7976878
--- /dev/null
+++ b/main/icu/icu-darwin.patch
@@ -0,0 +1,14 @@
+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;
diff --git a/main/icu/makefile.mk b/main/icu/makefile.mk
index 8d273540ba..0b33d01299 100644
--- a/main/icu/makefile.mk
+++ b/main/icu/makefile.mk
@@ -46,6 +46,10 @@ TARFILE_ROOTDIR=icu
PATCH_FILES=${TARFILE_NAME}.patch icu-win-layout.patch \
icu-format-security.patch icu-win-icutu-dll-version.patch
+.IF "$(OS)"=="MACOSX"
+PATCH_FILES+=icu-darwin.patch
+.ENDIF
+
# ADDITIONAL_FILES=
.IF "$(GUI)"=="UNX"