From 994834e07234c7cae90b509adad54f767d612934 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Wed, 12 Jun 2024 17:11:50 +0200 Subject: [PATCH] ICU: upgrade to 75.1 Downloaded from https://github.com/unicode-org/icu/releases/tag/release-75-1 Change-Id: I882c57bf5ab613dc71f7ae1c31305596e1ca791f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168750 Reviewed-by: Xisco Fauli Tested-by: Jenkins Tested-by: Xisco Fauli --- configure.ac | 4 ++-- download.lst | 8 ++++---- external/harfbuzz/UnpackedTarball_harfbuzz.mk | 6 ++++++ external/harfbuzz/icu_75.patch.0 | 17 +++++++++++++++++ external/icu/ExternalProject_icu.mk | 2 +- external/icu/no-python.patch | 4 ++-- i18nutil/source/utility/unicode.cxx | 5 +++++ 7 files changed, 37 insertions(+), 9 deletions(-) create mode 100644 external/harfbuzz/icu_75.patch.0 diff --git a/configure.ac b/configure.ac index 1ab001abbbca..5e4dc02eddb1 100644 --- a/configure.ac +++ b/configure.ac @@ -11204,8 +11204,8 @@ fi dnl =================================================================== dnl Check for system icu dnl =================================================================== -ICU_MAJOR=74 -ICU_MINOR=2 +ICU_MAJOR=75 +ICU_MINOR=1 ICU_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/icu/source/i18n -I${WORKDIR}/UnpackedTarball/icu/source/common" ICU_LIBS_internal="-L${WORKDIR}/UnpackedTarball/icu/source/lib -licuuc" libo_CHECK_SYSTEM_MODULE([icu],[ICU],[icu-i18n >= 66]) diff --git a/download.lst b/download.lst index 543bf27f0131..6ed3562fb8ee 100644 --- a/download.lst +++ b/download.lst @@ -352,10 +352,10 @@ IACCESSIBLE2_TARBALL := IAccessible2-1.3+git20231013.3d8c7f0.tar.gz # three static lines # so that git cherry-pick # will not run into conflicts -ICU_SHA256SUM := 68db082212a96d6f53e35d60f47d38b962e9f9d207a74cfac78029ae8ff5e08c -ICU_TARBALL := icu4c-74_2-src.tgz -ICU_DATA_SHA256SUM := c28c3ca5f4ba3384781797138a294ca360988d4322674ad4d51e52f5d9b0a2b6 -ICU_DATA_TARBALL := icu4c-74_2-data.zip +ICU_SHA256SUM := cb968df3e4d2e87e8b11c49a5d01c787bd13b9545280fc6642f826527618caef +ICU_TARBALL := icu4c-75_1-src.tgz +ICU_DATA_SHA256SUM := a5104212dc317a64f9b035723ea706f2f4fd5a0f37b7923fae7aeb9d1d0061b1 +ICU_DATA_TARBALL := icu4c-75_1-data.zip # three static lines # so that git cherry-pick # will not run into conflicts diff --git a/external/harfbuzz/UnpackedTarball_harfbuzz.mk b/external/harfbuzz/UnpackedTarball_harfbuzz.mk index 71627725fae7..9a771dffe279 100644 --- a/external/harfbuzz/UnpackedTarball_harfbuzz.mk +++ b/external/harfbuzz/UnpackedTarball_harfbuzz.mk @@ -19,4 +19,10 @@ $(eval $(call gb_UnpackedTarball_add_patches,harfbuzz, \ external/harfbuzz/tdf159529.patch.0 \ )) +ifneq ($(filter-out MACOSX WNT,$(OS)),) +$(eval $(call gb_UnpackedTarball_add_patches,harfbuzz, \ + external/harfbuzz/icu_75.patch.0 \ +)) +endif + # vim: set noet sw=4 ts=4: diff --git a/external/harfbuzz/icu_75.patch.0 b/external/harfbuzz/icu_75.patch.0 new file mode 100644 index 000000000000..4323716caa27 --- /dev/null +++ b/external/harfbuzz/icu_75.patch.0 @@ -0,0 +1,17 @@ +--- configure.ac 2024-06-12 16:35:18.736933604 +0200 ++++ configure.ac 2024-06-12 16:57:39.544214075 +0200 +@@ -249,7 +249,13 @@ + fi + + if $have_icu; then +- CXXFLAGS="$CXXFLAGS `$PKG_CONFIG --variable=CXXFLAGS icu-uc`" ++ is_icu75=false ++ PKG_CHECK_MODULES(ICU, icu-uc >= 75.1, is_icu75=true, :) ++ if $is_icu75; then ++ CXXFLAGS="$CXXFLAGS `$PKG_CONFIG --variable=CXXFLAGS -std=c++17 icu-uc`" ++ else ++ CXXFLAGS="$CXXFLAGS `$PKG_CONFIG --variable=CXXFLAGS icu-uc`" ++ fi + AC_DEFINE(HAVE_ICU, 1, [Have ICU library]) + if test "x$with_icu" = "xbuiltin"; then + AC_DEFINE(HAVE_ICU_BUILTIN, 1, [Use hb-icu Unicode callbacks]) diff --git a/external/icu/ExternalProject_icu.mk b/external/icu/ExternalProject_icu.mk index cd4bc99ab1a3..3510e8cd95f2 100644 --- a/external/icu/ExternalProject_icu.mk +++ b/external/icu/ExternalProject_icu.mk @@ -23,7 +23,7 @@ $(call gb_ExternalProject_get_state_target,icu,build) : $(WSL) autoconf -f \ && export LIB="$(ILIB)" PYTHONWARNINGS="default" \ gb_ICU_XFLAGS="-FS $(SOLARINC) $(gb_DEBUGINFO_FLAGS) $(if $(MSVC_USE_DEBUG_RUNTIME),-MDd,-MD -Gy)" \ - && CFLAGS="$${gb_ICU_XFLAGS}" CPPFLAGS="$(SOLARINC)" CXXFLAGS="$${gb_ICU_XFLAGS}" \ + && CFLAGS="$${gb_ICU_XFLAGS}" CPPFLAGS="$(SOLARINC)" CXXFLAGS="$${gb_ICU_XFLAGS} $(CXXFLAGS_CXX11)" \ INSTALL=`cygpath -m /usr/bin/install` $(if $(MSVC_USE_DEBUG_RUNTIME),LDFLAGS="-DEBUG") \ $(gb_RUN_CONFIGURE) ./configure \ $(if $(MSVC_USE_DEBUG_RUNTIME),--enable-debug --disable-release) \ diff --git a/external/icu/no-python.patch b/external/icu/no-python.patch index 33960fcae321..2d07215a17da 100644 --- a/external/icu/no-python.patch +++ b/external/icu/no-python.patch @@ -1,7 +1,7 @@ --- source/configure.ac +++ source/configure.ac -@@ -202,7 +202,7 @@ - m4_ifndef([AX_CHECK_COMPILE_FLAG], [AC_MSG_ERROR(['autoconf-archive' is missing])]) +@@ -213,7 +213,7 @@ + #AC_CHECK_PROG(STRIP, strip, strip, true) # TODO(ICU-20301): Remove fallback to Python 2. -AC_CHECK_PROGS(PYTHON, python3 "py -3" python "py") diff --git a/i18nutil/source/utility/unicode.cxx b/i18nutil/source/utility/unicode.cxx index a1e03bd5b41e..d5423e233109 100644 --- a/i18nutil/source/utility/unicode.cxx +++ b/i18nutil/source/utility/unicode.cxx @@ -1024,6 +1024,11 @@ OString unicode::getExemplarLanguageForUScriptCode(UScriptCode eScript) case USCRIPT_NAG_MUNDARI: sRet = "unr-Nagm"_ostr; break; +#endif +#if (U_ICU_VERSION_MAJOR_NUM >= 75) + case USCRIPT_ARABIC_NASTALIQ: + sRet = "fa-Aran"_ostr; + break; #endif } return sRet;