You are not logged in.
https://github.com/unicode-org/icu/blob … ation-file
Apparently I need to set `ICU_DATA_FILTER_FILE` to a json file that contains what to filter.
So using the archlinux PKGBUILD: https://gitlab.archlinux.org/archlinux/ … ckages/icu
I made this change to it
diff --git a/PKGBUILD b/PKGBUILD
index 094a1ae..f9fa505 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -31,6 +31,8 @@ prepare() {
}
build() {
+ export ICU_DATA_FILTER_FILE="$(readlink -f ../../filter.json)"
+ cat "$ICU_DATA_FILTER_FILE"
cd icu/source
./configure --prefix=/usr \
--sysconfdir=/etc \And added the following filter.json:
{
"localeFilter": {
"filterType": "language",
"includelist": [
"en"
]
}
}However after building the package libicudata.so is still +30 MiB so I don't know what I'm doing wrong, I also noticed someone else ran into this issue already: https://stackoverflow.com/questions/763 … udata-size
Last edited by Samueru (2025-12-12 04:28:40)
Offline
- cat "$ICU_DATA_FILTER_FILE"
+ stat "$ICU_DATA_FILTER_FILE"
+ sleep 10Does your file resolution actually yield the correct path?
Offline
- cat "$ICU_DATA_FILTER_FILE" + stat "$ICU_DATA_FILTER_FILE" + sleep 10Does your file resolution actually yield the correct path?
Yes, and I originally added a sleep 5 to make sure as well.
If the file didn't exist cat would fail and stop the build.
EDIT: I just noticed the original path I added was a bit wrong, because what I was doing was cloning the repo and then copying the `filter.json` that I had ready into the icu directory.
but anyways it is still a valid path.
Last edited by Samueru (2025-12-12 02:10:32)
Offline
Alright found the solution. Turns out alpine linux does this already: https://gitlab.alpinelinux.org/alpine/a … KBUILD#L59
I need to remove the `icu/source/data` directory and replace it with a separate zip they release for the variable to take effect. xd
They also have their own filter which is nice, the resulting libicudata is now less than 3 MiB in size.
Last edited by Samueru (2025-12-12 04:28:02)
Offline
You might want to raise this at https://gitlab.archlinux.org/archlinux/ … u/-/issues since the size difference is actually ridiculous (afaiu the small data archive contains the 23 most relevant languages and probably covers 95% of the world and 99.9% of archlinux users)
Offline