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

309.1. orcaslicer-2.4.2

G-code slicer for FDM printers with calibration tools and a wide printer-profile library

Version 2.4.2, release 3
Shelf fabrication — 3D-printing slicers and hosts, and CNC control
Phase 44_apps (Applications), 122 of 422 in build order
Licence AGPL-3.0-only
Homepage https://orcaslicer.com/
Build time 199.2 SBU
Installed size 310.3 MiB in 15024 files
Recipe ports/core/fabrication/orcaslicer/kpkgbuild

About

OrcaSlicer turns 3D models into G-code for FDM printers. It descends from Bambu Studio and PrusaSlicer, adds printer calibration tools, and carries a large library of printer profiles. Its interface is wxWidgets on GTK 3, with WebKitGTK for its built-in web pages. It is one of the largest builds in the tree: besides the program, build.sh compiles a private copy of most of the libraries OrcaSlicer is written against, through upstream’s own dependency superbuild in deps/.

Sources

Dependencies

Depends on: cmake, ninja, pkgconf, git, autoconf, automake, libtool, m4, gtk3, webkitgtk, gstreamer, gst-plugins-base, libsecret, glib, dbus, curl, openssl, zlib, libpng, libjpeg-turbo, expat, freetype2, fontconfig, pcre2, libwebp, mesa, libglvnd, glu, glew, glfw, cereal, qhull, gmp, mpfr, eudev, libX11, wayland, libxkbcommon, gspell.

Required by: no port names it.

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

What kpkg does

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

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/fabrication/orcaslicer
echo 'd97244baf15eb9377aa86714cb042d537ff3b1db13b7c2657cf865b820701cf0  orcaslicer-2.4.2.tar.gz' | sha256sum -c -
echo 'd81d9b8cfa0fa0f19d78578c6c235a76d173b6d8282b03270c21cd3c7d30c215  Orca-deps-wxWidgets-88f3483ca546fbf4ad732e1acd94cc930935077a.tar.gz' | sha256sum -c -
echo '4d27e9efed0f6f152dc28db6430b9d3dfb40c0345da7342eaa5a987dde57bd95  orcadeps-Boost-boost-1.84.0.tar.gz' | sha256sum -c -
echo '83ea786c964a384dd72534f9854b419716f412f9d43c0be88d41874763e7bb47  orcadeps-TBB-v2021.5.0.zip' | sha256sum -c -
echo '0dbb1f9e3aaad66f352c03227d8c983f6f0b49e0b07e71a7300f4abcc01aee12  orcadeps-Eigen-eigen-5.0.1.zip' | sha256sum -c -
echo '5d577acb4a9918ccb960491482da7a3838f8d363aff47e14d703f19fd84733d4  orcadeps-CGAL-CGAL-5.6.3.zip' | sha256sum -c -
echo 'dcb48bf43a672fa3de6a4b1de2c4c238709dad5893d1e097b8374ad84b1fc3b3  orcadeps-Blosc-v1.17.0_tm.zip' | sha256sum -c -
echo '0307a3d7e1fa1e77e9d84d7e9a8694583fbbbfd50bdc6884e2c96b8ef6b902de  orcadeps-OpenEXR-v2.5.5.zip' | sha256sum -c -
echo 'f353e7b99bd0cbfc27ac9082de51acf32a8bc0b3e21ff9661ecca6f205ec1d81  orcadeps-OpenVDB-a68fd58d0e2b85f01adeb8b13d7555183ab10aa5.zip' | sha256sum -c -
echo '28334f0e98f1b1629799783e9b4d21e05349d89e695809d7e6dfa45ea43e1dbc  orcadeps-OCCT-V7_6_0.zip' | sha256sum -c -
echo 'c6dd7a5701fff8ad5ebb45a3dc8e757e61d52658de3918e38bab233e7fd3b4ae  orcadeps-NLopt-v2.5.0.tar.gz' | sha256sum -c -
echo '96ffd6cc47898dd8147aab53d7d1b1911b507d9dbaecd5613ca2649468afd8b6  orcadeps-libnoise-1.0.zip' | sha256sum -c -
echo '27b72ba2d5ff3d0a9814ad40d4cb88f8dc89a35491c0866d952473f8f9416b77  orcadeps-Draco-1.5.7.zip' | sha256sum -c -
echo '1ec1cba65f9f20fe5a41fda1586e01c70ea0c9a6d7b67c9e13edf0cfe2239277  orcadeps-OpenCV-4.6.0.tar.gz' | 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/orcaslicer
SRC=$SRC_ROOT/orcaslicer-2.4.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf orcaslicer-2.4.2.tar.gz -C "$SRC" --strip-components=1
tar --no-same-permissions --warning=no-unknown-keyword -xf Orca-deps-wxWidgets-88f3483ca546fbf4ad732e1acd94cc930935077a.tar.gz -C "$SRC_ROOT"
tar --no-same-permissions --warning=no-unknown-keyword -xf orcadeps-Boost-boost-1.84.0.tar.gz -C "$SRC_ROOT"
cp orcadeps-TBB-v2021.5.0.zip "$SRC"
cp orcadeps-Eigen-eigen-5.0.1.zip "$SRC"
cp orcadeps-CGAL-CGAL-5.6.3.zip "$SRC"
cp orcadeps-Blosc-v1.17.0_tm.zip "$SRC"
cp orcadeps-OpenEXR-v2.5.5.zip "$SRC"
cp orcadeps-OpenVDB-a68fd58d0e2b85f01adeb8b13d7555183ab10aa5.zip "$SRC"
cp orcadeps-OCCT-V7_6_0.zip "$SRC"
tar --no-same-permissions --warning=no-unknown-keyword -xf orcadeps-NLopt-v2.5.0.tar.gz -C "$SRC_ROOT"
cp orcadeps-libnoise-1.0.zip "$SRC"
cp orcadeps-Draco-1.5.7.zip "$SRC"
tar --no-same-permissions --warning=no-unknown-keyword -xf orcadeps-OpenCV-4.6.0.tar.gz -C "$SRC_ROOT"

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 recipe’s helpers _wx, _openvdb and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

