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

118.13. openexr-3.5.0

High dynamic range image format library

3.5.0-1 · BSD-3-Clause · 2.3 SBU · 5.7 MiB, 198 files · 41_system, 687 of 1047 · ports/core/image-libs/openexr

Homepage: https://openexr.com/

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

ffmpeg and imagemagick are configured against these and are only as capable as what is installed: each build system answers a missing library by disabling the feature rather than failing.

OpenEXR is the high-dynamic-range image format of film and 3D rendering, as a library (libOpenEXR, libOpenEXRCore, libOpenEXRUtil, libIex, libIlmThread) and a set of exr* tools (exrheader, exrinfo, exrmaketiled, exrmultipart and others). blender, gimp, krita, darktable, imagemagick, opencv and libjxl link it. imath is its maths library.

Depends on: cmake, imath, libdeflate, zstd, help2man.

Required by (16): blender, darktable, gdal, gegl, gimp, gst-plugins-bad, imagemagick, kimageformats, kio-extras, krita, libjxl, libvips, opencolorio, opencv, openimageio, swayimg.

Sources: openexr-3.5.0.tar.gz (25.2 MiB). Every step kpkg takes applies to this port.

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

build.sh:

mkdir -p build && cd build
cmake .. \
	-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DCMAKE_INSTALL_LIBDIR=lib \
	-DBUILD_SHARED_LIBS=ON \
	-DBUILD_TESTING=OFF \
	-DOPENEXR_BUILD_TOOLS=ON \
	-DOPENEXR_BUILD_EXAMPLES=OFF
make
cmake -DOPENEXR_INSTALL_DOCS=ON .
make
make DESTDIR=$PKG install

rm "$PKG/usr/share/man/man1/exrcheck.1"

Programs: exr2aces, exrenvmap, exrheader, exrinfo, exrmakepreview, exrmaketiled, exrmanifest, exrmetrics, exrmultipart, exrmultiview, exrstdattr.

Libraries: libIex-3_5.so, libIex.so, libIlmThread-3_5.so, libIlmThread.so, libOpenEXR-3_5.so, libOpenEXR.so, libOpenEXRCore-3_5.so, libOpenEXRCore.so, libOpenEXRUtil-3_5.so, libOpenEXRUtil.so.

Directories: /usr/include/OpenEXR, /usr/lib/cmake/OpenEXR, /usr/share/licenses/openexr.

The build runs twice. The rules that generate the manual pages name each tool by its path in the build tree, not as a CMake target, so nothing orders them after the programs they read. build.sh therefore builds everything first, then reconfigures the same tree with -DOPENEXR_INSTALL_DOCS=ON and builds again, when the programs already exist.

exrcheck is built but not installed: upstream installs it only with OPENEXR_INSTALL_DEVELOPER_TOOLS, which is off by default and not set here. Its manual page is still generated from the binary in the build tree and installed with the others, so build.sh removes exrcheck.1 after the install: kept, it would document a program the package does not contain.

OpenJPH, the High-Throughput JPEG 2000 codec OpenEXR uses for its HTJ2K compression, is not a port. When it is not found, OpenEXR compiles the copy it carries in external/OpenJPH into libOpenEXRCore, and it does so here.