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

118.19. libraw-0.22.2

Camera raw file decoding library

0.22.2-1 · LGPL-2.1-only OR CDDL-1.0 · 0.7 SBU · 3.1 MiB, 22 files · 41_system, 698 of 1047 · ports/core/image-libs/libraw

Homepage: https://www.libraw.org/

Why it is in KDOS. The comment above it in script/phases/41_system/packages.d/image-libs.txt:

The JPEG beside a raw file is a lossy preview the camera made — an archive of raws with no decoder is one nobody can open in ten years.

LibRaw decodes camera raw files: CR3, NEF, ARW, DNG and the other formats a camera writes before any processing. The JPEG a camera writes beside a raw file is a lossy preview it made itself; LibRaw is what gets the picture out of the raw one. darktable, rawtherapee, gthumb, imagemagick, libvips, openimageio, gegl and KDE’s libkdcraw link it.

Depends on: gcc, autoconf, automake, libtool, pkgconf, libjpeg-turbo, lcms2, zlib.

Required by (10): darktable, gegl, gthumb, imagemagick, kimageformats, libkdcraw, libvips, openimageio, rawtherapee, swayimg.

Sources: libraw-0.22.2.tar.gz (595.9 KiB). Every step kpkg takes applies to this port.

Install: script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install libraw'

build.sh:

autoreconf -f -i

export CFLAGS="${CFLAGS/-O2/-O3}" CXXFLAGS="${CXXFLAGS/-O2/-O3}"

./configure \
	--prefix=/usr \
	--libdir=/usr/lib \
	--disable-static \
	--disable-examples \
	--enable-openmp \
	--enable-jpeg \
	--enable-lcms \
	--enable-zlib
make
make DESTDIR=$PKG install
grep -q -- -fopenmp "$PKG"/usr/lib/pkgconfig/libraw.pc

Libraries: libraw.so, libraw_r.so.

Directories: /usr/include/libraw, /usr/share/doc/libraw, /usr/share/licenses/libraw.

The configure probe for OpenMP drops it without an error when the compiler refuses -fopenmp, so build.sh checks after the install that -fopenmp is in libraw.pc, the flag the probe adds there when it succeeds.

The source is the GitHub tag archive, which carries no generated configure script, so build.sh runs autoreconf -f -i first; autoconf, automake and libtool are dependencies for that.