306.5. rawtherapee-5.13
RAW photo developer with non-destructive, per-image processing profiles
| Version | 5.13, release 2 |
| Shelf | graphics — Graphics applications: painting, vector, photo development and management, image viewers, screenshot and image optimisers |
| Phase | 44_apps (Applications), 225 of 422 in build order |
| Licence | GPL-3.0-or-later |
| Homepage | https://rawtherapee.com/ |
| Build time | 50.7 SBU |
| Installed size | 120.0 MiB in 619 files |
| Recipe | ports/core/graphics/rawtherapee/kpkgbuild |
About
RawTherapee is a raw photo developer: it turns a camera’s raw file into a finished image through a long chain of demosaicing, exposure, colour, sharpening and lens-correction tools, and keeps the settings for each image in a .pp3 processing profile beside it rather than changing the file. The port builds its GTK 3 interface, rawtherapee, and rawtherapee-cli, which applies profiles to files from a shell.
Sources
rawtherapee-5.13.tar.xz(18.2 MiB)
sha25623bdff4b1817e1274c11a94b11d21cac59e9c1b1d209795d3194710ee73e77bf
upstream: https://github.com/RawTherapee/RawTherapee/releases/download/5.13/rawtherapee-5.13.tar.xz
archive copy: sources-2/graphics--rawtherapee-5.13.tar.xz
Dependencies
Depends on: cmake, ninja, pkgconf, gtk3, gtkmm3, glibmm2.66, cairomm1.14, libsigc++2, glib, exiv2, expat, libiptcdata, librsvg, lcms2, lensfun, fftw, libraw, fmt, libcanberra, libjxl, libjpeg-turbo, libpng, libtiff, zlib.
Required by: no port names it.
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 rawtherapee'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/graphics/rawtherapee.
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/rawtherapee
echo '23bdff4b1817e1274c11a94b11d21cac59e9c1b1d209795d3194710ee73e77bf rawtherapee-5.13.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/rawtherapee
SRC=$SRC_ROOT/rawtherapee-5.13
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf rawtherapee-5.13.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:
cmake -S . -B build -G Ninja \
-D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_INSTALL_LIBDIR=lib \
-D CMAKE_BUILD_TYPE=Release \
-D CACHE_NAME_SUFFIX="" \
-D BUILD_BUNDLE=OFF \
-D BUILD_SHARED=OFF \
-D PROC_TARGET_NUMBER=0 \
-D OPTION_OMP=ON \
-D WITH_LTO=OFF \
-D WITH_SYSTEM_FMT=ON \
-D WITH_SYSTEM_LIBRAW=ON \
-D WITH_SYSTEM_KLT=OFF \
-D WITH_SIMDE=OFF \
-D WITH_JXL=ON \
-D SVG_BACKEND=librsvg \
-D USE_LIBCANBERRA=ON \
-D WARNINGS_AS_ERRORS=OFF \
-D ENABLE_TCMALLOC=OFF \
-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build
find "$PKG/usr/share/rawtherapee/languages" -type f ! -name default \
! -name 'English (UK)' ! -name 'English (US)' ! -name LICENSE ! -name README \
-exec rm -f {} +
cat > "$PKG/usr/share/applications/rawtherapee.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=RawTherapee
GenericName=Raw Photo Editor
Comment=An advanced raw photo development program
TryExec=rawtherapee
Exec=rawtherapee %f
Icon=rawtherapee
Terminal=false
StartupNotify=true
StartupWMClass=rawtherapee
MimeType=image/jpeg;image/png;image/tiff;image/x-adobe-dng;image/x-canon-cr2;image/x-canon-cr3;image/x-canon-crf;image/x-canon-crw;image/x-fuji-raf;image/x-hasselblad-3fr;image/x-hasselblad-fff;image/x-jpg;image/x-kodak-dcr;image/x-kodak-k25;image/x-kodak-kdc;image/x-leaf-mos;image/x-leica-rwl;image/x-mamiya-mef;image/x-minolta-mrw;image/x-nikon-nef;image/x-nikon-nrw;image/x-olympus-orf;image/x-panasonic-raw;image/x-panasonic-rw2;image/x-pentax-pef;image/x-pentax-raw;image/x-phaseone-iiq;image/x-raw;image/x-rwz;image/x-samsung-srw;image/x-sigma-x3f;image/x-sony-arq;image/x-sony-arw;image/x-sony-sr2;image/x-sony-srf;image/x-tif;
Categories=Graphics;Photography;2DGraphics;RasterGraphics;GTK;
Keywords=raw;photo;photography;develop;pp3;graphics;rawtherapee;
DESKTOP
chmod 644 "$PKG/usr/share/applications/rawtherapee.desktop"
The switches, and why each is set:
-D WITH_SYSTEM_FMT=ON— Uses the tree’s fmt. Left at its default,cmake/Dependencies.cmakeclones fmt from GitHub withFetchContentat configure time, which the build has no network for.-D WITH_SYSTEM_LIBRAW=ON— Uses the tree’s libraw instead of building the copy in the tarball.-D WITH_SYSTEM_KLT=OFF— Builds the KLT feature tracker inrtengine/klt, which is not a port; upstream’s default, named.-D PROC_TARGET_NUMBER=0— Adds no-marchor-mtuneof its own, so the package runs on every x86-64 processor; upstream’s default, named.-D CACHE_NAME_SUFFIX=""— The settings and cache live in~/.config/RawTherapeeand~/.cache/RawTherapee, with no version suffix; upstream’s default, named.-D BUILD_BUNDLE=OFF— An ordinary install under the prefix, with absolute data paths, rather than a relocatable bundle.-D BUILD_SHARED=OFF— Upstream’s default, named. The option is declared in the top-levelCMakeLists.txt, and nothing else in the Linux build reads it.-D OPTION_OMP=ON— Threads through OpenMP; upstream’s default, named.-D WITH_LTO=OFF,-D WITH_SIMDE=OFF,-D WARNINGS_AS_ERRORS=OFF,-D ENABLE_TCMALLOC=OFF— Upstream’s defaults, named: no link-time optimisation, no SIMD Everywhere portability layer, warnings left as warnings, and the C library’s allocator rather than tcmalloc.-D WITH_JXL=ON— JPEG XL through libjxl. Upstream’sAUTOwould quietly leave it out when the library is missing; namedON, configure stops instead.-D SVG_BACKEND=librsvg— Draws the interface’s SVG icons through librsvg rather than the alternative, lunasvg; upstream’s default, named.-D USE_LIBCANBERRA=ON— Plays a sound through libcanberra when the batch queue finishes or a long edit completes; upstream’s default on Linux, named.
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/rawtherapee, 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 rawtherapee-5.13-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/rawtherapee, and runs the triggers its paths call for.
Contents
Installed programs: rawtherapee, rawtherapee-cli.
Installed directories: /usr/share/doc/rawtherapee, /usr/share/licenses/rawtherapee, /usr/share/rawtherapee.
Short descriptions
rawtherapee |
An advanced, cross-platform program for developing raw photos. |
Notes
RawTherapee keeps its interface languages as plain text files in /usr/share/rawtherapee/languages, which kpkg’s language rule does not match. The find after the install removes all of them except default, the built-in English, the two English variants beside it, and the directory’s LICENSE and README.
Upstream’s desktop entry claims inode/directory, so a folder could open in RawTherapee instead of the file manager. It is replaced by one without that type, keeping the image and raw types and StartupWMClass=rawtherapee, the Wayland app_id GTK 3 takes from the program’s name. The hicolor PNG icons it names are upstream’s.