324.3. dsda-doom-0.29.4
Speedrunning Doom engine from the PrBoom+ line — Boom, MBF21, UMAPINFO, OpenGL renderer
| Version | 0.29.4, release 2 |
| Shelf | games-shooter — First-person shooters, Doom and Quake engines, and their data |
| Phase | 44_apps (Applications), 195 of 422 in build order |
| Licence | GPL-2.0-or-later |
| Homepage | https://github.com/kraflab/dsda-doom |
| Build time | 0.1 SBU |
| Installed size | 6.7 MiB in 7 files |
| Recipe | ports/core/games-shooter/dsda-doom/kpkgbuild |
About
DSDA-Doom is a Doom source port from the PrBoom+ line, aimed at speedrunners: it records and plays back demos exactly, and supports the Boom, MBF and MBF21 extensions and UMAPINFO, with a software renderer and an OpenGL one. With freedoom in depends, the Freedoom IWADs in /usr/share/games/doom, where the engine looks for WAD files and where it installs its own dsda-doom.wad, give it a game to play.
Sources
dsda-doom-0.29.4.tar.gz(10.6 MiB)
sha256f866db79381862080718668f582b0f358811a016db17680e507abb9250afbea5
upstream: https://github.com/kraflab/dsda-doom/archive/refs/tags/v0.29.4.tar.gz
archive copy: sources-2/games-shooter--dsda-doom-0.29.4.tar.gz
Dependencies
Depends on: cmake, ninja, pkgconf, sdl2-compat, sdl2-mixer, sdl2-image, libsndfile, zlib, libzip, mesa, libglvnd, glu, libmad, fluidsynth, libxmp, libvorbis, portmidi, librsvg, freedoom.
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 dsda-doom'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/games-shooter/dsda-doom.
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-shooter/dsda-doom
echo 'f866db79381862080718668f582b0f358811a016db17680e507abb9250afbea5 dsda-doom-0.29.4.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/dsda-doom
SRC=$SRC_ROOT/dsda-doom-0.29.4
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf dsda-doom-0.29.4.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 five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
cmake -S prboom2 -B build -G Ninja \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DENABLE_PACKAGING=OFF \
-DSTRICT_FIND=ON \
-DWITH_FLUIDSYNTH=ON \
-DWITH_IMAGE=ON \
-DWITH_MAD=ON \
-DWITH_PORTMIDI=ON \
-DWITH_VORBISFILE=ON \
-DWITH_XMP=ON
cmake --build build
DESTDIR=$PKG cmake --install build
install -Dm644 prboom2/COPYING "$PKG/usr/share/licenses/$name/COPYING"
install -d "$PKG/usr/share/icons/hicolor/256x256/apps"
rsvg-convert -w 256 -h 256 prboom2/ICONS/dsda-doom.svg \
-o "$PKG/usr/share/icons/hicolor/256x256/apps/dsda-doom.png"
cat > "$PKG/usr/share/applications/dsda-doom.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=DSDA-Doom
GenericName=First Person Shooter
Comment=Play Doom and Boom-compatible maps, with demo recording for speedruns
Exec=dsda-doom %F
Icon=dsda-doom
Terminal=false
StartupWMClass=dsda-doom
Categories=Game;ActionGame;
MimeType=application/x-doom-wad;
Keywords=first;person;shooter;doom;boom;mbf;prboom;freedoom;
DESKTOP
chmod 644 "$PKG/usr/share/applications/dsda-doom.desktop"
The switches, and why each is set:
-DENABLE_PACKAGING=OFF— do not set up upstream’s CPack packaging targets, which are on by default when the project is built on its own.-DSTRICT_FIND=ON— make every optional dependency required: eachfind_packagefor an optional library is givenREQUIRED, so a missing library fails the configure instead of dropping a music or image format without a word.-DWITH_FLUIDSYNTH=ON— with-DWITH_IMAGE=ON,-DWITH_MAD=ON,-DWITH_PORTMIDI=ON,-DWITH_VORBISFILE=ONand-DWITH_XMP=ON: MIDI music through fluidsynth, PNG and other image formats through sdl2-image, MP3 music through libmad, MIDI out to a device through portmidi, Ogg Vorbis music through libvorbis, and tracker music through libxmp. Each is on by default and means “use it if available”; withSTRICT_FINDeach is required.
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/dsda-doom, 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 dsda-doom-0.29.4-2.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/dsda-doom, and runs the triggers its paths call for.
Contents
Installed programs: dsda-doom.
Installed directories: /usr/share/doc/dsda-doom, /usr/share/licenses/dsda-doom.
Notes
The CMake project is in the prboom2 directory of the source, hence -S prboom2.
Upstream installs a desktop entry and a scalable SVG icon. The desktop’s icon lookup reads PNGs only (see Desktop entries belong to the port), so build.sh renders a 256-pixel PNG from the SVG with rsvg-convert from librsvg, and writes its own dsda-doom.desktop over upstream’s, adding StartupWMClass=dsda-doom, the window’s Wayland app id, which is the program’s name. The entry keeps upstream’s claim on application/x-doom-wad, the shared MIME database’s type for *.wad, so a WAD file opens in the game.