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

202.5. openal-soft-1.25.2

OpenAL 3D positional audio for games, played through PipeWire, Pulse or ALSA

Version 1.25.2, release 1
Shelf audio-io — The sound stack: ALSA, PipeWire and WirePlumber, PulseAudio client, and portable audio I/O APIs
Phase 42_graphics (Graphics Stack), 58 of 189 in build order
Licence LGPL-2.0-or-later
Homepage https://openal-soft.org/
Build time 1.6 SBU
Installed size 4.0 MiB in 29 files
Recipe ports/core/audio-io/openal-soft/kpkgbuild

About

OpenAL Soft is an implementation of OpenAL, the 3D positional audio API games and emulators use. In KDOS it plays through PipeWire first, with PulseAudio, ALSA and JACK behind it, all four of which reach the same PipeWire server. It also renders binaural sound for headphones from HRTF data that is built into the library.

Sources

Dependencies

Depends on: cmake, ninja, pkgconf, pipewire, libpulse, alsa-lib, dbus, libsndfile, libmysofa.

Required by (12): blender, endless-sky, ioquake3, libkdegames, love, luanti, pioneer, qt5-qtmultimedia, supertux, supertuxkart, warzone2100, yamagi-quake2.

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/42_graphics/phase.env && kpkg install openal-soft'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/audio-io/openal-soft.

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/audio-io/openal-soft
echo 'fb27e5839aa11f0e5b9d33756965291fad5d6909ab928ea1f796f4a1a6877894  openal-soft-1.25.2.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/openal-soft
SRC=$SRC_ROOT/openal-soft-1.25.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf openal-soft-1.25.2.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:

mkdir -p build && cd build
cmake .. -G Ninja \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DCMAKE_INSTALL_LIBDIR=lib \
	-DALSOFT_UPDATE_BUILD_VERSION=OFF \
	-DALSOFT_ENABLE_MODULES=OFF \
	-DALSOFT_UTILS=ON \
	-DALSOFT_NO_CONFIG_UTIL=ON \
	-DALSOFT_EXAMPLES=OFF \
	-DALSOFT_TESTS=OFF \
	-DALSOFT_INSTALL_EXAMPLES=OFF \
	-DALSOFT_EMBED_HRTF_DATA=ON \
	-DALSOFT_RTKIT=ON \
	-DALSOFT_REQUIRE_RTKIT=ON \
	-DALSOFT_BACKEND_PIPEWIRE=ON \
	-DALSOFT_REQUIRE_PIPEWIRE=ON \
	-DALSOFT_BACKEND_PULSEAUDIO=ON \
	-DALSOFT_REQUIRE_PULSEAUDIO=ON \
	-DALSOFT_BACKEND_ALSA=ON \
	-DALSOFT_REQUIRE_ALSA=ON \
	-DALSOFT_BACKEND_JACK=ON \
	-DALSOFT_REQUIRE_JACK=ON \
	-DALSOFT_BACKEND_OSS=OFF \
	-DALSOFT_BACKEND_SNDIO=OFF \
	-DALSOFT_BACKEND_PORTAUDIO=OFF \
	-DALSOFT_BACKEND_SDL2=OFF \
	-DALSOFT_BACKEND_SDL3=OFF \
	-DALSOFT_BACKEND_WAVE=ON \
	-DCMAKE_REQUIRE_FIND_PACKAGE_MySOFA=ON
ninja
DESTDIR=$PKG ninja install
install -m755 uhjdecoder uhjencoder sofa-info "$PKG/usr/bin"

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/openal-soft, 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 openal-soft-1.25.2-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/openal-soft, and runs the triggers its paths call for.

Contents

Installed programs: makemhr, openal-info, sofa-info, uhjdecoder, uhjencoder.

Installed libraries: libopenal.so.

Installed directories: /usr/include/AL, /usr/lib/cmake/OpenAL, /usr/share/licenses/openal-soft, /usr/share/openal.

Short descriptions

openal.pc OpenAL is a cross-platform 3D audio API