306.17. gimp-3.2.6
GNU Image Manipulation Program — raster image editor and photo retoucher
| Version | 3.2.6, release 2 |
| Shelf | graphics — Graphics applications: painting, vector, photo development and management, image viewers, screenshot and image optimisers |
| Phase | 44_apps (Applications), 237 of 422 in build order |
| Licence | GPL-3.0-or-later AND LGPL-3.0-or-later |
| Homepage | https://www.gimp.org/ |
| Build time | 3.5 SBU |
| Installed size | 59.9 MiB in 2245 files |
| Recipe | ports/core/graphics/gimp/kpkgbuild |
About
GIMP is the GNU Image Manipulation Program: a raster editor for photo retouching, painting, compositing and image format conversion, built on babl and gegl and drawn with GTK 3. It is built with its Python plug-ins, and F1 opens the local manual that gimp-help installs under /usr/share/gimp/3.0/help.
Sources
gimp-3.2.6.tar.xz(33.4 MiB)
sha25640b15e90ad0c0c631b76da3c467ea9847fa5c24f37413ac5b492804860a28cd8
upstream: https://download.gimp.org/pub/gimp/v3.2/gimp-3.2.6.tar.xz
archive copy: sources-2/graphics--gimp-3.2.6.tar.xz
Dependencies
Depends on: meson, ninja, pkgconf, perl, python3, python3-gobject, python3-cairo, gobject-introspection, glib, glib-introspection, gettext, libxslt, shared-mime-info, iso-codes, gtk3, at-spi2-core, cairo, pango, harfbuzz, fontconfig, freetype2, gdk-pixbuf, librsvg, babl, gegl, gexiv2, exiv2, json-glib, lcms2, libmypaint, mypaint-brushes, appstream, libarchive, libunwind-nongnu, libX11, libXmu, libXext, libXfixes, libXcursor, libXpm, zlib, bzip2, xz, libpng, libjpeg-turbo, libtiff, libwebp, libheif, libjxl, openjpeg, openexr, poppler, poppler-data, ghostscript, cfitsio, aalib, alsa-lib, libgudev, xdg-utils, bash-completion, gimp-help.
Required by: no port names it.
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.
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/44_apps/phase.env && kpkg install gimp'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/graphics/gimp.
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/gimp
echo '40b15e90ad0c0c631b76da3c467ea9847fa5c24f37413ac5b492804860a28cd8 gimp-3.2.6.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/gimp
SRC=$SRC_ROOT/gimp-3.2.6
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf gimp-3.2.6.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:
export LDFLAGS="$LDFLAGS -Wl,-z,stack-size=8388608"
meson setup build \
--prefix=/usr --sysconfdir=/etc --libdir=lib \
--buildtype=release \
--wrap-mode=nodownload \
-Dcheck-update=no \
-Drelocatable-bundle=no \
-Denable-console-bin=true \
-Denable-default-bin=enabled \
-Denable-multiproc=true \
-Dbash-completion=enabled \
-Daa=enabled \
-Dalsa=enabled \
-Dappdata-test=disabled \
-Dcairo-pdf=enabled \
-Dfits=enabled \
-Dghostscript=enabled \
-Dgudev=enabled \
-Dheif=enabled \
-Dilbm=disabled \
-Djpeg2000=enabled \
-Djpeg-xl=enabled \
-Dmng=disabled \
-Dopenexr=enabled \
-Dopenmp=enabled \
-Dprint=true \
-Dwebkit-unmaintained=false \
-Dtwain-unmaintained=false \
-Dwebp=enabled \
-Dwmf=disabled \
-Dxcursor=enabled \
-Dxpm=enabled \
-Dheadless-tests=disabled \
-Dfile-plug-ins-test=false \
-Dgi-docgen=disabled \
-Dlinux-input=enabled \
-Dvector-icons=true \
-Dvala=disabled \
-Djavascript=disabled \
-Dlua=false \
-Dlibunwind=true \
-Dlibbacktrace=false
meson compile -C build
DESTDIR=$PKG meson install --no-rebuild -C build
The switches, and why each is set:
-Wl,-z,stack-size=8388608, added toLDFLAGS— ask for an 8 MiB stack in thePT_GNU_STACKheader of every executable the build links:gimp-3.2,gimp-console-3.2and each C plug-in executable. The Python plug-ins run underpython3and get its header, not this one. 8 MiB is the size a thread gets by default on glibc, which GIMP and its plug-ins are written for, and musl’s ceiling for the default. musl gives each new thread the largestPT_GNU_STACKsize among the executable and the libraries loaded with it, and 128 KiB when none asks for more. GIMP’sasyncworker thread allocates about 256 KiB on its stack while it converts an image’s colour profile, so without the flag, opening any image with an embedded profile crashes GIMP, whether the profile is kept or converted. The executables’ 8 MiB covers the worker threads of babl and gegl as well, so those libraries need no flag of their own.-Dcheck-update=no— Never ask gimp.org for a newer release at start-up.-Drelocatable-bundle=no— Use the build-time paths, not paths relative to the executable. This is whatplatform-defaultresolves to off Windows and macOS, written out.-Denable-default-bin=enabled— Install unversioned links, such asgimp, to the versioned executables, so the plain name starts the program.-Daa=enabled— Each of these features is turned fromautointoenabled, and its library is independs, so a missing library failsmeson setupinstead of quietly dropping a loader or a controller:-Daa(the ASCII-art exporter, through aalib),-Dalsaand-Dgudev(the MIDI and input-device controllers),-Dcairo-pdf,-Dfits,-Dghostscript(the PostScript loader, through libgs),-Dheif,-Djpeg2000,-Djpeg-xl,-Dopenexr,-Dopenmp,-Dwebp,-Dxcursorand-Dxpm(the X cursor and XPM file plug-ins),-Dlinux-input(the evdev controller) and-Dbash-completion.-Dilbm=disabled— No Amiga IFF plug-in: libilbm is not a port.-Dmng=disabledand-Dwmf=disabledleave out the MNG and WMF plug-ins for the same reason (libmng and libwmf).-Dappdata-test=disabled— Do not validate the AppStream file withappstreamcliduring the build.-Dheadless-tests=disabled— Do not requirexvfb-runanddbus-run-session, which run the interface tests headless.xvfb-runstarts Xvfb, an X server from the Xorg server package, which the tree does not carry (principles).-Dgi-docgen=disabled— Build no developer API documentation; gi-docgen is not a port.-Dwebkit-unmaintained=false— Upstream’s default: no WebKit help browser. The help opens in the web browser instead.-Dtwain-unmaintained=false, the 32-bit TWAIN scanner plug-in, is off by default too.-Dvala=disabled— Build neither the Vala API files nor the Vala plug-ins.-Djavascript=disabled— No JavaScript plug-ins: they run under gjs, which is not a port.-Dlua=false, upstream’s default, likewise leaves out the Lua plug-ins, which need lua-lgi.-Dlibunwind=true— Stack traces in the debug dialog, and symbol names in the Dashboard’s sampled backtraces, through libunwind-nongnu, which installs thelibunwind.pcthe setup looks for; LLVM’s libunwind installs none.-Dlibbacktrace=false— libbacktrace is not a port. Without it the Dashboard’s backtraces have no source file and line information, whichmeson setupreports as “partially detailed”.
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/gimp, 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 gimp-3.2.6-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/gimp, and runs the triggers its paths call for.
Contents
Installed programs: gimp, gimp-3, gimp-3.2, gimp-console, gimp-console-3, gimp-console-3.2, gimp-script-fu-interpreter-3.0, gimp-test-clipboard, gimp-test-clipboard-3, gimp-test-clipboard-3.2, gimptool, gimptool-3, gimptool-3.2.
Installed libraries: libgimp-3.0.so, libgimp-scriptfu-3.0.so, libgimpbase-3.0.so, libgimpcolor-3.0.so, libgimpconfig-3.0.so, libgimpmath-3.0.so, libgimpmodule-3.0.so, libgimpthumb-3.0.so, libgimpui-3.0.so, libgimpwidgets-3.0.so.
Installed directories: /etc/gimp, /usr/include/gimp-3.0, /usr/lib/gimp, /usr/share/gimp/3.0/brushes, /usr/share/gimp/3.0/dynamics, /usr/share/gimp/3.0/file-raw, /usr/share/gimp/3.0/fonts, /usr/share/gimp/3.0/fractalexplorer, /usr/share/gimp/3.0/gfig, /usr/share/gimp/3.0/gflare, /usr/share/gimp/3.0/gimpressionist, /usr/share/gimp/3.0/gradients, /usr/share/gimp/3.0/icons, /usr/share/gimp/3.0/images, /usr/share/gimp/3.0/menus, /usr/share/gimp/3.0/palettes, /usr/share/gimp/3.0/patterns, /usr/share/gimp/3.0/scripts, /usr/share/gimp/3.0/tags, /usr/share/gimp/3.0/themes, /usr/share/gimp/3.0/tips, /usr/share/gimp/3.0/tool-presets, /usr/share/licenses/gimp.
Short descriptions
gimp-3.2 |
an image manipulation and paint program. |
gimp-console-3.2 |
an image manipulation and paint program. |
gimptool-3.2 |
script to perform various GIMPy functions |
gimp-3.0.pc |
GIMP Library |
gimpthumb-3.0.pc |
GIMP Thumbnail Library |
gimpui-3.0.pc |
GIMP User Interface Library |
Notes
The X11 libraries in depends (libXmu, libXext, libXfixes, libXcursor, libXpm) are needed because gtk3 is built with its X11 backend: GIMP then links them for picking windows under X11, and the cursor and XPM plug-ins are built from them.
meson has no switch for the message catalogues. They are built and then removed by the language policy, and GIMP shows its English source strings.