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

325.6. pioneer-20260907

Open-ended space trading and combat across a procedurally generated Milky Way, with Newtonian flight

Version 20260907, release 2
Shelf games-strategy — Strategy, simulation and space-trading games, and their data
Phase 44_apps (Applications), 206 of 422 in build order
Licence GPL-3.0-only AND CC-BY-SA-3.0
Homepage https://pioneerspacesim.net
Build time 8.2 SBU
Installed size 1.1 GiB in 2193 files
Recipe ports/core/games-strategy/pioneer/kpkgbuild

About

Pioneer is an open-ended space game: trading, missions and combat across a procedurally generated Milky Way, flown with Newtonian physics. The port installs the game, pioneer, its data under /usr/share/pioneer/data, and three tools upstream builds beside it, the system editor, the model compiler and the save-game dumper, as pioneer-editor, pioneer-modelcompiler and pioneer-savegamedump. It renders through OpenGL with SDL2 for its window and OpenAL for sound.

Sources

Dependencies

Depends on: cmake, ninja, pkgconf, python3, sdl2-compat, sdl2-image, assimp, libsigc++2, libvorbis, freetype2, glew, libglvnd, mesa, openal-soft.

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

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/games-strategy/pioneer.

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/games-strategy/pioneer
echo '11d1fbf745f5fc710f30cce02065b60e5aeb05f7c79b2cfdde8b4c64ec132491  pioneer-20260907.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/pioneer
SRC=$SRC_ROOT/pioneer-20260907
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf pioneer-20260907.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/musl-select.patch"
patch -p1 -i "$PORT_SRC/cstdint.patch"

mkdir build && cd build
cmake .. -G Ninja \
	-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DPIONEER_DATA_DIR=/usr/share/pioneer/data \
	-DPIONEER_INSTALL_DATADIR=share/pioneer \
	-DPIONEER_INSTALL_BINDIR=bin \
	-DUSE_SYSTEM_LIBGLEW=ON \
	-DCMAKE_IGNORE_PATH='/usr/lib/cmake/glew;/usr/lib64/cmake/glew;/lib/cmake/glew;/lib64/cmake/glew' \
	-DUSE_SYSTEM_LIBLUA=OFF \
	-DUSE_SSE42=OFF \
	-DUSE_AVX2=OFF \
	-DWITH_DEVKEYS=OFF \
	-DWITH_OBJECTVIEWER=ON \
	-DREMOTE_LUA_REPL=OFF \
	-DPROFILER_ENABLED=OFF \
	-DBUILD_WITH_OPENAL=ON
ninja

ninja build-data
DESTDIR=$PKG ninja install
cd ..
for _t in editor modelcompiler savegamedump; do
	mv "$PKG/usr/bin/$_t" "$PKG/usr/bin/pioneer-$_t"
done

find "$PKG/usr/share/pioneer/data/lang" -name '*.json' ! -name 'en.json' -delete

rm -f "$PKG/usr/share/applications/net.pioneerspacesim.Pioneer.desktop"
cat > "$PKG/usr/share/applications/net.pioneerspacesim.Pioneer.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Pioneer
GenericName=Space Simulator
Comment=Trade, fight and explore across the Milky Way
Exec=pioneer
Icon=net.pioneerspacesim.Pioneer
Terminal=false
StartupWMClass=pioneer
Categories=Game;Simulation;
Keywords=space;trading;elite;simulator;pioneer;
DESKTOP
chmod 644 "$PKG/usr/share/applications/net.pioneerspacesim.Pioneer.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/pioneer, 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 pioneer-20260907-2.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/pioneer, and runs the triggers its paths call for.

Contents

Installed programs: pioneer, pioneer-editor, pioneer-modelcompiler, pioneer-savegamedump.

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

Notes

Upstream installs the three tools as editor, modelcompiler and savegamedump; the loop after the install gives each a pioneer- prefix.

ninja build-data runs before the install and is not optional. It runs the model compiler just built over data/models, writing each ship and station model in the optimised .sgm form beside its source, and the install copies only .sgm, .dds and .png files from that directory. An install without the step carries no models at all.

The game’s strings are JSON files under data/lang/<module>/, one per language. Every one but en.json is deleted after the install, because the image is English only (see Size and language policy); the package’s language rule matches message catalogs and does not reach these files.

Upstream’s desktop entry is replaced by one with StartupWMClass=pioneer, the Wayland app_id SDL gives the window from the executable’s name. The PNG icons it names are upstream’s.