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
orcaslicer-2.4.2.tar.gz(125.2 MiB)
sha256d97244baf15eb9377aa86714cb042d537ff3b1db13b7c2657cf865b820701cf0
upstream: https://github.com/OrcaSlicer/OrcaSlicer/archive/refs/tags/v2.4.2.tar.gz
archive copy: sources-2/fabrication--orcaslicer-2.4.2.tar.gzOrca-deps-wxWidgets-88f3483ca546fbf4ad732e1acd94cc930935077a.tar.gz(20.4 MiB)
sha256d81d9b8cfa0fa0f19d78578c6c235a76d173b6d8282b03270c21cd3c7d30c215
upstream: https://github.com/SoftFever/Orca-deps-wxWidgets/archive/88f3483ca546fbf4ad732e1acd94cc930935077a.tar.gz
archive copy: sources-2/fabrication--Orca-deps-wxWidgets-88f3483ca546fbf4ad732e1acd94cc930935077a.tar.gzorcadeps-Boost-boost-1.84.0.tar.gz(118.1 MiB)
sha2564d27e9efed0f6f152dc28db6430b9d3dfb40c0345da7342eaa5a987dde57bd95
upstream: https://github.com/boostorg/boost/releases/download/boost-1.84.0/boost-1.84.0.tar.gz
archive copy: sources-2/fabrication--orcadeps-Boost-boost-1.84.0.tar.gzorcadeps-TBB-v2021.5.0.zip(3.0 MiB)
sha25683ea786c964a384dd72534f9854b419716f412f9d43c0be88d41874763e7bb47
upstream: https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2021.5.0.zip
archive copy: sources-2/fabrication--orcadeps-TBB-v2021.5.0.ziporcadeps-Eigen-eigen-5.0.1.zip(3.8 MiB)
sha2560dbb1f9e3aaad66f352c03227d8c983f6f0b49e0b07e71a7300f4abcc01aee12
upstream: https://gitlab.com/libeigen/eigen/-/archive/5.0.1/eigen-5.0.1.zip
archive copy: sources-2/fabrication--orcadeps-Eigen-eigen-5.0.1.ziporcadeps-CGAL-CGAL-5.6.3.zip(35.7 MiB)
sha2565d577acb4a9918ccb960491482da7a3838f8d363aff47e14d703f19fd84733d4
upstream: https://github.com/CGAL/cgal/releases/download/v5.6.3/CGAL-5.6.3.zip
archive copy: sources-2/fabrication--orcadeps-CGAL-CGAL-5.6.3.ziporcadeps-Blosc-v1.17.0_tm.zip(993.9 KiB)
sha256dcb48bf43a672fa3de6a4b1de2c4c238709dad5893d1e097b8374ad84b1fc3b3
upstream: https://github.com/tamasmeszaros/c-blosc/archive/refs/heads/v1.17.0_tm.zip
archive copy: sources-2/fabrication--orcadeps-Blosc-v1.17.0_tm.ziporcadeps-OpenEXR-v2.5.5.zip(27.1 MiB)
sha2560307a3d7e1fa1e77e9d84d7e9a8694583fbbbfd50bdc6884e2c96b8ef6b902de
upstream: https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.5.zip
archive copy: sources-2/fabrication--orcadeps-OpenEXR-v2.5.5.ziporcadeps-OpenVDB-a68fd58d0e2b85f01adeb8b13d7555183ab10aa5.zip(3.1 MiB)
sha256f353e7b99bd0cbfc27ac9082de51acf32a8bc0b3e21ff9661ecca6f205ec1d81
upstream: https://github.com/tamasmeszaros/openvdb/archive/a68fd58d0e2b85f01adeb8b13d7555183ab10aa5.zip
archive copy: sources-2/fabrication--orcadeps-OpenVDB-a68fd58d0e2b85f01adeb8b13d7555183ab10aa5.ziporcadeps-OCCT-V7_6_0.zip(63.7 MiB)
sha25628334f0e98f1b1629799783e9b4d21e05349d89e695809d7e6dfa45ea43e1dbc
upstream: https://github.com/Open-Cascade-SAS/OCCT/archive/refs/tags/V7_6_0.zip
archive copy: sources-2/fabrication--orcadeps-OCCT-V7_6_0.ziporcadeps-NLopt-v2.5.0.tar.gz(2.3 MiB)
sha256c6dd7a5701fff8ad5ebb45a3dc8e757e61d52658de3918e38bab233e7fd3b4ae
upstream: https://github.com/stevengj/nlopt/archive/v2.5.0.tar.gz
archive copy: sources-2/fabrication--orcadeps-NLopt-v2.5.0.tar.gzorcadeps-libnoise-1.0.zip(273.9 KiB)
sha25696ffd6cc47898dd8147aab53d7d1b1911b507d9dbaecd5613ca2649468afd8b6
upstream: https://github.com/SoftFever/Orca-deps-libnoise/archive/refs/tags/1.0.zip
archive copy: sources-2/fabrication--orcadeps-libnoise-1.0.ziporcadeps-Draco-1.5.7.zip(58.2 MiB)
sha25627b72ba2d5ff3d0a9814ad40d4cb88f8dc89a35491c0866d952473f8f9416b77
upstream: https://github.com/google/draco/archive/refs/tags/1.5.7.zip
archive copy: sources-2/fabrication--orcadeps-Draco-1.5.7.ziporcadeps-OpenCV-4.6.0.tar.gz(86.0 MiB)
sha2561ec1cba65f9f20fe5a41fda1586e01c70ea0c9a6d7b67c9e13edf0cfe2239277
upstream: https://github.com/opencv/opencv/archive/refs/tags/4.6.0.tar.gz
archive copy: sources-2/fabrication--orcadeps-OpenCV-4.6.0.tar.gz
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.
0001-Boost-musl-locale.patch— Convert paths with Boost.Filesystem's UTF-8 codecvt facet on Linux without glibcApplied by the superbuild to its Boost (see deps-musl-patch-step.patch). Boost.Filesystem builds its path locale on Linux as std::locale(""). On musl, libstdc++ uses its generic locale model, whose codecvt converts through the C library's current locale whatever the C++ locale's name, and that is "C" until the program calls setlocale, so the characters of a UTF-8 path above U+007F would not be decoded. Linux without glibc now gets the UTF-8 codecvt facet the BSDs get.
0002-OCCT-musl.patch— Applied by the superbuild to its OpenCASCADE. OCCT reads heap usage withmallinfo, traps floating-point exceptions withfeenableexcept/fegetexcept, and prints stack traces through<execinfo.h>, none of which musl has. The patch compiles those calls under glibc only: elsewhere the heap-usage counter is left unread, floating-point traps are never enabled and report as off, and a stack trace takes the “not implemented for this platform” branch OCCT already has for UWP and iOS.deps-musl-patch-step.patch— Adds0001-Boost-musl-locale.patchand0002-OCCT-musl.patchto the superbuild: OCCT’sgit applytakes0002-OCCT-musl.patchafter upstream’s own0001-OCCT-fix.patch, and Boost gains aPATCH_COMMANDfor0001-Boost-musl-locale.patch.build.shcopies both intodeps/OCCT/anddeps/Boost/, where those commands look.deps-system-gmp-mpfr.patch— Removes the superbuild’s GMP and MPFR projects and the dependencies of CGAL and Eigen on them, so CGAL finds the gmp and mpfr ports instead of private copies.mdns-select.patch— The bundled mDNS client indeps_src/mdns/mdns.husesselect(),fd_setandstruct timevaland includes neither<sys/select.h>nor<sys/time.h>, which glibc’s socket headers pull in and musl’s do not; the patch includes both.serial-unistd.patch—src/slic3r/Utils/Serial.cppincludes<sys/unistd.h>, a name only glibc carries; the patch includes<unistd.h>.
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:
KDOS_JOBS=$_jobs— WithMAKEFLAGS=-j$_jobsandCMAKE_BUILD_PARALLEL_LEVEL=$_jobs: one compile job per 6 GiB of memory, read from/proc/meminfo, never more than the tree’s ownKDOS_JOBSand never fewer than one. A compiler on OpenVDB, CGAL or libslic3r holds 3 to 4 GB, so the tree’s usual count would exhaust a large host.KDOS_JOBSis the count the tree’sninjawrapper hands every ninja call; the other two reachmakeandcmake --build.-DRTLD_DEEPBIND=0— The pinned oneTBB ORsRTLD_DEEPBIND, adlopenflag musl does not have, into the flags it opens its own plugins with; defined as 0 it adds nothing.-D__TBB_RESUMABLE_TASKS_USE_THREADS=1— oneTBB’s resumable tasks switch stacks withgetcontextandswapcontext, which musl does not provide; this runs them on threads instead. Both TBB defines go inCXXFLAGS, which every dependency’s configure reads from the environment, and only TBB names either.-DFLATPAK=ON— Upstream’s switch for a build where the system provides zlib, libpng, expat, libjpeg, FreeType, OpenSSL and curl: the superbuild finds those instead of building them, and leaves wxWidgets to be built separately. It also installs intoDESTDIRitself rather thanDESTDIR/usr/local, and deletes each project’s download directory once it is unpacked and its source and build trees once it is installed. Only the superbuild is configured with it.-DDESTDIR="$_deps"— The prefix the superbuild installs every dependency into,$SRC_ROOT/orcadeps. Nothing from it reaches the package; the program links it statically.-DDEP_DOWNLOAD_DIR="$_dl"— Where ExternalProject looks for each dependency’s archive, as<dir>/<project>/<file>; see Notes.-DDEP_WX_GTK3=ON— GTK 3 for the superbuild’s own wxWidgets project, whichFLATPAKkeeps out of this build. Upstream’s default, named.-DwxBUILD_TOOLKIT=gtk3— With-DwxBUILD_SHARED=OFF,-DwxBUILD_DEBUG_LEVEL=0,-DwxUSE_MEDIACTRL=ON,-DwxUSE_DETECT_SM=OFF,-DwxUSE_PRIVATE_FONTS=ON,-DwxUSE_OPENGL=ON,-DwxUSE_WEBREQUEST=ON,-DwxUSE_WEBVIEW=ON,-DwxUSE_LIBSDL=OFF,-DwxUSE_XTEST=OFF,-DwxUSE_STC=OFFand-DwxUSE_AUI=ON: the options upstream’sdeps/wxWidgets/wxWidgets.cmakebuilds wxWidgets with, repeated here because the separate wxWidgets build does not read that file.-DwxBUILD_PRECOMP=OFF— No precompiled headers; upstream’s superbuild turns them on.-DwxUSE_GLCANVAS_EGL=ON— The OpenGL canvas makes its context through EGL, which works on Wayland; upstream sets it too.-DwxUSE_WEBVIEW_WEBKIT=ON— With-DwxUSE_WEBVIEW_EDGE=OFF,-DwxUSE_WEBVIEW_IE=OFFand-DwxUSE_WEBVIEW_CHROMIUM=OFF: the web view is webkitgtk alone.-DwxUSE_REGEX=sys— With-DwxUSE_ZLIB=sys,-DwxUSE_EXPAT=sys,-DwxUSE_LIBPNG=sys,-DwxUSE_LIBJPEG=sysand-DwxUSE_LIBWEBP=sys: every image, compression and regex library is the tree’s. The fork’s archive leaves its bundled-library submodules empty, and upstream builds PCRE and libwebp from them.-DwxUSE_LIBTIFF=OFF— With-DwxUSE_NANOSVG=OFF,-DwxUSE_LUNASVG=OFFand-DwxUSE_LIBGNOMEVFS=OFF: no TIFF images, no SVG rasteriser and no GNOME VFS in wxWidgets. Upstream turns TIFF and NanoSVG off; LunaSVG is off by wxWidgets’ own default.-DwxWidgets_CONFIG_EXECUTABLE="$_deps/bin/wx-config"— Points OrcaSlicer at the private wxWidgets build rather than anywx-configonPATH.-DSLIC3R_STATIC=ON— Links the private prefix statically. Upstream’s default, named.-DSLIC3R_STATIC_EXCLUDE_CURL=ON— Links the system curl dynamically even underSLIC3R_STATIC.-DSLIC3R_FHS=ON— Installs into a standard FHS layout: resources, printer profiles and icons under/usr/share, the binary in/usr/bin.-DSLIC3R_GTK=3— With-DSLIC3R_GUI=ON: the GUI, on GTK 3. Upstream’s defaults, named.-DSLIC3R_PCH=OFF— No precompiled headers; upstream’s default is on.-DBBL_RELEASE_TO_PUBLIC=1— Compiles the public-release behaviour, among it the lower log level of the release builds. Upstream sets it for Release builds; named here.-DORCA_TOOLS=OFF— With-DSLIC3R_BUILD_SANDBOXES=OFF: none of upstream’s developer tools or sandboxes. Upstream’s defaults, named.-DCMAKE_DISABLE_FIND_PACKAGE_Git=ON— The main project does not look for git. It only uses git to read a commit hash from a.gitdirectory, which the release archive has none of.
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.