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/files/, media-sound/pulseaudio/
Date: Sat, 11 Jan 2020 19:24:23
Message-Id: 1578770003.734f0b473b6600353940ebc6acb175d6cf14617c.leio@gentoo
1 commit: 734f0b473b6600353940ebc6acb175d6cf14617c
2 Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jan 11 19:10:59 2020 +0000
4 Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 11 19:13:23 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=734f0b47
7
8 media-sound/pulseaudio: remove old
9
10 Package-Manager: Portage-2.3.79, Repoman-2.3.12
11 Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>
12
13 media-sound/pulseaudio/Manifest | 1 -
14 .../files/pulseaudio-12.2-alsa-header-path.patch | 130 --------
15 .../files/pulseaudio-12.2-alsa-header-path2.patch | 45 ---
16 .../files/pulseaudio-12.2-exit-time-session.patch | 181 -----------
17 media-sound/pulseaudio/pulseaudio-12.2-r1.ebuild | 361 ---------------------
18 5 files changed, 718 deletions(-)
19
20 diff --git a/media-sound/pulseaudio/Manifest b/media-sound/pulseaudio/Manifest
21 index 5780ad7256e..8c2628da203 100644
22 --- a/media-sound/pulseaudio/Manifest
23 +++ b/media-sound/pulseaudio/Manifest
24 @@ -1,2 +1 @@
25 -DIST pulseaudio-12.2.tar.xz 1665092 BLAKE2B 2e36efc5142c1e379cc2b135f4126f03a31831b26efe60f7cdf128af6e23fab25706a5609644d0b387530021055f87525fe60d527cd3a087f51bfd58e810644f SHA512 877754c1838b3cb042dbc18a5f1cc3cf313ffcaee7a64703330406d1f86279c34f1107634ac3083b158365e6757fbacf5ec406bc3c5788d291de67b77a561a4e
26 DIST pulseaudio-13.0.tar.xz 1901768 BLAKE2B 651a80f54525f196bcb036d893fedd4d9f34e10459918281397a45f498c31bff0d0c836f4e64aab5ac2612ffd5a0cab1a41ea710bbee5fd34dfc9ea1236deea9 SHA512 d445b8ccd43029a0ca0e456fc9291a79d3434d6496ead7eb329ab348d5249235e8bde6cf2be68765d8f761452dbe1486fb10c739e40b1e67ed75787bbd24ac0c
27
28 diff --git a/media-sound/pulseaudio/files/pulseaudio-12.2-alsa-header-path.patch b/media-sound/pulseaudio/files/pulseaudio-12.2-alsa-header-path.patch
29 deleted file mode 100644
30 index 334af3ee755..00000000000
31 --- a/media-sound/pulseaudio/files/pulseaudio-12.2-alsa-header-path.patch
32 +++ /dev/null
33 @@ -1,130 +0,0 @@
34 -From 993d3fd89e5611997f1e165bf03edefb0204b0a4 Mon Sep 17 00:00:00 2001
35 -From: Olaf Hering <olaf@××××××.de>
36 -Date: Wed, 27 Mar 2019 09:35:05 +0100
37 -Subject: [PATCH 287/375] alsa: Use correct header path
38 -
39 -Consumers are expected to use <alsa/asoundlib.h> instead of
40 -<asoundlib.h>.
41 -
42 -This is in preparation of an change to pkgconfig(alsa) to
43 -not pollute CFLAGS with -I/usr/include/alsa anymore.
44 -
45 -Signed-off-by: Olaf Hering <olaf@××××××.de>
46 ----
47 - src/modules/alsa/alsa-mixer.c | 2 +-
48 - src/modules/alsa/alsa-mixer.h | 2 +-
49 - src/modules/alsa/alsa-sink.c | 2 +-
50 - src/modules/alsa/alsa-source.c | 2 +-
51 - src/modules/alsa/alsa-ucm.c | 2 +-
52 - src/modules/alsa/alsa-util.c | 2 +-
53 - src/modules/alsa/alsa-util.h | 2 +-
54 - src/modules/alsa/module-alsa-source.c | 2 +-
55 - 8 files changed, 8 insertions(+), 8 deletions(-)
56 -
57 -diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
58 -index 5cb99c8fd..cd99a75f8 100644
59 ---- a/src/modules/alsa/alsa-mixer.c
60 -+++ b/src/modules/alsa/alsa-mixer.c
61 -@@ -23,7 +23,7 @@
62 - #endif
63 -
64 - #include <sys/types.h>
65 --#include <asoundlib.h>
66 -+#include <alsa/asoundlib.h>
67 - #include <math.h>
68 -
69 - #ifdef HAVE_VALGRIND_MEMCHECK_H
70 -diff --git a/src/modules/alsa/alsa-mixer.h b/src/modules/alsa/alsa-mixer.h
71 -index 3ea4d7329..65b071165 100644
72 ---- a/src/modules/alsa/alsa-mixer.h
73 -+++ b/src/modules/alsa/alsa-mixer.h
74 -@@ -21,7 +21,7 @@
75 - along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
76 - ***/
77 -
78 --#include <asoundlib.h>
79 -+#include <alsa/asoundlib.h>
80 -
81 - #include <pulse/sample.h>
82 - #include <pulse/mainloop-api.h>
83 -diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
84 -index 28143402a..4b46708ce 100644
85 ---- a/src/modules/alsa/alsa-sink.c
86 -+++ b/src/modules/alsa/alsa-sink.c
87 -@@ -25,7 +25,7 @@
88 - #include <signal.h>
89 - #include <stdio.h>
90 -
91 --#include <asoundlib.h>
92 -+#include <alsa/asoundlib.h>
93 -
94 - #ifdef HAVE_VALGRIND_MEMCHECK_H
95 - #include <valgrind/memcheck.h>
96 -diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c
97 -index 8129220b0..c8bf649e1 100644
98 ---- a/src/modules/alsa/alsa-source.c
99 -+++ b/src/modules/alsa/alsa-source.c
100 -@@ -25,7 +25,7 @@
101 - #include <signal.h>
102 - #include <stdio.h>
103 -
104 --#include <asoundlib.h>
105 -+#include <alsa/asoundlib.h>
106 -
107 - #include <pulse/rtclock.h>
108 - #include <pulse/timeval.h>
109 -diff --git a/src/modules/alsa/alsa-ucm.c b/src/modules/alsa/alsa-ucm.c
110 -index 341c8012e..0a40ca8fe 100644
111 ---- a/src/modules/alsa/alsa-ucm.c
112 -+++ b/src/modules/alsa/alsa-ucm.c
113 -@@ -27,7 +27,7 @@
114 - #include <ctype.h>
115 - #include <sys/types.h>
116 - #include <limits.h>
117 --#include <asoundlib.h>
118 -+#include <alsa/asoundlib.h>
119 -
120 - #ifdef HAVE_VALGRIND_MEMCHECK_H
121 - #include <valgrind/memcheck.h>
122 -diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c
123 -index e8d712e72..bd0a47e50 100644
124 ---- a/src/modules/alsa/alsa-util.c
125 -+++ b/src/modules/alsa/alsa-util.c
126 -@@ -23,7 +23,7 @@
127 - #endif
128 -
129 - #include <sys/types.h>
130 --#include <asoundlib.h>
131 -+#include <alsa/asoundlib.h>
132 -
133 - #include <pulse/sample.h>
134 - #include <pulse/xmalloc.h>
135 -diff --git a/src/modules/alsa/alsa-util.h b/src/modules/alsa/alsa-util.h
136 -index 6b27339ec..4ceaa06ee 100644
137 ---- a/src/modules/alsa/alsa-util.h
138 -+++ b/src/modules/alsa/alsa-util.h
139 -@@ -21,7 +21,7 @@
140 - along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
141 - ***/
142 -
143 --#include <asoundlib.h>
144 -+#include <alsa/asoundlib.h>
145 -
146 - #include <pulse/sample.h>
147 - #include <pulse/channelmap.h>
148 -diff --git a/src/modules/alsa/module-alsa-source.c b/src/modules/alsa/module-alsa-source.c
149 -index af6800dd2..747ba9342 100644
150 ---- a/src/modules/alsa/module-alsa-source.c
151 -+++ b/src/modules/alsa/module-alsa-source.c
152 -@@ -24,7 +24,7 @@
153 -
154 - #include <stdio.h>
155 -
156 --#include <asoundlib.h>
157 -+#include <alsa/asoundlib.h>
158 -
159 - #ifdef HAVE_VALGRIND_MEMCHECK_H
160 - #include <valgrind/memcheck.h>
161 ---
162 -2.21.0
163 -
164
165 diff --git a/media-sound/pulseaudio/files/pulseaudio-12.2-alsa-header-path2.patch b/media-sound/pulseaudio/files/pulseaudio-12.2-alsa-header-path2.patch
166 deleted file mode 100644
167 index c592da2205e..00000000000
168 --- a/media-sound/pulseaudio/files/pulseaudio-12.2-alsa-header-path2.patch
169 +++ /dev/null
170 @@ -1,45 +0,0 @@
171 -From b89d33bb182c42db5ad3987b0e91b7bf62f421e8 Mon Sep 17 00:00:00 2001
172 -From: Takashi Iwai <tiwai@××××.de>
173 -Date: Sun, 21 Apr 2019 11:59:30 +0200
174 -Subject: [PATCH 304/375] alsa: Fix inclusion of use-case.h
175 -
176 -The recent change in ALSA upstream stripped -I$include/alsa path from
177 -pkgconfig. We already fixed for this change in some places but still
178 -the code for UCM was overlooked, and this resulted in the unresolved
179 -symbols in alsa card module. Fix them as well.
180 -
181 -Signed-off-by: Takashi Iwai <tiwai@××××.de>
182 ----
183 - configure.ac | 2 +-
184 - src/modules/alsa/alsa-ucm.h | 2 +-
185 - 2 files changed, 2 insertions(+), 2 deletions(-)
186 -
187 -diff --git a/configure.ac b/configure.ac
188 -index c004bd70d..b44ed1595 100644
189 ---- a/configure.ac
190 -+++ b/configure.ac
191 -@@ -826,7 +826,7 @@ AS_IF([test "x$enable_alsa" = "xyes" && test "x$HAVE_ALSA" = "x0"],
192 - AS_IF([test "x$HAVE_ALSA" = "x1"],
193 - [
194 - save_CPPFLAGS="$CPPFLAGS"; CPPFLAGS="$CPPFLAGS $ASOUNDLIB_CFLAGS"
195 -- AC_CHECK_HEADERS([use-case.h], HAVE_ALSA_UCM=1, HAVE_ALSA_UCM=0)
196 -+ AC_CHECK_HEADERS([alsa/use-case.h], HAVE_ALSA_UCM=1, HAVE_ALSA_UCM=0)
197 - CPPFLAGS="$save_CPPFLAGS"
198 - ],
199 - HAVE_ALSA_UCM=0)
200 -diff --git a/src/modules/alsa/alsa-ucm.h b/src/modules/alsa/alsa-ucm.h
201 -index 53abf3f90..c926f3cc3 100644
202 ---- a/src/modules/alsa/alsa-ucm.h
203 -+++ b/src/modules/alsa/alsa-ucm.h
204 -@@ -23,7 +23,7 @@
205 - ***/
206 -
207 - #ifdef HAVE_ALSA_UCM
208 --#include <use-case.h>
209 -+#include <alsa/use-case.h>
210 - #else
211 - typedef void snd_use_case_mgr_t;
212 - #endif
213 ---
214 -2.21.0
215 -
216
217 diff --git a/media-sound/pulseaudio/files/pulseaudio-12.2-exit-time-session.patch b/media-sound/pulseaudio/files/pulseaudio-12.2-exit-time-session.patch
218 deleted file mode 100644
219 index 045ab5567d8..00000000000
220 --- a/media-sound/pulseaudio/files/pulseaudio-12.2-exit-time-session.patch
221 +++ /dev/null
222 @@ -1,181 +0,0 @@
223 -From de705a0eeaa27a8ac1abdc2625e639340323595a Mon Sep 17 00:00:00 2001
224 -From: Tanu Kaskinen <tanuk@×××.fi>
225 -Date: Tue, 6 Mar 2018 15:09:06 +0200
226 -Subject: [PATCH 08/77] set exit_idle_time to 0 when we detect a session
227 -
228 -As the comments explain, this fixes relogin problems on some systems
229 -that remove our sockets on logout without terminating the daemon.
230 ----
231 - man/pulse-daemon.conf.5.xml.in | 15 ++++++++++++---
232 - man/pulseaudio.1.xml.in | 17 +++++++++++++++--
233 - src/modules/module-console-kit.c | 13 +++++++++++++
234 - src/modules/module-systemd-login.c | 14 ++++++++++++++
235 - src/modules/x11/module-x11-xsmp.c | 13 +++++++++++++
236 - src/pulsecore/core.c | 10 ++++++++++
237 - src/pulsecore/core.h | 2 ++
238 - 7 files changed, 79 insertions(+), 5 deletions(-)
239 -
240 -diff --git a/man/pulse-daemon.conf.5.xml.in b/man/pulse-daemon.conf.5.xml.in
241 -index f0550f3b..f49fa9b0 100644
242 ---- a/man/pulse-daemon.conf.5.xml.in
243 -+++ b/man/pulse-daemon.conf.5.xml.in
244 -@@ -292,9 +292,18 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
245 - <option>
246 - <p><opt>exit-idle-time=</opt> Terminate the daemon after the
247 - last client quit and this time in seconds passed. Use a negative value to
248 -- disable this feature. Defaults to 20. The
249 -- <opt>--exit-idle-time</opt> command line option takes
250 -- precedence.</p>
251 -+ disable this feature. Defaults to 20. The <opt>--exit-idle-time</opt>
252 -+ command line option takes precedence.</p>
253 -+
254 -+ <p>When PulseAudio runs in the per-user mode and detects a login
255 -+ session, then any positive value will be reset to 0 so that PulseAudio
256 -+ will terminate immediately on logout. A positive value therefore has
257 -+ effect only in environments where there's no support for login session
258 -+ tracking. A negative value can still be used to disable any automatic
259 -+ exit.</p>
260 -+
261 -+ <p>When PulseAudio runs in the system mode, automatic exit is always
262 -+ disabled, so this option does nothing.</p>
263 - </option>
264 -
265 - <option>
266 -diff --git a/man/pulseaudio.1.xml.in b/man/pulseaudio.1.xml.in
267 -index f732b8ae..824eddb4 100644
268 ---- a/man/pulseaudio.1.xml.in
269 -+++ b/man/pulseaudio.1.xml.in
270 -@@ -189,8 +189,21 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
271 - <option>
272 - <p><opt>--exit-idle-time</opt><arg>=SECS</arg></p>
273 -
274 -- <optdesc><p>Terminate the daemon when idle and the specified
275 -- number of seconds passed.</p></optdesc>
276 -+ <optdesc>
277 -+ <p>Terminate the daemon after the last client quit and this time in
278 -+ seconds passed. Use a negative value to disable this feature. Defaults
279 -+ to 20.</p>
280 -+
281 -+ <p>When PulseAudio runs in the per-user mode and detects a login
282 -+ session, then any positive value will be reset to 0 so that PulseAudio
283 -+ will terminate immediately on logout. A positive value therefore has
284 -+ effect only in environments where there's no support for login session
285 -+ tracking. A negative value can still be used to disable any automatic
286 -+ exit.</p>
287 -+
288 -+ <p>When PulseAudio runs in the system mode, automatic exit is always
289 -+ disabled, so this option does nothing.</p>
290 -+ </optdesc>
291 - </option>
292 -
293 - <option>
294 -diff --git a/src/modules/module-console-kit.c b/src/modules/module-console-kit.c
295 -index c7938849..c8fe2ed2 100644
296 ---- a/src/modules/module-console-kit.c
297 -+++ b/src/modules/module-console-kit.c
298 -@@ -118,6 +118,19 @@ static void add_session(struct userdata *u, const char *id) {
299 -
300 - pa_log_debug("Added new session %s", id);
301 -
302 -+ /* Positive exit_idle_time is only useful when we have no session tracking
303 -+ * capability, so we can set it to 0 now that we have detected a session.
304 -+ * The benefit of setting exit_idle_time to 0 is that pulseaudio will exit
305 -+ * immediately when the session ends. That in turn is useful, because some
306 -+ * systems (those that use pam_systemd but don't use systemd for managing
307 -+ * pulseaudio) clean $XDG_RUNTIME_DIR on logout, but fail to terminate all
308 -+ * services that depend on the files in $XDG_RUNTIME_DIR. The directory
309 -+ * contains our sockets, and if the sockets are removed without terminating
310 -+ * pulseaudio, a quick relogin will likely cause trouble, because a new
311 -+ * instance will be spawned while the old instance is still running. */
312 -+ if (u->core->exit_idle_time > 0)
313 -+ pa_core_set_exit_idle_time(u->core, 0);
314 -+
315 - fail:
316 -
317 - if (m)
318 -diff --git a/src/modules/module-systemd-login.c b/src/modules/module-systemd-login.c
319 -index 87981592..51401575 100644
320 ---- a/src/modules/module-systemd-login.c
321 -+++ b/src/modules/module-systemd-login.c
322 -@@ -84,6 +84,20 @@ static int add_session(struct userdata *u, const char *id) {
323 - pa_hashmap_put(u->sessions, session->id, session);
324 -
325 - pa_log_debug("Added new session %s", id);
326 -+
327 -+ /* Positive exit_idle_time is only useful when we have no session tracking
328 -+ * capability, so we can set it to 0 now that we have detected a session.
329 -+ * The benefit of setting exit_idle_time to 0 is that pulseaudio will exit
330 -+ * immediately when the session ends. That in turn is useful, because some
331 -+ * systems (those that use pam_systemd but don't use systemd for managing
332 -+ * pulseaudio) clean $XDG_RUNTIME_DIR on logout, but fail to terminate all
333 -+ * services that depend on the files in $XDG_RUNTIME_DIR. The directory
334 -+ * contains our sockets, and if the sockets are removed without terminating
335 -+ * pulseaudio, a quick relogin will likely cause trouble, because a new
336 -+ * instance will be spawned while the old instance is still running. */
337 -+ if (u->core->exit_idle_time > 0)
338 -+ pa_core_set_exit_idle_time(u->core, 0);
339 -+
340 - return 0;
341 - }
342 -
343 -diff --git a/src/modules/x11/module-x11-xsmp.c b/src/modules/x11/module-x11-xsmp.c
344 -index 0238e516..6f801237 100644
345 ---- a/src/modules/x11/module-x11-xsmp.c
346 -+++ b/src/modules/x11/module-x11-xsmp.c
347 -@@ -206,6 +206,19 @@ int pa__init(pa_module*m) {
348 - if (!u->client)
349 - goto fail;
350 -
351 -+ /* Positive exit_idle_time is only useful when we have no session tracking
352 -+ * capability, so we can set it to 0 now that we have detected a session.
353 -+ * The benefit of setting exit_idle_time to 0 is that pulseaudio will exit
354 -+ * immediately when the session ends. That in turn is useful, because some
355 -+ * systems (those that use pam_systemd but don't use systemd for managing
356 -+ * pulseaudio) clean $XDG_RUNTIME_DIR on logout, but fail to terminate all
357 -+ * services that depend on the files in $XDG_RUNTIME_DIR. The directory
358 -+ * contains our sockets, and if the sockets are removed without terminating
359 -+ * pulseaudio, a quick relogin will likely cause trouble, because a new
360 -+ * instance will be spawned while the old instance is still running. */
361 -+ if (u->core->exit_idle_time > 0)
362 -+ pa_core_set_exit_idle_time(u->core, 0);
363 -+
364 - pa_modargs_free(ma);
365 -
366 - return 0;
367 -diff --git a/src/pulsecore/core.c b/src/pulsecore/core.c
368 -index 79abbc04..da42a13e 100644
369 ---- a/src/pulsecore/core.c
370 -+++ b/src/pulsecore/core.c
371 -@@ -426,6 +426,16 @@ void pa_core_update_default_source(pa_core *core) {
372 - pa_hook_fire(&core->hooks[PA_CORE_HOOK_DEFAULT_SOURCE_CHANGED], core->default_source);
373 - }
374 -
375 -+void pa_core_set_exit_idle_time(pa_core *core, int time) {
376 -+ pa_assert(core);
377 -+
378 -+ if (time == core->exit_idle_time)
379 -+ return;
380 -+
381 -+ pa_log_info("exit_idle_time: %i -> %i", core->exit_idle_time, time);
382 -+ core->exit_idle_time = time;
383 -+}
384 -+
385 - static void exit_callback(pa_mainloop_api *m, pa_time_event *e, const struct timeval *t, void *userdata) {
386 - pa_core *c = userdata;
387 - pa_assert(c->exit_event == e);
388 -diff --git a/src/pulsecore/core.h b/src/pulsecore/core.h
389 -index 213964ce..38622f61 100644
390 ---- a/src/pulsecore/core.h
391 -+++ b/src/pulsecore/core.h
392 -@@ -258,6 +258,8 @@ void pa_core_set_configured_default_source(pa_core *core, const char *source);
393 - void pa_core_update_default_sink(pa_core *core);
394 - void pa_core_update_default_source(pa_core *core);
395 -
396 -+void pa_core_set_exit_idle_time(pa_core *core, int time);
397 -+
398 - /* Check whether no one is connected to this core */
399 - void pa_core_check_idle(pa_core *c);
400 -
401 ---
402 -2.17.1
403 -
404
405 diff --git a/media-sound/pulseaudio/pulseaudio-12.2-r1.ebuild b/media-sound/pulseaudio/pulseaudio-12.2-r1.ebuild
406 deleted file mode 100644
407 index 10ddfaa15a6..00000000000
408 --- a/media-sound/pulseaudio/pulseaudio-12.2-r1.ebuild
409 +++ /dev/null
410 @@ -1,361 +0,0 @@
411 -# Copyright 1999-2019 Gentoo Authors
412 -# Distributed under the terms of the GNU General Public License v2
413 -
414 -EAPI=6
415 -inherit bash-completion-r1 flag-o-matic gnome2-utils linux-info systemd user udev multilib-minimal
416 -
417 -DESCRIPTION="A networked sound server with an advanced plugin system"
418 -HOMEPAGE="https://www.freedesktop.org/wiki/Software/PulseAudio/"
419 -SRC_URI="https://freedesktop.org/software/pulseaudio/releases/${P}.tar.xz"
420 -
421 -# libpulse-simple and libpulse link to libpulse-core; this is daemon's
422 -# library and can link to gdbm and other GPL-only libraries. In this
423 -# cases, we have a fully GPL-2 package. Leaving the rest of the
424 -# GPL-forcing USE flags for those who use them.
425 -LICENSE="!gdbm? ( LGPL-2.1 ) gdbm? ( GPL-2 )"
426 -
427 -SLOT="0"
428 -KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 ppc ppc64 ~sh ~sparc x86 ~amd64-linux ~x86-linux"
429 -
430 -# +alsa-plugin as discussed in bug #519530
431 -IUSE="+alsa +alsa-plugin +asyncns bluetooth +caps dbus doc equalizer elogind gconf
432 -+gdbm +glib gtk ipv6 jack libsamplerate libressl lirc native-headset neon
433 -ofono-headset +orc oss qt5 realtime selinux sox ssl systemd system-wide tcpd test
434 -+udev +webrtc-aec +X zeroconf"
435 -
436 -RESTRICT="!test? ( test )"
437 -# See "*** BLUEZ support not found (requires D-Bus)" in configure.ac
438 -REQUIRED_USE="
439 - ?? ( elogind systemd )
440 - bluetooth? ( dbus )
441 - equalizer? ( dbus )
442 - ofono-headset? ( bluetooth )
443 - native-headset? ( bluetooth )
444 - realtime? ( dbus )
445 - udev? ( || ( alsa oss ) )
446 -"
447 -
448 -# libpcre needed in some cases, bug #472228
449 -CDEPEND="
450 - || (
451 - elibc_glibc? ( virtual/libc )
452 - elibc_uclibc? ( virtual/libc )
453 - dev-libs/libpcre
454 - )
455 - >=media-libs/libsndfile-1.0.20[${MULTILIB_USEDEP}]
456 - X? (
457 - >=x11-libs/libX11-1.4.0[${MULTILIB_USEDEP}]
458 - >=x11-libs/libxcb-1.6[${MULTILIB_USEDEP}]
459 - x11-libs/libSM[${MULTILIB_USEDEP}]
460 - x11-libs/libICE[${MULTILIB_USEDEP}]
461 - x11-libs/libXtst[${MULTILIB_USEDEP}]
462 - )
463 - caps? ( >=sys-libs/libcap-2.22-r2[${MULTILIB_USEDEP}] )
464 - libsamplerate? ( >=media-libs/libsamplerate-0.1.1-r1 )
465 - alsa? ( >=media-libs/alsa-lib-1.0.19 )
466 - glib? ( >=dev-libs/glib-2.26.0:2[${MULTILIB_USEDEP}] )
467 - zeroconf? ( >=net-dns/avahi-0.6.12[dbus] )
468 - jack? ( virtual/jack )
469 - tcpd? ( sys-apps/tcp-wrappers[${MULTILIB_USEDEP}] )
470 - lirc? ( app-misc/lirc )
471 - dbus? ( >=sys-apps/dbus-1.0.0[${MULTILIB_USEDEP}] )
472 - gtk? ( x11-libs/gtk+:3 )
473 - bluetooth? (
474 - >=net-wireless/bluez-5
475 - >=sys-apps/dbus-1.0.0
476 - media-libs/sbc
477 - )
478 - asyncns? ( net-libs/libasyncns[${MULTILIB_USEDEP}] )
479 - udev? ( >=virtual/udev-143[hwdb(+)] )
480 - equalizer? ( sci-libs/fftw:3.0 )
481 - ofono-headset? ( >=net-misc/ofono-1.13 )
482 - orc? ( >=dev-lang/orc-0.4.15 )
483 - sox? ( >=media-libs/soxr-0.1.1 )
484 - ssl? (
485 - !libressl? ( dev-libs/openssl:0= )
486 - libressl? ( dev-libs/libressl:= )
487 - )
488 - media-libs/speexdsp
489 - gdbm? ( sys-libs/gdbm:= )
490 - webrtc-aec? ( >=media-libs/webrtc-audio-processing-0.2 )
491 - elogind? ( sys-auth/elogind )
492 - systemd? ( sys-apps/systemd:0=[${MULTILIB_USEDEP}] )
493 - dev-libs/libltdl:0
494 - selinux? ( sec-policy/selinux-pulseaudio )
495 -" # libltdl is a valid RDEPEND, libltdl.so is used for native abi in pulsecore and daemon
496 -
497 -RDEPEND="${CDEPEND}
498 - realtime? ( sys-auth/rtkit )
499 - gconf? ( >=gnome-base/gconf-3.2.6 )
500 -"
501 -
502 -DEPEND="${RDEPEND}
503 - sys-devel/m4
504 - doc? ( app-doc/doxygen )
505 - test? ( >=dev-libs/check-0.9.10 )
506 - X? (
507 - x11-base/xorg-proto
508 - >=x11-libs/libXtst-1.0.99.2[${MULTILIB_USEDEP}]
509 - )
510 - dev-libs/libatomic_ops
511 - virtual/pkgconfig
512 - system-wide? ( || ( dev-util/unifdef sys-freebsd/freebsd-ubin ) )
513 - dev-util/intltool
514 - >=sys-devel/gettext-0.18.1
515 -"
516 -# This is a PDEPEND to avoid a circular dep
517 -PDEPEND="
518 - alsa? ( alsa-plugin? ( >=media-plugins/alsa-plugins-1.0.27-r1[pulseaudio,${MULTILIB_USEDEP}] ) )
519 -"
520 -
521 -# alsa-utils dep is for the alsasound init.d script (see bug #155707)
522 -# bluez dep is for the bluetooth init.d script
523 -# PyQt5 dep is for the qpaeq script
524 -RDEPEND="${RDEPEND}
525 - equalizer? ( qt5? ( dev-python/PyQt5[dbus,widgets] ) )
526 - system-wide? (
527 - alsa? ( media-sound/alsa-utils )
528 - bluetooth? ( >=net-wireless/bluez-5 )
529 - )
530 -"
531 -
532 -PATCHES=(
533 - "${FILESDIR}"/pulseaudio-11.1-disable-flat-volumes.patch # bug 627894
534 -)
535 -
536 -pkg_pretend() {
537 - CONFIG_CHECK="~HIGH_RES_TIMERS"
538 - WARNING_HIGH_RES_TIMERS="CONFIG_HIGH_RES_TIMERS:\tis not set (required for enabling timer-based scheduling in pulseaudio)\n"
539 - check_extra_config
540 -
541 - if linux_config_exists; then
542 - local snd_hda_prealloc_size=$(linux_chkconfig_string SND_HDA_PREALLOC_SIZE)
543 - if [ -n "${snd_hda_prealloc_size}" ] && [ "${snd_hda_prealloc_size}" -lt 2048 ]; then
544 - ewarn "A preallocated buffer-size of 2048 (kB) or higher is recommended for the HD-audio driver!"
545 - ewarn "CONFIG_SND_HDA_PREALLOC_SIZE=${snd_hda_prealloc_size}"
546 - fi
547 - fi
548 -}
549 -
550 -pkg_setup() {
551 - linux-info_pkg_setup
552 - gnome2_environment_reset #543364
553 -
554 - enewgroup audio 18 # Just make sure it exists
555 -
556 - if use system-wide; then
557 - enewgroup pulse-access
558 - enewgroup pulse
559 - enewuser pulse -1 -1 /var/run/pulse pulse,audio
560 - fi
561 -}
562 -
563 -src_prepare() {
564 - default
565 -
566 - # Skip test that cannot work with sandbox, bug #501846
567 - sed -i -e '/lock-autospawn-test /d' src/Makefile.am || die
568 - sed -i -e 's/lock-autospawn-test$(EXEEXT) //' src/Makefile.in || die
569 -}
570 -
571 -multilib_src_configure() {
572 - local myconf=(
573 - --disable-adrian-aec
574 - --disable-bluez4
575 - --disable-esound
576 - --disable-gconf
577 - --disable-solaris
578 - --enable-largefile
579 - --localstatedir="${EPREFIX}"/var
580 - --with-systemduserunitdir=$(systemd_get_userunitdir)
581 - --with-udev-rules-dir="${EPREFIX}/$(get_udevdir)"/rules.d
582 - $(multilib_native_use_enable alsa)
583 - $(multilib_native_use_enable bluetooth bluez5)
584 - $(multilib_native_use_enable glib gsettings)
585 - $(multilib_native_use_enable gtk gtk3)
586 - $(multilib_native_use_enable jack)
587 - $(multilib_native_use_enable libsamplerate samplerate)
588 - $(multilib_native_use_enable lirc)
589 - $(multilib_native_use_enable orc)
590 - $(multilib_native_use_enable oss oss-output)
591 - $(multilib_native_use_enable ssl openssl)
592 - # tests involve random modules, so just do them for the native
593 - $(multilib_native_use_enable test default-build-tests)
594 - $(multilib_native_use_enable udev)
595 - $(multilib_native_use_enable webrtc-aec)
596 - $(multilib_native_use_enable zeroconf avahi)
597 - $(multilib_native_use_with equalizer fftw)
598 - $(multilib_native_use_with sox soxr)
599 - $(multilib_native_usex gdbm '--with-database=gdbm' '--with-database=simple')
600 - $(use_enable glib glib2)
601 - $(use_enable asyncns)
602 - $(use_enable neon neon-opt)
603 - $(use_enable tcpd tcpwrap)
604 - $(use_enable dbus)
605 - $(use_enable X x11)
606 - $(use_enable systemd systemd-daemon)
607 - # 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
608 - $(use_enable systemd systemd-login)
609 - $(use_enable systemd systemd-journal)
610 - $(use_enable ipv6)
611 - $(use_with caps)
612 - )
613 -
614 - if use elogind && multilib_is_native_abi; then
615 - myconf+=(
616 - --enable-systemd-login
617 - SYSTEMDLOGIN_CFLAGS=`pkg-config --cflags "libelogind" 2>/dev/null`
618 - SYSTEMDLOGIN_LIBS=`pkg-config --libs "libelogind" 2>/dev/null`
619 - )
620 - fi
621 -
622 - if use bluetooth; then
623 - myconf+=(
624 - $(multilib_native_use_enable native-headset bluez5-native-headset)
625 - $(multilib_native_use_enable ofono-headset bluez5-ofono-headset)
626 - )
627 - fi
628 -
629 - if ! multilib_is_native_abi; then
630 - myconf+=(
631 - # hack around unnecessary checks
632 - # (results don't matter, we're not building anything using it)
633 - ac_cv_lib_ltdl_lt_dladvise_init=yes
634 - LIBSPEEX_CFLAGS=' '
635 - LIBSPEEX_LIBS=' '
636 - )
637 - else
638 - # 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
639 - if use elibc_glibc ; then
640 - myconf+=( --with-pulsedsp-location="${EPREFIX}"'/usr/\\$$LIB/pulseaudio' )
641 - fi
642 - fi
643 -
644 - ECONF_SOURCE=${S} \
645 - econf "${myconf[@]}"
646 -}
647 -
648 -multilib_src_compile() {
649 - if multilib_is_native_abi; then
650 - emake
651 - use doc && emake doxygen
652 - else
653 - local targets=( libpulse.la libpulsedsp.la libpulse-simple.la )
654 - use glib && targets+=( libpulse-mainloop-glib.la )
655 - emake -C src ${targets[*]}
656 - fi
657 -}
658 -
659 -multilib_src_test() {
660 - # We avoid running the toplevel check target because that will run
661 - # po/'s tests too, and they are broken. Officially, it should work
662 - # with intltool 0.41, but that doesn't look like a stable release.
663 - if multilib_is_native_abi; then
664 - emake -C src check
665 - fi
666 -}
667 -
668 -multilib_src_install() {
669 - if multilib_is_native_abi; then
670 - emake -j1 DESTDIR="${D}" bashcompletiondir="$(get_bashcompdir)" install
671 - if use doc ; then
672 - docinto html
673 - dodoc -r doxygen/html/
674 - fi
675 - else
676 - local targets=( libpulse.la libpulse-simple.la )
677 - use glib && targets+=( libpulse-mainloop-glib.la )
678 - emake DESTDIR="${D}" install-pkgconfigDATA
679 - emake DESTDIR="${D}" -C src \
680 - install-libLTLIBRARIES \
681 - install-padsplibLTLIBRARIES \
682 - lib_LTLIBRARIES="${targets[*]}" \
683 - install-pulseincludeHEADERS
684 - fi
685 -}
686 -
687 -multilib_src_install_all() {
688 - if use system-wide; then
689 - newconfd "${FILESDIR}/pulseaudio.conf.d" pulseaudio
690 -
691 - use_define() {
692 - local define=${2:-$(echo $1 | tr '[:lower:]' '[:upper:]')}
693 -
694 - use "$1" && echo "-D$define" || echo "-U$define"
695 - }
696 -
697 - unifdef $(use_define zeroconf AVAHI) \
698 - $(use_define alsa) \
699 - $(use_define bluetooth) \
700 - $(use_define udev) \
701 - "${FILESDIR}/pulseaudio.init.d-5" \
702 - > "${T}/pulseaudio"
703 -
704 - doinitd "${T}/pulseaudio"
705 -
706 - systemd_dounit "${FILESDIR}/${PN}.service"
707 -
708 - # We need /var/run/pulse, bug #442852
709 - systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles" "${PN}.conf"
710 - else
711 - # Prevent warnings when system-wide is not used, bug #447694
712 - if use dbus ; then
713 - rm "${ED%/}"/etc/dbus-1/system.d/pulseaudio-system.conf || die
714 - fi
715 - fi
716 -
717 - if use zeroconf ; then
718 - sed -e '/module-zeroconf-publish/s:^#::' \
719 - -i "${ED%/}/etc/pulse/default.pa" || die
720 - fi
721 -
722 - dodoc NEWS README todo
723 -
724 - # Create the state directory
725 - use prefix || diropts -o pulse -g pulse -m0755
726 -
727 - find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die
728 -}
729 -
730 -pkg_postinst() {
731 - gnome2_schemas_update
732 - if use system-wide; then
733 - elog "You have enabled the 'system-wide' USE flag for pulseaudio."
734 - elog "This mode should only be used on headless servers, embedded systems,"
735 - elog "or thin clients. It will usually require manual configuration, and is"
736 - elog "incompatible with many expected pulseaudio features."
737 - elog "On normal desktop systems, system-wide mode is STRONGLY DISCOURAGED."
738 - elog "For more information, see"
739 - elog " https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/"
740 - elog " https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/SystemWide/"
741 - elog " https://wiki.gentoo.org/wiki/PulseAudio#Headless_server"
742 - fi
743 -
744 - if use equalizer && ! use qt5; then
745 - elog "You've enabled the 'equalizer' USE-flag but not the 'qt5' USE-flag."
746 - elog "This will build the equalizer module, but the 'qpaeq' tool"
747 - elog "which is required to set equalizer levels will not work."
748 - fi
749 -
750 - if use equalizer && use qt5; then
751 - elog "You will need to load some extra modules to make qpaeq work."
752 - elog "You can do that by adding the following two lines in"
753 - elog "/etc/pulse/default.pa and restarting pulseaudio:"
754 - elog "load-module module-equalizer-sink"
755 - elog "load-module module-dbus-protocol"
756 - fi
757 -
758 - if use native-headset && use ofono-headset; then
759 - elog "You have enabled both native and ofono headset profiles. The runtime decision"
760 - elog "which to use is done via the 'headset' argument of module-bluetooth-discover."
761 - fi
762 -
763 - if use libsamplerate; then
764 - elog "The libsamplerate based resamplers are now deprecated, because they offer no"
765 - elog "particular advantage over speex. Upstream suggests disabling them."
766 - fi
767 -}
768 -
769 -pkg_postrm() {
770 - gnome2_schemas_update
771 -}