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
luanti-5.17.0.tar.gz(12.1 MiB)
sha25652e7dd315ae0e5c3868a23231e691578cd694bcca5af627fc57c03f32bdc846f
upstream: https://github.com/luanti-org/luanti/archive/refs/tags/5.17.0.tar.gz
archive copy: sources-2/games-action--luanti-5.17.0.tar.gzminetest_game-5.8.0.tar.gz(2.5 MiB)
sha25633a3bb43b08497a0bdb2f49f140a2829e582d5c16c0ad52be1595c803f706912
upstream: https://github.com/luanti-org/minetest_game/archive/refs/tags/5.8.0.tar.gz
archive copy: sources-2/games-action--minetest_game-5.8.0.tar.gz
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.
-DENABLE_CURL=OFF, line 26: curl (explained with the switches below)-DENABLE_POSTGRESQL=OFF, line 31: postgresql (explained with the switches below)-DENABLE_CURSES=OFF, line 36: ncurses (explained with the switches below)
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:
-DBUILD_CLIENT=ON— with-DBUILD_SERVER=OFF: build theluantiprogram, which plays local worlds and joins servers, and not the separate dedicated serverluantiserver. Both are upstream’s defaults, named.-DBUILD_UNITTESTS=OFF— leave out the unit tests, which upstream compiles into the program by default.-DBUILD_DOCUMENTATION=OFF— skip the Doxygen documentation, which upstream builds by default.-DBUILD_BENCHMARKS=OFF— with-DBUILD_WITH_TRACY=OFF: no benchmarks and no Tracy profiler client. Tracy is fetched from git at configure time, which a build without network cannot do. Both are upstream’s defaults, named.-DRUN_IN_PLACE=OFF— a system install: the program reads its data from/usr/share/luantiand keeps worlds and settings in the user’s home, rather than everything in the directory it runs from. Upstream’s default on Linux, named.-DENABLE_LTO=OFF— no link-time optimisation. Upstream turns it on by default for a release build on Linux.-DUSE_SDL3=ON— build IrrlichtMt’s SDL3 device rather than its default SDL2 one, linking sdl3 directly. Upstream’s build documentation calls the SDL3 device experimental.-DENABLE_CURL=OFF— with-DENABLE_UPDATE_CHECKER=OFF: build without libcurl, which upstream needs for the public server list, the in-game content browser (ContentDB, where games, mods and texture packs are downloaded) and the update check. Without it the program plays local worlds and joins a server whose address is typed in. The update checker switch sets only the default of theupdate_information_urlsetting, so with cURL off it is named for completeness.-DENABLE_GETTEXT=OFF— no gettext, so the engine’s interface is English only and its message catalogues are not built, in line with the system’s language policy.-DENABLE_SOUND=ON— in-game sound through openal-soft and Ogg Vorbis. Upstream’s default; with it on, a missing OpenAL or Vorbis is a configure error.-DENABLE_OPENSSL=ON— take SHA-1 and SHA-2 from OpenSSL’s libcrypto, which upstream describes as faster than its own. Upstream’s default, named.-DREQUIRE_LUAJIT=ON— make luajit required. Upstream looks for LuaJIT and, when it is missing, compiles the plain Lua interpreter bundled in the source instead, which is slower; with this switch a missing LuaJIT is a configure error.-DENABLE_POSTGRESQL=OFF— with-DENABLE_LEVELDB=OFFand-DENABLE_REDIS=OFF: store maps in SQLite only, the backend that is always built. These three are alternative map databases, each on by default when its library is found; the switches keep the result from depending on what the build root holds.-DENABLE_SPATIAL=OFF— no libspatialindex for area stores, which upstream uses to speed them up when it finds the library.-DENABLE_PROMETHEUS=OFF— no Prometheus metrics exporter, upstream’s default, named.-DENABLE_CURSES=OFF— no ncurses server console. Its default followsBUILD_SERVER, which is off.-DINSTALL_DEVTEST=OFF— do not install Development Test, upstream’s test game. Upstream’s default, named.
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.