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

129.1. glib-2.90.0

Low-level libraries useful for providing data structure handling for C, portability wrappers and interfaces

Version 2.90.0, release 1
Shelf gtk — The GLib and GTK platform and GNOME/Xfce desktop-platform libraries: widgets, settings, bindings, GIO plug-ins
Phase 41_system (System), 16 of 1047 in build order
Licence LGPL-2.1-or-later
Homepage https://gitlab.gnome.org/GNOME/glib
Build time 1.1 SBU
Installed size 9.5 MiB in 425 files
Recipe ports/core/gtk/glib/kpkgbuild

About

GLib is the C utility library under GTK and most of the GNOME and freedesktop software stack. One source tree builds several libraries: libglib-2.0 (data structures, the main loop, Unicode and string handling), libgobject-2.0 (the GObject type and object system), libgmodule-2.0, libgio-2.0 (files, sockets, D-Bus, settings and application support) and libgirepository-2.0. It also installs the tools other builds run, such as glib-compile-resources, glib-compile-schemas, gdbus-codegen and glib-mkenums, and command-line programs such as gio, gdbus and gsettings. It is one of the libraries the most ports in the tree name in depends.

GLib is built twice from the same tarball. This port builds it with introspection off, because gobject-introspection needs GLib to exist first; glib-introspection builds the same source again, once both are installed, and packages only the GIR and typelib files. The split, and why its two versions must stay equal, is in A second build of the same source.

Sources

Dependencies

Depends on: python3-docutils, meson, pcre2, libffi, zlib, util-linux, elfutils.

Required by (217): abiword, accountsservice, aisleriot, appstream, ardour, at-spi2-core, audacious, audacious-plugins, avahi, ayatana-ido, babl, baresip, bluez, bolt, brasero, cairo, celluloid, chafa, chromium, conmon, cups-browsed, darktable, dasher, dconf, ddcutil, deja-dup, desktop-file-utils, digikam, dino, enchant, exo, fastfetch, fcitx5, fcitx5-gtk, firefox-esr, fltk, font-manager, fontforge, fprintd, fuse-emulator, fwupd, gdk-pixbuf, geany, gegl, geoclue, gexiv2, gimp, glabels, glib-introspection, glib-networking, glibmm, glibmm2.66, gmime, gnome-disk-utility, gnome-mahjongg, gnome-mines, gnome-sudoku, gnucash, gnumeric, gobject-introspection, goffice, goocanvas, gparted, gpredict, graphene, graphviz, gsettings-desktop-schemas, gspell, gstreamer, gthumb, gtk-vnc, gtk3, gtk4, gtksourceview4, gtksourceview5, gts, gvfs, handbrake, harfbuzz, homebank, iio-sensor-proxy, impression, inkscape, json-glib, kamoso, kde-gtk-config, kicad, lasem, lensfun, lib2geom, libaccounts-glib, libaccounts-qt, libadwaita, libayatana-appindicator, libayatana-indicator, libblockdev, libcacard, libcamera, libdbusmenu, libfprint, libgee, libgpod, libgsf, libgudev, libgusb, libhandy, liblangtag, libmbim, libmypaint, libnice, libnotify, libosinfo, libpeas, libportal, libproxy, libpulse, libqmi, libqrtr-glib, libreoffice, librewolf, librsvg, libsecret, libsigrok, libsigrokdecode, libslirp, libsoup3, libspectrum, libspelling, libstoragemgmt, libvips, libvirt, libvirt-glib, libwacom, libxfce4ui, libxfce4util, libxmlb, linuxcnc, lxi-tools, mc, mlt, modemmanager, mpv-mpris, netsurf, networkmanager, networkmanager-openvpn, networkmanager-qt, obs-studio, opencpn, openscad, orca, orcaslicer, osinfo-db-tools, osm-gps-map, pango, pcsc-lite, phodav, phonon, pipewire, plasma-pa, polkit, polkit-qt6, poppler, profanity, prusaslicer, pulseaudio-qt, python3-dbus, python3-gobject, qemu, qt5-qtbase, qt6-qtbase, qt6-qtwebengine, qtkeychain, rawtherapee, remmina, resources, rhythmbox, sdcv, sdl2-pango, shared-mime-info, sigrok-cli, slirp4netns, speech-dispatcher, spice, spice-gtk, sshfs, strawberry, switcheroo-control, swtpm, system-config-printer, tenacity, thermald, thunderbird, tio, tlf, tlp-pd, totem-pl-parser, udisks2, upower, usbredir, vala, viking, virt-manager, volume_key, vte3, webkitgtk, webkitgtk6, wireplumber, wireshark, wv, wxwidgets, xdg-dbus-proxy, xdg-desktop-portal, xdg-desktop-portal-gtk, xfburn, xfconf, xnec2c, zenity.

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 glib'

