309.3. cura-5.13.0
UltiMaker's slicer: prepares 3D models for FDM printing, with printer definitions and material profiles
| Version | 5.13.0, release 1 |
| Shelf | fabrication — 3D-printing slicers and hosts, and CNC control |
| Phase | 44_apps (Applications), 124 of 422 in build order |
| Licence | LGPL-3.0-or-later |
| Homepage | https://ultimaker.com/software/ultimaker-cura |
| Build time | 1.1 SBU |
| Installed size | 111.7 MiB in 12293 files |
| Recipe | ports/core/fabrication/cura/kpkgbuild |
About
UltiMaker Cura is a slicer that prepares 3D models for FDM printing, with UltiMaker’s printer definitions and material profiles. It is a Python program on Qt 6 through python3-pyqt6, built on the uranium application framework, and it slices with the separate curaengine binary. Upstream ships it through Conan and PyInstaller and gives it no install rules, so build.sh lays out the files itself.
Sources
cura-5.13.0.tar.gz(48.3 MiB)
sha2565911c63c465d23e8c27262b5702c2e708844b33fefb0f924855fa1a17158a089
upstream: https://github.com/Ultimaker/Cura/archive/refs/tags/5.13.0.tar.gz
archive copy: sources-2/fabrication--cura-5.13.0.tar.gzfdm_materials-5.13.0.tar.gz(78.6 KiB)
sha256bb4060bddb3fa87eaf58ac3427097fff46d79a6142037380c624636f705174df
upstream: https://github.com/Ultimaker/fdm_materials/archive/refs/tags/5.13.0.tar.gz
archive copy: sources-2/fabrication--fdm_materials-5.13.0.tar.gzlibCharon-0decd60531dcdde31b519fdad0cd14102e63c25f.tar.gz(148.6 KiB)
sha256c68bb416dc93ad33c1e0e63ed9378e7812ae37e07836b0b6c76c3a08975e2f47
upstream: https://github.com/Ultimaker/libCharon/archive/0decd60531dcdde31b519fdad0cd14102e63c25f.tar.gz
archive copy: sources-2/fabrication--libCharon-0decd60531dcdde31b519fdad0cd14102e63c25f.tar.gzcura-vendor-5.13.0.tar.xz(6.6 MiB)
sha2569b5b5fdcc2d7f1499f5074591887ea792939acd5eaaf43e9369a0a83573998db
a vendor bundle: the dependencies upstream’s own tool would download, packed once
archive copy: sources-2/fabrication--cura-vendor-5.13.0.tar.xz
Dependencies
Depends on: python3, python3-pip, python3-setuptools, python3-setuptools-scm, python3-poetry-core, python3-cython, python3-wheel, uranium, curaengine, python3-pyarcus, python3-pysavitar, python3-pynest2d, python3-pyuvula, python3-pyqt6, python3-requests, python3-certifi, python3-keyring, python3-pyserial, python3-cryptography, numpy, scipy.
Required by: no port names it.
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 cura'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/fabrication/cura.
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/cura
echo '5911c63c465d23e8c27262b5702c2e708844b33fefb0f924855fa1a17158a089 cura-5.13.0.tar.gz' | sha256sum -c -
echo 'bb4060bddb3fa87eaf58ac3427097fff46d79a6142037380c624636f705174df fdm_materials-5.13.0.tar.gz' | sha256sum -c -
echo 'c68bb416dc93ad33c1e0e63ed9378e7812ae37e07836b0b6c76c3a08975e2f47 libCharon-0decd60531dcdde31b519fdad0cd14102e63c25f.tar.gz' | sha256sum -c -
echo '9b5b5fdcc2d7f1499f5074591887ea792939acd5eaaf43e9369a0a83573998db cura-vendor-5.13.0.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/cura
SRC=$SRC_ROOT/cura-5.13.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf cura-5.13.0.tar.gz -C "$SRC" --strip-components=1
tar --no-same-permissions --warning=no-unknown-keyword -xf fdm_materials-5.13.0.tar.gz -C "$SRC_ROOT"
tar --no-same-permissions --warning=no-unknown-keyword -xf libCharon-0decd60531dcdde31b519fdad0cd14102e63c25f.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 _charon, pyrequirements, pyruntime and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
mkdir -p vendor
tar -xf "$PORT_SRC/$name-vendor-$version.tar.xz" --strip-components=1 -C vendor
pip3 install --ignore-installed --no-deps --no-index --find-links=vendor --no-build-isolation \
--root=$PKG --prefix=/usr trimesh zeroconf ifaddr
_site=$(python3 -c 'import sysconfig; print(sysconfig.get_path("purelib", vars={"base": "/usr"}))')
install -d "$PKG$_site" "$PKG/usr/lib/cura/plugins" "$PKG/usr/share/cura"
cp -r cura "$PKG$_site/"
cp -r "$SRC_ROOT/libCharon-$_charon/Charon" "$PKG$_site/"
cat > "$PKG$_site/cura/CuraVersion.py" <<PY
CuraAppName = "cura"
CuraAppDisplayName = "UltiMaker Cura"
CuraVersion = "$version"
CuraVersionFull = "$version"
CuraBuildType = ""
CuraDebugMode = False
CuraCloudAPIRoot = "https://api.ultimaker.com"
CuraCloudAPIVersion = "1"
CuraCloudAccountAPIRoot = "https://account.ultimaker.com"
CuraMarketplaceRoot = "https://marketplace.ultimaker.com"
CuraDigitalFactoryURL = "https://digitalfactory.ultimaker.com"
CuraLatestURL = "https://software.ultimaker.com/latest.json"
ConanInstalls = {}
PythonInstalls = {}
DependenciesDescriptions = {}
PY
for p in plugins/*/; do
p=${p%/}
case ${p##*/} in
SliceInfoPlugin|FirmwareUpdateChecker|3DConnexion|MakerbotWriter) continue ;;
esac
cp -r "$p" "$PKG/usr/lib/cura/plugins/"
done
cp -r resources "$PKG/usr/share/cura/"
rm -rf "$PKG/usr/share/cura/resources/i18n"
install -d "$PKG/usr/share/cura/resources/materials"
cp "$SRC_ROOT/fdm_materials-$version"/*.xml.fdm_material \
"$PKG/usr/share/cura/resources/materials/"
find "$PKG$_site/cura" "$PKG$_site/Charon" "$PKG/usr/lib/cura" -depth -type d \
\( -name tests -o -name __pycache__ \) -exec rm -rf {} +
find "$PKG$_site/cura" "$PKG$_site/Charon" "$PKG/usr/lib/cura" "$PKG/usr/share/cura" \
-type f -exec chmod 644 {} +
python3 -m compileall -q -s "$PKG" -p / "$PKG$_site/cura" "$PKG$_site/Charon" "$PKG/usr/lib/cura"
install -Dm644 cura_app.py "$PKG/usr/lib/cura/cura_app.py"
cat > "$PKG/usr/bin/cura" <<'PY'
#!/usr/bin/python3
from PyQt6.QtGui import QGuiApplication
QGuiApplication.setDesktopFileName("cura")
_path = "/usr/lib/cura/cura_app.py"
with open(_path) as _f:
_code = compile(_f.read(), _path, "exec")
exec(_code, {"__name__": "__main__", "__file__": _path})
PY
chmod 755 "$PKG/usr/bin/cura"
for s in 64 128 256; do
install -Dm644 "packaging/icons/cura-icon_${s}x${s}.png" \
"$PKG/usr/share/icons/hicolor/${s}x${s}/apps/cura-icon.png"
done
install -d "$PKG/usr/share/applications"
cat > "$PKG/usr/share/applications/cura.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=UltiMaker Cura
GenericName=3D Printing Slicer
Comment=Prepare 3D models for printing on FDM printers
Exec=cura %F
Icon=cura-icon
Terminal=false
Categories=Qt;Graphics;3DGraphics;Engineering;
Keywords=3d;printing;slicer;gcode;stl;3mf;cura;ultimaker;
StartupWMClass=cura
DESKTOP
chmod 644 "$PKG/usr/share/applications/cura.desktop"
test -f "$PKG/usr/share/cura/resources/definitions/fdmprinter.def.json"
test -n "$(ls "$PKG/usr/share/cura/resources/materials")"
test -f "$PKG/usr/lib/cura/plugins/CuraEngineBackend/plugin.json"
test -f "$PKG/usr/lib/cura/plugins/SentryLogger/plugin.json"
The switches, and why each is set:
--no-deps— With--no-index,--find-links=vendorand--no-build-isolation: pip installs exactly the three vendored modules it is named, from the unpacked bundle alone, with the build backends of the tree’s own ports, and resolves nothing. See Notes.--ignore-installed— Installs the three modules into$PKGeven when the build root already has a copy, so the package always carries them.
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/cura, 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 cura-5.13.0-1.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/cura, and runs the triggers its paths call for.
Contents
Installed programs: cura, trimesh.
Installed directories: /usr/lib/cura, /usr/lib/python3.14/site-packages/Charon, /usr/lib/python3.14/site-packages/cura, /usr/lib/python3.14/site-packages/ifaddr, /usr/lib/python3.14/site-packages/ifaddr-0.2.0.dist-info, /usr/lib/python3.14/site-packages/trimesh, /usr/lib/python3.14/site-packages/trimesh-5.1.0.dist-info, /usr/lib/python3.14/site-packages/zeroconf, /usr/lib/python3.14/site-packages/zeroconf-0.151.3.dist-info, /usr/share/cura, /usr/share/licenses/cura.
Notes
The Python modules that only Cura imports are vendored: trimesh for the AMF reader and the glTF and other mesh readers of TrimeshReader, and zeroconf with ifaddr for finding network printers. They are named, at their versions, in pypackages in kpkgbuild, so ports/fetch downloads exactly those source distributions (with the build requirements it follows from them) into cura-vendor-<version>.tar.xz, which kpkgbuild pins by its sha256 like any other source (see Vendoring). Every other module Cura imports is a port in depends, the account token store python3-keyring among them.
The layout is the one Cura and Uranium search from a launcher in /usr/bin: the cura package and Charon in site-packages, plugins under /usr/lib/cura/plugins, resources under /usr/share/cura, and CuraEngine at /usr/bin/CuraEngine. Charon, the UFP container library, is the one module of libCharon that Cura imports; it comes from a second source pinned to the commit _charon. The material profiles come from fdm_materials at the same release as Cura, a third source.
CuraVersion.py is generated by Conan from upstream’s CuraVersion.py.jinja; build.sh writes the same file with the values a release build fills in. The cloud and marketplace addresses in it are upstream’s.
Four plugins are left out: SliceInfoPlugin (anonymous slice statistics to statistics.ultimaker.com) and FirmwareUpdateChecker, which report to or poll UltiMaker’s servers; 3DConnexion, which imports pynavlib, not a port; and MakerbotWriter, which imports the pyDulcificum converter, not a port either. Cura starts without each of them.
SentryLogger (crash reports) is shipped: CuraApplication preloads it unconditionally, and Uranium’s preload path does not catch a missing plugin, so Cura aborts before its first window without it. It registers nothing when sentry_sdk cannot be imported, and sentry_sdk is not a port, so it sends nothing.
build.sh leaves out resources/i18n, so the interface shows its English source strings. Test directories and byte-code caches are removed, every file is made mode 644, and the modules are byte-compiled against their installed paths. The four test lines at the end stop the build if the base printer definition, the material profiles, the CuraEngine backend plugin or SentryLogger are missing.
/usr/bin/cura is a small launcher that calls QGuiApplication.setDesktopFileName("cura") and then runs /usr/lib/cura/cura_app.py. Without a desktop file name, Qt builds the Wayland app_id from Uranium’s organisation domain and the interpreter’s name, which matches no desktop entry. The launcher names the entry before Cura’s code runs and leaves argv[0] as /usr/bin/cura, from which Uranium derives its install prefix.
The desktop entry claims no MIME types: prusaslicer’s entry claims the model types.