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

326.2. crawl-tiles-0.34.1

Dungeon Crawl Stone Soup — the open-ended roguelike of the Orb of Zot, in its graphical tiles build

Version 0.34.1, release 1
Shelf games-rpg — RPGs, roguelikes and interactive fiction
Phase 44_apps (Applications), 189 of 422 in build order
Licence GPL-2.0-or-later
Homepage https://crawl.develz.org
Build time 12.1 SBU
Installed size 43.5 MiB in 441 files
Recipe ports/core/games-rpg/crawl-tiles/kpkgbuild

About

Dungeon Crawl Stone Soup is a single-player roguelike: the player descends a dungeon of randomly generated levels in search of the Orb of Zot, with permanent death and a large choice of species, backgrounds and gods. This port is its graphical tiles build, the program crawl, drawn with SDL2 and OpenGL and with sound; the game’s level and monster data install under /usr/share/crawl, and saves go to ~/.crawl.

Sources

Dependencies

Depends on: pkgconf, perl, python3, python3-yaml, sdl2-compat, sdl2-image, sdl2-mixer, freetype2, libpng, zlib, sqlite, lua54, libglvnd, mesa, ttf-dejavu.

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 crawl-tiles'

What kpkg does

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

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-rpg/crawl-tiles
echo '473b9cdc16be0b537ac11e43c6c77db4b290000e4a17f72a842eba59c6b7be2a  crawl-tiles-0.34.1.tar.xz' | 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/crawl-tiles
SRC=$SRC_ROOT/crawl-tiles-0.34.1
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf crawl-tiles-0.34.1.tar.xz -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-execinfo.patch"

cd source

mk() {
	make \
		TILES=y SOUND=y \
		EXTERNAL_FLAGS="$CXXFLAGS" EXTERNAL_LDFLAGS="$LDFLAGS" \
		prefix=/usr bin_prefix=bin \
		NO_TRY_GOLD=y NO_TRY_LLD=y \
		LANGUAGES= \
		PROPORTIONAL_FONT=/usr/share/fonts/TTF/DejaVuSans.ttf \
		MONOSPACED_FONT=/usr/share/fonts/TTF/DejaVuSansMono.ttf \
		"$@"
}
mk
mk DESTDIR=$PKG install

for s in 32 48 512; do
	install -Dm644 dat/tiles/stone_soup_icon-${s}x$s.png \
		"$PKG/usr/share/icons/hicolor/${s}x$s/apps/crawl-tiles.png"
done

install -d "$PKG/usr/share/applications"
cat > "$PKG/usr/share/applications/crawl-tiles.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Dungeon Crawl Stone Soup
GenericName=Roguelike
Comment=Descend the Dungeon for the Orb of Zot, in tiles
Exec=crawl
Icon=crawl-tiles
Terminal=false
StartupWMClass=crawl
Categories=Game;AdventureGame;RolePlaying;
Keywords=roguelike;dungeon;crawl;dcss;stone soup;
DESKTOP
chmod 644 "$PKG/usr/share/applications/crawl-tiles.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/crawl-tiles, 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 crawl-tiles-0.34.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/crawl-tiles, and runs the triggers its paths call for.

Contents

Installed programs: crawl.

Installed directories: /usr/share/crawl, /usr/share/licenses/crawl-tiles.

Notes

The mk function passes the same variables to both make runs: upstream’s Makefile reads the build type at install time too, so make install without TILES and the rest would install a different build.

Every library is the system’s. In a native Linux build the Makefile finds SDL2, FreeType, SQLite, zlib, libpng and Lua through pkg-config, so nothing under contrib/ is compiled. Lua is lua54, found as lua5.4. The Makefile falls back without a word: when no Lua 5.4 module answers pkg-config, it compiles and links the copy under contrib/lua instead, and the build still succeeds. perl, python3 and python3-yaml are in depends for the build-time generators, such as util/mon-gen.py, which writes the monster table from dat/mons/*.yaml.

build.sh installs upstream’s tile icons into hicolor and writes the desktop entry, with StartupWMClass=crawl: the window’s Wayland app id is SDL’s default, the executable’s name.