Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

54.3. icu-78.3

International Components for Unicode library

Version 78.3, release 1
Shelf i18n — Unicode, locale, text shaping and segmentation, conversion, and translation
Phase 30_foundation (Build Foundation), 100 of 127 in build order
Licence Unicode-3.0
Homepage https://icu.unicode.org
Build time 6.0 SBU
Installed size 46.0 MiB in 270 files
Recipe ports/core/i18n/icu/kpkgbuild

About

ICU, International Components for Unicode, is a library of Unicode and locale services: character properties and names, collation, text boundaries, number, date and time formatting, time zones, and conversion between character sets. In KDOS it sits under harfbuzz, libxml2, boost, both Qt series, the web engines, nodejs’s Intl, and postgresql’s collation, among others.

The source is upstream’s archive of the release tag, which holds ICU for C, ICU for Java and the tools beside them; the build uses icu4c/source alone. The tag archive carries the locale data in source form, so configure runs python3’s icutools.databuilder to write the data build’s rules, and the data library is compiled from those sources. That is the reason for python3 in depends.

Sources

Dependencies

Depends on: python3.

Required by (57): boost, brltty, calibre, celestia, darktable, dino, firefox-esr, freeciv, freerdp, gnucash, gspell, harfbuzz, imv, kdeplasma-addons, kdiff3, konsole, ledger, libcdr, libical, libkiwix, libphonenumber, libqalculate, libreoffice, librewolf, libspelling, libvisio, libxml2, libzim, mpd, neochat, nodejs, openrct2, openttd, organicmaps, pdfium, plasma-workspace, postgresql, python3-pyicu, qt5-qtbase, qt6-qt5compat, qt6-qtbase, qt6-qtwebengine, R, raptor2, re2, samba, strawberry, tesseract, texlive, vte3, webkitgtk, webkitgtk6, wesnoth, widelands, xapian-core, xerces-c, xfsprogs.

Installation

From the repository root, inside the build container, this is the line kdosbuild runs for the port:

script/chroot/exec.sh bash -c 'source script/phases/30_foundation/phase.env && kpkg install icu'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/i18n/icu.

1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.

cd /ports/core/i18n/icu
echo 'f06bcab72736ee9d55689033b8198a178562354128cf38edb2afc2e67e3fd931  icu-78.3.tar.gz' | sha256sum -c -

2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.

SRC_ROOT=/var/cache/kpkg/work/icu
SRC=$SRC_ROOT/icu-78.3
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf icu-78.3.tar.gz -C "$SRC" --strip-components=1

Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.

3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

export CC=gcc CXX=g++
cd icu4c/source
./configure --prefix=/usr --disable-samples --disable-tests
make
make DESTDIR=$PKG install

LD_LIBRARY_PATH=lib bin/genrb -q -d "$PKG/usr/share/icu/$version" data/misc/zoneinfo64.txt

The switches, and why each is set:

The common switches of each build system are explained in the Flag glossary.

4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/icu, prunes what the image does not ship, lints the tree and rolls it reproducibly:

tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
    --mtime=@$SOURCE_DATE_EPOCH \
    --use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
    -cf icu-78.3-1.tar.xz -C "$PKG" .

5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/icu, and runs the triggers its paths call for.

Contents

Installed programs: derb, escapesrc, genbrk, genccode, gencfu, gencmn, gencnval, gendict, gennorm2, genrb, gensprep, icu-config, icuexportdata, icuinfo, icupkg, makeconv, pkgdata, uconv.

Installed libraries: libicudata.so, libicui18n.so, libicuio.so, libicutest.so, libicutu.so, libicuuc.so.

Installed directories: /usr/include/unicode, /usr/lib/icu, /usr/share/icu, /usr/share/licenses/icu.

Short descriptions

derb disassemble a resource bundle
genbrk Compiles ICU break iteration rules source files into binary data files
genccode generate C or platform specific assembly code from an ICU data file.
gencfu Generates Unicode Confusable data files
gencmn generate an ICU memory-mappable data file
gencnval compile the converters aliases file
gendict Compiles word list into ICU string trie dictionary
genrb compile a resource bundle
gensprep compile StringPrep data from files filtered by filterRFC3454.pl
icu-config output ICU build options
icuexportdata Writes text files with Unicode properties data from ICU.
icupkg extract or modify an ICU .dat archive
makeconv compile a converter table
pkgdata package data for use by ICU
uconv convert data from one encoding to another
icu-i18n.pc International Components for Unicode: Internationalization library
icu-io.pc International Components for Unicode: Stream and I/O Library
icu-uc.pc International Components for Unicode: Common and Data libraries

Notes

The last line compiles the time-zone rules data/misc/zoneinfo64.txt into a separate zoneinfo64.res in /usr/share/icu/$version/, with the genrb just built, run against the libraries just built in lib/ rather than any ICU already installed. ICU’s own data library carries the same rules; this extra file is for nodejs, whose build.sh copies it over the zoneinfo64.res inside its vendored Rust crate, so that its Temporal and ICU’s Intl read one time-zone database (see Data with no other source form). nodejs finds the file by the version pkg-config --modversion icu-uc prints, so the directory name must stay the ICU version.