244.2. gegl-0.4.72
Graph-based image processing framework, the engine under GIMP
| Version | 0.4.72, release 2 |
| Shelf | graphics-libs — 2D rendering, vector and SVG, text layout, colour management and graph drawing libraries |
| Phase | 43_toolkits (Toolkits), 157 of 344 in build order |
| Licence | LGPL-3.0-or-later AND GPL-3.0-or-later |
| Homepage | https://gegl.org/ |
| Build time | 1.6 SBU |
| Installed size | 11.1 MiB in 141 files |
| Recipe | ports/core/graphics-libs/gegl/kpkgbuild |
About
GEGL (Generic Graphics Library) is the graph-based image processing engine under gimp: an image operation is a node, and GIMP’s filters and tools are graphs of GEGL operations, working in high bit depth and in the pixel formats of babl. The port also installs the gegl command, which runs a graph from the command line.
Sources
gegl-0.4.72.tar.xz(6.0 MiB)
sha256ccbb8cdd1db56ecd4ece5dbabae0118ab2c46b5b3439c94f3cec467798ce956d
upstream: https://download.gimp.org/pub/gegl/0.4/gegl-0.4.72.tar.xz
archive copy: sources-2/graphics-libs--gegl-0.4.72.tar.xz
Dependencies
Depends on: meson, ninja, pkgconf, babl, glib, json-glib, libjpeg-turbo, libpng, libnsgif, gdk-pixbuf, gexiv2, lcms2, lensfun, libraw, librsvg, libtiff, openexr, cairo, pango, poppler, libwebp, gobject-introspection, glib-introspection, vala, suitesparse, libspiro.
Required by (1): gimp.
Optional, off in KDOS
These switches in build.sh turn off a feature whose library is a port here. The recipe may turn each off on purpose, or because the library was not yet a port when the recipe was written; this list cannot tell which.
-Dgraphviz=disabled, line 27: graphviz (explained with the switches below)-Djasper=disabled, line 28: jasper (explained with the switches below)-Dlibav=disabled, line 31: ffmpeg (explained with the switches below)-Dlua=disabled, line 38: lua (explained with the switches below)-Dpygobject=disabled, line 47: python3-gobject (explained with the switches below)-Dsdl3=disabled, line 50: sdl3
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/43_toolkits/phase.env && kpkg install gegl'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/graphics-libs/gegl.
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/gegl
echo 'ccbb8cdd1db56ecd4ece5dbabae0118ab2c46b5b3439c94f3cec467798ce956d gegl-0.4.72.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/gegl
SRC=$SRC_ROOT/gegl-0.4.72
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf gegl-0.4.72.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 \
--prefix=/usr --sysconfdir=/etc --libdir=lib \
--buildtype=release \
--wrap-mode=nodownload \
-Ddocs=false \
-Dgtk-doc=false \
-Dgi-docgen=disabled \
-Dworkshop=false \
-Dintrospection=true \
-Dvapigen=enabled \
-Dparallel-tests=false \
-Doperation-test=false \
-Drelocatable-bundle=no \
-Dgdk-pixbuf=enabled \
-Dgexiv2=enabled \
-Dgraphviz=disabled \
-Djasper=disabled \
-Dlcms=enabled \
-Dlensfun=enabled \
-Dlibav=disabled \
-Dlibraw=enabled \
-Dlibrsvg=enabled \
-Dlibspiro=enabled \
-Dlibtiff=enabled \
-Dlibv4l=disabled \
-Dlibv4l2=disabled \
-Dlua=disabled \
-Dmrg=disabled \
-Dmaxflow=disabled \
-Dopenexr=enabled \
-Dopenmp=enabled \
-Dcairo=enabled \
-Dpango=enabled \
-Dpangocairo=enabled \
-Dpoppler=enabled \
-Dpygobject=disabled \
-Dsdl1=disabled \
-Dsdl2=disabled \
-Dsdl3=disabled \
-Dumfpack=enabled \
-Dwebp=enabled
meson compile -C build
DESTDIR=$PKG meson install --no-rebuild -C build
test -e "$PKG/usr/lib/gegl-0.4/matting-levin.so"
readelf -d "$PKG/usr/bin/gegl" | grep -q 'NEEDED.*\[libspiro\.'
The switches, and why each is set:
--wrap-mode=nodownload— Never download a meson subproject. GEGL’s own source carries poly2tri-c and libnsgif undersubprojects/; nodownload still allows those copies. libnsgif is a port and is found first, and poly2tri-c, which is not, is built from its copy.-Dintrospection=true,-Dvapigen=enabled— GenerateGegl-0.4.girand its typelib, and the Vala bindings, for which vala is independs.-Drelocatable-bundle=no— Look for operations and data at the paths compiled in, not relative to the running program. Upstream’splatform-defaultgives the same on Linux.-Dgdk-pixbuf=enabled,-Dgexiv2=enabled,-Dlcms=enabled,-Dlensfun=enabled,-Dlibraw=enabled,-Dlibrsvg=enabled,-Dlibtiff=enabled,-Dopenexr=enabled,-Dcairo=enabled,-Dpango=enabled,-Dpangocairo=enabled,-Dpoppler=enabled,-Dwebp=enabled— Each optional library this build uses, namedenabledinstead of upstream’sauto, so a missing one stops the configure. They give the image loaders and savers (TIFF, OpenEXR, camera RAW, SVG, PDF, WebP), metadata through gexiv2, colour management through lcms2, lens correction through lensfun, and text rendering.-Dlibspiro=enabled— Spiro curves in thegeglcommand’s path drawing, through libspiro.-Dumfpack=enabled— Build thematting-levinoperation, which solves a sparse linear system through UMFPACK from suitesparse. GIMP’s foreground select offers it as one of its matting engines.-Dopenmp=enabled— Use OpenMP where GEGL’s code has it.-Dlibav=disabled— Build noff-loadandff-saveoperations, which read and write video through FFmpeg’s libraries. It is upstream’s default; with them the library would follow every ffmpeg release.-Djasper=disabled— No JPEG 2000 loader through JasPer.-Dlibv4l=disabled,-Dlibv4l2=disabled— No video-capture source operations.-Dlua=disabled,-Dmrg=disabled,-Dsdl1=disabled,-Dsdl2=disabled,-Dsdl3=disabled— No interactive viewer for thegeglcommand and no SDL display operations. mrg is not a port.-Dmaxflow=disabled— No operations built on the maxflow graph-cut library, which is not a port.-Dpygobject=disabled— No Python tests through PyGObject.-Dgraphviz=disabled— The option is declared inmeson_options.txtand read by nomeson.build; Graphviz’sdotis looked up only for the documentation, which is off.-Dworkshop=false— Build none of the experimental operations underoperations/workshop, upstream’s default.-Dparallel-tests=false,-Doperation-test=false— Settings for the test suite, which is not run here.
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/gegl, 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 gegl-0.4.72-2.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/gegl, and runs the triggers its paths call for.
Contents
Installed programs: gegl, gegl-imgcmp.
Installed libraries: libgegl-0.4.so, libgegl-npd-0.4.so, libgegl-sc-0.4.so.
Installed directories: /usr/include/gegl-0.4, /usr/lib/gegl-0.4, /usr/share/licenses/gegl.
Short descriptions
gegl-0.4.pc |
Generic Graphics Library |
gegl-sc-0.4.pc |
Seamless Cloning Library Based on GEGL |
Notes
After the install, build.sh checks that matting-levin.so is in the package and that the gegl program links libspiro, and fails the build when either is missing.