diff mbox series

[meta-oe,13/13] libpulse: Add recipe

Message ID 20261204183211.546018-14-khem.raj@oss.qualcomm.com
State New
Headers show
Series meta-oe: Recipe upgrades and a libpulse recipe | expand

Commit Message

Khem Raj Dec. 4, 2026, 6:32 p.m. UTC
oe-core removed the pulseaudio recipe (pulseaudio: remove the
recipe) and replaced pulseaudio with pipewire in DISTRO_FEATURES. GNOME
still needs the PulseAudio client library: gnome-shell,
gnome-settings-daemon and gnome-control-center all build their bundled
libgvc volume control against libpulse and libpulse-mainloop-glib, and
none of them has an option to build without it. Binary distributions
ship the client library next to PipeWire for the same reason.

Build only the client side of pulseaudio 17.0 (-Ddaemon=false): libpulse,
libpulse-simple, libpulse-mainloop-glib and the command line tools
(pactl, paplay, pacat, ...) in libpulse-utils. At runtime the libraries
talk to PipeWire through pipewire-pulse.

Add it to meta-oe so that recipes in other layers, such as meta-gnome,
can depend on it.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 .../libpulse/libpulse_17.0.bb                 | 67 +++++++++++++++++++
 1 file changed, 67 insertions(+)
 create mode 100644 meta-oe/recipes-multimedia/libpulse/libpulse_17.0.bb
diff mbox series

Patch

diff --git a/meta-oe/recipes-multimedia/libpulse/libpulse_17.0.bb b/meta-oe/recipes-multimedia/libpulse/libpulse_17.0.bb
new file mode 100644
index 0000000000..1c3600c542
--- /dev/null
+++ b/meta-oe/recipes-multimedia/libpulse/libpulse_17.0.bb
@@ -0,0 +1,67 @@ 
+SUMMARY = "PulseAudio client libraries"
+DESCRIPTION = "The PulseAudio client libraries (libpulse, libpulse-simple and \
+libpulse-mainloop-glib) and command line tools, built without the sound \
+server. Applications using them talk to PipeWire through pipewire-pulse."
+HOMEPAGE = "https://www.freedesktop.org/wiki/Software/PulseAudio/"
+BUGTRACKER = "https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues"
+SECTION = "libs/multimedia"
+
+# The client libraries are LGPL-2.1-or-later; BSD-3-Clause and MIT code is
+# shared with the server in src/pulsecore.
+LICENSE = "LGPL-2.1-or-later AND BSD-3-Clause AND MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=0e5cd938de1a7a53ea5adac38cc10c39 \
+                    file://LGPL;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+                    file://src/pulsecore/filter/LICENSE.WEBKIT;md5=49defbaffddf8c51faf606ff7fc3b1f7 \
+                    file://src/pulsecore/rtkit.h;beginline=6;endline=29;md5=3f00ff966716ae0817c31576d1473528 \
+                    "
+
+SRC_URI = "https://www.freedesktop.org/software/pulseaudio/releases/pulseaudio-${PV}.tar.xz"
+SRC_URI[sha256sum] = "053794d6671a3e397d849e478a80b82a63cb9d8ca296bd35b73317bb5ceb87b5"
+
+UPSTREAM_CHECK_URI = "https://www.freedesktop.org/software/pulseaudio/releases/"
+UPSTREAM_CHECK_REGEX = "pulseaudio-(?P<pver>\d+(\.(?!99)\d+)+)\.tar"
+
+S = "${UNPACKDIR}/pulseaudio-${PV}"
+
+DEPENDS = "glib-2.0 libsndfile1 m4-native"
+
+inherit meson pkgconfig gettext bash-completion
+
+# The glib mainloop symbols in the version script are only defined in
+# libpulse-mainloop-glib, so lld's default --no-undefined-version fails.
+LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -Wl,--undefined-version', '', d)}"
+
+EXTRA_OEMESON = " \
+    -Ddaemon=false \
+    -Dclient=true \
+    -Ddoxygen=false \
+    -Dman=false \
+    -Dtests=false \
+    -Ddatabase=simple \
+    -Dglib=enabled \
+    -Dgsettings=disabled \
+    -Dgtk=disabled \
+    -Dorc=disabled \
+    -Dopenssl=disabled \
+    -Dvalgrind=disabled \
+    -Dzshcompletiondir=no \
+    -Drunning-from-build-tree=false \
+"
+
+PACKAGECONFIG ??= "dbus ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 x11', d)}"
+PACKAGECONFIG[dbus] = "-Ddbus=enabled,-Ddbus=disabled,dbus"
+PACKAGECONFIG[ipv6] = "-Dipv6=true,-Dipv6=false"
+PACKAGECONFIG[x11] = "-Dx11=enabled,-Dx11=disabled,virtual/libx11 libxtst libice libsm libxcb"
+
+PACKAGE_BEFORE_PN += "${PN}-simple ${PN}-mainloop-glib ${PN}-utils"
+
+FILES:${PN}-simple = "${libdir}/libpulse-simple${SOLIBS}"
+FILES:${PN}-mainloop-glib = "${libdir}/libpulse-mainloop-glib${SOLIBS}"
+FILES:${PN}-utils = "${bindir} ${libdir}/pulseaudio/libpulsedsp.so"
+FILES:${PN} += "${libdir}/pulseaudio/libpulsecommon-*.so"
+FILES:${PN}-dev += "${libdir}/cmake ${datadir}/vala"
+
+# pa-info is a bash script
+RDEPENDS:${PN}-utils = "bash"
+
+CONFFILES:${PN} = "${sysconfdir}/pulse/client.conf"