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

308.1. solvespace-3.2

Parametric 2D and 3D CAD with a constraint solver (Qt 6 interface)

Version 3.2, release 1
Shelf cad — Mechanical, architectural and 2D CAD, geometry kernels, meshing and FEM
Phase 44_apps (Applications), 22 of 422 in build order
Licence GPL-3.0-or-later
Homepage https://solvespace.com/
Build time 1.7 SBU
Installed size 13.0 MiB in 111 files
Recipe ports/core/cad/solvespace/kpkgbuild

About

SolveSpace is a parametric CAD program: a part is drawn as 2D sketches held by constraints, which its solver keeps satisfied as dimensions change, then extruded, lathed or combined into a solid and exported as DXF, STEP, STL or a mesh. The port builds its Qt 6 window, solvespace-qt, and the command-line solvespace-cli, which exports and regenerates files without a display.

Sources

Dependencies

Depends on: cmake, ninja, pkgconf, qt6-qtbase, qt6-qtwayland, eigen, zlib, libpng, freetype2, fontconfig, cairo, pixman, mesa, libglvnd.

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

What kpkg does

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

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/cad/solvespace
echo 'd93e816667b6c6f05fabc3f3cb6d783fad2a3805c46d24e28f2ebd91bc36de76  solvespace-3.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/solvespace
SRC=$SRC_ROOT/solvespace-3.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf solvespace-3.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/eigen5-cxx14.patch"

mkdir -p build && cd build
cmake .. -G Ninja -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib \
	-DENABLE_GUI=ON \
	-DUSE_QT_GUI=ON \
	-DENABLE_CLI=ON \
	-DENABLE_TESTS=OFF \
	-DENABLE_OPENMP=ON \
	-DENABLE_LTO=OFF \
	-DFORCE_VENDORED_Eigen3=OFF \
	-DEIGEN3_INCLUDE_DIRS=/usr/include/eigen3 \
	-DCMAKE_DISABLE_FIND_PACKAGE_SpaceWare=ON
ninja
DESTDIR=$PKG ninja install

cat > "$PKG/usr/share/applications/solvespace-qt.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=SolveSpace
GenericName=Parametric CAD
Comment=Constraint-based 2D sketches and 3D parts
Exec=solvespace-qt %f
Icon=solvespace
Terminal=false
StartupWMClass=solvespace-qt
MimeType=application/x-solvespace;
Categories=Graphics;3DGraphics;Engineering;Qt;
Keywords=parametric;cad;2d;3d;sketch;constraint;dxf;step;stl;solvespace;
DESKTOP
chmod 644 "$PKG/usr/share/applications/solvespace-qt.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/solvespace, 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 solvespace-3.2-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/solvespace, and runs the triggers its paths call for.

Contents

Installed programs: solvespace-cli, solvespace-qt.

Installed libraries: libslvs.so.

Installed directories: /usr/share/licenses/solvespace, /usr/share/solvespace.

Notes

The release archive carries its own copies of several libraries under extlib/. On Linux the build takes zlib, libpng, FreeType and Cairo from the system, and Eigen through the two switches above; the allocator, mimalloc, and the DXF library, libdxfrw, are always the bundled ones, compiled into the programs.

Upstream installs a solvespace-qt.desktop generated from res/freedesktop/solvespace.desktop.in. build.sh writes over it, adding StartupWMClass=solvespace-qt and its own comment, categories and keywords.