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

323.3. luanti-5.17.0

Voxel game engine, with Minetest Game for offline play

Version 5.17.0, release 1
Shelf games-action — Action, arcade, racing, platform and sandbox games
Phase 44_apps (Applications), 138 of 422 in build order
Licence LGPL-2.1-or-later AND Zlib AND MIT AND Apache-2.0 AND CC-BY-SA-3.0 AND CC-BY-SA-4.0 AND CC-BY-4.0
Homepage https://www.luanti.org/
Build time 6.5 SBU
Installed size 27.4 MiB in 1162 files
Recipe ports/core/games-action/luanti/kpkgbuild

About

Luanti is a voxel game engine: a world of blocks that can be mined and built with, where the game itself is written in Lua and loaded at run time. The engine installs no playable game (its source carries only Development Test, a test game), so this port also installs Minetest Game, a sandbox game from the same project, written in Lua and taken from a second source, giving the program something to play from its first start without downloading anything. The client renders through IrrlichtMt, Luanti’s own fork of the Irrlicht engine, on SDL3.

Sources

Dependencies

Depends on: cmake, ninja, pkgconf, sdl3, mesa, libglvnd, freetype2, libjpeg-turbo, libpng, zlib, zstd, sqlite, luajit, gmp, jsoncpp, openal-soft, libogg, libvorbis, openssl.

Required by: no port names it.

Optional, off in KDOS

These switches in build.sh turn off a feature whose library is a port here. The recipe may turn each off on purpose, or because the library was not yet a port when the recipe was written; this list cannot tell which.

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

What kpkg does

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

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/luanti
echo '52e7dd315ae0e5c3868a23231e691578cd694bcca5af627fc57c03f32bdc846f  luanti-5.17.0.tar.gz' | sha256sum -c -
echo '33a3bb43b08497a0bdb2f49f140a2829e582d5c16c0ad52be1595c803f706912  minetest_game-5.8.0.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/luanti
SRC=$SRC_ROOT/luanti-5.17.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf luanti-5.17.0.tar.gz -C "$SRC" --strip-components=1
tar --no-same-permissions --warning=no-unknown-keyword -xf minetest_game-5.8.0.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 _mtg and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

cmake -S . -B build -G Ninja \
	-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DBUILD_CLIENT=ON \
	-DBUILD_SERVER=OFF \
	-DBUILD_UNITTESTS=OFF \
	-DBUILD_BENCHMARKS=OFF \
	-DBUILD_DOCUMENTATION=OFF \
	-DBUILD_WITH_TRACY=OFF \
	-DRUN_IN_PLACE=OFF \
	-DENABLE_LTO=OFF \
	-DUSE_SDL3=ON \
	-DENABLE_UPDATE_CHECKER=OFF \
	-DENABLE_CURL=OFF \
	-DENABLE_GETTEXT=OFF \
	-DENABLE_SOUND=ON \
	-DENABLE_OPENSSL=ON \
	-DREQUIRE_LUAJIT=ON \
	-DENABLE_POSTGRESQL=OFF \
	-DENABLE_LEVELDB=OFF \
	-DENABLE_REDIS=OFF \
	-DENABLE_SPATIAL=OFF \
	-DENABLE_PROMETHEUS=OFF \
	-DENABLE_CURSES=OFF \
	-DINSTALL_DEVTEST=OFF
cmake --build build
DESTDIR=$PKG cmake --install build

install -d "$PKG/usr/share/luanti/games"
cp -R "$SRC_ROOT/minetest_game-$_mtg" "$PKG/usr/share/luanti/games/minetest_game"
find "$PKG/usr/share/luanti/games/minetest_game" -path '*/locale/*.tr' -delete

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

Contents

Installed programs: luanti, minetest.

Installed directories: /usr/share/doc/luanti, /usr/share/licenses/luanti, /usr/share/luanti.

Short descriptions

luanti voxel game engine

Notes

minetest_game-<version>.tar.gz unpacks beside Luanti’s own tree, and build.sh copies it whole into /usr/share/luanti/games/minetest_game, where the engine finds the games it offers in its main menu. The game’s version is the _mtg helper in kpkgbuild, and it moves separately from the engine’s. build.sh then deletes every .tr file under the game’s locale/ directories: these are Luanti’s translation files, which the engine loads at run time, and kpkg’s prune removes only compiled catalogues.