_mem=$(sed -n 's/^MemTotal: *\([0-9]*\) kB/\1/p' /proc/meminfo)
_jobs=$((_mem / 6291456))
[ "$_jobs" -le "$KDOS_JOBS" ] || _jobs=$KDOS_JOBS
[ "$_jobs" -ge 1 ] || _jobs=1
export KDOS_JOBS=$_jobs MAKEFLAGS=-j$_jobs CMAKE_BUILD_PARALLEL_LEVEL=$_jobs
unset KDOS_JOBSERVER GNUMAKEFLAGS CARGO_MAKEFLAGS

_deps="$SRC_ROOT/orcadeps"
_dl="$SRC_ROOT/dl"
for f in "$PORT_SRC"/orcadeps-* "$SOURCE_DIR"/orcadeps-*; do
	[ -f "$f" ] || continue
	_b=${f##*/orcadeps-}
	mkdir -p "$_dl/${_b%%-*}"
	[ -e "$_dl/${_b%%-*}/${_b#*-}" ] || ln -s "$f" "$_dl/${_b%%-*}/${_b#*-}"
done
test "$(ls "$_dl"/*/* | wc -l)" -eq 12

export CXXFLAGS="$CXXFLAGS -DRTLD_DEEPBIND=0 -D__TBB_RESUMABLE_TASKS_USE_THREADS=1"
patch -p1 -i "$PORT_SRC/deps-musl-patch-step.patch"
patch -p1 -i "$PORT_SRC/deps-system-gmp-mpfr.patch"
cp "$PORT_SRC/0002-OCCT-musl.patch" deps/OCCT/
cp "$PORT_SRC/0001-Boost-musl-locale.patch" deps/Boost/

patch -p1 -i "$PORT_SRC/mdns-select.patch"
patch -p1 -i "$PORT_SRC/serial-unistd.patch"

cmake -S deps -B "$SRC_ROOT/build-deps" -G Ninja \
	-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
	-DCMAKE_BUILD_TYPE=Release \
	-DFLATPAK=ON \
	-DDESTDIR="$_deps" \
	-DDEP_DOWNLOAD_DIR="$_dl" \
	-DDEP_WX_GTK3=ON
cmake --build "$SRC_ROOT/build-deps" --parallel 1 --target \
	dep_Boost dep_TBB dep_CGAL dep_OpenVDB dep_OCCT dep_NLopt \
	dep_libnoise dep_Draco dep_OpenCV

_wxsrc="$SRC_ROOT/Orca-deps-wxWidgets-$_wx"
cmake -S "$_wxsrc" -B "$SRC_ROOT/build-wx" -G Ninja \
	-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX="$_deps" \
	-DCMAKE_PREFIX_PATH="$_deps" \
	-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
	-DwxBUILD_TOOLKIT=gtk3 \
	-DwxBUILD_SHARED=OFF \
	-DwxBUILD_PRECOMP=OFF \
	-DwxBUILD_DEBUG_LEVEL=0 \
	-DwxBUILD_SAMPLES=OFF \
	-DwxBUILD_TESTS=OFF \
	-DwxBUILD_DEMOS=OFF \
	-DwxUSE_MEDIACTRL=ON \
	-DwxUSE_DETECT_SM=OFF \
	-DwxUSE_PRIVATE_FONTS=ON \
	-DwxUSE_OPENGL=ON \
	-DwxUSE_GLCANVAS_EGL=ON \
	-DwxUSE_WEBREQUEST=ON \
	-DwxUSE_WEBVIEW=ON \
	-DwxUSE_WEBVIEW_WEBKIT=ON \
	-DwxUSE_WEBVIEW_EDGE=OFF \
	-DwxUSE_WEBVIEW_IE=OFF \
	-DwxUSE_WEBVIEW_CHROMIUM=OFF \
	-DwxUSE_LIBSDL=OFF \
	-DwxUSE_XTEST=OFF \
	-DwxUSE_STC=OFF \
	-DwxUSE_AUI=ON \
	-DwxUSE_REGEX=sys \
	-DwxUSE_ZLIB=sys \
	-DwxUSE_EXPAT=sys \
	-DwxUSE_LIBPNG=sys \
	-DwxUSE_LIBJPEG=sys \
	-DwxUSE_LIBTIFF=OFF \
	-DwxUSE_LIBWEBP=sys \
	-DwxUSE_NANOSVG=OFF \
	-DwxUSE_LUNASVG=OFF \
	-DwxUSE_LIBGNOMEVFS=OFF
ninja -C "$SRC_ROOT/build-wx" install
for d in private generic/private gtk/private; do
	mkdir -p "$_deps/include/wx-3.3/wx/$d"
	cp -r "$_wxsrc/include/wx/$d/." "$_deps/include/wx-3.3/wx/$d/"
done

cmake -S . -B build -G Ninja -Wno-dev \
	-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DCMAKE_PREFIX_PATH="$_deps" \
	-DwxWidgets_CONFIG_EXECUTABLE="$_deps/bin/wx-config" \
	-DSLIC3R_STATIC=ON \
	-DSLIC3R_STATIC_EXCLUDE_CURL=ON \
	-DSLIC3R_FHS=ON \
	-DSLIC3R_GTK=3 \
	-DSLIC3R_GUI=ON \
	-DSLIC3R_PCH=OFF \
	-DBBL_RELEASE_TO_PUBLIC=1 \
	-DBUILD_TESTS=OFF \
	-DORCA_TOOLS=OFF \
	-DSLIC3R_BUILD_SANDBOXES=OFF \
	-DCMAKE_DISABLE_FIND_PACKAGE_Git=ON
ninja -C build
DESTDIR=$PKG ninja -C build install
rm -f "$PKG/usr/LICENSE.txt"

cat > "$PKG/usr/share/applications/com.orcaslicer.OrcaSlicer.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=OrcaSlicer
GenericName=3D Printing Slicer
Comment=Slice 3D models into G-code, with printer calibration tools
Exec=orca-slicer %F
Icon=OrcaSlicer
Terminal=false
Categories=Graphics;3DGraphics;Engineering;
Keywords=3d;printing;slicer;gcode;stl;3mf;calibration;
StartupWMClass=orca-slicer
DESKTOP
chmod 644 "$PKG/usr/share/applications/com.orcaslicer.OrcaSlicer.desktop"

test -x "$PKG/usr/bin/orca-slicer"
test -d "$PKG/usr/share/OrcaSlicer/profiles"
test -f "$PKG/usr/share/icons/hicolor/128x128/apps/OrcaSlicer.png"

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/orcaslicer, 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 orcaslicer-2.4.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/orcaslicer, and runs the triggers its paths call for.

Contents

Installed programs: orca-slicer.

Installed directories: /usr/include/stb_dxt, /usr/lib/cmake/stb_dxt, /usr/share/OrcaSlicer, /usr/share/licenses/orcaslicer.

Notes

OrcaSlicer is written against the dependency set its superbuild pins, and most of those are older than the tree’s own ports: Boost (the code uses asio’s io_service, which later Boost releases remove), CGAL, OpenCASCADE, a fork of OpenVDB with its forks of Blosc and OpenEXR, oneTBB, NLopt and OpenCV. Draco and a libnoise fork are built the same way. The versions are in the archive names in kpkgbuild. All of them are vendored, built static and private, and never packaged. Only the targets named on the cmake --build line are built, with the projects ExternalProject orders before them (Eigen, Blosc, OpenEXR); --parallel 1 builds one project at a time, each with the job count above.

Every archive the superbuild would download is a source of this port, named orcadeps-<Project>-<file>. build.sh links each into $SRC_ROOT/dl/<Project>/<file>, from the port directory or from kpkg’s source directory, wherever kpkg found it; ExternalProject then finds the file in its download directory and accepts it only against the URL_HASH SHA256 the superbuild pins beside the URL, so nothing is fetched. test "$(ls "$_dl"/*/* | wc -l)" -eq 12 stops the build unless every archive is in place. A version bump of OrcaSlicer that moves a pin needs the matching archive as a new source, or the superbuild tries the network and fails. git is in depends because the superbuild applies its patches with git apply.

wxWidgets is SoftFever’s fork, which the superbuild would clone with git by tag; here it is the archive of the commit _wx in kpkgbuild, built by hand with the superbuild’s options and installed into the same private prefix. OrcaSlicer includes wxWidgets’ private headers, which wxWidgets does not install, so build.sh copies private, generic/private and gtk/private after the install, as the superbuild does.

Everything else comes from the tree’s ports. gtk3, webkitgtk, GStreamer, libsecret, curl, OpenSSL, GLFW, expat and libpng are linked dynamically; cereal is header-only; and qhull is linked statically, from the libqhullcpp.a and libqhullstatic_r.a that the qhull port installs, because SLIC3R_STATIC selects those two. OpenGL is loaded through upstream’s bundled glad, so GLEW is not linked. The three test lines at the end stop the build if the binary, the printer profiles or the 128-pixel icon are missing from the package. Upstream installs a LICENSE.txt directly under /usr, which build.sh removes.

The Bambu network plugin is a proprietary download the program offers at run time; nothing of it is part of this build.