134.4. libpulse-17.0
PulseAudio client libraries and pactl/pacat — the server is pipewire-pulse
| Version | 17.0, release 1 |
| Shelf | audio-io — The sound stack: ALSA, PipeWire and WirePlumber, PulseAudio client, and portable audio I/O APIs |
| Phase | 41_system (System), 125 of 1047 in build order |
| Licence | LGPL-2.1-or-later |
| Homepage | https://www.freedesktop.org/wiki/Software/PulseAudio/ |
| Build time | 0.2 SBU |
| Installed size | 1.7 MiB in 76 files |
| Recipe | ports/core/audio-io/libpulse/kpkgbuild |
About
libpulse is the client half of the PulseAudio tree and nothing else: the libpulse, libpulse-simple and libpulse-mainloop-glib libraries, pactl, and pacat with its paplay, parec, parecord and pamon links. The server on KDOS is pipewire-pulse, which speaks the same protocol on $XDG_RUNTIME_DIR/pulse/native, so a program written for PulseAudio links this library and talks to PipeWire without knowing it; see Audio.
Sources
libpulse-17.0.tar.xz(1.5 MiB)
sha256053794d6671a3e397d849e478a80b82a63cb9d8ca296bd35b73317bb5ceb87b5
upstream: https://www.freedesktop.org/software/pulseaudio/releases/pulseaudio-17.0.tar.xz
archive copy: sources-1/audio-io--libpulse-17.0.tar.xz
Dependencies
Depends on: meson, ninja, pkgconf, m4, perl, perl-xml-parser, gettext, libintl, libsndfile, dbus, glib.
Required by (46): ardour, avidemux, blender, chromium, cubicsdr, fastfetch, firefox-esr, fldigi, freedv-gui, freerdp, gqrx, gst-plugins-good, gtk-vnc, hydrogen, kinfocenter, kmix, kodi, kwave, libao, libcanberra, libopenmpt, librewolf, libsoundio, lmms, mlt, multimon-ng, obs-studio, openal-soft, phonon, pipewire, plasma-pa, pulseaudio-qt, qsstv, qt5-qtmultimedia, qt6-qtmultimedia, qt6-qtwebengine, retroarch, rtaudio, sdl3, sideband, stk, strawberry, thunderbird, vice, vlc, wine.
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.
-Ddaemon=false, line 15: libdaemon (explained with the switches below)-Dgtk=disabled, line 25: gtk3 (explained with the switches below)-Dx11=disabled, line 26: libX11 (explained with the switches below)-Dfftw=disabled, line 29: fftw-Dalsa=disabled, line 31: alsa-lib (explained with the switches below)-Davahi=disabled, line 32: avahi-Delogind=disabled, line 36: elogind-Dgstreamer=disabled, line 38: gstreamer-Dlirc=disabled, line 40: lirc-Dopenssl=disabled, line 41: openssl-Dorc=disabled, line 42: orc-Dsamplerate=disabled, line 43: libsamplerate-Dsoxr=disabled, line 44: soxr-Dspeex=disabled, line 45: speex-Dudev=disabled, line 47: eudev
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/41_system/phase.env && kpkg install libpulse'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/audio-io/libpulse.
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/libpulse
echo '053794d6671a3e397d849e478a80b82a63cb9d8ca296bd35b73317bb5ceb87b5 libpulse-17.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/libpulse
SRC=$SRC_ROOT/libpulse-17.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf libpulse-17.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:
LDFLAGS="$LDFLAGS -lintl" meson setup build \
--prefix=/usr --sysconfdir=/etc --libdir=lib --localstatedir=/var \
-Dbuildtype=release \
-Ddaemon=false \
-Dclient=true \
-Ddoxygen=false \
-Dman=true \
-Dtests=false \
-Dgcov=false \
-Dipv6=true \
-Ddbus=enabled \
-Dglib=enabled \
-Dasyncns=disabled \
-Dgtk=disabled \
-Dx11=disabled \
-Dsystemd=disabled \
-Doss-output=disabled \
-Dfftw=disabled \
-Dvalgrind=disabled \
-Dalsa=disabled \
-Davahi=disabled \
-Dbluez5=disabled \
-Dbluez5-gstreamer=disabled \
-Dconsolekit=disabled \
-Delogind=disabled \
-Dgsettings=disabled \
-Dgstreamer=disabled \
-Djack=disabled \
-Dlirc=disabled \
-Dopenssl=disabled \
-Dorc=disabled \
-Dsamplerate=disabled \
-Dsoxr=disabled \
-Dspeex=disabled \
-Dtcpwrap=disabled \
-Dudev=disabled \
-Dwebrtc-aec=disabled \
-Dbashcompletiondir=/usr/share/bash-completion/completions \
-Dzshcompletiondir=/usr/share/zsh/site-functions
meson compile -C build
DESTDIR=$PKG meson install --no-rebuild -C build
The switches, and why each is set:
LDFLAGS="$LDFLAGS -lintl"— Linkslibintlby name. The tree has no switch to leave translation out; its probe finds musl’s owndgettext()and adds no library, while thegettextport’slibintl.hrenames every call tolibintl_dgettext, which only thelibintlport defines, so without it the first program fails to link. It ridesLDFLAGSbecause-Dc_link_argswould replace the build environment’sLDFLAGSrather than add to them.-Ddaemon=false— Build no server.-Ddaemon=truewould install a second PulseAudio server that fightspipewire-pulsefor the socket.-Dclient=true— Build the client libraries and utilities, upstream’s default, named because it is the half this port exists for.-Ddoxygen=false,-Dtests=false,-Dgcov=false— No API reference, no unit tests and no coverage instrumentation.-Dman=true— Build the manual pages of the client tools. They are converted from XML by upstream’sxmltoman, a Perl script usingXML::Parser, which is whyperlandperl-xml-parserare dependencies.-Dipv6=true— Let a client reach a server address given as an IPv6 host.-Ddbus=enabled— Lets a client notice a PulseAudio server that appears on the session or system bus;enabledmakes a missingdbusa setup error.-Dglib=enabled— Buildslibpulse-mainloop-glib, the GLib main-loop adapter most graphical consumers link.-Dasyncns=disabled— Resolve server host names synchronously instead of throughlibasyncns, which the tree does not carry.-Dgtk=disabled— GTK 3 is used only by one of the unit tests, which are off.-Dx11=disabled— Leave outpax11publishand the client’s reading of the server address and cookie from X11 root-window properties. The session is Wayland; see no Xorg server.-Dsystemd=disabled,-Delogind=disabled,-Dconsolekit=disabled— The three session trackers feed only the daemon’smodule-systemd-loginandmodule-console-kit, and meson reads the options only inside its daemon section, so with-Ddaemon=falsenone of them builds or links anything whatever its value. They are named off for the reason in the note below. KDOS has no systemd; its session tracker, elogind, is something only a server would use.-Doss-output=disabled— Builds nopadsp, theLD_PRELOADwrapper that turns OSS calls into PulseAudio ones. It resolves the functions it passes through by their large-file alias names, which musl does not export.-Dalsa=disabled, with-Davahi,-Dbluez5,-Dbluez5-gstreamer,-Dfftw,-Dgsettings,-Dgstreamer,-Djack,-Dlirc,-Dopenssl,-Dorc,-Dsamplerate,-Dsoxr,-Dspeex,-Dtcpwrap,-Dudevand-Dwebrtc-aec, all=disabled— Every one of these is a feature of the daemon or its modules: card access, network discovery, Bluetooth, the equalizer, resamplers, echo cancellation and the rest. With the daemon off they have nothing to build; they are named all the same, for the reason in the note below.-Dvalgrind=disabled— Leave out the Valgrind memcheck annotations, which the code shared with the client libraries compiles in whenvalgrind/memcheck.his found.-Dbashcompletiondir=/usr/share/bash-completion/completions,-Dzshcompletiondir=/usr/share/zsh/site-functions— Fix where thepactlandpacatcompletions go. Left empty, the bash directory is read frombash-completion’spkg-configfile when that port happens to be installed first.
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/libpulse, 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 libpulse-17.0-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/libpulse, and runs the triggers its paths call for.
Contents
Installed programs: pa-info, pacat, pactl, pamon, paplay, parec, parecord.
Installed libraries: libpulse-mainloop-glib.so, libpulse-simple.so, libpulse.so.
Installed directories: /etc/pulse, /usr/include/pulse, /usr/lib/cmake/PulseAudio, /usr/lib/pulseaudio, /usr/share/licenses/libpulse.
Short descriptions
pacat |
Play back or record raw or encoded audio streams on a PulseAudio sound server |
pactl |
Control a running PulseAudio sound server |
libpulse.pc |
PulseAudio Client Interface |
libpulse-mainloop-glib.pc |
PulseAudio GLib 2.0 Main Loop Wrapper |
libpulse-simple.pc |
PulseAudio Simplified Synchronous Client Interface |
Notes
- Every feature is named rather than left to
auto. An enabled one whose library is missing fails the setup instead of producing a narrowerlibpulsewithout a word, and a disabled one stays off whatever else happens to be installed when the port builds.