Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/pulseaudio-daemon/
Date: Thu, 23 Jun 2022 04:30:04
Message-Id: 1655958237.c2f5222fbdbd17dd6b748858c9114f563a9bcaa7.sam@gentoo
1 commit: c2f5222fbdbd17dd6b748858c9114f563a9bcaa7
2 Author: Igor V. Kovalenko <igor.v.kovalenko <AT> gmail <DOT> com>
3 AuthorDate: Wed Jun 22 16:54:24 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 23 04:23:57 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2f5222f
7
8 media-sound/pulseaudio-daemon: Version bump to 16.1
9
10 Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko <AT> gmail.com>
11 Closes: https://github.com/gentoo/gentoo/pull/26045
12 Signed-off-by: Sam James <sam <AT> gentoo.org>
13
14 media-sound/pulseaudio-daemon/Manifest | 1 +
15 .../pulseaudio-daemon-16.1.ebuild | 392 +++++++++++++++++++++
16 2 files changed, 393 insertions(+)
17
18 diff --git a/media-sound/pulseaudio-daemon/Manifest b/media-sound/pulseaudio-daemon/Manifest
19 index 5bc75fa5795d..7e2a36fffea5 100644
20 --- a/media-sound/pulseaudio-daemon/Manifest
21 +++ b/media-sound/pulseaudio-daemon/Manifest
22 @@ -1 +1,2 @@
23 DIST pulseaudio-16.0.tar.xz 1551276 BLAKE2B 54ba5d446bc02246bf842280f577851eb66ff9fed1e1b0d2d03e238796d9d04bc1fc27215b02fdded37441da1747be23d1e03d5a00b79ee3b91eb35c0f76a470 SHA512 42d4968c2dc88f5e39a5358d124e399e40a5abdf815eff387087141bc9dddd217012acb35649a8e0e24a44e8a402d90eb193ce2eef186f7d59550f757a6cc26d
24 +DIST pulseaudio-16.1.tar.xz 1545596 BLAKE2B 535706abcea2cae39834b23c8bdc37f71b0e633de2d8e43ea4425da97a850b57c2f980c318681cbc86cf1e746200609dad41f8b96ecf4568f86d94aa6831c9a1 SHA512 33b0b4292f05e0882f3ec822cf5720414bb34c523d80fe287b9740d6be219787c562e8024c9b0d9e2ee010771ca72c7ae4f27df1bbef9c9cb6bb6a23cbcc412f
25
26 diff --git a/media-sound/pulseaudio-daemon/pulseaudio-daemon-16.1.ebuild b/media-sound/pulseaudio-daemon/pulseaudio-daemon-16.1.ebuild
27 new file mode 100644
28 index 000000000000..eddb6f54e7b5
29 --- /dev/null
30 +++ b/media-sound/pulseaudio-daemon/pulseaudio-daemon-16.1.ebuild
31 @@ -0,0 +1,392 @@
32 +# Copyright 1999-2022 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI="7"
36 +
37 +MY_PV="${PV/_pre*}"
38 +MY_P="pulseaudio-${MY_PV}"
39 +inherit bash-completion-r1 gnome2-utils meson optfeature systemd tmpfiles udev
40 +
41 +DESCRIPTION="Daemon component of PulseAudio (networked sound server)"
42 +HOMEPAGE="https://www.freedesktop.org/wiki/Software/PulseAudio/"
43 +
44 +if [[ ${PV} = 9999 ]]; then
45 + inherit git-r3
46 + EGIT_BRANCH="master"
47 + EGIT_REPO_URI="https://gitlab.freedesktop.org/pulseaudio/pulseaudio"
48 +else
49 + SRC_URI="https://freedesktop.org/software/pulseaudio/releases/${MY_P}.tar.xz"
50 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
51 +fi
52 +
53 +S="${WORKDIR}/${MY_P}"
54 +
55 +# libpulse-simple and libpulse link to libpulse-core; this is daemon's
56 +# library and can link to gdbm and other GPL-only libraries. In this
57 +# cases, we have a fully GPL-2 package. Leaving the rest of the
58 +# GPL-forcing USE flags for those who use them.
59 +LICENSE="!gdbm? ( LGPL-2.1 ) gdbm? ( GPL-2 )"
60 +
61 +SLOT="0"
62 +
63 +# +alsa-plugin as discussed in bug #519530
64 +# TODO: Find out why webrtc-aec is + prefixed - there's already the always available speexdsp-aec
65 +# NOTE: The current ebuild sets +X almost certainly just for the pulseaudio.desktop file
66 +IUSE="+alsa +alsa-plugin aptx +asyncns bluetooth dbus elogind equalizer fftw +gdbm +glib gstreamer jack ldac lirc
67 +ofono-headset +orc oss selinux sox ssl systemd system-wide tcpd test +udev valgrind +webrtc-aec +X zeroconf"
68 +
69 +RESTRICT="!test? ( test )"
70 +
71 +# See "*** BLUEZ support not found (requires D-Bus)" in configure.ac
72 +# Basically all IUSE are either ${MULTILIB_USEDEP} for client libs or they belong under !daemon ()
73 +# We duplicate alsa-plugin, {native,ofono}-headset under daemon to let users deal with them at once
74 +REQUIRED_USE="
75 + ?? ( elogind systemd )
76 + alsa-plugin? ( alsa )
77 + aptx? ( bluetooth )
78 + bluetooth? ( dbus )
79 + equalizer? ( dbus )
80 + ldac? ( bluetooth )
81 + ofono-headset? ( bluetooth )
82 + udev? ( || ( alsa oss ) )
83 + zeroconf? ( dbus )
84 +"
85 +
86 +# NOTE:
87 +# - libpcre needed in some cases, bug #472228
88 +# - media-libs/speexdsp is providing echo canceller implementation and used in resampler
89 +# TODO: libatomic_ops is only needed on some architectures and conditions, and then at runtime too
90 +gstreamer_deps="
91 + media-libs/gst-plugins-base
92 + >=media-libs/gstreamer-1.14
93 +"
94 +COMMON_DEPEND="
95 + >=media-libs/libpulse-${PV}[dbus?,glib?,systemd?,valgrind?,X?]
96 + dev-libs/libatomic_ops
97 + >=media-libs/libsndfile-1.0.20
98 + >=media-libs/speexdsp-1.2
99 + || (
100 + elibc_glibc? ( virtual/libc )
101 + dev-libs/libpcre:3
102 + )
103 + alsa? ( >=media-libs/alsa-lib-1.0.24 )
104 + aptx? ( ${gstreamer_deps} )
105 + asyncns? ( >=net-libs/libasyncns-0.1 )
106 + bluetooth? (
107 + >=net-wireless/bluez-5
108 + media-libs/sbc
109 + )
110 + dev-libs/libltdl
111 + sys-kernel/linux-headers
112 + >=sys-libs/libcap-2.22-r2
113 + dbus? ( >=sys-apps/dbus-1.4.12 )
114 + elogind? ( sys-auth/elogind )
115 + equalizer? (
116 + sci-libs/fftw:3.0=
117 + )
118 + fftw? (
119 + sci-libs/fftw:3.0=
120 + )
121 + gdbm? ( sys-libs/gdbm:= )
122 + glib? ( >=dev-libs/glib-2.28.0:2 )
123 + gstreamer? (
124 + ${gstreamer_deps}
125 + >=dev-libs/glib-2.26.0:2
126 + )
127 + jack? ( virtual/jack )
128 + ldac? ( ${gstreamer_deps} )
129 + lirc? ( app-misc/lirc )
130 + ofono-headset? ( >=net-misc/ofono-1.13 )
131 + orc? ( >=dev-lang/orc-0.4.15 )
132 + selinux? ( sec-policy/selinux-pulseaudio )
133 + sox? ( >=media-libs/soxr-0.1.1 )
134 + ssl? ( dev-libs/openssl:= )
135 + systemd? ( sys-apps/systemd:= )
136 + tcpd? ( sys-apps/tcp-wrappers )
137 + udev? ( >=virtual/udev-143[hwdb(+)] )
138 + valgrind? ( dev-util/valgrind )
139 + webrtc-aec? ( >=media-libs/webrtc-audio-processing-0.2:0 )
140 + X? (
141 + >=x11-libs/libxcb-1.6
142 + x11-libs/libICE
143 + x11-libs/libSM
144 + >=x11-libs/libX11-1.4.0
145 + >=x11-libs/libXtst-1.0.99.2
146 + )
147 + zeroconf? ( >=net-dns/avahi-0.6.12[dbus] )
148 + !<media-sound/pulseaudio-15.0-r100
149 +"
150 +
151 +# pulseaudio ships a bundle xmltoman, which uses XML::Parser
152 +DEPEND="
153 + ${COMMON_DEPEND}
154 + test? ( >=dev-libs/check-0.9.10 )
155 + X? ( x11-base/xorg-proto )
156 +"
157 +
158 +# alsa-utils dep is for the alsasound init.d script (see bug 155707); TODO: read it
159 +# NOTE: Only system-wide needs acct-group/audio unless elogind/systemd is not used
160 +RDEPEND="
161 + ${COMMON_DEPEND}
162 + system-wide? (
163 + alsa? ( media-sound/alsa-utils )
164 + acct-user/pulse
165 + acct-group/audio
166 + acct-group/pulse-access
167 + )
168 + bluetooth? (
169 + ldac? ( media-plugins/gst-plugins-ldac )
170 + aptx? ( media-plugins/gst-plugins-openaptx )
171 + )
172 +"
173 +unset gstreamer_deps
174 +
175 +# This is a PDEPEND to avoid a circular dep
176 +PDEPEND="
177 + alsa? ( alsa-plugin? ( >=media-plugins/alsa-plugins-1.0.27-r1[pulseaudio] ) )
178 +"
179 +
180 +BDEPEND="
181 + dev-lang/perl
182 + dev-perl/XML-Parser
183 + sys-devel/gettext
184 + virtual/libiconv
185 + virtual/libintl
186 + virtual/pkgconfig
187 + orc? ( >=dev-lang/orc-0.4.15 )
188 + system-wide? ( dev-util/unifdef )
189 +"
190 +
191 +DOCS=( NEWS README )
192 +
193 +S="${WORKDIR}/${MY_P}"
194 +
195 +# patches merged upstream, to be removed with 16.2 or later bump
196 +PATCHES=(
197 + "${FILESDIR}"/pulseaudio-16.0-optional-module-console-kit.patch
198 +)
199 +
200 +src_prepare() {
201 + default
202 +
203 + gnome2_environment_reset
204 +}
205 +
206 +src_configure() {
207 + local enable_bluez5_gstreamer="disabled"
208 + if use aptx || use ldac ; then
209 + enable_bluez5_gstreamer="enabled"
210 + fi
211 +
212 + local enable_fftw="disabled"
213 + if use equalizer || use fftw ; then
214 + enable_fftw="enabled"
215 + fi
216 +
217 + local emesonargs=(
218 + --localstatedir="${EPREFIX}"/var
219 +
220 + -Ddaemon=true
221 + -Dclient=false
222 + -Ddoxygen=false
223 + -Dgcov=false
224 + -Dman=true
225 + # tests involve random modules, so just do them for the native # TODO: tests should run always
226 + $(meson_use test tests)
227 + -Ddatabase=$(usex gdbm gdbm simple) # tdb is also an option but no one cares about it
228 + -Dstream-restore-clear-old-devices=true
229 + -Drunning-from-build-tree=false
230 +
231 + # Paths
232 + -Dmodlibexecdir="${EPREFIX}/usr/$(get_libdir)/pulseaudio/modules" # Was $(get_libdir)/${P}
233 + -Dsystemduserunitdir=$(systemd_get_userunitdir)
234 + -Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d"
235 + -Dbashcompletiondir="$(get_bashcompdir)" # Alternatively DEPEND on app-shells/bash-completion for pkg-config to provide the value
236 +
237 + # Optional features
238 + $(meson_feature alsa)
239 + $(meson_feature asyncns)
240 + $(meson_feature zeroconf avahi)
241 + $(meson_feature bluetooth bluez5)
242 + -Dbluez5-gstreamer=${enable_bluez5_gstreamer}
243 + $(meson_use bluetooth bluez5-native-headset)
244 + $(meson_use ofono-headset bluez5-ofono-headset)
245 + -Dconsolekit=disabled
246 + $(meson_feature dbus)
247 + $(meson_feature elogind)
248 + -Dfftw=${enable_fftw}
249 + $(meson_feature glib) # WARNING: toggling this likely changes ABI
250 + $(meson_feature glib gsettings) # Supposedly correct?
251 + $(meson_feature gstreamer)
252 + -Dgtk=disabled
253 + -Dhal-compat=false
254 + -Dipv6=true
255 + $(meson_feature jack)
256 + $(meson_feature lirc)
257 + $(meson_feature ssl openssl)
258 + $(meson_feature orc)
259 + $(meson_feature oss oss-output)
260 + -Dsamplerate=disabled # Matches upstream
261 + $(meson_feature sox soxr)
262 + -Dspeex=enabled
263 + $(meson_feature systemd)
264 + $(meson_feature tcpd tcpwrap)
265 + $(meson_feature udev)
266 + $(meson_feature valgrind)
267 + $(meson_feature X x11)
268 +
269 + # Echo cancellation
270 + -Dadrian-aec=false # Not packaged?
271 + $(meson_feature webrtc-aec)
272 + )
273 +
274 + meson_src_configure
275 +}
276 +
277 +src_install() {
278 + meson_src_install
279 +
280 + # Upstream installs 'pactl' if client is built, with all symlinks except for
281 + # 'pulseaudio', 'pacmd' and 'pasuspender' which are installed if server is built.
282 + # This trips QA warning, workaround:
283 + # - install missing aliases in media-libs/libpulse (client build)
284 + # - remove corresponding symlinks in media-sound/pulseaudio-daemonclient (server build)
285 + rm "${D}/$(get_bashcompdir)"/pulseaudio || die
286 + rm "${D}/$(get_bashcompdir)"/pacmd || die
287 + rm "${D}/$(get_bashcompdir)"/pasuspender || die
288 +
289 + # Daemon configuration scripts will try to load snippets from corresponding '.d' dirs.
290 + # Install these dirs to silence a warning if they are missing.
291 + keepdir /etc/pulse/default.pa.d
292 + keepdir /etc/pulse/system.pa.d
293 +
294 + if use system-wide; then
295 + newconfd "${FILESDIR}"/pulseaudio.conf.d pulseaudio
296 +
297 + use_define() {
298 + local define=${2:-$(echo ${1} | tr '[:lower:]' '[:upper:]')}
299 +
300 + use "${1}" && echo "-D${define}" || echo "-U${define}"
301 + }
302 +
303 + unifdef -x 1 \
304 + $(use_define zeroconf AVAHI) \
305 + $(use_define alsa) \
306 + $(use_define bluetooth) \
307 + $(use_define udev) \
308 + "${FILESDIR}"/pulseaudio.init.d-5 \
309 + > "${T}"/pulseaudio \
310 + || die
311 +
312 + doinitd "${T}"/pulseaudio
313 +
314 + systemd_dounit "${FILESDIR}"/pulseaudio.service
315 +
316 + # We need /var/run/pulse, bug 442852
317 + newtmpfiles "${FILESDIR}"/pulseaudio.tmpfiles pulseaudio.conf
318 + else
319 + # Prevent warnings when system-wide is not used, bug 447694
320 + if use dbus; then
321 + rm "${ED}"/etc/dbus-1/system.d/pulseaudio-system.conf || die
322 + fi
323 + fi
324 +
325 + if use zeroconf; then
326 + sed -i \
327 + -e '/module-zeroconf-publish/s:^#::' \
328 + "${ED}/etc/pulse/default.pa" \
329 + || die
330 + fi
331 +
332 + # Only enable autospawning pulseaudio daemon on systems without systemd
333 + if ! use systemd; then
334 + insinto /etc/pulse/client.conf.d
335 + newins "${FILESDIR}/enable-autospawn.conf" "enable-autospawn.conf"
336 + fi
337 +
338 + find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die
339 +}
340 +
341 +pkg_postinst() {
342 + gnome2_schemas_update
343 +
344 + use udev && udev_reload
345 +
346 + if use system-wide; then
347 + tmpfiles_process "pulseaudio.conf"
348 +
349 + elog "You have enabled the 'system-wide' USE flag for pulseaudio."
350 + elog "This mode should only be used on headless servers, embedded systems,"
351 + elog "or thin clients. It will usually require manual configuration, and is"
352 + elog "incompatible with many expected pulseaudio features."
353 + elog "On normal desktop systems, system-wide mode is STRONGLY DISCOURAGED."
354 + elog ""
355 + elog "For more information, see"
356 + elog " https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/"
357 + elog " https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/SystemWide/"
358 + elog " https://wiki.gentoo.org/wiki/PulseAudio#Headless_server"
359 + elog ""
360 + fi
361 +
362 + if use equalizer; then
363 + elog "You will need to load some extra modules to make qpaeq work."
364 + elog "You can do that by adding the following two lines in"
365 + elog "/etc/pulse/default.pa and restarting pulseaudio:"
366 + elog "load-module module-equalizer-sink"
367 + elog "load-module module-dbus-protocol"
368 + elog ""
369 + fi
370 +
371 + if use bluetooth; then
372 + elog "You have enabled bluetooth USE flag for pulseaudio. Daemon will now handle"
373 + elog "bluetooth Headset (HSP HS and HSP AG) and Handsfree (HFP HF) profiles using"
374 + elog "native headset backend by default. This can be selectively disabled"
375 + elog "via runtime configuration arguments to module-bluetooth-discover"
376 + elog "in /etc/pulse/default.pa"
377 + elog "To disable HFP HF append enable_native_hfp_hf=false"
378 + elog "To disable HSP HS append enable_native_hsp_hs=false"
379 + elog "To disable HSP AG append headset=auto or headset=ofono"
380 + elog "(note this does NOT require enabling USE ofono)"
381 + elog ""
382 + fi
383 +
384 + if use ofono-headset; then
385 + elog "You have enabled both native and ofono headset profiles. The runtime decision"
386 + elog "which to use is done via the 'headset' argument of module-bluetooth-discover."
387 + elog ""
388 + fi
389 +
390 + if use gstreamer; then
391 + elog "GStreamer-based RTP implementation modile enabled."
392 + elog "To use OPUS payload install media-plugins/gst-plugins-opus"
393 + elog "and add enable_opus=1 argument to module-rtp-send"
394 + elog ""
395 + fi
396 +
397 + if use systemd; then
398 + elog "Pulseaudio autospawn by client library is no longer enabled when systemd is available."
399 + elog "It's recommended to start pulseaudio via its systemd user units:"
400 + elog ""
401 + elog " systemctl --user enable pulseaudio.service pulseaudio.socket"
402 + elog ""
403 + elog "Root user can change system default configuration for all users:"
404 + elog ""
405 + elog " systemctl --global enable pulseaudio.service pulseaudio.socket"
406 + elog ""
407 + elog "If you would like to enable autospawn by client library, edit autospawn flag in /etc/pulse/client.conf like this:"
408 + elog ""
409 + elog " autospawn = yes"
410 + elog ""
411 + elog "The change from autospawn to user units will take effect after restarting."
412 + elog ""
413 + fi
414 +
415 + optfeature_header "PulseAudio can be enhanced by installing the following:"
416 + use equalizer && optfeature "using the qpaeq script" dev-python/PyQt5[dbus,widgets]
417 + use dbus && optfeature "restricted realtime capabilities via D-Bus" sys-auth/rtkit
418 +}
419 +
420 +pkg_postrm() {
421 + gnome2_schemas_update
422 + use udev && udev_reload
423 +}