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

307.1. blender-5.2.2

Blender: 3D modelling, sculpting, animation, rendering (Cycles, EEVEE), compositing and video editing

The build-state snapshot was taken from 5.2.2-2; this recipe is 5.2.2-3, so the size, time and contents below describe the earlier build.

Version 5.2.2, release 3
Shelf 3d — 3D modelling, animation, voxel and mesh tools and libraries, and scientific visualisation
Phase 44_apps (Applications), 1 of 422 in build order
Licence GPL-2.0-or-later
Homepage https://www.blender.org/
Build time 93.9 SBU
Installed size 177.9 MiB in 2207 files
Recipe ports/core/3d/blender/kpkgbuild

About

Blender is a 3D suite: modelling, sculpting, animation, simulation, rendering with Cycles and EEVEE, compositing, motion tracking and video editing, scripted in Python. This port builds it against the tree’s libraries and the system Python, as an ordinary install under /usr rather than upstream’s self-contained portable directory. Cycles renders on the CPU; EEVEE and the viewport draw with OpenGL or Vulkan.

Sources

Dependencies

Depends on: cmake, ninja, pkgconf, python3, numpy, python3-zstandard, python3-requests, python3-urllib3, python3-attrs, python3-cattrs, eigen, ceres-solver, abseil-cpp, onetbb, opencolorio, openimageio, openexr, imath, opensubdiv, openvdb, c-blosc, alembic, libharu, potrace, pugixml, fmt, gmp, manifold, fftw, ffmpeg, libsndfile, openal-soft, libpulse, pipewire, rubberband, libjpeg-turbo, libpng, zlib, zstd, libwebp, openjpeg, libtiff, freetype2, brotli, libepoxy, shaderc, vulkan-headers, vulkan-loader, wayland, wayland-protocols, libxkbcommon, libX11, libXi, libXfixes, libXrender, libglvnd, mesa, librsvg, draco, libspnav, oidn, embree, meshoptimizer.

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.

Patches

build.sh applies these; kpkg applies nothing by itself.

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 blender'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/3d/blender.

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/3d/blender
echo '56a3b1ec97479ff24dce65d2f09f8a1895005cece279b701fe4fcf74bce3f77e  blender-5.2.2.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/blender
SRC=$SRC_ROOT/blender-5.2.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf blender-5.2.2.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:

patch -p1 -i "$PORT_SRC/0001-musl-fixes.patch"
patch -p1 -i "$PORT_SRC/0002-fix-includes.patch"
patch -p1 -i "$PORT_SRC/0004-dont-poison-off_t.patch"

patch -p1 -i "$PORT_SRC/ffmpeg9-audaspace.patch"

_py=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])')

