117.3. gdk-pixbuf-2.44.8
Image-loading library used by GTK and many notification daemons
| Version | 2.44.8, release 1 |
| Shelf | graphics-libs — 2D rendering, vector and SVG, text layout, colour management and graph drawing libraries |
| Phase | 41_system (System), 605 of 1047 in build order |
| Licence | LGPL-2.1-or-later |
| Homepage | https://gitlab.gnome.org/GNOME/gdk-pixbuf |
| Build time | 0.7 SBU |
| Installed size | 1.1 MiB in 42 files |
| Recipe | ports/core/graphics-libs/gdk-pixbuf/kpkgbuild |
About
GdkPixbuf is GNOME’s image-loading library: it decodes an image file into a GdkPixbuf, an in-memory RGB or RGBA image, through a set of loaders, one per format, and scales and composites the result. GTK 3 loads its icons and pictures through it, and GTK 4 every format it does not decode itself; libnotify, librsvg (whose SVG loader plugs into it) and the many other ports that name it load images through it too. Its commands include gdk-pixbuf-query-loaders, which writes the cache of installed loaders, and gdk-pixbuf-thumbnailer.
Sources
gdk-pixbuf-2.44.8.tar.xz(5.8 MiB)
sha256919f529512961a12e81cd4b4b466a48c3933469e7f9a310c6513cd4fb252ba3c
upstream: https://download.gnome.org/sources/gdk-pixbuf/2.44/gdk-pixbuf-2.44.8.tar.xz
archive copy: sources-2/graphics-libs--gdk-pixbuf-2.44.8.tar.xz
Dependencies
Depends on: glib, libpng, libjpeg-turbo, libtiff, shared-mime-info, meson, python3-docutils, gobject-introspection, glib-introspection, libintl.
Required by (33): audacious-plugins, dino, fcitx5, gegl, gimp, goffice, gramps, gst-plugins-good, gtk-vnc, gtk3, gtk4, gtkmm3, gtkmm4, lasem, libavif, libgpod, libgsf, libheif, libjxl, libnotify, librsvg, libsixel, lxi-tools, mlt, profanity, rhythmbox, strawberry, tryton, viking, w3m, webp-pixbuf-loader, wxwidgets, xdg-desktop-portal.
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 gdk-pixbuf'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/graphics-libs/gdk-pixbuf.
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/graphics-libs/gdk-pixbuf
echo '919f529512961a12e81cd4b4b466a48c3933469e7f9a310c6513cd4fb252ba3c gdk-pixbuf-2.44.8.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/gdk-pixbuf
SRC=$SRC_ROOT/gdk-pixbuf-2.44.8
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf gdk-pixbuf-2.44.8.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 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 \
--wrap-mode=nodownload \
-D png=enabled \
-D jpeg=enabled \
-D tiff=enabled \
-D gif=enabled \
-D others=enabled \
-D glycin=disabled \
-D introspection=enabled \
-D documentation=false \
-D man=true \
-D tests=false \
-D installed_tests=false
meson compile -C build
DESTDIR=$PKG meson install --no-rebuild -C build
The switches, and why each is set:
--wrap-mode=nodownload— Never download a meson subproject. The release archive carries wrap files for glib, libpng, libjpeg-turbo and gi-docgen; with downloads forbidden, a missing libpng or libjpeg stops the configuration instead of being answered by a copy fetched and built inside the port.-D png=enabled,-D jpeg=enabled,-D tiff=enabled,-D gif=enabled— Build the PNG, JPEG, TIFF and GIF loaders, named rather than left atauto, so a missing libpng, libjpeg-turbo or libtiff is an error and not a library that cannot open the format.-D others=enabled— Build the loaders upstream calls “weakly maintained”: ANI, BMP, ICNS, ICO, PNM, QTIF, TGA, XBM and XPM. They default to disabled; without them no program that loads images through GdkPixbuf opens those formats.-D glycin=disabled— Build no glycin loader, which hands decoding to the glycin library. glycin is not a port, and upstream’sautoturns the loader on, as a required dependency, on Linux, so without the switch the configuration stops. With glycin off, the PNG and JPEG loaders are the ones built into the library, and the rest are modules.-D introspection=enabled— GenerateGdkPixbuf-2.0.girand its typelib. GTK’s, libnotify’s and librsvg’s own introspection data include it, so their GIRs cannot be generated without it. It is generated against the GLib GIR files that glib-introspection installs, which is why that port is independs.-D man=true— Build the manual pages of the commands withrst2man, from python3-docutils. It is upstream’s default, and with it a missingrst2manstops the configuration instead of leaving the pages out.-D tests=false,-D installed_tests=false— Build no test suite. Upstream builds and installs the test programs by default;installed_teststakes effect only whiletestsis on, and is named so that turning the tests on does not also put them in the package.
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/gdk-pixbuf, 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 gdk-pixbuf-2.44.8-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/gdk-pixbuf, and runs the triggers its paths call for.
Contents
Installed programs: gdk-pixbuf-csource, gdk-pixbuf-pixdata, gdk-pixbuf-query-loaders, gdk-pixbuf-thumbnailer.
Installed libraries: libgdk_pixbuf-2.0.so.
Installed directories: /usr/include/gdk-pixbuf-2.0, /usr/share/licenses/gdk-pixbuf.
Short descriptions
gdk-pixbuf-csource |
C code generation utility for GdkPixbuf images |
gdk-pixbuf-query-loaders |
GdkPixbuf loader registration utility |
gdk-pixbuf-2.0.pc |
Image loading and scaling |