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
blender-5.2.2.tar.xz(89.3 MiB)
sha25656a3b1ec97479ff24dce65d2f09f8a1895005cece279b701fe4fcf74bce3f77e
upstream: https://download.blender.org/source/blender-5.2.2.tar.xz
archive copy: sources-1/3d--blender-5.2.2.tar.xz
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.
-DWITH_HARFBUZZ=OFF, line 59: harfbuzz (explained with the switches below)-DWITH_FRIBIDI=OFF, line 60: fribidi-DWITH_LLVM=OFF, line 111: llvm (explained with the switches below)-DWITH_CLANG=OFF, line 112: clang
Patches
build.sh applies these; kpkg applies nothing by itself.
0001-musl-fixes.patch— musl fixes0002-fix-includes.patch— fix includes0004-dont-poison-off_t.patch— dont poison off_tffmpeg9-audaspace.patch— the bundled Audaspace’s FFmpeg writer readsAVCodec’ssample_fmtsandsupported_samplerates, fields the tree’s FFmpeg does not have. The patch asksavcodec_get_supported_configfor both, as Blender’s own movie writer does; a null list means the encoder accepts any format or rate.
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:
-DWITH_STRICT_BUILD_OPTIONS=ON— when a feature namedONlacks its library, stop configure instead of switching the feature off, so everyONin the list is a feature the package has. Every feature that needs a library the tree does not carry is namedOFF.-DWITH_LIBS_PRECOMPILED=OFF— with-DWITH_STATIC_LIBS=OFFand-DWITH_INSTALL_PORTABLE=OFF: use the installed libraries rather than Blender’s precompiled set underlib/linux_x64in the source tree, link them shared, and install into/usrinstead of a redistributable directory with its own runtime.-DWITH_CPU_CHECK=OFF— no start-up processor check. It is a library only a portable install ships, and with strict options configure stops when it is left on.-DWITH_PYTHON_INSTALL=OFF— with-DWITH_PYTHON_INSTALL_NUMPY=OFF,-DWITH_PYTHON_INSTALL_REQUESTS=OFFand-DWITH_PYTHON_INSTALL_ZSTANDARD=OFF: Blender runs on the system Python and bundles none of its modules. NumPy and zstandard are the ports’ (numpy, python3-zstandard); zstandard is how Python scripts such asblend_render_inforead a zstd-compressed.blend, and Blender’s own loader does not need it.-DPYTHON_VERSION— the Python version, read from the interpreter, so CMake looks for that version’s headers and library.-DWITH_PYTHON_SECURITY=ON— scripts inside a.blendfile do not run unless the user allows them. Upstream’s default, named.-DWITH_BUILDINFO=OFF— keep the build date and git hash out of the binary.-DWITH_DOC_MANPAGE=ON— with-DWITH_BLENDER_THUMBNAILER=ON: the manual page, andblender-thumbnailer, which file managers run to extract the preview image from a.blend.-DWITH_GHOST_WAYLAND=ON— with-DWITH_GHOST_X11=ON,-DWITH_GHOST_CSD=ON,-DWITH_GHOST_XDND=ON,-DWITH_X11_XINPUT=ONand-DWITH_X11_XFIXES=ON: GHOST, Blender’s windowing layer, is built for Wayland, with its own window decorations, and for X11, and tries Wayland first.-DWITH_GHOST_WAYLAND_DYNLOAD=OFF— with-DWITH_PULSEAUDIO_DYNLOAD=OFFand-DWITH_PIPEWIRE_DYNLOAD=OFF: link the Wayland, PulseAudio and PipeWire libraries instead of opening them at run time, so the ELF names what the package needs.-DWITH_PIPEWIRE=ON— with-DWITH_PULSEAUDIO=ONand-DWITH_OPENAL=ON: the audio outputs.-DWITH_JACK=OFFand-DWITH_SDL_AUDIO=OFFleave out the other two.-DWITH_GHOST_SDL=OFF— no SDL windowing in place of the native backends. Upstream’s default, named.-DWITH_INPUT_NDOF=ON— 3D mice and other six-degree-of-freedom devices, through libspnav.-DWITH_SYSTEM_GLOG=OFF— with-DWITH_SYSTEM_GFLAGS=OFF: use Blender’s bundled glog and gflags (the defaults, named), although the tree has glog and gflags: libmv includes glog’s headers with none of the definitions glog’s CMake target supplies, and the bundled pair is the one Blender tests with.-DWITH_SYSTEM_BULLET=OFF— with-DWITH_SYSTEM_AUDASPACE=OFF: the bundled Bullet physics and Audaspace audio libraries. Upstream marks a system Bullet unsupported, a system Audaspace cannot be combined with-DWITH_RUBBERBAND=ON, and neither library is a port.-DWITH_HARFBUZZ=OFF— with-DWITH_FRIBIDI=OFF: text layout without HarfBuzz and FriBidi. Upstream’s default, named.-DWITH_INTERNATIONAL=OFF— no translations of the interface.-DWITH_CYCLES_EMBREE=ON— with-DWITH_OPENIMAGEDENOISE=ON: Cycles traces rays with Embree and denoises with OpenImageDenoise.-DWITH_DRACO=ON— with-DWITH_MESHOPTIMIZER=ON: glTF mesh compression, through draco and meshoptimizer.-DWITH_CYCLES_OSL=OFF— no Open Shading Language in Cycles; OSL is not a port.-DWITH_LLVM=OFF— with-DWITH_CLANG=OFF: link neither LLVM nor Clang. Upstream’s defaults, named.-DWITH_CYCLES_PATH_GUIDING=OFF— no path guiding, which needs OpenPGL, not a port.-DWITH_CYCLES_DEVICE_CUDA=OFF— and the OptiX, HIP, HIP RT and oneAPI devices, with-DWITH_CYCLES_CUDA_BINARIES=OFFand-DWITH_CYCLES_HIP_BINARIES=OFF: the Cycles GPU devices need vendor compilers the tree does not carry.-DWITH_USD=OFF— with-DWITH_MATERIALX=OFF,-DWITH_HYDRA=OFFand-DWITH_XR_OPENXR=OFF: no USD import and export, MaterialX, Hydra render delegates or OpenXR virtual reality; none of their libraries is a port.-DWITH_TRACY=OFF— with-DWITH_RENDERDOC=OFF: no Tracy profiler and no RenderDoc capture hooks.-DWITH_TBB_MALLOC_PROXY=OFF— do not replace the C library’smallocwith oneTBB’s allocator.-DWITH_LINKER_LLD=OFF— with-DWITH_LINKER_MOLD=OFFand-DWITH_COMPILER_CCACHE=OFF: the default linker, and no ccache.-DWITH_GTESTS=OFF— no test programs.
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.