328.14. dosbox-x-2026.08.31
x86 PC emulator for DOS, Windows 3.x/9x, PC-98 and PCjr/Tandy software
| Version | 2026.08.31, release 1 |
| Shelf | emulators — Standalone emulators of computers and consoles, and compatibility layers |
| Phase | 44_apps (Applications), 121 of 422 in build order |
| Licence | GPL-2.0-or-later |
| Homepage | https://dosbox-x.com/ |
| Build time | 15.4 SBU |
| Installed size | 45.5 MiB in 61 files |
| Recipe | ports/core/emulators/dosbox-x/kpkgbuild |
About
DOSBox-X is an x86 PC emulator for DOS software, for Windows 3.x and 9x, and for the NEC PC-98 and the PCjr and Tandy machines. It aims to emulate the hardware of the period accurately rather than only what games need. The port builds its SDL 2 front end on sdl2-compat.
Sources
dosbox-x-2026.08.31.tar.gz(126.9 MiB)
sha256992ea538ea858f9fb196b39de2276ce3048c731965e144e6288202abed109782
upstream: https://github.com/joncampbell123/dosbox-x/archive/refs/tags/dosbox-x-v2026.08.31.tar.gz
archive copy: sources-2/emulators--dosbox-x-2026.08.31.tar.gz
Dependencies
Depends on: autoconf, automake, pkgconf, librsvg, sdl2-compat, sdl2-net, libglvnd, mesa, freetype2, libpng, zlib, alsa-lib, fluidsynth, libslirp, libpcap, ffmpeg, duktape.
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.
--disable-x11, line 16: libX11 (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 dosbox-x'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/emulators/dosbox-x.
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/emulators/dosbox-x
echo '992ea538ea858f9fb196b39de2276ce3048c731965e144e6288202abed109782 dosbox-x-2026.08.31.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/dosbox-x
SRC=$SRC_ROOT/dosbox-x-2026.08.31
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf dosbox-x-2026.08.31.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:
./autogen.sh
./configure --prefix=/usr --libdir=/usr/lib \
--enable-sdl2 \
--disable-x11 \
--enable-opengl \
--enable-freetype \
--enable-printer \
--enable-avcodec \
--enable-libfluidsynth \
--enable-libslirp \
--enable-alsa-midi \
--enable-mt32 \
--enable-screenshots \
--enable-xbrz \
--enable-dynamic-core \
--enable-dynrec
make
make DESTDIR=$PKG install
find "$PKG/usr/share/dosbox-x/languages" -name '*.lng' ! -name 'en_US.lng' -delete
for _size in 32 48 64 128 256; do
install -d "$PKG/usr/share/icons/hicolor/${_size}x${_size}/apps"
rsvg-convert -w "$_size" -h "$_size" \
-o "$PKG/usr/share/icons/hicolor/${_size}x${_size}/apps/dosbox-x.png" \
contrib/icons/dosbox-x.svg
done
cat > "$PKG/usr/share/applications/com.dosbox_x.DOSBox-X.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=DOSBox-X
GenericName=DOS Emulator
Comment=Run DOS, Windows 3.x and 9x, and PC-98 software
TryExec=dosbox-x
Exec=dosbox-x
Icon=dosbox-x
Terminal=false
StartupWMClass=dosbox-x
Categories=Game;Emulator;
Keywords=dos;msdos;emulator;pcjr;tandy;pc98;pc-98;windows 3.1;windows 95;retro;
DESKTOP
chmod 644 "$PKG/usr/share/applications/com.dosbox_x.DOSBox-X.desktop"
The switches, and why each is set:
--enable-sdl2— Builds against SDL 2, here sdl2-compat. Without it configure looks for SDL 1.x first and takes SDL 2 only when that is missing. The SDL 3 build,--enable-sdl3, asks for a newer SDL 3 than the sdl3 port.--disable-x11— No X11 integration: the XKB keyboard-layout lookup and the XRandR queries through Xlib. Configure also leaves it out by itself when SDL’sSDL_config.hdefines no X11 video driver.--enable-opengl— With--enable-freetype,--enable-printer,--enable-screenshotsand--enable-xbrz: OpenGL output through libglvnd, the TrueType console through freetype2, printer emulation, PNG screenshots and the xBRZ scaler. All are upstream’s defaults, named.--enable-avcodec— Video capture through ffmpeg’s libavcodec. Upstream’s default, named.--enable-libfluidsynth— With--enable-alsa-midiand--enable-mt32: General MIDI through fluidsynth, MIDI out through alsa-lib, and the MUNT MT-32 emulation compiled from its copy insrc/libs/mt32. Upstream’s defaults, named.--enable-libslirp— User-mode NE2000 networking through libslirp, which needs no privileges. Upstream’s default, named.--enable-dynamic-core— With--enable-dynrec: the dynamic CPU cores. The first allows all of them, the x86-64 one among them; the second is the portable recompiling core. Upstream’s defaults, 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/dosbox-x, 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 dosbox-x-2026.08.31-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/dosbox-x, and runs the triggers its paths call for.
Contents
Installed programs: dosbox-x.
Installed directories: /usr/share/dosbox-x, /usr/share/licenses/dosbox-x.
Short descriptions
dosbox-x |
a x86/DOS and PC98 emulator |
Notes
The tag archive carries no configure script, so build.sh runs upstream’s ./autogen.sh first, which is why autoconf and automake are in depends.
Every optional library is found by a probe that drops the feature, at most with a warning, when the library is missing: the ones above, and also sdl2-net for the modem and IPX emulation, libpcap for Ethernet pass-through to the host, and duktape, the ECMAScript engine sdlmain.cpp starts a heap of. Each is in depends, which is all that keeps the feature in the build.
build.sh deletes every interface translation in /usr/share/dosbox-x/languages but en_US.lng; DOSBox-X falls back to its built-in English strings. These .lng files are not message catalogs, so the package-wide English-only rule (see Size and language policy) does not reach them.
Upstream installs its icon as SVG only, in hicolor/scalable. build.sh renders contrib/icons/dosbox-x.svg with rsvg-convert from librsvg into five PNG sizes in the hicolor theme.
Upstream’s desktop entry is replaced: its StartupWMClass ends in a space, which no app_id matches. SDL’s Wayland app_id is the executable’s name, dosbox-x.