Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion emscripten/2_build_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions ios/2_build_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions macos/2_build_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
43 changes: 43 additions & 0 deletions shared/extra/icu-fix-data.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
From aa17de1994d188560d99d07c37bf333416483899 Mon Sep 17 00:00:00 2001
From: George Rhoten <grhoten@users.noreply.github.com>
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<const uint32_t*>(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<const uint16_t*>(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;
}
12 changes: 6 additions & 6 deletions shared/packages.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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 =
Expand Down
18 changes: 9 additions & 9 deletions shared/packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 \
Expand Down
5 changes: 5 additions & 0 deletions tvos/2_build_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down