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

129.3. glib-introspection-2.90.0

GLib's introspection data: the GLib, GObject, GModule, Gio and GIRepository GIR and typelib files

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), 174 of 1047 in build order
Licence LGPL-2.1-or-later
Homepage https://gitlab.gnome.org/GNOME/glib
Build time 2.2 SBU
Installed size 12.5 MiB in 26 files
Recipe ports/core/gtk/glib-introspection/kpkgbuild

About

glib-introspection is the introspection data for GLib’s own libraries: the GIR files and typelibs GLib-2.0, GLibUnix-2.0, GObject-2.0, GModule-2.0, Gio-2.0, GioUnix-2.0 and GIRepository-3.0, under /usr/share/gir-1.0 and /usr/lib/girepository-1.0. It is the second build of glib’s tarball: glib is built with introspection off, because gobject-introspection needs glib first, and this port builds the same source again once both are installed. A port that generates introspection data for a GLib-based library names it in depends, because the GIR it writes includes GLib’s, GObject’s or Gio’s.

The arrangement is described in A second build of the same source.

Sources

Dependencies

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

Required by (45): appstream, at-spi2-core, ayatana-ido, babl, gdk-pixbuf, gegl, gexiv2, gimp, graphene, gsettings-desktop-schemas, gspell, gst-plugins-bad, gst-plugins-base, gstreamer, gtk3, gtk4, gtksourceview4, gtksourceview5, harfbuzz, json-glib, libaccounts-glib, libadwaita, libayatana-appindicator, libblockdev, libdbusmenu, libgee, libhandy, libmbim, libnotify, libportal, libqmi, libqrtr-glib, librsvg, libsecret, libsoup3, libspelling, modemmanager, pango, poppler, python3-gobject, system-config-printer, udisks2, vte3, webkitgtk, webkitgtk6.

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

What kpkg does

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

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-introspection
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-introspection
SRC=$SRC_ROOT/glib-introspection-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=disabled \
	-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=enabled
meson compile -C build
DESTDIR=$PWD/stage meson install --no-rebuild -C build

install -d $PKG/usr/share/gir-1.0 $PKG/usr/lib/girepository-1.0
cp -a stage/usr/share/gir-1.0/*.gir $PKG/usr/share/gir-1.0/
cp -a stage/usr/lib/girepository-1.0/*.typelib $PKG/usr/lib/girepository-1.0/

The switches, and why each is set:

Every other switch is the glib port’s, so that the introspection data describes the library that is installed; see the glib page for what each one does.

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

Contents

Installed directories: /usr/share/licenses/glib-introspection.

Notes

The package holds only the GIR and typelib files. meson install writes the whole of GLib into a staging directory, stage/, inside the source tree, and build.sh copies the two sets of files from there into $PKG. Packaging anything more would give two packages the same paths.

The recipe names glib’s tarball under glib’s own file name, glib-<version>.tar.xz, with the same sha256, so the source archive and the cache hold one file for both ports. Its version must be glib’s, since a typelib describes the library installed beside it, and both recipes carry group = glib, so the version checker offers the two only as one bump.