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

127.5. fribidi-1.0.17

Implementation of the Unicode Bidirectional Algorithm (BIDI)

Version 1.0.17, release 1
Shelf i18n — Unicode, locale, text shaping and segmentation, conversion, and translation
Phase 41_system (System), 675 of 1047 in build order
Licence LGPL-2.1-or-later
Homepage https://github.com/fribidi/fribidi
Build time 0.5 SBU
Installed size 340.3 KiB in 60 files
Recipe ports/core/i18n/fribidi/kpkgbuild

About

GNU FriBidi implements the Unicode Bidirectional Algorithm, which works out the display order of text that mixes right-to-left scripts such as Arabic and Hebrew with left-to-right ones. It installs libfribidi and the fribidi command, which reorders text given on its input. Text layout links it: pango, and through it GTK, libass’s subtitle rendering in ffmpeg and the media players, libraqm and the programs that name it directly.

The build is meson’s canonical shape; -Dtests=false leaves out the test suite. Upstream’s docs option, on by default, installs a section 3 manual page for each library function.

Sources

Dependencies

Depends on: meson.

Required by (24): abiword, avidemux, ffmpeg, gnumeric, gtk3, gtk4, gtksourceview4, gtksourceview5, handbrake, kodi, krita, lagrange, libadwaita, libass, libhandy, libraqm, matplotlib, pango, python3-pillow, scummvm, tuxpaint, vlc, vte3, warzone2100.

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/41_system/phase.env && kpkg install fribidi'

What kpkg does

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

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/fribidi
echo '6949dcde27d41cebad1fd741fcafc36d55a1020d2d872d4a6eb3914caabbada2  fribidi-1.0.17.tar.xz' | 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/fribidi
SRC=$SRC_ROOT/fribidi-1.0.17
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf fribidi-1.0.17.tar.xz -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:

meson setup build --buildtype=release --prefix=/usr --sysconfdir=/etc --libdir=lib -Dtests=false
meson compile -C build
DESTDIR=$PKG meson install --no-rebuild -C build

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/fribidi, 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 fribidi-1.0.17-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/fribidi, and runs the triggers its paths call for.

Contents

Installed programs: fribidi.

Installed libraries: libfribidi.so.

Installed directories: /usr/include/fribidi, /usr/share/licenses/fribidi.

Short descriptions

fribidi A command line interface for the GNU FriBidi library.
fribidi.pc Unicode Bidirectional Algorithm Library