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
openal-soft-1.25.2.tar.gz(1.3 MiB)
sha256fb27e5839aa11f0e5b9d33756965291fad5d6909ab928ea1f796f4a1a6877894
upstream: https://github.com/kcat/openal-soft/archive/refs/tags/1.25.2.tar.gz
archive copy: sources-1/audio-io--openal-soft-1.25.2.tar.gz
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:
-DALSOFT_UPDATE_BUILD_VERSION=OFF— Do not ask git for the commit and branch to compile in; a release tarball is not a git checkout.-DALSOFT_ENABLE_MODULES=OFF— Compile from headers rather than as C++20 modules, which upstream uses by default where the compiler supports them.-DALSOFT_UTILS=ON— Build the utilities:openal-info,makemhr,uhjdecoder,uhjencoderandsofa-info. Upstream’s install rule installs only the first two, sobuild.shcopies the other three into/usr/binafter the install.-DALSOFT_NO_CONFIG_UTIL=ON— Leave outalsoft-config, a Qt program. Its settings are plain text, read from~/.alsoftrcand~/.config/alsoft.conf.-DALSOFT_EXAMPLES=OFF,-DALSOFT_TESTS=OFF,-DALSOFT_INSTALL_EXAMPLES=OFF— No example players and no tests.-DALSOFT_EMBED_HRTF_DATA=ON— Compile the default HRTF data sets into the library, so binaural output needs no data files. It is upstream’s default.-DALSOFT_RTKIT=ON,-DALSOFT_REQUIRE_RTKIT=ON— Build the RTKit fallback, and fail the configure if its D-Bus support is missing. The mixer thread first raises itself to real-time priority withpthread_setschedparamand asks RTKit over D-Bus only when that fails. The image ships no RTKit daemon; the direct call succeeds for a member ofaudio, every human account, becausepam_limitsgives that groupRLIMIT_RTPRIO95 at login (see Starting a session).-DALSOFT_BACKEND_PIPEWIRE=ON— This switch and the other three backends turned on with it, PulseAudio, ALSA and JACK, each with itsALSOFT_REQUIRE_switch also on (-DALSOFT_REQUIRE_PIPEWIRE=ONand the rest). Without theREQUIRE_switch a backend whose library is missing is dropped at configure time, and the library is built with no way to open a device. JACK is PipeWire’slibjack.-DALSOFT_BACKEND_OSS=OFF,-DALSOFT_BACKEND_SNDIO=OFF,-DALSOFT_BACKEND_PORTAUDIO=OFF,-DALSOFT_BACKEND_SDL2=OFF,-DALSOFT_BACKEND_SDL3=OFF— The other output backends. sndio is not a port; PortAudio and SDL would reach the same sound server through another library, and OSS is the kernel’s older device interface, beside PipeWire rather than through it.-DALSOFT_BACKEND_WAVE=ON— The backend that writes the mix to a WAV file instead of a device, chosen in the configuration. It is upstream’s default.-DCMAKE_REQUIRE_FIND_PACKAGE_MySOFA=ON— Make CMake’sfind_package(MySOFA)a hard requirement.makemhrandsofa-inforead SOFA HRTF sets through libmysofa, and upstream otherwise leaves both out when the library is missing.
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 |