Gentoo Archives: gentoo-commits

From: Matthias Maier <tamiko@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/dev/tamiko:master commit in: media-sound/pulseaudio/, media-sound/pulseaudio/files/
Date: Mon, 11 Sep 2017 13:43:45
Message-Id: 1505137405.72a79e23fe3e480f248f99b6f11bbc4fe58e0941.tamiko@gentoo
1 commit: 72a79e23fe3e480f248f99b6f11bbc4fe58e0941
2 Author: Matthias Maier <tamiko <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 11 13:43:25 2017 +0000
4 Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 11 13:43:25 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/dev/tamiko.git/commit/?id=72a79e23
7
8 media-sound/pulseaudio: version bump to 11.0
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.3
11
12 media-sound/pulseaudio/Manifest | 1 +
13 media-sound/pulseaudio/files/pulseaudio.conf.d | 6 +
14 media-sound/pulseaudio/files/pulseaudio.init.d-5 | 80 +++++
15 media-sound/pulseaudio/files/pulseaudio.service | 10 +
16 media-sound/pulseaudio/files/pulseaudio.tmpfiles | 1 +
17 media-sound/pulseaudio/metadata.xml | 81 +++++
18 media-sound/pulseaudio/pulseaudio-11.0.ebuild | 365 +++++++++++++++++++++++
19 7 files changed, 544 insertions(+)
20
21 diff --git a/media-sound/pulseaudio/Manifest b/media-sound/pulseaudio/Manifest
22 new file mode 100644
23 index 0000000..99435a4
24 --- /dev/null
25 +++ b/media-sound/pulseaudio/Manifest
26 @@ -0,0 +1 @@
27 +DIST pulseaudio-11.0.tar.xz 1648128 SHA256 072305d4018fc5e75bb1b45ee6b938fa52fc9fd27493bf327415ef89ed14c969 SHA512 37d0afe343c136cef1906342f17c3473f791fe17b7e6dd463ce120d45285bc12e3680b8b4b6779d79b8ce2e755fe2a0cc4d4c960209b1dae9f924731484ecded WHIRLPOOL a7ddd82f9b65fe85ee4509909e03fb8526fb1998f4d13505637a4fc4d5f379f96e279279413aa7a878b6c13e9a331b4a4b06e0c63efa7ef8e5609194d9af9018
28
29 diff --git a/media-sound/pulseaudio/files/pulseaudio.conf.d b/media-sound/pulseaudio/files/pulseaudio.conf.d
30 new file mode 100644
31 index 0000000..9e72453
32 --- /dev/null
33 +++ b/media-sound/pulseaudio/files/pulseaudio.conf.d
34 @@ -0,0 +1,6 @@
35 +# Config file for /etc/init.d/pulseaudio
36 +
37 +# For more see "pulseaudio -h".
38 +
39 +# Startup options
40 +PA_OPTS="--log-target=syslog --disallow-module-loading=1"
41
42 diff --git a/media-sound/pulseaudio/files/pulseaudio.init.d-5 b/media-sound/pulseaudio/files/pulseaudio.init.d-5
43 new file mode 100644
44 index 0000000..78dc519
45 --- /dev/null
46 +++ b/media-sound/pulseaudio/files/pulseaudio.init.d-5
47 @@ -0,0 +1,80 @@
48 +#!/sbin/openrc-run
49 +# Copyright 1999-2017 Gentoo Foundation
50 +# Distributed under the terms of the GNU General Public License v2
51 +
52 +depend() {
53 + need localmount
54 + use net
55 +
56 + local script="/etc/pulse/system.pa"
57 +
58 + for opt in ${PA_OPTS}; do
59 + case "$opt" in
60 + --file=*) script="${opt#*=}" ;;
61 + -F*) script="${opt#-F}" ;;
62 + esac
63 + done
64 +
65 + config "$script"
66 +
67 + local needs="$(get_options need)"
68 + if [ -n "${needs}" ]; then
69 + need ${needs}
70 + return
71 + fi
72 +
73 + if egrep -q '^[[:space:]]*load-module[[:space:]]+module-console-kit' "$script"; then
74 + needs="${needs} consolekit"
75 + fi
76 +
77 +#ifdef UDEV
78 + if egrep -q '^[[:space:]]*load-module[[:space:]]+module-udev-detect' "$script"; then
79 + needs="${needs} udev"
80 + fi
81 +#endif
82 +
83 +#ifdef AVAHI
84 + if egrep -q '^[[:space:]]*load-module[[:space:]]+module-zeroconf-publish' "$script"; then
85 + needs="${needs} avahi-daemon"
86 + fi
87 +#endif
88 +
89 +#ifdef BLUETOOTH
90 + if egrep -q '^[[:space:]]*load-module[[:space:]]+module-bt-proximity' "$script"; then
91 + needs="${needs} bluetooth"
92 + fi
93 +#endif
94 +
95 +#ifdef ALSA
96 + if egrep -q '^[[:space:]]*load-module[[:space:]]+module-alsa-(sink|source)' "$script" ||
97 + egrep -q '^[[:space:]]*load-module[[:space:]]+module-(udev-)?detect' "$script" ||
98 + egrep -q '^[[:space:]]*add-autoload-source[[:space:]]+(input|output)[[:space:]]+module-alsa-(sink|source)' "$script"; then
99 + needs="${needs} alsasound"
100 + fi
101 +#endif
102 +
103 + need "${needs}"
104 + save_options need "${needs}"
105 +}
106 +
107 +start() {
108 + if [ -z "${PULSEAUDIO_SHOULD_NOT_GO_SYSTEMWIDE}" ]; then
109 + eerror "Please don't use system wide PulseAudio unless you read the"
110 + eerror "documentation available at http://www.pulseaudio.org/wiki/WhatIsWrongWithSystemMode"
111 + eerror ""
112 + eerror "When you're done, please set the variable PULSEAUDIO_SHOULD_NOT_GO_SYSTEMWIDE in"
113 + eerror "/etc/conf.d/pulseaudio . Please remember that upstream does not support this mode"
114 + eerror "when used for standard desktop configurations."
115 + return 1
116 + fi
117 + ebegin "Starting pulseaudio"
118 + PA_ALL_OPTS="${PA_OPTS} --fail=1 --daemonize=1 --system"
119 + start-stop-daemon --start --exec /usr/bin/pulseaudio -- ${PA_ALL_OPTS}
120 + eend $?
121 +}
122 +
123 +stop() {
124 + ebegin "Stopping pulseaudio"
125 + start-stop-daemon --stop --quiet --exec /usr/bin/pulseaudio --pidfile /var/run/pulse/pid
126 + eend $?
127 +}
128
129 diff --git a/media-sound/pulseaudio/files/pulseaudio.service b/media-sound/pulseaudio/files/pulseaudio.service
130 new file mode 100644
131 index 0000000..c5f0d57
132 --- /dev/null
133 +++ b/media-sound/pulseaudio/files/pulseaudio.service
134 @@ -0,0 +1,10 @@
135 +[Unit]
136 +Description=System wide PulseAudio instance
137 +After=syslog.target network.target alsasound.service
138 +
139 +[Service]
140 +Restart=always
141 +ExecStart=/usr/bin/pulseaudio --system --log-target=syslog
142 +
143 +[Install]
144 +WantedBy=multi-user.target
145
146 diff --git a/media-sound/pulseaudio/files/pulseaudio.tmpfiles b/media-sound/pulseaudio/files/pulseaudio.tmpfiles
147 new file mode 100644
148 index 0000000..88374e3
149 --- /dev/null
150 +++ b/media-sound/pulseaudio/files/pulseaudio.tmpfiles
151 @@ -0,0 +1 @@
152 +d /var/run/pulse 0755 pulse audio -
153
154 diff --git a/media-sound/pulseaudio/metadata.xml b/media-sound/pulseaudio/metadata.xml
155 new file mode 100644
156 index 0000000..e35348f
157 --- /dev/null
158 +++ b/media-sound/pulseaudio/metadata.xml
159 @@ -0,0 +1,81 @@
160 +<?xml version="1.0" encoding="UTF-8"?>
161 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
162 +<pkgmetadata>
163 + <maintainer type="project">
164 + <email>gnome@g.o</email>
165 + <name>Gentoo GNOME Desktop</name>
166 + </maintainer>
167 + <maintainer type="project">
168 + <email>sound@g.o</email>
169 + <name>Gentoo Sound project</name>
170 + </maintainer>
171 + <use>
172 + <flag name="X">
173 + Build the X11 publish module to export PulseAudio information
174 + through X11 protocol for clients to make use. Don't enable this
175 + flag if you want to use a system wide instance. If unsure, enable
176 + this flag.
177 + </flag>
178 + <flag name="alsa-plugin">
179 + Request installing <pkg>media-plugins/alsa-plugins</pkg> with
180 + PulseAudio plugin enabled. This ensures that clients supporting
181 + ALSA only will use PulseAudio.
182 + </flag>
183 + <flag name="gnome">
184 + Use GConf to store user preferences on streams and so on. Don't
185 + enable this flag if you want to use a system wide instance. If
186 + unsure, enable this flag.
187 + </flag>
188 + <flag name="oss">
189 + Enable OSS sink/source (output/input). Deprecated, upstream does
190 + not support this on systems where other sink/source systems are
191 + available (i.e.: Linux). The padsp wrapper is now always build
192 + if the system supports OSS at all.
193 + </flag>
194 + <flag name="glib">
195 + Add support to <pkg>dev-libs/glib</pkg>-based mainloop for the
196 + libpulse client library, to allow using libpulse on glib-based
197 + programs.
198 + </flag>
199 + <flag name="system-wide" restrict="&gt;=media-sound/pulseaudio-0.9.21.1">
200 + Allow preparation and installation of the system-wide init
201 + script for PulseAudio. Since this support is only supported for
202 + embedded situations, do not enable without reading the upstream
203 + instructions at
204 + https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/ .
205 + </flag>
206 + <flag name="asyncns">Use libasyncns for asynchronous name resolution.</flag>
207 + <flag name="doc">Build the doxygen-described API documentation.</flag>
208 + <flag name="realtime" restrict="&gt;=media-sound/pulseaudio-0.9.21.2-r1">
209 + Makes PulseAudio use RealtimeKit (<pkg>sys-auth/rtkit</pkg>) to get
210 + real-time priority while running.
211 + </flag>
212 + <flag name="equalizer">
213 + Enable the equalizer module (requires <pkg>sci-libs/fftw</pkg>).
214 + </flag>
215 + <flag name="ssl">
216 + Use <pkg>dev-libs/openssl</pkg> to provide support for RAOP
217 + (AirPort) streaming.
218 + </flag>
219 + <flag name="gdbm">
220 + Use <pkg>sys-libs/gdbm</pkg> to store PulseAudio
221 + databases. Recommended for desktop usage. This flag causes the
222 + whole package to be licensed under GPL-2 or later.
223 + </flag>
224 + <flag name="webrtc-aec">
225 + Uses the webrtc.org AudioProcessing library for enhancing VoIP calls
226 + greatly in applications that support it by performing acoustic echo
227 + cancellation, analog gain control, noise suppression and other processing.
228 + </flag>
229 + <flag name="systemd">
230 + Build with <pkg>sys-apps/systemd</pkg> support to replace standalone
231 + ConsoleKit.
232 + </flag>
233 + <flag name="native-headset">
234 + Build with native HSP backend for bluez 5.
235 + </flag>
236 + <flag name="ofono-headset">
237 + Build with oFono HFP backend for bluez 5, requires <pkg>net-misc/ofono</pkg>.
238 + </flag>
239 + </use>
240 +</pkgmetadata>
241
242 diff --git a/media-sound/pulseaudio/pulseaudio-11.0.ebuild b/media-sound/pulseaudio/pulseaudio-11.0.ebuild
243 new file mode 100644
244 index 0000000..54df4e0
245 --- /dev/null
246 +++ b/media-sound/pulseaudio/pulseaudio-11.0.ebuild
247 @@ -0,0 +1,365 @@
248 +# Copyright 1999-2017 Gentoo Foundation
249 +# Distributed under the terms of the GNU General Public License v2
250 +
251 +EAPI=6
252 +inherit autotools bash-completion-r1 eutils flag-o-matic gnome2-utils linux-info systemd user versionator udev multilib-minimal
253 +
254 +DESCRIPTION="A networked sound server with an advanced plugin system"
255 +HOMEPAGE="https://www.freedesktop.org/wiki/Software/PulseAudio/"
256 +SRC_URI="https://freedesktop.org/software/pulseaudio/releases/${P}.tar.xz"
257 +
258 +# libpulse-simple and libpulse link to libpulse-core; this is daemon's
259 +# library and can link to gdbm and other GPL-only libraries. In this
260 +# cases, we have a fully GPL-2 package. Leaving the rest of the
261 +# GPL-forcing USE flags for those who use them.
262 +# qpaeq equalizer pyqt GUI frontend is AGPL-3+
263 +LICENSE="!gdbm? ( LGPL-2.1 ) gdbm? ( GPL-2 ) equalizer? ( AGPL-3+ )"
264 +
265 +SLOT="0"
266 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
267 +
268 +# +alsa-plugin as discussed in bug #519530
269 +IUSE="+alsa +alsa-plugin +asyncns bluetooth +caps dbus doc equalizer +gdbm +glib
270 +gnome gtk ipv6 jack libsamplerate libressl lirc native-headset neon ofono-headset
271 ++orc oss qt4 realtime selinux sox ssl systemd system-wide tcpd test +udev
272 ++webrtc-aec +X zeroconf"
273 +
274 +# See "*** BLUEZ support not found (requires D-Bus)" in configure.ac
275 +REQUIRED_USE="
276 + bluetooth? ( dbus )
277 + equalizer? ( dbus )
278 + ofono-headset? ( bluetooth )
279 + native-headset? ( bluetooth )
280 + udev? ( || ( alsa oss ) )
281 +"
282 +
283 +# libpcre needed in some cases, bug #472228
284 +RDEPEND="
285 + || (
286 + elibc_glibc? ( virtual/libc )
287 + elibc_uclibc? ( virtual/libc )
288 + dev-libs/libpcre
289 + )
290 + >=media-libs/libsndfile-1.0.20[${MULTILIB_USEDEP}]
291 + X? (
292 + >=x11-libs/libX11-1.4.0[${MULTILIB_USEDEP}]
293 + >=x11-libs/libxcb-1.6[${MULTILIB_USEDEP}]
294 + x11-libs/libSM[${MULTILIB_USEDEP}]
295 + x11-libs/libICE[${MULTILIB_USEDEP}]
296 + x11-libs/libXtst[${MULTILIB_USEDEP}]
297 + )
298 + caps? ( >=sys-libs/libcap-2.22-r2[${MULTILIB_USEDEP}] )
299 + libsamplerate? ( >=media-libs/libsamplerate-0.1.1-r1 )
300 + alsa? ( >=media-libs/alsa-lib-1.0.19 )
301 + glib? ( >=dev-libs/glib-2.4.0:2[${MULTILIB_USEDEP}] )
302 + zeroconf? ( >=net-dns/avahi-0.6.12[dbus] )
303 + jack? ( virtual/jack )
304 + tcpd? ( sys-apps/tcp-wrappers[${MULTILIB_USEDEP}] )
305 + lirc? ( app-misc/lirc )
306 + dbus? ( >=sys-apps/dbus-1.0.0[${MULTILIB_USEDEP}] )
307 + gtk? ( x11-libs/gtk+:3 )
308 + gnome? ( >=gnome-base/gconf-2.4.0 )
309 + bluetooth? (
310 + >=net-wireless/bluez-5
311 + >=sys-apps/dbus-1.0.0
312 + media-libs/sbc
313 + )
314 + asyncns? ( net-libs/libasyncns[${MULTILIB_USEDEP}] )
315 + udev? ( >=virtual/udev-143[hwdb(+)] )
316 + realtime? ( sys-auth/rtkit )
317 + equalizer? ( sci-libs/fftw:3.0 )
318 + ofono-headset? ( >=net-misc/ofono-1.13 )
319 + orc? ( >=dev-lang/orc-0.4.15 )
320 + sox? ( >=media-libs/soxr-0.1.1 )
321 + ssl? (
322 + !libressl? ( dev-libs/openssl:0= )
323 + libressl? ( dev-libs/libressl:= )
324 + )
325 + || (
326 + (
327 + >=media-libs/speex-1.2.0
328 + media-libs/speexdsp
329 + )
330 + (
331 + <media-libs/speex-1.2.0
332 + >=media-libs/speex-1.2_rc1
333 + )
334 + )
335 + gdbm? ( sys-libs/gdbm )
336 + webrtc-aec? ( >=media-libs/webrtc-audio-processing-0.2 )
337 + systemd? ( sys-apps/systemd:0=[${MULTILIB_USEDEP}] )
338 + dev-libs/libltdl:0
339 + selinux? ( sec-policy/selinux-pulseaudio )
340 +"
341 +# it's a valid RDEPEND, libltdl.so is used for native abi
342 +
343 +DEPEND="${RDEPEND}
344 + sys-devel/m4
345 + doc? ( app-doc/doxygen )
346 + test? ( >=dev-libs/check-0.9.10 )
347 + X? (
348 + x11-proto/xproto[${MULTILIB_USEDEP}]
349 + >=x11-libs/libXtst-1.0.99.2[${MULTILIB_USEDEP}]
350 + )
351 + dev-libs/libatomic_ops
352 + virtual/pkgconfig
353 + system-wide? ( || ( dev-util/unifdef sys-freebsd/freebsd-ubin ) )
354 + dev-util/intltool
355 + >=sys-devel/gettext-0.18.1
356 +"
357 +# This is a PDEPEND to avoid a circular dep
358 +PDEPEND="
359 + alsa? ( alsa-plugin? ( >=media-plugins/alsa-plugins-1.0.27-r1[pulseaudio,${MULTILIB_USEDEP}] ) )
360 +"
361 +
362 +# alsa-utils dep is for the alsasound init.d script (see bug #155707)
363 +# bluez dep is for the bluetooth init.d script
364 +# PyQt4 dep is for the qpaeq script
365 +RDEPEND="${RDEPEND}
366 + equalizer? ( qt4? ( dev-python/PyQt4[dbus] ) )
367 + system-wide? (
368 + alsa? ( media-sound/alsa-utils )
369 + bluetooth? ( >=net-wireless/bluez-5 )
370 + )
371 +"
372 +
373 +pkg_pretend() {
374 + CONFIG_CHECK="~HIGH_RES_TIMERS"
375 + WARNING_HIGH_RES_TIMERS="CONFIG_HIGH_RES_TIMERS:\tis not set (required for enabling timer-based scheduling in pulseaudio)\n"
376 + check_extra_config
377 +
378 + if linux_config_exists; then
379 + local snd_hda_prealloc_size=$(linux_chkconfig_string SND_HDA_PREALLOC_SIZE)
380 + if [ -n "${snd_hda_prealloc_size}" ] && [ "${snd_hda_prealloc_size}" -lt 2048 ]; then
381 + ewarn "A preallocated buffer-size of 2048 (kB) or higher is recommended for the HD-audio driver!"
382 + ewarn "CONFIG_SND_HDA_PREALLOC_SIZE=${snd_hda_prealloc_size}"
383 + fi
384 + fi
385 +}
386 +
387 +pkg_setup() {
388 + linux-info_pkg_setup
389 + gnome2_environment_reset #543364
390 +
391 + enewgroup audio 18 # Just make sure it exists
392 +
393 + if use system-wide; then
394 + enewgroup pulse-access
395 + enewgroup pulse
396 + enewuser pulse -1 -1 /var/run/pulse pulse,audio
397 + fi
398 +}
399 +
400 +src_prepare() {
401 + default
402 +
403 + # Skip test that cannot work with sandbox, bug #501846
404 + sed -i -e '/lock-autospawn-test/d' src/Makefile.am || die
405 +
406 + eautoreconf
407 +}
408 +
409 +multilib_src_configure() {
410 + local myconf=()
411 +
412 + if use gdbm; then
413 + myconf+=( --with-database=gdbm )
414 + else
415 + myconf+=( --with-database=simple )
416 + fi
417 +
418 + if use bluetooth; then
419 + if multilib_is_native_abi; then
420 + myconf+=( --enable-bluez5 --disable-bluez4
421 + $(use_enable native-headset bluez5-native-headset)
422 + $(use_enable ofono-headset bluez5-ofono-headset) )
423 + fi
424 + else
425 + myconf+=( --disable-bluez5 --disable-bluez4 )
426 + fi
427 +
428 + myconf+=(
429 + --enable-largefile
430 + $(use_enable glib glib2)
431 + --disable-solaris
432 + $(use_enable asyncns)
433 + $(use_enable oss oss-output)
434 + $(use_enable alsa)
435 + $(use_enable lirc)
436 + $(use_enable neon neon-opt)
437 + $(use_enable tcpd tcpwrap)
438 + $(use_enable jack)
439 + $(use_enable zeroconf avahi)
440 + $(use_enable dbus)
441 + $(use_enable gnome gconf)
442 + $(use_enable gtk gtk3)
443 + $(use_enable libsamplerate samplerate)
444 + $(use_enable orc)
445 + $(use_enable X x11)
446 + $(use_enable test default-build-tests)
447 + $(use_enable udev)
448 + $(use_with sox soxr)
449 + $(use_enable systemd systemd-daemon)
450 + $(use_enable systemd systemd-login)
451 + $(use_enable systemd systemd-journal)
452 + $(use_enable ipv6)
453 + $(use_enable ssl openssl)
454 + $(use_enable webrtc-aec)
455 + $(use_with caps)
456 + $(use_with equalizer fftw)
457 + --disable-adrian-aec
458 + --disable-esound
459 + --localstatedir="${EPREFIX}"/var
460 + --with-udev-rules-dir="${EPREFIX}/$(get_udevdir)"/rules.d
461 + --with-systemduserunitdir=$(systemd_get_userunitdir)
462 + )
463 +
464 + if ! multilib_is_native_abi; then
465 + # disable all the modules and stuff
466 + myconf+=(
467 + --disable-oss-output
468 + --disable-alsa
469 + --disable-lirc
470 + --disable-jack
471 + --disable-avahi
472 + --disable-gconf
473 + --disable-gtk3
474 + --disable-samplerate
475 + --disable-bluez4
476 + --disable-bluez5
477 + --disable-udev
478 + --disable-openssl
479 + --disable-orc
480 + --disable-webrtc-aec
481 + --without-fftw
482 + --without-soxr
483 +
484 + # tests involve random modules, so just do them for the native
485 + --disable-default-build-tests
486 +
487 + # hack around unnecessary checks
488 + # (results don't matter, we're not building anything using it)
489 + ac_cv_lib_ltdl_lt_dladvise_init=yes
490 + --with-database=simple
491 + LIBSPEEX_CFLAGS=' '
492 + LIBSPEEX_LIBS=' '
493 + )
494 + fi
495 +
496 + ECONF_SOURCE=${S} \
497 + econf "${myconf[@]}"
498 +}
499 +
500 +multilib_src_compile() {
501 + if multilib_is_native_abi; then
502 + emake
503 + use doc && emake doxygen
504 + else
505 + local targets=( libpulse.la libpulse-simple.la )
506 + use glib && targets+=( libpulse-mainloop-glib.la )
507 + emake -C src libpulse{,dsp,-simple,-mainloop-glib}.la
508 + fi
509 +}
510 +
511 +multilib_src_test() {
512 + # We avoid running the toplevel check target because that will run
513 + # po/'s tests too, and they are broken. Officially, it should work
514 + # with intltool 0.41, but that doesn't look like a stable release.
515 + if multilib_is_native_abi; then
516 + emake -C src check
517 + fi
518 +}
519 +
520 +multilib_src_install() {
521 + if multilib_is_native_abi; then
522 + emake -j1 DESTDIR="${D}" bashcompletiondir="$(get_bashcompdir)" install
523 + use doc && dohtml -r doxygen/html/
524 + else
525 + local targets=( libpulse.la libpulse-simple.la )
526 + use glib && targets+=( libpulse-mainloop-glib.la )
527 + emake DESTDIR="${D}" install-pkgconfigDATA
528 + emake DESTDIR="${D}" -C src \
529 + install-libLTLIBRARIES \
530 + install-padsplibLTLIBRARIES \
531 + lib_LTLIBRARIES="${targets[*]}" \
532 + install-pulseincludeHEADERS
533 + fi
534 +}
535 +
536 +multilib_src_install_all() {
537 + # Drop the script entirely if X is disabled
538 + use X || rm "${ED}"/usr/bin/start-pulseaudio-x11
539 +
540 + if use system-wide; then
541 + newconfd "${FILESDIR}/pulseaudio.conf.d" pulseaudio
542 +
543 + use_define() {
544 + local define=${2:-$(echo $1 | tr '[:lower:]' '[:upper:]')}
545 +
546 + use "$1" && echo "-D$define" || echo "-U$define"
547 + }
548 +
549 + unifdef $(use_define zeroconf AVAHI) \
550 + $(use_define alsa) \
551 + $(use_define bluetooth) \
552 + $(use_define udev) \
553 + "${FILESDIR}/pulseaudio.init.d-5" \
554 + > "${T}/pulseaudio"
555 +
556 + doinitd "${T}/pulseaudio"
557 +
558 + systemd_dounit "${FILESDIR}/${PN}.service"
559 + fi
560 +
561 + use zeroconf && sed -i -e '/module-zeroconf-publish/s:^#::' "${ED}/etc/pulse/default.pa"
562 +
563 + dodoc NEWS README todo
564 +
565 + # Create the state directory
566 + use prefix || diropts -o pulse -g pulse -m0755
567 +
568 + # We need /var/run/pulse, bug #442852
569 + use system-wide && systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles" "${PN}.conf"
570 +
571 + # Prevent warnings when system-wide is not used, bug #447694
572 + use system-wide || rm "${ED}"/etc/dbus-1/system.d/pulseaudio-system.conf
573 +
574 + prune_libtool_files --all
575 +}
576 +
577 +pkg_postinst() {
578 + if use system-wide; then
579 + elog "You have enabled the 'system-wide' USE flag for pulseaudio."
580 + elog "This mode should only be used on headless servers, embedded systems,"
581 + elog "or thin clients. It will usually require manual configuration, and is"
582 + elog "incompatible with many expected pulseaudio features."
583 + elog "On normal desktop systems, system-wide mode is STRONGLY DISCOURAGED."
584 + elog "For more information, see"
585 + elog " https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/"
586 + elog " https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/SystemWide/"
587 + elog " https://wiki.gentoo.org/wiki/PulseAudio#Headless_server"
588 + if use gnome ; then
589 + elog
590 + elog "By enabling gnome USE flag, you enabled gconf support. Please note"
591 + elog "that you might need to remove the gnome USE flag or disable the"
592 + elog "gconf module on /etc/pulse/system.pa to be able to use PulseAudio"
593 + elog "with a system-wide instance."
594 + fi
595 + fi
596 +
597 + if use equalizer && ! use qt4; then
598 + elog "You've enabled the 'equalizer' USE-flag but not the 'qt4' USE-flag."
599 + elog "This will build the equalizer module, but the 'qpaeq' tool"
600 + elog "which is required to set equalizer levels will not work."
601 + fi
602 +
603 + if use native-headset && use ofono-headset; then
604 + elog "You have enabled both native and ofono headset profiles. The runtime decision"
605 + elog "which to use is done via the 'headset' argument of module-bluetooth-discover."
606 + fi
607 +
608 + if use libsamplerate; then
609 + elog "The libsamplerate based resamplers are now deprecated, because they offer no"
610 + elog "particular advantage over speex. Upstream suggests disabling them."
611 + fi
612 +}