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

307.2. goxel-0.15.1

3D voxel editor, drawn with OpenGL through GLFW and no toolkit

Version 0.15.1, release 1
Shelf 3d — 3D modelling, animation, voxel and mesh tools and libraries, and scientific visualisation
Phase 44_apps (Applications), 2 of 422 in build order
Licence GPL-3.0-or-later
Homepage https://goxel.xyz
Build time 2.6 SBU
Installed size 5.3 MiB in 11 files
Recipe ports/core/3d/goxel/kpkgbuild

About

Goxel is a 3D voxel editor: a model is built out of cubes on a grid, painted, and exported to formats such as glTF, OBJ, PLY, MagicaVoxel .vox and PNG slices. It draws its whole interface itself with OpenGL through glfw, so it links no toolkit, and it builds with scons.

Sources

Dependencies

Depends on: scons, pkgconf, glfw, libglvnd, mesa, dbus, libpng.

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

What kpkg does

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

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/goxel
echo '01c9601ac9d8d38e29d3adff4b79a26c2b9fea4c2d2cb1d134471e499f8c4a84  goxel-0.15.1.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/goxel
SRC=$SRC_ROOT/goxel-0.15.1
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf goxel-0.15.1.tar.gz -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/goxel-app-id.patch"
patch -p1 -i "$PORT_SRC/goxel-maximized.patch"

scons -j"$KDOS_JOBS" mode=release werror=false nfd_backend=portal sound=false
make PREFIX=/usr DESTDIR=$PKG install

cat > "$PKG/usr/share/applications/goxel.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Goxel
GenericName=Voxel Editor
Comment=Build 3D models out of voxels
TryExec=goxel
Exec=goxel %f
Icon=goxel
Terminal=false
StartupWMClass=goxel
Categories=Graphics;3DGraphics;
Keywords=voxel;3d;model;editor;pixel;goxel;
DESKTOP
chmod 644 "$PKG/usr/share/applications/goxel.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/goxel, 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 goxel-0.15.1-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/goxel, and runs the triggers its paths call for.

Contents

Installed programs: goxel.

Installed directories: /usr/share/licenses/goxel.

Notes

goxel-maximized.patch sets the GLFW hint GLFW_MAXIMIZED. Goxel sizes its window to the primary monitor’s full resolution, which with the compositor’s title bar is taller than the work area and puts the bottom of the interface under the panel; maximized, the compositor fits it to the work area.

make install is upstream’s Makefile, which takes PREFIX and DESTDIR; it installs the binary, the hicolor icons, the AppStream file and upstream’s desktop entry. build.sh then writes its own goxel.desktop over that entry, with %f in Exec, TryExec, StartupWMClass=goxel and search keywords.