diff --git a/emscripten/2_build_toolchain.sh b/emscripten/2_build_toolchain.sh index 755a796c..9090760b 100755 --- a/emscripten/2_build_toolchain.sh +++ b/emscripten/2_build_toolchain.sh @@ -36,9 +36,14 @@ if [ ! -f .patches-applied ]; then # (see https://groups.google.com/forum/#!topic/emscripten-discuss/YM3jC_qQoPk) perl -pi -e 's/HAVE_ARC4RANDOM\)/NO_ARC4RANDOM\)/' $EXPAT_DIR/ConfigureChecks.cmake + # Fix ICU (Remove when 79.1 is released) + (cd $ICU_DIR + patch -Np2 < $SCRIPT_DIR/../shared/extra/icu-fix-data.patch + ) + if [ "$USE_WASM_SIMD" == "1" ]; then (cd $PIXMAN_DIR - patch -Np2 < ../pixman-wasm.patch + patch -Np2 < $SCRIPT_DIR/pixman-wasm.patch ) fi diff --git a/ios/2_build_toolchain.sh b/ios/2_build_toolchain.sh index fe4448d9..083e2269 100755 --- a/ios/2_build_toolchain.sh +++ b/ios/2_build_toolchain.sh @@ -22,6 +22,11 @@ if [ ! -f .patches-applied ]; then patches_common + # Fix ICU (Remove when 79.1 is released) + (cd $ICU_DIR + patch -Np2 < $SCRIPT_DIR/../shared/extra/icu-fix-data.patch + ) + touch .patches-applied fi diff --git a/macos/2_build_toolchain.sh b/macos/2_build_toolchain.sh index b2dc9dbd..9f3ff02b 100755 --- a/macos/2_build_toolchain.sh +++ b/macos/2_build_toolchain.sh @@ -22,6 +22,11 @@ if [ ! -f .patches-applied ]; then patches_common + # Fix ICU (Remove when 79.1 is released) + (cd $ICU_DIR + patch -Np2 < $SCRIPT_DIR/../shared/extra/icu-fix-data.patch + ) + touch .patches-applied fi diff --git a/shared/extra/icu-fix-data.patch b/shared/extra/icu-fix-data.patch new file mode 100644 index 00000000..04775d77 --- /dev/null +++ b/shared/extra/icu-fix-data.patch @@ -0,0 +1,43 @@ +From aa17de1994d188560d99d07c37bf333416483899 Mon Sep 17 00:00:00 2001 +From: George Rhoten +Date: Tue, 18 Nov 2025 15:47:24 -0800 +Subject: [PATCH] ICU-23263 Support shared/static data library that uses a + pointer based table of contents + +--- + icu4c/source/common/ucnv_io.cpp | 7 ++++--- + icu4c/source/configure | 2 +- + icu4c/source/configure.ac | 2 +- + 3 files changed, 6 insertions(+), 5 deletions(-) + +diff --git a/icu4c/source/common/ucnv_io.cpp b/icu4c/source/common/ucnv_io.cpp +index 46a26f821fd8..66813f5a0372 100644 +--- a/icu4c/source/common/ucnv_io.cpp ++++ b/icu4c/source/common/ucnv_io.cpp +@@ -249,14 +249,15 @@ static void U_CALLCONV initAliasData(UErrorCode &errCode) { + + sectionSizes = static_cast(udata_getMemory(data)); + int32_t dataLength = udata_getLength(data); // This is the length minus the UDataInfo size +- if (dataLength <= int32_t(sizeof(sectionSizes[0]))) { ++ UBool isDataLengthKnown = dataLength >= 0; // Only false when using a pointer table of contents (not files nor a common data archive) ++ if (isDataLengthKnown && dataLength <= int32_t(sizeof(sectionSizes[0]))) { + // We don't even have a TOC! + goto invalidFormat; + } + table = reinterpret_cast(sectionSizes); + tableStart = sectionSizes[0]; + sizeOfTOC = int32_t((tableStart + 1) * sizeof(sectionSizes[0])); +- if (tableStart < minTocLength || dataLength <= sizeOfTOC) { ++ if (tableStart < minTocLength || (isDataLengthKnown && dataLength <= sizeOfTOC)) { + // We don't have a whole TOC! + goto invalidFormat; + } +@@ -279,7 +280,7 @@ static void U_CALLCONV initAliasData(UErrorCode &errCode) { + for (uint32_t section = 1; section <= tableStart; section++) { + sizeOfData += sectionSizes[section] * sizeof(table[0]); + } +- if (dataLength < sizeOfData) { ++ if (isDataLengthKnown && dataLength < sizeOfData) { + // Truncated file! + goto invalidFormat; + } diff --git a/shared/packages.ini b/shared/packages.ini index d7c0ce28..73363fe8 100644 --- a/shared/packages.ini +++ b/shared/packages.ini @@ -11,19 +11,19 @@ arguments = "-DZLIB_BUILD_TESTING=OFF -DZLIB_BUILD_SHARED=OFF -DZLIB_BUILD_STATI anitya_id = 5303 [libpng] -version = 1.6.55 +version = 1.6.58 url = "https://download.sourceforge.net/libpng/libpng-${version}.tar.xz" arguments = "-DPNG_SHARED=OFF -DPNG_TOOLS=OFF -DPNG_TESTS=OFF" anitya_id = 1705 [freetype] -version = 2.14.2 +version = 2.14.3 url = "https://download.savannah.gnu.org/releases/freetype/freetype-${version}.tar.xz" arguments = "-DFT_DISABLE_BZIP2=ON -DFT_DISABLE_BROTLI=ON" anitya_id = 854 [harfbuzz] -version = 13.0.0 +version = 14.1.0 url = "https://github.com/harfbuzz/harfbuzz/releases/download/${version}/harfbuzz-${version}.tar.xz" arguments = "-Dfreetype=enabled -Dicu=disabled -Dtests=disabled -Dutilities=disabled -Draster=disabled -Dvector=disabled -Dsubset=disabled" anitya_id = 1299 @@ -37,7 +37,7 @@ anitya_id = 3648 [expat] version_major = 2 version_minor = 7 -version_patch = 4 +version_patch = 5 version = ${version_major}.${version_minor}.${version_patch} version_url = ${version_major}_${version_minor}_${version_patch} url = "https://github.com/libexpat/libexpat/releases/download/R_${version_url}/expat-${version}.tar.bz2" @@ -146,7 +146,7 @@ url = "https://github.com/fragglet/lhasa/releases/download/v${version}/lhasa-${v anitya_id = 14822 [ICU] -version = 78.2 +version = 78.3 url = "https://github.com/unicode-org/icu/releases/download/release-${version}/icu4c-${version}-sources.tgz" directory = "icu" arguments = "--enable-strict=no --disable-tests --disable-samples @@ -157,7 +157,7 @@ anitya_id = 379847 [icudata] version_major = 78 -version_minor = 2 +version_minor = 3 version = ${version_major}.${version_minor} _ini_comment = empty on purpose, otherwise polluted by default section directory = diff --git a/shared/packages.sh b/shared/packages.sh index 681d963c..e8673ceb 100644 --- a/shared/packages.sh +++ b/shared/packages.sh @@ -9,26 +9,26 @@ ZLIB_URL="https://zlib.net/fossils/zlib-1.3.2.tar.gz" ZLIB_ARGS="-DZLIB_BUILD_TESTING=OFF -DZLIB_BUILD_SHARED=OFF -DZLIB_BUILD_STATIC=ON" ZLIB_DIR="zlib-1.3.2" -LIBPNG_URL="https://download.sourceforge.net/libpng/libpng-1.6.55.tar.xz" +LIBPNG_URL="https://download.sourceforge.net/libpng/libpng-1.6.58.tar.xz" LIBPNG_ARGS="-DPNG_SHARED=OFF -DPNG_TOOLS=OFF -DPNG_TESTS=OFF" -LIBPNG_DIR="libpng-1.6.55" +LIBPNG_DIR="libpng-1.6.58" -FREETYPE_URL="https://download.savannah.gnu.org/releases/freetype/freetype-2.14.2.tar.xz" +FREETYPE_URL="https://download.savannah.gnu.org/releases/freetype/freetype-2.14.3.tar.xz" FREETYPE_ARGS="-DFT_DISABLE_BZIP2=ON -DFT_DISABLE_BROTLI=ON" -FREETYPE_DIR="freetype-2.14.2" +FREETYPE_DIR="freetype-2.14.3" -HARFBUZZ_URL="https://github.com/harfbuzz/harfbuzz/releases/download/13.0.0/harfbuzz-13.0.0.tar.xz" +HARFBUZZ_URL="https://github.com/harfbuzz/harfbuzz/releases/download/14.1.0/harfbuzz-14.1.0.tar.xz" HARFBUZZ_ARGS="-Dfreetype=enabled -Dicu=disabled -Dtests=disabled -Dutilities=disabled -Draster=disabled -Dvector=disabled -Dsubset=disabled" -HARFBUZZ_DIR="harfbuzz-13.0.0" +HARFBUZZ_DIR="harfbuzz-14.1.0" PIXMAN_URL="https://cairographics.org/releases/pixman-0.46.4.tar.gz" PIXMAN_ARGS="-Dtests=disabled -Ddemos=disabled -Dlibpng=disabled" PIXMAN_DIR="pixman-0.46.4" -EXPAT_URL="https://github.com/libexpat/libexpat/releases/download/R_2_7_4/expat-2.7.4.tar.bz2" +EXPAT_URL="https://github.com/libexpat/libexpat/releases/download/R_2_7_5/expat-2.7.5.tar.bz2" EXPAT_ARGS="-DEXPAT_BUILD_TOOLS=OFF -DEXPAT_BUILD_EXAMPLES=OFF \ -DEXPAT_BUILD_TESTS=OFF -DEXPAT_BUILD_DOCS=OFF -DEXPAT_SHARED_LIBS=OFF" -EXPAT_DIR="expat-2.7.4" +EXPAT_DIR="expat-2.7.5" LIBOGG_URL="https://downloads.xiph.org/releases/ogg/libogg-1.3.6.tar.xz" LIBOGG_DIR="libogg-1.3.6" @@ -95,7 +95,7 @@ INIH_DIR="inih-r62" LHASA_URL="https://github.com/fragglet/lhasa/releases/download/v0.5.0/lhasa-0.5.0.tar.gz" LHASA_DIR="lhasa-0.5.0" -ICU_URL="https://github.com/unicode-org/icu/releases/download/release-78.2/icu4c-78.2-sources.tgz" +ICU_URL="https://github.com/unicode-org/icu/releases/download/release-78.3/icu4c-78.3-sources.tgz" ICU_DIR="icu" ICU_ARGS="--enable-strict=no --disable-tests --disable-samples \ --disable-dyload --disable-extras --disable-icuio \ diff --git a/tvos/2_build_toolchain.sh b/tvos/2_build_toolchain.sh index 2c77ad67..f3b45e47 100755 --- a/tvos/2_build_toolchain.sh +++ b/tvos/2_build_toolchain.sh @@ -22,6 +22,11 @@ if [ ! -f .patches-applied ]; then patches_common + # Fix ICU (Remove when 79.1 is released) + (cd $ICU_DIR + patch -Np2 < $SCRIPT_DIR/../shared/extra/icu-fix-data.patch + ) + touch .patches-applied fi