What kpkg does

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

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/gtk/glib
echo '17d15cac2af80a33271127408e0abc2748eb297c595c2a26409e81e14e7d1b8f  glib-2.90.0.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/glib
SRC=$SRC_ROOT/glib-2.90.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf glib-2.90.0.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 recipe’s helpers devseries, group and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

meson setup build \
	--prefix=/usr \
	--libdir=lib \
	--buildtype=release \
	-D documentation=false \
	-D man-pages=enabled \
	-D nls=disabled \
	-D selinux=disabled \
	-D tests=false \
	-D wrap_mode=nodownload \
	-D libmount=enabled \
	-D libelf=enabled \
	-D glib_debug=disabled \
	-D dtrace=disabled \
	-D systemtap=disabled \
	-D sysprof=disabled \
	-D introspection=disabled
meson compile -C build
DESTDIR=$PKG meson install --no-rebuild -C build

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

Contents

Installed programs: gapplication, gdbus, gdbus-codegen, gi-compile-repository, gi-decompile-typelib, gi-inspect-typelib, gio, gio-querymodules, glib-compile-resources, glib-compile-schemas, glib-genmarshal, glib-gettextize, glib-mkenums, gobject-query, gresource, gsettings, gtester, gtester-report.

Installed libraries: libgio-2.0.so, libgirepository-2.0.so, libglib-2.0.so, libgmodule-2.0.so, libgobject-2.0.so, libgthread-2.0.so.

Installed directories: /usr/include/gio-unix-2.0, /usr/include/glib-2.0, /usr/lib/glib-2.0, /usr/share/glib-2.0/codegen, /usr/share/glib-2.0/dtds, /usr/share/glib-2.0/gdb, /usr/share/glib-2.0/valgrind, /usr/share/licenses/glib.

Short descriptions

gapplication D-Bus application launcher
gdbus Tool for working with D-Bus objects
gdbus-codegen D-Bus code and documentation generator
gi-compile-repository Typelib compiler
gi-decompile-typelib Typelib decompiler
gi-inspect-typelib Typelib inspection tool
gio GIO commandline tool
gio-querymodules GIO module cache creation
glib-compile-resources GLib resource compiler
glib-compile-schemas GSettings schema compiler
glib-genmarshal C code marshaller generation utility for GLib closures
glib-gettextize gettext internationalization utility
glib-mkenums C language enum description generation utility
gobject-query display a tree of types
gresource GResource tool
gsettings GSettings configuration tool
gtester test running utility
gtester-report test report formatting utility
gio-2.0.pc glib I/O library
gio-unix-2.0.pc unix specific headers for glib I/O library
girepository-2.0.pc GObject Introspection repository parser
glib-2.0.pc C Utility Library
gmodule-2.0.pc Dynamic module loader for GLib
gmodule-export-2.0.pc Dynamic module loader for GLib
gmodule-no-export-2.0.pc Dynamic module loader for GLib
gobject-2.0.pc GLib Type, Object, Parameter and Signal Library
gthread-2.0.pc Thread support for GLib

Notes

The two GLib ports carry group = glib, so the version checker offers them only as one bump, and glib-introspection passes this port’s meson options, with introspection turned on and the manual pages, which it does not package, turned off. A switch changed here without the same change there leaves the installed typelibs describing a different library from the one installed.