Gentoo Archives: gentoo-commits

From: Mart Raudsepp <leio@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/pulseaudio/
Date: Tue, 17 Sep 2019 06:50:22
Message-Id: 1568702965.ec0eb9940d584dabf3199482f3d46e036c2bde18.leio@gentoo
1 commit: ec0eb9940d584dabf3199482f3d46e036c2bde18
2 Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 17 06:49:13 2019 +0000
4 Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 17 06:49:25 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec0eb994
7
8 media-sound/pulseaudio: bump to 13.0, migrate neon to CPU_ARM_FLAGS
9
10 This release removes explicit addition of -ffast-math to CFLAGS, as PA
11 needs to deal with negative infinite for volumes, as the volume-test
12 failing with -ffast-math demonstrates.
13
14 Closes: https://bugs.gentoo.org/682696
15 Closes: https://bugs.gentoo.org/693436
16 Bug: https://bugs.gentoo.org/694080
17 Package-Manager: Portage-2.3.69, Repoman-2.3.12
18 Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>
19
20 media-sound/pulseaudio/Manifest | 1 +
21 media-sound/pulseaudio/pulseaudio-13.0.ebuild | 360 ++++++++++++++++++++++++++
22 2 files changed, 361 insertions(+)
23
24 diff --git a/media-sound/pulseaudio/Manifest b/media-sound/pulseaudio/Manifest
25 index 51ef3ffb093..5780ad7256e 100644
26 --- a/media-sound/pulseaudio/Manifest
27 +++ b/media-sound/pulseaudio/Manifest
28 @@ -1 +1,2 @@
29 DIST pulseaudio-12.2.tar.xz 1665092 BLAKE2B 2e36efc5142c1e379cc2b135f4126f03a31831b26efe60f7cdf128af6e23fab25706a5609644d0b387530021055f87525fe60d527cd3a087f51bfd58e810644f SHA512 877754c1838b3cb042dbc18a5f1cc3cf313ffcaee7a64703330406d1f86279c34f1107634ac3083b158365e6757fbacf5ec406bc3c5788d291de67b77a561a4e
30 +DIST pulseaudio-13.0.tar.xz 1901768 BLAKE2B 651a80f54525f196bcb036d893fedd4d9f34e10459918281397a45f498c31bff0d0c836f4e64aab5ac2612ffd5a0cab1a41ea710bbee5fd34dfc9ea1236deea9 SHA512 d445b8ccd43029a0ca0e456fc9291a79d3434d6496ead7eb329ab348d5249235e8bde6cf2be68765d8f761452dbe1486fb10c739e40b1e67ed75787bbd24ac0c
31
32 diff --git a/media-sound/pulseaudio/pulseaudio-13.0.ebuild b/media-sound/pulseaudio/pulseaudio-13.0.ebuild
33 new file mode 100644
34 index 00000000000..3c16e3f4d8d
35 --- /dev/null
36 +++ b/media-sound/pulseaudio/pulseaudio-13.0.ebuild
37 @@ -0,0 +1,360 @@
38 +# Copyright 1999-2019 Gentoo Authors
39 +# Distributed under the terms of the GNU General Public License v2
40 +
41 +EAPI=6
42 +inherit autotools bash-completion-r1 flag-o-matic gnome2-utils linux-info systemd user udev multilib-minimal
43 +
44 +DESCRIPTION="A networked sound server with an advanced plugin system"
45 +HOMEPAGE="https://www.freedesktop.org/wiki/Software/PulseAudio/"
46 +SRC_URI="https://freedesktop.org/software/pulseaudio/releases/${P}.tar.xz"
47 +
48 +# libpulse-simple and libpulse link to libpulse-core; this is daemon's
49 +# library and can link to gdbm and other GPL-only libraries. In this
50 +# cases, we have a fully GPL-2 package. Leaving the rest of the
51 +# GPL-forcing USE flags for those who use them.
52 +LICENSE="!gdbm? ( LGPL-2.1 ) gdbm? ( GPL-2 )"
53 +
54 +SLOT="0"
55 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
56 +
57 +# +alsa-plugin as discussed in bug #519530
58 +IUSE="+alsa +alsa-plugin +asyncns bluetooth +caps dbus doc equalizer elogind gconf
59 ++gdbm +glib gtk ipv6 jack libsamplerate libressl lirc native-headset cpu_flags_arm_neon
60 +ofono-headset +orc oss qt5 realtime selinux sox ssl systemd system-wide tcpd test
61 ++udev +webrtc-aec +X zeroconf"
62 +
63 +# See "*** BLUEZ support not found (requires D-Bus)" in configure.ac
64 +REQUIRED_USE="
65 + ?? ( elogind systemd )
66 + bluetooth? ( dbus )
67 + equalizer? ( dbus )
68 + ofono-headset? ( bluetooth )
69 + native-headset? ( bluetooth )
70 + realtime? ( dbus )
71 + udev? ( || ( alsa oss ) )
72 +"
73 +
74 +# libpcre needed in some cases, bug #472228
75 +CDEPEND="
76 + || (
77 + elibc_glibc? ( virtual/libc )
78 + elibc_uclibc? ( virtual/libc )
79 + dev-libs/libpcre
80 + )
81 + >=media-libs/libsndfile-1.0.20[${MULTILIB_USEDEP}]
82 + X? (
83 + >=x11-libs/libX11-1.4.0[${MULTILIB_USEDEP}]
84 + >=x11-libs/libxcb-1.6[${MULTILIB_USEDEP}]
85 + x11-libs/libSM[${MULTILIB_USEDEP}]
86 + x11-libs/libICE[${MULTILIB_USEDEP}]
87 + x11-libs/libXtst[${MULTILIB_USEDEP}]
88 + )
89 + caps? ( >=sys-libs/libcap-2.22-r2[${MULTILIB_USEDEP}] )
90 + libsamplerate? ( >=media-libs/libsamplerate-0.1.1-r1 )
91 + alsa? ( >=media-libs/alsa-lib-1.0.19 )
92 + glib? ( >=dev-libs/glib-2.26.0:2[${MULTILIB_USEDEP}] )
93 + zeroconf? ( >=net-dns/avahi-0.6.12[dbus] )
94 + jack? ( virtual/jack )
95 + tcpd? ( sys-apps/tcp-wrappers[${MULTILIB_USEDEP}] )
96 + lirc? ( app-misc/lirc )
97 + dbus? ( >=sys-apps/dbus-1.0.0[${MULTILIB_USEDEP}] )
98 + gtk? ( x11-libs/gtk+:3 )
99 + bluetooth? (
100 + >=net-wireless/bluez-5
101 + >=sys-apps/dbus-1.0.0
102 + media-libs/sbc
103 + )
104 + asyncns? ( net-libs/libasyncns[${MULTILIB_USEDEP}] )
105 + udev? ( >=virtual/udev-143[hwdb(+)] )
106 + equalizer? ( sci-libs/fftw:3.0 )
107 + ofono-headset? ( >=net-misc/ofono-1.13 )
108 + orc? ( >=dev-lang/orc-0.4.15 )
109 + sox? ( >=media-libs/soxr-0.1.1 )
110 + ssl? (
111 + !libressl? ( dev-libs/openssl:0= )
112 + libressl? ( dev-libs/libressl:= )
113 + )
114 + media-libs/speexdsp
115 + gdbm? ( sys-libs/gdbm:= )
116 + webrtc-aec? ( >=media-libs/webrtc-audio-processing-0.2 )
117 + elogind? ( sys-auth/elogind )
118 + systemd? ( sys-apps/systemd:0=[${MULTILIB_USEDEP}] )
119 + dev-libs/libltdl:0
120 + selinux? ( sec-policy/selinux-pulseaudio )
121 +" # libltdl is a valid RDEPEND, libltdl.so is used for native abi in pulsecore and daemon
122 +
123 +RDEPEND="${CDEPEND}
124 + realtime? ( sys-auth/rtkit )
125 + gconf? ( >=gnome-base/gconf-3.2.6 )
126 +"
127 +
128 +DEPEND="${RDEPEND}
129 + sys-devel/m4
130 + doc? ( app-doc/doxygen )
131 + test? ( >=dev-libs/check-0.9.10 )
132 + X? (
133 + x11-base/xorg-proto
134 + >=x11-libs/libXtst-1.0.99.2[${MULTILIB_USEDEP}]
135 + )
136 + dev-libs/libatomic_ops
137 + virtual/pkgconfig
138 + system-wide? ( || ( dev-util/unifdef sys-freebsd/freebsd-ubin ) )
139 + >=sys-devel/gettext-0.19.3
140 +"
141 +# This is a PDEPEND to avoid a circular dep
142 +PDEPEND="
143 + alsa? ( alsa-plugin? ( >=media-plugins/alsa-plugins-1.0.27-r1[pulseaudio,${MULTILIB_USEDEP}] ) )
144 +"
145 +
146 +# alsa-utils dep is for the alsasound init.d script (see bug #155707)
147 +# bluez dep is for the bluetooth init.d script
148 +# PyQt5 dep is for the qpaeq script
149 +RDEPEND="${RDEPEND}
150 + equalizer? ( qt5? ( dev-python/PyQt5[dbus,widgets] ) )
151 + system-wide? (
152 + alsa? ( media-sound/alsa-utils )
153 + bluetooth? ( >=net-wireless/bluez-5 )
154 + )
155 +"
156 +
157 +PATCHES=(
158 + "${FILESDIR}"/pulseaudio-11.1-disable-flat-volumes.patch # bug 627894
159 +)
160 +
161 +pkg_pretend() {
162 + CONFIG_CHECK="~HIGH_RES_TIMERS"
163 + WARNING_HIGH_RES_TIMERS="CONFIG_HIGH_RES_TIMERS:\tis not set (required for enabling timer-based scheduling in pulseaudio)\n"
164 + check_extra_config
165 +
166 + if linux_config_exists; then
167 + local snd_hda_prealloc_size=$(linux_chkconfig_string SND_HDA_PREALLOC_SIZE)
168 + if [ -n "${snd_hda_prealloc_size}" ] && [ "${snd_hda_prealloc_size}" -lt 2048 ]; then
169 + ewarn "A preallocated buffer-size of 2048 (kB) or higher is recommended for the HD-audio driver!"
170 + ewarn "CONFIG_SND_HDA_PREALLOC_SIZE=${snd_hda_prealloc_size}"
171 + fi
172 + fi
173 +}
174 +
175 +pkg_setup() {
176 + linux-info_pkg_setup
177 + gnome2_environment_reset #543364
178 +
179 + enewgroup audio 18 # Just make sure it exists
180 +
181 + if use system-wide; then
182 + enewgroup pulse-access
183 + enewgroup pulse
184 + enewuser pulse -1 -1 /var/run/pulse pulse,audio
185 + fi
186 +}
187 +
188 +src_prepare() {
189 + default
190 +
191 + # Skip test that cannot work with sandbox, bug #501846
192 + sed -i -e '/lock-autospawn-test /d' src/Makefile.am || die
193 + sed -i -e 's/lock-autospawn-test$(EXEEXT) //' src/Makefile.in || die
194 +
195 + eautoreconf
196 +}
197 +
198 +multilib_src_configure() {
199 + local myconf=(
200 + --disable-adrian-aec
201 + --disable-esound
202 + --disable-gconf
203 + --disable-solaris
204 + --enable-largefile
205 + --localstatedir="${EPREFIX}"/var
206 + --with-systemduserunitdir=$(systemd_get_userunitdir)
207 + --with-udev-rules-dir="${EPREFIX}/$(get_udevdir)"/rules.d
208 + $(multilib_native_use_enable alsa)
209 + $(multilib_native_use_enable bluetooth bluez5)
210 + $(multilib_native_use_enable glib gsettings)
211 + $(multilib_native_use_enable gtk gtk3)
212 + $(multilib_native_use_enable jack)
213 + $(multilib_native_use_enable libsamplerate samplerate)
214 + $(multilib_native_use_enable lirc)
215 + $(multilib_native_use_enable orc)
216 + $(multilib_native_use_enable oss oss-output)
217 + $(multilib_native_use_enable ssl openssl)
218 + # tests involve random modules, so just do them for the native
219 + $(multilib_native_use_enable test default-build-tests)
220 + $(multilib_native_use_enable udev)
221 + $(multilib_native_use_enable webrtc-aec)
222 + $(multilib_native_use_enable zeroconf avahi)
223 + $(multilib_native_use_with equalizer fftw)
224 + $(multilib_native_use_with sox soxr)
225 + $(multilib_native_usex gdbm '--with-database=gdbm' '--with-database=simple')
226 + $(use_enable glib glib2)
227 + $(use_enable asyncns)
228 + $(use_enable cpu_flags_arm_neon neon-opt)
229 + $(use_enable tcpd tcpwrap)
230 + $(use_enable dbus)
231 + $(use_enable X x11)
232 + $(use_enable systemd systemd-daemon)
233 + # systemd-login isn't necessary for non-native, but the rest of systemd are; not changing it at this point close to a meson port
234 + $(use_enable systemd systemd-login)
235 + $(use_enable systemd systemd-journal)
236 + $(use_enable ipv6)
237 + $(use_with caps)
238 + )
239 +
240 + if use elogind && multilib_is_native_abi; then
241 + myconf+=(
242 + --enable-systemd-login
243 + SYSTEMDLOGIN_CFLAGS=`pkg-config --cflags "libelogind" 2>/dev/null`
244 + SYSTEMDLOGIN_LIBS=`pkg-config --libs "libelogind" 2>/dev/null`
245 + )
246 + fi
247 +
248 + if use bluetooth; then
249 + myconf+=(
250 + $(multilib_native_use_enable native-headset bluez5-native-headset)
251 + $(multilib_native_use_enable ofono-headset bluez5-ofono-headset)
252 + )
253 + fi
254 +
255 + if ! multilib_is_native_abi; then
256 + myconf+=(
257 + # hack around unnecessary checks
258 + # (results don't matter, we're not building anything using it)
259 + ac_cv_lib_ltdl_lt_dladvise_init=yes
260 + LIBSPEEX_CFLAGS=' '
261 + LIBSPEEX_LIBS=' '
262 + )
263 + else
264 + # Make padsp work for non-native ABI, supposedly only possible with glibc; this is used by /usr/bin/padsp that comes from native build, thus we need this argument for native build
265 + if use elibc_glibc ; then
266 + myconf+=( --with-pulsedsp-location="${EPREFIX}"'/usr/\\$$LIB/pulseaudio' )
267 + fi
268 + fi
269 +
270 + ECONF_SOURCE=${S} \
271 + econf "${myconf[@]}"
272 +}
273 +
274 +multilib_src_compile() {
275 + if multilib_is_native_abi; then
276 + emake
277 + use doc && emake doxygen
278 + else
279 + local targets=( libpulse.la libpulsedsp.la libpulse-simple.la )
280 + use glib && targets+=( libpulse-mainloop-glib.la )
281 + emake -C src ${targets[*]}
282 + fi
283 +}
284 +
285 +multilib_src_test() {
286 + # We avoid running the toplevel check target because that will run
287 + # po/'s tests too, and they are broken. Officially, it should work
288 + # with intltool 0.41, but that doesn't look like a stable release.
289 + if multilib_is_native_abi; then
290 + emake -C src check
291 + fi
292 +}
293 +
294 +multilib_src_install() {
295 + if multilib_is_native_abi; then
296 + emake -j1 DESTDIR="${D}" bashcompletiondir="$(get_bashcompdir)" install
297 + if use doc ; then
298 + docinto html
299 + dodoc -r doxygen/html/
300 + fi
301 + else
302 + local targets=( libpulse.la libpulse-simple.la )
303 + use glib && targets+=( libpulse-mainloop-glib.la )
304 + emake DESTDIR="${D}" install-pkgconfigDATA
305 + emake DESTDIR="${D}" -C src \
306 + install-libLTLIBRARIES \
307 + install-padsplibLTLIBRARIES \
308 + lib_LTLIBRARIES="${targets[*]}" \
309 + install-pulseincludeHEADERS
310 + fi
311 +}
312 +
313 +multilib_src_install_all() {
314 + if use system-wide; then
315 + newconfd "${FILESDIR}/pulseaudio.conf.d" pulseaudio
316 +
317 + use_define() {
318 + local define=${2:-$(echo $1 | tr '[:lower:]' '[:upper:]')}
319 +
320 + use "$1" && echo "-D$define" || echo "-U$define"
321 + }
322 +
323 + unifdef $(use_define zeroconf AVAHI) \
324 + $(use_define alsa) \
325 + $(use_define bluetooth) \
326 + $(use_define udev) \
327 + "${FILESDIR}/pulseaudio.init.d-5" \
328 + > "${T}/pulseaudio"
329 +
330 + doinitd "${T}/pulseaudio"
331 +
332 + systemd_dounit "${FILESDIR}/${PN}.service"
333 +
334 + # We need /var/run/pulse, bug #442852
335 + systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles" "${PN}.conf"
336 + else
337 + # Prevent warnings when system-wide is not used, bug #447694
338 + if use dbus ; then
339 + rm "${ED%/}"/etc/dbus-1/system.d/pulseaudio-system.conf || die
340 + fi
341 + fi
342 +
343 + if use zeroconf ; then
344 + sed -e '/module-zeroconf-publish/s:^#::' \
345 + -i "${ED%/}/etc/pulse/default.pa" || die
346 + fi
347 +
348 + dodoc NEWS README todo
349 +
350 + # Create the state directory
351 + use prefix || diropts -o pulse -g pulse -m0755
352 +
353 + find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die
354 +}
355 +
356 +pkg_postinst() {
357 + gnome2_schemas_update
358 + if use system-wide; then
359 + elog "You have enabled the 'system-wide' USE flag for pulseaudio."
360 + elog "This mode should only be used on headless servers, embedded systems,"
361 + elog "or thin clients. It will usually require manual configuration, and is"
362 + elog "incompatible with many expected pulseaudio features."
363 + elog "On normal desktop systems, system-wide mode is STRONGLY DISCOURAGED."
364 + elog "For more information, see"
365 + elog " https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/"
366 + elog " https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/SystemWide/"
367 + elog " https://wiki.gentoo.org/wiki/PulseAudio#Headless_server"
368 + fi
369 +
370 + if use equalizer && ! use qt5; then
371 + elog "You've enabled the 'equalizer' USE-flag but not the 'qt5' USE-flag."
372 + elog "This will build the equalizer module, but the 'qpaeq' tool"
373 + elog "which is required to set equalizer levels will not work."
374 + fi
375 +
376 + if use equalizer && use qt5; then
377 + elog "You will need to load some extra modules to make qpaeq work."
378 + elog "You can do that by adding the following two lines in"
379 + elog "/etc/pulse/default.pa and restarting pulseaudio:"
380 + elog "load-module module-equalizer-sink"
381 + elog "load-module module-dbus-protocol"
382 + fi
383 +
384 + if use native-headset && 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 + fi
388 +
389 + if use libsamplerate; then
390 + elog "The libsamplerate based resamplers are now deprecated, because they offer no"
391 + elog "particular advantage over speex. Upstream suggests disabling them."
392 + fi
393 +}
394 +
395 +pkg_postrm() {
396 + gnome2_schemas_update
397 +}