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

323.2. supertuxkart-1.5

3D kart racing with story mode, grand prix, battles and soccer

Version 1.5, release 1
Shelf games-action — Action, arcade, racing, platform and sandbox games
Phase 44_apps (Applications), 137 of 422 in build order
Licence GPL-3.0-or-later
Homepage https://supertuxkart.net/
Build time 35.7 SBU
Installed size 60.2 MiB in 1256 files
Recipe ports/core/games-action/supertuxkart/kpkgbuild

About

SuperTuxKart is a 3D kart racer: story mode, grand prix, time trials, battle arenas and soccer, against the computer or other people on the same machine or over the network. It renders through its own fork of the Irrlicht engine, with an OpenGL renderer and a Vulkan one, and plays sound through OpenAL. This port is the program and the engine’s own data; the karts, tracks, music, sounds, models and textures are stk-assets, built from the same release tarball.

Sources

Dependencies

Depends on: cmake, ninja, pkgconf, sdl2-compat, mesa, libglvnd, shaderc, openal-soft, libogg, libvorbis, freetype2, harfbuzz, libjpeg-turbo, libpng, zlib, curl, openssl, sqlite, bluez, stk-assets.

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

What kpkg does

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

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-action/supertuxkart
echo '33cf8841e4ff4082d80b9248014295bbbea61d14683e86dff100e3ab8f7b27cb  supertuxkart-1.5.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/supertuxkart
SRC=$SRC_ROOT/supertuxkart-1.5
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf supertuxkart-1.5.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 recipe’s helpers group and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

patch -p1 -i "$PORT_SRC/offline-default.patch"

cmake -S . -B build -G Ninja \
	-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DCMAKE_INSTALL_LIBDIR=lib \
	-DSERVER_ONLY=OFF \
	-DCHECK_ASSETS=OFF \
	-DBUILD_RECORDER=OFF \
	-DUSE_WIIUSE=ON \
	-DUSE_SYSTEM_WIIUSE=OFF \
	-DUSE_IPV6=ON \
	-DUSE_SQLITE3=ON \
	-DUSE_CRYPTO_OPENSSL=ON \
	-DUSE_MOJOAL=OFF \
	-DUSE_DNS_C=OFF \
	-DUSE_GLES2=OFF \
	-DNO_SHADERC=OFF \
	-DUSE_LIBBFD=OFF
cmake --build build
DESTDIR=$PKG cmake --install build
rm "$PKG/usr/lib/libwiiuse.a" "$PKG/usr/include/wiiuse.h" \
	"$PKG/usr/lib/libangelscript.a" "$PKG/usr/include/angelscript.h"
rm -r "$PKG/usr/lib/cmake/Angelscript"
rmdir "$PKG/usr/include" "$PKG/usr/lib/cmake" "$PKG/usr/lib"

find "$PKG/usr/share/supertuxkart/data/po" -name '*.po' -delete
for d in karts library models music sfx textures tracks; do
	rm -rf "$PKG/usr/share/supertuxkart/data/$d"
done

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/supertuxkart, 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 supertuxkart-1.5-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/supertuxkart, and runs the triggers its paths call for.

Contents

Installed programs: supertuxkart.

Installed directories: /usr/share/licenses/supertuxkart, /usr/share/supertuxkart/data/challenges, /usr/share/supertuxkart/data/gamerzilla, /usr/share/supertuxkart/data/gfx, /usr/share/supertuxkart/data/grandprix, /usr/share/supertuxkart/data/gui, /usr/share/supertuxkart/data/po, /usr/share/supertuxkart/data/replay, /usr/share/supertuxkart/data/shaders, /usr/share/supertuxkart/data/skins, /usr/share/supertuxkart/data/ttf.

Notes

cmake --install installs two libraries built from copies in the source, wiiuse and AngelScript (the scripting language tracks use), as static archives with their headers and AngelScript’s CMake package files. The game links both into its binary, so build.sh removes them, and the empty /usr/include and /usr/lib directories after them. A change that makes upstream install any other file under those directories makes the rmdir fail and the build stop.

Upstream installs the whole of data/ from the release, assets included. build.sh deletes the karts, library, models, music, sfx, textures and tracks directories again, because stk-assets installs those same seven, and kpkg’s conflict scan refuses a path two packages claim. The list here and the list in stk-assets/build.sh have to stay the same. The two ports share group = supertuxkart, so the version checker offers them only as one bump; both name the same tarball by the same sha256, so the source cache holds it once.

The game reads its translations as .po files from data/po at run time. kpkg’s language prune removes only compiled catalogues, so build.sh deletes the .po files itself, and the game is English only, like the rest of the system.