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

326.5. devilutionx-1.5.5

Diablo and Hellfire engine, for a player's own copy of the game data

Version 1.5.5, release 1
Shelf games-rpg — RPGs, roguelikes and interactive fiction
Phase 44_apps (Applications), 192 of 422 in build order
Licence LicenseRef-Sustainable-Use-License
Homepage https://github.com/diasurgical/DevilutionX
Build time 13.6 SBU
Installed size 10.2 MiB in 9 files
Recipe ports/core/games-rpg/devilutionx/kpkgbuild

About

DevilutionX is an engine for Blizzard’s Diablo and its expansion Hellfire, built on Devilution, a reconstruction of the original game’s source code, so that it runs on current systems. It ships no game: the player supplies their own DIABDAT.MPQ (and Hellfire’s files for the expansion), which cannot be redistributed. The engine’s own assets, devilutionx.mpq, come prebuilt in upstream’s source release. This port installs the one program, devilutionx, with a menu entry for each game.

Sources

Dependencies

Depends on: cmake, ninja, pkgconf, sdl2-compat, sdl2-image, libpng, zlib, bzip2, libsodium.

Required by: no port names it.

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

What kpkg does

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

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/devilutionx
echo 'f42379cdf098a351a2020d9e6de1840c76e09113c792f73c6df34dec26818b04  devilutionx-1.5.5.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/devilutionx
SRC=$SRC_ROOT/devilutionx-1.5.5
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf devilutionx-1.5.5.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:

mkdir build && cd build
cmake .. -G Ninja \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DFETCHCONTENT_FULLY_DISCONNECTED=ON \
	-DBUILD_TESTING=OFF \
	-DDISABLE_LTO=ON \
	-DDISABLE_ZERO_TIER=ON \
	-DDISABLE_TCP=OFF \
	-DDISCORD_INTEGRATION=OFF \
	-DNONET=OFF \
	-DNOSOUND=OFF \
	-DBUILD_ASSETS_MPQ=OFF \
	-DDEVILUTIONX_SYSTEM_SDL2=ON \
	-DDEVILUTIONX_SYSTEM_SDL_IMAGE=ON \
	-DDEVILUTIONX_SYSTEM_ZLIB=ON \
	-DDEVILUTIONX_SYSTEM_BZIP2=ON \
	-DDEVILUTIONX_SYSTEM_LIBSODIUM=ON \
	-DDEVILUTIONX_SYSTEM_LIBFMT=OFF \
	-DDEVILUTIONX_SYSTEM_SDL_AUDIOLIB=OFF \
	-DDEVILUTIONX_SYSTEM_SIMPLEINI=OFF
ninja
DESTDIR=$PKG ninja install
cd ..

rm -f "$PKG/usr/share/applications/devilutionx.desktop" \
	"$PKG/usr/share/applications/devilutionx-hellfire.desktop"
cat > "$PKG/usr/share/applications/devilutionx.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=DevilutionX
GenericName=Action Role-Playing Game
Comment=Play Diablo from your own game data
Exec=devilutionx --diablo
Icon=devilutionx
Terminal=false
StartupWMClass=devilutionx
Categories=Game;RolePlaying;
Keywords=diablo;rpg;dungeon;devilutionx;
DESKTOP
cat > "$PKG/usr/share/applications/devilutionx-hellfire.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=DevilutionX Hellfire
GenericName=Action Role-Playing Game
Comment=Play Diablo: Hellfire from your own game data
Exec=devilutionx --hellfire
Icon=devilutionx-hellfire
Terminal=false
StartupWMClass=devilutionx
Categories=Game;RolePlaying;
Keywords=diablo;hellfire;rpg;dungeon;devilutionx;
DESKTOP
chmod 644 "$PKG/usr/share/applications/"devilutionx*.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/devilutionx, 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 devilutionx-1.5.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/devilutionx, and runs the triggers its paths call for.

Contents

Installed programs: devilutionx.

Installed directories: /usr/share/diasurgical, /usr/share/licenses/devilutionx.

Notes

The build runs from a build directory inside the source; upstream warns about a build in the source directory itself. Libraries that have no system form at all, such as asio, libmpq and libsmackerdec, are always compiled, from their sources under dist/ through the CMake wrappers in 3rdParty/.

build.sh removes upstream’s two desktop entries and writes its own, devilutionx.desktop running devilutionx --diablo and devilutionx-hellfire.desktop running devilutionx --hellfire. Both add StartupWMClass=devilutionx: the two games run the one program, whose Wayland app id is SDL’s default, the executable’s name.