mkdir build && cd build
cmake .. -G Ninja -Wno-dev \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DWITH_STRICT_BUILD_OPTIONS=ON \
	-DWITH_LIBS_PRECOMPILED=OFF \
	-DWITH_STATIC_LIBS=OFF \
	-DWITH_INSTALL_PORTABLE=OFF \
	-DWITH_CPU_CHECK=OFF \
	-DWITH_PYTHON_INSTALL=OFF \
	-DWITH_PYTHON_INSTALL_NUMPY=OFF \
	-DWITH_PYTHON_INSTALL_REQUESTS=OFF \
	-DWITH_PYTHON_INSTALL_ZSTANDARD=OFF \
	-DWITH_PYTHON_MODULE=OFF \
	-DWITH_PYTHON_NUMPY=ON \
	-DWITH_PYTHON_SECURITY=ON \
	-DPYTHON_VERSION="$_py" \
	-DWITH_BUILDINFO=OFF \
	-DWITH_INTERNATIONAL=OFF \
	-DWITH_DOC_MANPAGE=ON \
	-DWITH_BLENDER_THUMBNAILER=ON \
	-DWITH_GTESTS=OFF \
	-DWITH_LINKER_LLD=OFF \
	-DWITH_LINKER_MOLD=OFF \
	-DWITH_COMPILER_CCACHE=OFF \
	-DWITH_HEADLESS=OFF \
	-DWITH_GHOST_WAYLAND=ON \
	-DWITH_GHOST_WAYLAND_DYNLOAD=OFF \
	-DWITH_GHOST_CSD=ON \
	-DWITH_GHOST_X11=ON \
	-DWITH_GHOST_XDND=ON \
	-DWITH_X11_XINPUT=ON \
	-DWITH_X11_XFIXES=ON \
	-DWITH_GHOST_SDL=OFF \
	-DWITH_INPUT_IME=ON \
	-DWITH_INPUT_NDOF=ON \
	-DWITH_OPENGL_BACKEND=ON \
	-DWITH_VULKAN_BACKEND=ON \
	-DWITH_SYSTEM_FREETYPE=ON \
	-DWITH_HARFBUZZ=OFF \
	-DWITH_FRIBIDI=OFF \
	-DWITH_SYSTEM_GLOG=OFF \
	-DWITH_SYSTEM_GFLAGS=OFF \
	-DWITH_SYSTEM_BULLET=OFF \
	-DWITH_SYSTEM_AUDASPACE=OFF \
	-DWITH_AUDASPACE=ON \
	-DWITH_RUBBERBAND=ON \
	-DWITH_OPENAL=ON \
	-DWITH_PULSEAUDIO=ON \
	-DWITH_PULSEAUDIO_DYNLOAD=OFF \
	-DWITH_PIPEWIRE=ON \
	-DWITH_PIPEWIRE_DYNLOAD=OFF \
	-DWITH_JACK=OFF \
	-DWITH_SDL_AUDIO=OFF \
	-DWITH_CODEC_FFMPEG=ON \
	-DWITH_CODEC_SNDFILE=ON \
	-DWITH_FFTW3=ON \
	-DWITH_IMAGE_OPENJPEG=ON \
	-DWITH_IMAGE_WEBP=ON \
	-DWITH_IMAGE_CINEON=ON \
	-DWITH_OPENSUBDIV=ON \
	-DWITH_OPENVDB=ON \
	-DWITH_OPENVDB_BLOSC=ON \
	-DWITH_NANOVDB=ON \
	-DWITH_ALEMBIC=ON \
	-DWITH_HARU=ON \
	-DWITH_POTRACE=ON \
	-DWITH_PUGIXML=ON \
	-DWITH_GMP=ON \
	-DWITH_MANIFOLD=ON \
	-DWITH_TBB=ON \
	-DWITH_TBB_MALLOC_PROXY=OFF \
	-DWITH_LIBMV=ON \
	-DWITH_USD=OFF \
	-DWITH_MATERIALX=OFF \
	-DWITH_HYDRA=OFF \
	-DWITH_XR_OPENXR=OFF \
	-DWITH_OPENIMAGEDENOISE=ON \
	-DWITH_DRACO=ON \
	-DWITH_MESHOPTIMIZER=ON \
	-DWITH_CYCLES=ON \
	-DWITH_CYCLES_EMBREE=ON \
	-DWITH_CYCLES_OSL=OFF \
	-DWITH_CYCLES_PATH_GUIDING=OFF \
	-DWITH_CYCLES_DEVICE_CUDA=OFF \
	-DWITH_CYCLES_DEVICE_OPTIX=OFF \
	-DWITH_CYCLES_DEVICE_HIP=OFF \
	-DWITH_CYCLES_DEVICE_HIPRT=OFF \
	-DWITH_CYCLES_DEVICE_ONEAPI=OFF \
	-DWITH_CYCLES_CUDA_BINARIES=OFF \
	-DWITH_CYCLES_HIP_BINARIES=OFF \
	-DWITH_LLVM=OFF \
	-DWITH_CLANG=OFF \
	-DWITH_TRACY=OFF \
	-DWITH_RENDERDOC=OFF
ninja
DESTDIR=$PKG ninja install

rm -rf "$PKG/usr/share/icons/hicolor/scalable"
install -d "$PKG/usr/share/icons/hicolor/256x256/apps"
rsvg-convert -w 256 -h 256 ../release/freedesktop/icons/scalable/apps/blender.svg \
	-o "$PKG/usr/share/icons/hicolor/256x256/apps/blender.png"
rm -f "$PKG/usr/share/applications/blender.desktop"
cat > "$PKG/usr/share/applications/blender.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Blender
GenericName=3D Modeller
Comment=3D modelling, animation, rendering, compositing and video editing
Exec=blender --offline-mode %f
Icon=blender
Terminal=false
StartupWMClass=blender
PrefersNonDefaultGPU=true
Categories=Graphics;3DGraphics;
MimeType=application/x-blender;
Keywords=3d;cg;modeling;modelling;animation;sculpting;texturing;rendering;cycles;eevee;video editing;motion tracking;
DESKTOP
chmod 644 "$PKG/usr/share/applications/blender.desktop"

The switches, and why each is set:

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/blender, 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 blender-5.2.2-3.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/blender, and runs the triggers its paths call for.

Contents

Installed programs: blender, blender-thumbnailer.

Installed directories: /usr/lib/blender, /usr/share/blender, /usr/share/doc/blender, /usr/share/licenses/blender.

Short descriptions

blender a full-featured 3D application

Notes

The three numbered patches are Alpine’s musl fixes, each with its header: the bundled glog claims <execinfo.h>, which musl does not have; one header uses uint64_t without including <cstdint>; and readfile.hh poisons off_t, which musl’s own headers use after it.

build.sh rasterises the scalable icon to 256 by 256 with rsvg-convert and removes the SVG. It replaces upstream’s desktop entry, whose StartupWMClass=Blender does not match blender, the app_id GHOST gives its Wayland windows, with one that carries StartupWMClass=blender and starts blender --offline-mode. That switch disallows internet access for the run whatever Blender’s “Allow Online Access” preference holds, and leaves the preference itself as it is, so the extensions platform offers nothing that needs the network.

The Extensions platform and the remote asset libraries (bl_pkg, registered at every start whatever --offline-mode says) import cattrs, attrs, requests and urllib3 from _bpy_internal. With -DWITH_PYTHON_INSTALL_REQUESTS=OFF none is bundled, so all four are ports in depends (python3-cattrs, python3-attrs, python3-requests, python3-urllib3); without them the add-on fails to register at start.