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

325.3. warzone2100-4.7.0

Post-apocalyptic real-time strategy with campaigns, skirmish and a research tree

Version 4.7.0, release 2
Shelf games-strategy — Strategy, simulation and space-trading games, and their data
Phase 44_apps (Applications), 203 of 422 in build order
Licence GPL-2.0-or-later
Homepage https://wz2100.net/
Build time 58.7 SBU
Installed size 409.7 MiB in 133 files
Recipe ports/core/games-strategy/warzone2100/kpkgbuild

About

Warzone 2100 is a real-time strategy game set after a nuclear war: the player builds a base, researches a large technology tree and designs their own units, in campaigns, skirmishes against the computer or multiplayer. It renders through OpenGL or Vulkan on SDL3, and its texture packages are encoded during the build from the PNGs in the source.

Sources

Dependencies

Depends on: cmake, ninja, pkgconf, sdl3, physfs, libpng, libjpeg-turbo, freetype2, harfbuzz, fribidi, openal-soft, libogg, libvorbis, opus, libtheora, sqlite, curl, libsodium, libzip, protobuf, miniupnpc, vulkan-headers, shaderc, zip, asciidoctor.

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

What kpkg does

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

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-strategy/warzone2100
echo '95ee4d5b88680ea1b1cf230b67ea84028e08a2458b84605ac9f7fb9eb97c4e37  warzone2100-4.7.0.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/warzone2100
SRC=$SRC_ROOT/warzone2100-4.7.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf warzone2100-4.7.0.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/no-update-check.patch"

patch -p1 -i "$PORT_SRC/vulkan-colorspace.patch"

export LDFLAGS="$LDFLAGS -Wl,--strip-debug"
cmake -S . -B build -G Ninja \
	-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DCMAKE_INSTALL_LIBDIR=lib \
	-DWZ_DISTRIBUTOR=KDOS \
	-DWZ_ENABLE_WARNINGS=OFF \
	-DWZ_ENABLE_WARNINGS_AS_ERRORS=OFF \
	-DWZ_ENABLE_BASIS_UNIVERSAL=ON \
	-DWZ_INCLUDE_TERRAIN_HIGH=ON \
	-DWZ_DOWNLOAD_PREBUILT_PACKAGES=OFF \
	-DWZ_DISABLE_FETCHCONTENT_GIT_CLONE=ON \
	-DWZ_ENABLE_BACKEND_VULKAN=ON \
	-DWZ_USE_SYSTEM_LIBJPEG_TURBO=ON \
	-DWZ_FORCE_MINIMAL_OPUSFILE=ON \
	-DWZ_DEBUG_GFX_API_LEAKS=OFF \
	-DENABLE_GNS_NETWORK_BACKEND=ON \
	-DENABLE_DISCORD=OFF \
	-DWZ_BUILD_SENTRY=OFF \
	-DWZ_SKIP_ELF_SEPARATE_DEBUG=ON \
	-DENABLE_NLS=OFF \
	-DENABLE_DOCS=ON \
	-DCMAKE_REQUIRE_FIND_PACKAGE_VulkanHeaders=ON \
	-DCMAKE_REQUIRE_FIND_PACKAGE_Fribidi=ON \
	-DCMAKE_REQUIRE_FIND_PACKAGE_Miniupnpc=ON
cmake --build build
DESTDIR=$PKG cmake --install build
rm -rf "$PKG/usr/share/doc/warzone2100/hosting/linux_scripts"

rm -f "$PKG/usr/share/icons/net.wz2100.warzone2100.png"
install -Dm644 icons/warzone2100.large.png \
	"$PKG/usr/share/icons/hicolor/256x256/apps/net.wz2100.warzone2100.png"
cat > "$PKG/usr/share/applications/net.wz2100.warzone2100.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Warzone 2100
GenericName=Strategy Game
Comment=Post-apocalyptic real-time strategy
Exec=warzone2100
Icon=net.wz2100.warzone2100
Terminal=false
StartupWMClass=warzone2100
Categories=Game;StrategyGame;
Keywords=warzone2100;wz2100;strategy;rts;real-time;
DESKTOP
chmod 644 "$PKG/usr/share/applications/net.wz2100.warzone2100.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/warzone2100, 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 warzone2100-4.7.0-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/warzone2100, and runs the triggers its paths call for.

Contents

Installed programs: warzone2100.

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

Short descriptions

warzone2100 3D real time strategy game

Notes

build.sh removes /usr/share/doc/warzone2100/hosting/linux_scripts, the sample scripts for running a dedicated host, which include a systemd unit, wz2100host_sample.service; KDOS has no systemd.

Upstream installs its icon loose in /usr/share/icons, which no icon lookup reads, so build.sh removes it, installs icons/warzone2100.large.png into hicolor instead, and writes its own desktop entry over upstream’s with StartupWMClass=warzone2100, the window’s Wayland app id, which is the program’s name.

The campaign videos are not shipped. They are upstream’s separate sequences.wz, hundreds of megabytes in its standard-quality set, which -DWZ_INCLUDE_VIDEOS would download at build time and the build leaves at its default OFF; the campaigns play without the briefing videos, and the game says on the Campaign screen that they are missing. To add them, download upstream’s sequences.wz (from its wz-sequences releases) and copy it into /usr/share/warzone2100/ beside the other data packages, where WZ_INCLUDE_VIDEOS would have installed it.