1 |
commit: 10b61dc8872a9ba034771bd9b793e452fd428363 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jul 31 03:39:14 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 31 03:39:33 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10b61dc8 |
7 |
|
8 |
media-sound/pulseaudio-daemon: drop 16.0-r4, 16.0-r5 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
...udio-16.0-fix-combine-sink-underrun-crash.patch | 72 ---- |
13 |
...io-16.0-fix-gstreamer-bluetooth-arm-crash.patch | 43 --- |
14 |
...pulseaudio-16.0-fix-pacmd-play-file-crash.patch | 42 --- |
15 |
...lseaudio-16.0-fix-rtp-receiver-sdp-record.patch | 26 -- |
16 |
.../pulseaudio-daemon-16.0-r4.ebuild | 388 -------------------- |
17 |
.../pulseaudio-daemon-16.0-r5.ebuild | 396 --------------------- |
18 |
6 files changed, 967 deletions(-) |
19 |
|
20 |
diff --git a/media-sound/pulseaudio-daemon/files/pulseaudio-16.0-fix-combine-sink-underrun-crash.patch b/media-sound/pulseaudio-daemon/files/pulseaudio-16.0-fix-combine-sink-underrun-crash.patch |
21 |
deleted file mode 100644 |
22 |
index d66d75afdfda..000000000000 |
23 |
--- a/media-sound/pulseaudio-daemon/files/pulseaudio-16.0-fix-combine-sink-underrun-crash.patch |
24 |
+++ /dev/null |
25 |
@@ -1,72 +0,0 @@ |
26 |
-https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/ee8bfb49adddd271d8a8cafa796c6f9fa84de48a |
27 |
- |
28 |
-From ee8bfb49adddd271d8a8cafa796c6f9fa84de48a Mon Sep 17 00:00:00 2001 |
29 |
-From: Georg Chini <georg@×××××.tk> |
30 |
-Date: Fri, 17 Jun 2022 13:11:11 +0200 |
31 |
-Subject: [PATCH] combine-sink: Fix threading issue during underrun |
32 |
- |
33 |
-A recent commit added i->origin sink for the sink inputs of the combine sinks. |
34 |
-Therefore pa_sink_process_input_underruns() treated the combine sink like |
35 |
-filter sinks. pa_sink_process_input_underruns() calls itself with the |
36 |
-origin sink, which is only correct for filter sinks because they run in the |
37 |
-thread context of the origin sink. The combine sink however has its own |
38 |
-thread context, so pa_sink_process_input_underruns() was executed in the |
39 |
-wrong context. |
40 |
-This patch fixes the issue by skipping the section for module-combine-sink. |
41 |
- |
42 |
-Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/722> |
43 |
---- |
44 |
- src/pulsecore/sink.c | 37 +++++++++++++++++++++++-------------- |
45 |
- 1 file changed, 23 insertions(+), 14 deletions(-) |
46 |
- |
47 |
-diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c |
48 |
-index 3108ae765..0f0dc56fc 100644 |
49 |
---- a/src/pulsecore/sink.c |
50 |
-+++ b/src/pulsecore/sink.c |
51 |
-@@ -1016,20 +1016,29 @@ size_t pa_sink_process_input_underruns(pa_sink *s, size_t left_to_play) { |
52 |
- if (i->origin_sink) { |
53 |
- size_t filter_result, left_to_play_origin; |
54 |
- |
55 |
-- /* The recursive call works in the origin sink domain ... */ |
56 |
-- left_to_play_origin = pa_convert_size(left_to_play, &i->sink->sample_spec, &i->origin_sink->sample_spec); |
57 |
-- |
58 |
-- /* .. and returns the time to sleep before waking up. We need the |
59 |
-- * underrun duration for comparisons, so we undo the subtraction on |
60 |
-- * the return value... */ |
61 |
-- filter_result = left_to_play_origin - pa_sink_process_input_underruns(i->origin_sink, left_to_play_origin); |
62 |
-- |
63 |
-- /* ... and convert it back to the master sink domain */ |
64 |
-- filter_result = pa_convert_size(filter_result, &i->origin_sink->sample_spec, &i->sink->sample_spec); |
65 |
-- |
66 |
-- /* Remember the longest underrun so far */ |
67 |
-- if (filter_result > result) |
68 |
-- result = filter_result; |
69 |
-+ /* The combine sink sets i->origin sink but has a different threading model |
70 |
-+ * than the filter sinks. Therefore the recursion below may not be executed |
71 |
-+ * because pa_sink_process_input_underruns() was not called in the thread |
72 |
-+ * context of the origin sink. |
73 |
-+ * FIXME: It is unclear if some other kind of recursion would be necessary |
74 |
-+ * for the combine sink. */ |
75 |
-+ if (!i->module || !pa_safe_streq(i->module->name, "module-combine-sink")) { |
76 |
-+ |
77 |
-+ /* The recursive call works in the origin sink domain ... */ |
78 |
-+ left_to_play_origin = pa_convert_size(left_to_play, &i->sink->sample_spec, &i->origin_sink->sample_spec); |
79 |
-+ |
80 |
-+ /* .. and returns the time to sleep before waking up. We need the |
81 |
-+ * underrun duration for comparisons, so we undo the subtraction on |
82 |
-+ * the return value... */ |
83 |
-+ filter_result = left_to_play_origin - pa_sink_process_input_underruns(i->origin_sink, left_to_play_origin); |
84 |
-+ |
85 |
-+ /* ... and convert it back to the master sink domain */ |
86 |
-+ filter_result = pa_convert_size(filter_result, &i->origin_sink->sample_spec, &i->sink->sample_spec); |
87 |
-+ |
88 |
-+ /* Remember the longest underrun so far */ |
89 |
-+ if (filter_result > result) |
90 |
-+ result = filter_result; |
91 |
-+ } |
92 |
- } |
93 |
- |
94 |
- if (uf == 0) { |
95 |
--- |
96 |
-GitLab |
97 |
- |
98 |
|
99 |
diff --git a/media-sound/pulseaudio-daemon/files/pulseaudio-16.0-fix-gstreamer-bluetooth-arm-crash.patch b/media-sound/pulseaudio-daemon/files/pulseaudio-16.0-fix-gstreamer-bluetooth-arm-crash.patch |
100 |
deleted file mode 100644 |
101 |
index a2efaf37b381..000000000000 |
102 |
--- a/media-sound/pulseaudio-daemon/files/pulseaudio-16.0-fix-gstreamer-bluetooth-arm-crash.patch |
103 |
+++ /dev/null |
104 |
@@ -1,43 +0,0 @@ |
105 |
-https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/dd4dc5e8bce2c03631c3613dbddee1a691bdd17d |
106 |
- |
107 |
-From dd4dc5e8bce2c03631c3613dbddee1a691bdd17d Mon Sep 17 00:00:00 2001 |
108 |
-From: Jan Palus <jpalus@××××××××.com> |
109 |
-Date: Fri, 17 Jun 2022 14:36:36 +0200 |
110 |
-Subject: [PATCH] bluetooth/gst: Correct var type for GST_TYPE_BITMASK |
111 |
- |
112 |
-GST_TYPE_BITMASK is 64-bit bit mask while corresponding channel_mask in |
113 |
-pulseaudio is int therefore usually 32-bit. Switch to uint64_t instead |
114 |
-to match internal representation in gstreamer. |
115 |
- |
116 |
-Fixes pulseaudio crash on ARM 32-bit when pulseaudio is compiled with |
117 |
-gstreamer and either LDAC or aptX support is available. |
118 |
- |
119 |
-Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/723> |
120 |
---- |
121 |
- src/modules/bluetooth/a2dp-codec-gst.c | 3 ++- |
122 |
- 1 file changed, 2 insertions(+), 1 deletion(-) |
123 |
- |
124 |
-diff --git a/src/modules/bluetooth/a2dp-codec-gst.c b/src/modules/bluetooth/a2dp-codec-gst.c |
125 |
-index 8ef74be9c..11839c580 100644 |
126 |
---- a/src/modules/bluetooth/a2dp-codec-gst.c |
127 |
-+++ b/src/modules/bluetooth/a2dp-codec-gst.c |
128 |
-@@ -22,6 +22,7 @@ |
129 |
- #endif |
130 |
- |
131 |
- #include <arpa/inet.h> |
132 |
-+#include <stdint.h> |
133 |
- |
134 |
- #include <pulsecore/log.h> |
135 |
- #include <pulsecore/macro.h> |
136 |
-@@ -82,7 +83,7 @@ fail: |
137 |
- static GstCaps *gst_create_caps_from_sample_spec(const pa_sample_spec *ss) { |
138 |
- gchar *sample_format; |
139 |
- GstCaps *caps; |
140 |
-- int channel_mask; |
141 |
-+ uint64_t channel_mask; |
142 |
- |
143 |
- switch (ss->format) { |
144 |
- case PA_SAMPLE_S16LE: |
145 |
--- |
146 |
-GitLab |
147 |
- |
148 |
|
149 |
diff --git a/media-sound/pulseaudio-daemon/files/pulseaudio-16.0-fix-pacmd-play-file-crash.patch b/media-sound/pulseaudio-daemon/files/pulseaudio-16.0-fix-pacmd-play-file-crash.patch |
150 |
deleted file mode 100644 |
151 |
index f9c044dbb2be..000000000000 |
152 |
--- a/media-sound/pulseaudio-daemon/files/pulseaudio-16.0-fix-pacmd-play-file-crash.patch |
153 |
+++ /dev/null |
154 |
@@ -1,42 +0,0 @@ |
155 |
-https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/a8a2a31408c4acf54530d65922d235d3e590ce05 |
156 |
- |
157 |
-From a8a2a31408c4acf54530d65922d235d3e590ce05 Mon Sep 17 00:00:00 2001 |
158 |
-From: Jaechul Lee <jcsing.lee@×××××××.com> |
159 |
-Date: Thu, 2 Jun 2022 15:07:09 +0900 |
160 |
-Subject: [PATCH] sound-file-stream: Fix crash when playing a file which is not |
161 |
- aligned |
162 |
- |
163 |
-pulseaudio crash occurred when I play a file using pacmd play-file command. |
164 |
-The file is not aligned with its frame size and the last rendering size |
165 |
-is also not aligned. Thus, an assertion was generated at the end of the |
166 |
-file as the following. |
167 |
- |
168 |
-memblockq.c: Assertion 'uchunk->length % bq->base == 0' failed at |
169 |
-../src/pulsecore/memblockq.c:288, function pa_memblockq_push(). Aborting. |
170 |
- |
171 |
-When I play the file using paplay, it works good. So, I changed to |
172 |
-pa_memblockq_push_align instead of pa_memblockq_push to prevent the |
173 |
-assertion. |
174 |
- |
175 |
-Signed-off-by: Jaechul Lee <jcsing.lee@×××××××.com> |
176 |
-Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/717> |
177 |
---- |
178 |
- src/pulsecore/sound-file-stream.c | 2 +- |
179 |
- 1 file changed, 1 insertion(+), 1 deletion(-) |
180 |
- |
181 |
-diff --git a/src/pulsecore/sound-file-stream.c b/src/pulsecore/sound-file-stream.c |
182 |
-index 147aa2288..255f4b61a 100644 |
183 |
---- a/src/pulsecore/sound-file-stream.c |
184 |
-+++ b/src/pulsecore/sound-file-stream.c |
185 |
-@@ -185,7 +185,7 @@ static int sink_input_pop_cb(pa_sink_input *i, size_t length, pa_memchunk *chunk |
186 |
- |
187 |
- tchunk.length = (size_t) n * fs; |
188 |
- |
189 |
-- pa_memblockq_push(u->memblockq, &tchunk); |
190 |
-+ pa_memblockq_push_align(u->memblockq, &tchunk); |
191 |
- pa_memblock_unref(tchunk.memblock); |
192 |
- } |
193 |
- |
194 |
--- |
195 |
-GitLab |
196 |
- |
197 |
|
198 |
diff --git a/media-sound/pulseaudio-daemon/files/pulseaudio-16.0-fix-rtp-receiver-sdp-record.patch b/media-sound/pulseaudio-daemon/files/pulseaudio-16.0-fix-rtp-receiver-sdp-record.patch |
199 |
deleted file mode 100644 |
200 |
index 3d72b9a009c4..000000000000 |
201 |
--- a/media-sound/pulseaudio-daemon/files/pulseaudio-16.0-fix-rtp-receiver-sdp-record.patch |
202 |
+++ /dev/null |
203 |
@@ -1,26 +0,0 @@ |
204 |
-commit d7a633df899dda8738a30df318269e28c902e815 |
205 |
-Author: Igor V. Kovalenko <igor.v.kovalenko@×××××.com> |
206 |
-Date: Mon Jun 13 21:38:08 2022 +0300 |
207 |
- |
208 |
- rtp: Initialize SDP info struct field added for OPUS |
209 |
- |
210 |
- Turned out that pa_sdp_info::enable_opus is never initialized, which seldom |
211 |
- makes module-rtp-recv believe it will be playing OPUS-encoded stream even though |
212 |
- discovered SDP record does not indicate OPUS codec in metadata. |
213 |
- |
214 |
- Fix this by adding missing initializer. |
215 |
- |
216 |
- Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/720> |
217 |
- |
218 |
-diff --git a/src/modules/rtp/sdp.c b/src/modules/rtp/sdp.c |
219 |
-index 4e6a442f8..bf131a27e 100644 |
220 |
---- a/src/modules/rtp/sdp.c |
221 |
-+++ b/src/modules/rtp/sdp.c |
222 |
-@@ -129,6 +129,7 @@ pa_sdp_info *pa_sdp_parse(const char *t, pa_sdp_info *i, int is_goodbye) { |
223 |
- i->origin = i->session_name = NULL; |
224 |
- i->salen = 0; |
225 |
- i->payload = 255; |
226 |
-+ i->enable_opus = false; |
227 |
- |
228 |
- if (pa_startswith(t, PA_SDP_HEADER)) { |
229 |
- t += sizeof(PA_SDP_HEADER) - 1; |
230 |
|
231 |
diff --git a/media-sound/pulseaudio-daemon/pulseaudio-daemon-16.0-r4.ebuild b/media-sound/pulseaudio-daemon/pulseaudio-daemon-16.0-r4.ebuild |
232 |
deleted file mode 100644 |
233 |
index 8c47aaf30579..000000000000 |
234 |
--- a/media-sound/pulseaudio-daemon/pulseaudio-daemon-16.0-r4.ebuild |
235 |
+++ /dev/null |
236 |
@@ -1,388 +0,0 @@ |
237 |
-# Copyright 1999-2022 Gentoo Authors |
238 |
-# Distributed under the terms of the GNU General Public License v2 |
239 |
- |
240 |
-EAPI="7" |
241 |
- |
242 |
-MY_PV="${PV/_pre*}" |
243 |
-MY_P="pulseaudio-${MY_PV}" |
244 |
-inherit bash-completion-r1 gnome2-utils meson optfeature systemd tmpfiles udev |
245 |
- |
246 |
-DESCRIPTION="A networked sound server with an advanced plugin system" |
247 |
-HOMEPAGE="https://www.freedesktop.org/wiki/Software/PulseAudio/" |
248 |
- |
249 |
-if [[ ${PV} = 9999 ]]; then |
250 |
- inherit git-r3 |
251 |
- EGIT_BRANCH="master" |
252 |
- EGIT_REPO_URI="https://gitlab.freedesktop.org/pulseaudio/pulseaudio" |
253 |
-else |
254 |
- SRC_URI="https://freedesktop.org/software/pulseaudio/releases/${MY_P}.tar.xz" |
255 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux" |
256 |
-fi |
257 |
- |
258 |
-S="${WORKDIR}/${MY_P}" |
259 |
- |
260 |
-# libpulse-simple and libpulse link to libpulse-core; this is daemon's |
261 |
-# library and can link to gdbm and other GPL-only libraries. In this |
262 |
-# cases, we have a fully GPL-2 package. Leaving the rest of the |
263 |
-# GPL-forcing USE flags for those who use them. |
264 |
-LICENSE="!gdbm? ( LGPL-2.1 ) gdbm? ( GPL-2 )" |
265 |
- |
266 |
-SLOT="0" |
267 |
- |
268 |
-# +alsa-plugin as discussed in bug #519530 |
269 |
-# TODO: Find out why webrtc-aec is + prefixed - there's already the always available speexdsp-aec |
270 |
-# NOTE: The current ebuild sets +X almost certainly just for the pulseaudio.desktop file |
271 |
-IUSE="+alsa +alsa-plugin aptx +asyncns bluetooth dbus elogind equalizer fftw +gdbm +glib gstreamer jack ldac lirc |
272 |
-ofono-headset +orc oss selinux sox ssl systemd system-wide tcpd test +udev valgrind +webrtc-aec +X zeroconf" |
273 |
- |
274 |
-RESTRICT="!test? ( test )" |
275 |
- |
276 |
-# See "*** BLUEZ support not found (requires D-Bus)" in configure.ac |
277 |
-# Basically all IUSE are either ${MULTILIB_USEDEP} for client libs or they belong under !daemon () |
278 |
-# We duplicate alsa-plugin, {native,ofono}-headset under daemon to let users deal with them at once |
279 |
-REQUIRED_USE=" |
280 |
- ?? ( elogind systemd ) |
281 |
- alsa-plugin? ( alsa ) |
282 |
- aptx? ( bluetooth ) |
283 |
- bluetooth? ( dbus ) |
284 |
- equalizer? ( dbus ) |
285 |
- ldac? ( bluetooth ) |
286 |
- ofono-headset? ( bluetooth ) |
287 |
- udev? ( || ( alsa oss ) ) |
288 |
- zeroconf? ( dbus ) |
289 |
-" |
290 |
- |
291 |
-# NOTE: |
292 |
-# - libpcre needed in some cases, bug #472228 |
293 |
-# - media-libs/speexdsp is providing echo canceller implementation and used in resampler |
294 |
-# TODO: libatomic_ops is only needed on some architectures and conditions, and then at runtime too |
295 |
-gstreamer_deps=" |
296 |
- media-libs/gst-plugins-base |
297 |
- >=media-libs/gstreamer-1.14 |
298 |
-" |
299 |
-COMMON_DEPEND=" |
300 |
- ~media-libs/libpulse-${PV}[dbus?,glib?,systemd?,valgrind?,X?] |
301 |
- dev-libs/libatomic_ops |
302 |
- >=media-libs/libsndfile-1.0.20 |
303 |
- >=media-libs/speexdsp-1.2 |
304 |
- || ( |
305 |
- elibc_glibc? ( virtual/libc ) |
306 |
- dev-libs/libpcre:3 |
307 |
- ) |
308 |
- alsa? ( >=media-libs/alsa-lib-1.0.24 ) |
309 |
- aptx? ( ${gstreamer_deps} ) |
310 |
- asyncns? ( >=net-libs/libasyncns-0.1 ) |
311 |
- bluetooth? ( |
312 |
- >=net-wireless/bluez-5 |
313 |
- media-libs/sbc |
314 |
- ) |
315 |
- dev-libs/libltdl |
316 |
- sys-kernel/linux-headers |
317 |
- >=sys-libs/libcap-2.22-r2 |
318 |
- dbus? ( >=sys-apps/dbus-1.4.12 ) |
319 |
- elogind? ( sys-auth/elogind ) |
320 |
- equalizer? ( |
321 |
- sci-libs/fftw:3.0= |
322 |
- ) |
323 |
- fftw? ( |
324 |
- sci-libs/fftw:3.0= |
325 |
- ) |
326 |
- gdbm? ( sys-libs/gdbm:= ) |
327 |
- glib? ( >=dev-libs/glib-2.28.0:2 ) |
328 |
- gstreamer? ( |
329 |
- ${gstreamer_deps} |
330 |
- >=dev-libs/glib-2.26.0:2 |
331 |
- ) |
332 |
- jack? ( virtual/jack ) |
333 |
- ldac? ( ${gstreamer_deps} ) |
334 |
- lirc? ( app-misc/lirc ) |
335 |
- ofono-headset? ( >=net-misc/ofono-1.13 ) |
336 |
- orc? ( >=dev-lang/orc-0.4.15 ) |
337 |
- selinux? ( sec-policy/selinux-pulseaudio ) |
338 |
- sox? ( >=media-libs/soxr-0.1.1 ) |
339 |
- ssl? ( dev-libs/openssl:= ) |
340 |
- systemd? ( sys-apps/systemd:= ) |
341 |
- tcpd? ( sys-apps/tcp-wrappers ) |
342 |
- udev? ( >=virtual/udev-143[hwdb(+)] ) |
343 |
- valgrind? ( dev-util/valgrind ) |
344 |
- webrtc-aec? ( >=media-libs/webrtc-audio-processing-0.2:0 ) |
345 |
- X? ( |
346 |
- >=x11-libs/libxcb-1.6 |
347 |
- x11-libs/libICE |
348 |
- x11-libs/libSM |
349 |
- >=x11-libs/libX11-1.4.0 |
350 |
- >=x11-libs/libXtst-1.0.99.2 |
351 |
- ) |
352 |
- zeroconf? ( >=net-dns/avahi-0.6.12[dbus] ) |
353 |
- !<media-sound/pulseaudio-15.0-r100 |
354 |
-" |
355 |
- |
356 |
-# pulseaudio ships a bundle xmltoman, which uses XML::Parser |
357 |
-DEPEND=" |
358 |
- ${COMMON_DEPEND} |
359 |
- test? ( >=dev-libs/check-0.9.10 ) |
360 |
- X? ( x11-base/xorg-proto ) |
361 |
-" |
362 |
- |
363 |
-# alsa-utils dep is for the alsasound init.d script (see bug 155707); TODO: read it |
364 |
-# NOTE: Only system-wide needs acct-group/audio unless elogind/systemd is not used |
365 |
-RDEPEND=" |
366 |
- ${COMMON_DEPEND} |
367 |
- system-wide? ( |
368 |
- alsa? ( media-sound/alsa-utils ) |
369 |
- acct-user/pulse |
370 |
- acct-group/audio |
371 |
- acct-group/pulse-access |
372 |
- ) |
373 |
- bluetooth? ( |
374 |
- ldac? ( media-plugins/gst-plugins-ldac ) |
375 |
- aptx? ( media-plugins/gst-plugins-openaptx ) |
376 |
- ) |
377 |
-" |
378 |
-unset gstreamer_deps |
379 |
- |
380 |
-# This is a PDEPEND to avoid a circular dep |
381 |
-PDEPEND=" |
382 |
- alsa? ( alsa-plugin? ( >=media-plugins/alsa-plugins-1.0.27-r1[pulseaudio] ) ) |
383 |
-" |
384 |
- |
385 |
-BDEPEND=" |
386 |
- dev-lang/perl |
387 |
- dev-perl/XML-Parser |
388 |
- sys-devel/gettext |
389 |
- virtual/libiconv |
390 |
- virtual/libintl |
391 |
- virtual/pkgconfig |
392 |
- orc? ( >=dev-lang/orc-0.4.15 ) |
393 |
- system-wide? ( dev-util/unifdef ) |
394 |
-" |
395 |
- |
396 |
-DOCS=( NEWS README ) |
397 |
- |
398 |
-S="${WORKDIR}/${MY_P}" |
399 |
- |
400 |
-# patches merged upstream, to be removed with 16.1 or later bump |
401 |
-PATCHES=( |
402 |
- "${FILESDIR}"/pulseaudio-16.0-fix-rtp-receiver-sdp-record.patch |
403 |
- "${FILESDIR}"/pulseaudio-16.0-optional-module-console-kit.patch |
404 |
-) |
405 |
- |
406 |
-src_prepare() { |
407 |
- default |
408 |
- |
409 |
- gnome2_environment_reset |
410 |
-} |
411 |
- |
412 |
-src_configure() { |
413 |
- local enable_bluez5_gstreamer="disabled" |
414 |
- if use aptx || use ldac ; then |
415 |
- enable_bluez5_gstreamer="enabled" |
416 |
- fi |
417 |
- |
418 |
- local enable_fftw="disabled" |
419 |
- if use equalizer || use fftw ; then |
420 |
- enable_fftw="enabled" |
421 |
- fi |
422 |
- |
423 |
- local emesonargs=( |
424 |
- --localstatedir="${EPREFIX}"/var |
425 |
- |
426 |
- -Ddaemon=true |
427 |
- -Dclient=false |
428 |
- -Ddoxygen=false |
429 |
- -Dgcov=false |
430 |
- -Dman=true |
431 |
- # tests involve random modules, so just do them for the native # TODO: tests should run always |
432 |
- $(meson_use test tests) |
433 |
- -Ddatabase=$(usex gdbm gdbm simple) # tdb is also an option but no one cares about it |
434 |
- -Dstream-restore-clear-old-devices=true |
435 |
- -Drunning-from-build-tree=false |
436 |
- |
437 |
- # Paths |
438 |
- -Dmodlibexecdir="${EPREFIX}/usr/$(get_libdir)/pulseaudio/modules" # Was $(get_libdir)/${P} |
439 |
- -Dsystemduserunitdir=$(systemd_get_userunitdir) |
440 |
- -Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d" |
441 |
- -Dbashcompletiondir="$(get_bashcompdir)" # Alternatively DEPEND on app-shells/bash-completion for pkg-config to provide the value |
442 |
- |
443 |
- # Optional features |
444 |
- $(meson_feature alsa) |
445 |
- $(meson_feature asyncns) |
446 |
- $(meson_feature zeroconf avahi) |
447 |
- $(meson_feature bluetooth bluez5) |
448 |
- -Dbluez5-gstreamer=${enable_bluez5_gstreamer} |
449 |
- $(meson_use bluetooth bluez5-native-headset) |
450 |
- $(meson_use ofono-headset bluez5-ofono-headset) |
451 |
- -Dconsolekit=disabled |
452 |
- $(meson_feature dbus) |
453 |
- $(meson_feature elogind) |
454 |
- -Dfftw=${enable_fftw} |
455 |
- $(meson_feature glib) # WARNING: toggling this likely changes ABI |
456 |
- $(meson_feature glib gsettings) # Supposedly correct? |
457 |
- $(meson_feature gstreamer) |
458 |
- -Dgtk=disabled |
459 |
- -Dhal-compat=false |
460 |
- -Dipv6=true |
461 |
- $(meson_feature jack) |
462 |
- $(meson_feature lirc) |
463 |
- $(meson_feature ssl openssl) |
464 |
- $(meson_feature orc) |
465 |
- $(meson_feature oss oss-output) |
466 |
- -Dsamplerate=disabled # Matches upstream |
467 |
- $(meson_feature sox soxr) |
468 |
- -Dspeex=enabled |
469 |
- $(meson_feature systemd) |
470 |
- $(meson_feature tcpd tcpwrap) |
471 |
- $(meson_feature udev) |
472 |
- $(meson_feature valgrind) |
473 |
- $(meson_feature X x11) |
474 |
- |
475 |
- # Echo cancellation |
476 |
- -Dadrian-aec=false # Not packaged? |
477 |
- $(meson_feature webrtc-aec) |
478 |
- ) |
479 |
- |
480 |
- meson_src_configure |
481 |
-} |
482 |
- |
483 |
-src_install() { |
484 |
- meson_src_install |
485 |
- |
486 |
- # Upstream installs 'pactl' if client is built, with all symlinks except for |
487 |
- # 'pulseaudio', 'pacmd' and 'pasuspender' which are installed if server is built. |
488 |
- # This trips QA warning, workaround: |
489 |
- # - install missing aliases in media-libs/libpulse (client build) |
490 |
- # - remove corresponding symlinks in media-sound/pulseaudio-daemonclient (server build) |
491 |
- rm "${D}/$(get_bashcompdir)"/pulseaudio || die |
492 |
- rm "${D}/$(get_bashcompdir)"/pacmd || die |
493 |
- rm "${D}/$(get_bashcompdir)"/pasuspender || die |
494 |
- |
495 |
- if use system-wide; then |
496 |
- newconfd "${FILESDIR}"/pulseaudio.conf.d pulseaudio |
497 |
- |
498 |
- use_define() { |
499 |
- local define=${2:-$(echo ${1} | tr '[:lower:]' '[:upper:]')} |
500 |
- |
501 |
- use "${1}" && echo "-D${define}" || echo "-U${define}" |
502 |
- } |
503 |
- |
504 |
- unifdef -x 1 \ |
505 |
- $(use_define zeroconf AVAHI) \ |
506 |
- $(use_define alsa) \ |
507 |
- $(use_define bluetooth) \ |
508 |
- $(use_define udev) \ |
509 |
- "${FILESDIR}"/pulseaudio.init.d-5 \ |
510 |
- > "${T}"/pulseaudio \ |
511 |
- || die |
512 |
- |
513 |
- doinitd "${T}"/pulseaudio |
514 |
- |
515 |
- systemd_dounit "${FILESDIR}"/pulseaudio.service |
516 |
- |
517 |
- # We need /var/run/pulse, bug 442852 |
518 |
- newtmpfiles "${FILESDIR}"/pulseaudio.tmpfiles pulseaudio.conf |
519 |
- else |
520 |
- # Prevent warnings when system-wide is not used, bug 447694 |
521 |
- if use dbus; then |
522 |
- rm "${ED}"/etc/dbus-1/system.d/pulseaudio-system.conf || die |
523 |
- fi |
524 |
- fi |
525 |
- |
526 |
- if use zeroconf; then |
527 |
- sed -i \ |
528 |
- -e '/module-zeroconf-publish/s:^#::' \ |
529 |
- "${ED}/etc/pulse/default.pa" \ |
530 |
- || die |
531 |
- fi |
532 |
- |
533 |
- # Only enable autospawning pulseaudio daemon on systems without systemd |
534 |
- if ! use systemd; then |
535 |
- insinto /etc/pulse/client.conf.d |
536 |
- newins "${FILESDIR}/enable-autospawn.conf" "enable-autospawn.conf" |
537 |
- fi |
538 |
- |
539 |
- find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die |
540 |
-} |
541 |
- |
542 |
-pkg_postinst() { |
543 |
- gnome2_schemas_update |
544 |
- |
545 |
- use udev && udev_reload |
546 |
- |
547 |
- if use system-wide; then |
548 |
- tmpfiles_process "pulseaudio.conf" |
549 |
- |
550 |
- elog "You have enabled the 'system-wide' USE flag for pulseaudio." |
551 |
- elog "This mode should only be used on headless servers, embedded systems," |
552 |
- elog "or thin clients. It will usually require manual configuration, and is" |
553 |
- elog "incompatible with many expected pulseaudio features." |
554 |
- elog "On normal desktop systems, system-wide mode is STRONGLY DISCOURAGED." |
555 |
- elog "" |
556 |
- elog "For more information, see" |
557 |
- elog " https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/" |
558 |
- elog " https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/SystemWide/" |
559 |
- elog " https://wiki.gentoo.org/wiki/PulseAudio#Headless_server" |
560 |
- elog "" |
561 |
- fi |
562 |
- |
563 |
- if use equalizer; then |
564 |
- elog "You will need to load some extra modules to make qpaeq work." |
565 |
- elog "You can do that by adding the following two lines in" |
566 |
- elog "/etc/pulse/default.pa and restarting pulseaudio:" |
567 |
- elog "load-module module-equalizer-sink" |
568 |
- elog "load-module module-dbus-protocol" |
569 |
- elog "" |
570 |
- fi |
571 |
- |
572 |
- if use bluetooth; then |
573 |
- elog "You have enabled bluetooth USE flag for pulseaudio. Daemon will now handle" |
574 |
- elog "bluetooth Headset (HSP HS and HSP AG) and Handsfree (HFP HF) profiles using" |
575 |
- elog "native headset backend by default. This can be selectively disabled" |
576 |
- elog "via runtime configuration arguments to module-bluetooth-discover" |
577 |
- elog "in /etc/pulse/default.pa" |
578 |
- elog "To disable HFP HF append enable_native_hfp_hf=false" |
579 |
- elog "To disable HSP HS append enable_native_hsp_hs=false" |
580 |
- elog "To disable HSP AG append headset=auto or headset=ofono" |
581 |
- elog "(note this does NOT require enabling USE ofono)" |
582 |
- elog "" |
583 |
- fi |
584 |
- |
585 |
- if use ofono-headset; then |
586 |
- elog "You have enabled both native and ofono headset profiles. The runtime decision" |
587 |
- elog "which to use is done via the 'headset' argument of module-bluetooth-discover." |
588 |
- elog "" |
589 |
- fi |
590 |
- |
591 |
- if use gstreamer; then |
592 |
- elog "GStreamer-based RTP implementation modile enabled." |
593 |
- elog "To use OPUS payload install media-plugins/gst-plugins-opus" |
594 |
- elog "and add enable_opus=1 argument to module-rtp-send" |
595 |
- elog "" |
596 |
- fi |
597 |
- |
598 |
- if use systemd; then |
599 |
- elog "Pulseaudio autospawn by client library is no longer enabled when systemd is available." |
600 |
- elog "It's recommended to start pulseaudio via its systemd user units:" |
601 |
- elog "" |
602 |
- elog " systemctl --user enable pulseaudio.service pulseaudio.socket" |
603 |
- elog "" |
604 |
- elog "Root user can change system default configuration for all users:" |
605 |
- elog "" |
606 |
- elog " systemctl --global enable pulseaudio.service pulseaudio.socket" |
607 |
- elog "" |
608 |
- elog "If you would like to enable autospawn by client library, edit autospawn flag in /etc/pulse/client.conf like this:" |
609 |
- elog "" |
610 |
- elog " autospawn = yes" |
611 |
- elog "" |
612 |
- elog "The change from autospawn to user units will take effect after restarting." |
613 |
- elog "" |
614 |
- fi |
615 |
- |
616 |
- optfeature_header "PulseAudio can be enhanced by installing the following:" |
617 |
- use equalizer && optfeature "using the qpaeq script" dev-python/PyQt5[dbus,widgets] |
618 |
- use dbus && optfeature "restricted realtime capabilities via D-Bus" sys-auth/rtkit |
619 |
-} |
620 |
- |
621 |
-pkg_postrm() { |
622 |
- gnome2_schemas_update |
623 |
- use udev && udev_reload |
624 |
-} |
625 |
|
626 |
diff --git a/media-sound/pulseaudio-daemon/pulseaudio-daemon-16.0-r5.ebuild b/media-sound/pulseaudio-daemon/pulseaudio-daemon-16.0-r5.ebuild |
627 |
deleted file mode 100644 |
628 |
index 66f340cd76f7..000000000000 |
629 |
--- a/media-sound/pulseaudio-daemon/pulseaudio-daemon-16.0-r5.ebuild |
630 |
+++ /dev/null |
631 |
@@ -1,396 +0,0 @@ |
632 |
-# Copyright 1999-2022 Gentoo Authors |
633 |
-# Distributed under the terms of the GNU General Public License v2 |
634 |
- |
635 |
-EAPI="7" |
636 |
- |
637 |
-MY_PV="${PV/_pre*}" |
638 |
-MY_P="pulseaudio-${MY_PV}" |
639 |
-inherit bash-completion-r1 gnome2-utils meson optfeature systemd tmpfiles udev |
640 |
- |
641 |
-DESCRIPTION="Daemon component of PulseAudio (networked sound server)" |
642 |
-HOMEPAGE="https://www.freedesktop.org/wiki/Software/PulseAudio/" |
643 |
- |
644 |
-if [[ ${PV} = 9999 ]]; then |
645 |
- inherit git-r3 |
646 |
- EGIT_BRANCH="master" |
647 |
- EGIT_REPO_URI="https://gitlab.freedesktop.org/pulseaudio/pulseaudio" |
648 |
-else |
649 |
- SRC_URI="https://freedesktop.org/software/pulseaudio/releases/${MY_P}.tar.xz" |
650 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux" |
651 |
-fi |
652 |
- |
653 |
-S="${WORKDIR}/${MY_P}" |
654 |
- |
655 |
-# libpulse-simple and libpulse link to libpulse-core; this is daemon's |
656 |
-# library and can link to gdbm and other GPL-only libraries. In this |
657 |
-# cases, we have a fully GPL-2 package. Leaving the rest of the |
658 |
-# GPL-forcing USE flags for those who use them. |
659 |
-LICENSE="!gdbm? ( LGPL-2.1 ) gdbm? ( GPL-2 )" |
660 |
- |
661 |
-SLOT="0" |
662 |
- |
663 |
-# +alsa-plugin as discussed in bug #519530 |
664 |
-# TODO: Find out why webrtc-aec is + prefixed - there's already the always available speexdsp-aec |
665 |
-# NOTE: The current ebuild sets +X almost certainly just for the pulseaudio.desktop file |
666 |
-IUSE="+alsa +alsa-plugin aptx +asyncns bluetooth dbus elogind equalizer fftw +gdbm +glib gstreamer jack ldac lirc |
667 |
-ofono-headset +orc oss selinux sox ssl systemd system-wide tcpd test +udev valgrind +webrtc-aec +X zeroconf" |
668 |
- |
669 |
-RESTRICT="!test? ( test )" |
670 |
- |
671 |
-# See "*** BLUEZ support not found (requires D-Bus)" in configure.ac |
672 |
-# Basically all IUSE are either ${MULTILIB_USEDEP} for client libs or they belong under !daemon () |
673 |
-# We duplicate alsa-plugin, {native,ofono}-headset under daemon to let users deal with them at once |
674 |
-REQUIRED_USE=" |
675 |
- ?? ( elogind systemd ) |
676 |
- alsa-plugin? ( alsa ) |
677 |
- aptx? ( bluetooth ) |
678 |
- bluetooth? ( dbus ) |
679 |
- equalizer? ( dbus ) |
680 |
- ldac? ( bluetooth ) |
681 |
- ofono-headset? ( bluetooth ) |
682 |
- udev? ( || ( alsa oss ) ) |
683 |
- zeroconf? ( dbus ) |
684 |
-" |
685 |
- |
686 |
-# NOTE: |
687 |
-# - libpcre needed in some cases, bug #472228 |
688 |
-# - media-libs/speexdsp is providing echo canceller implementation and used in resampler |
689 |
-# TODO: libatomic_ops is only needed on some architectures and conditions, and then at runtime too |
690 |
-gstreamer_deps=" |
691 |
- media-libs/gst-plugins-base |
692 |
- >=media-libs/gstreamer-1.14 |
693 |
-" |
694 |
-COMMON_DEPEND=" |
695 |
- ~media-libs/libpulse-${PV}[dbus?,glib?,systemd?,valgrind?,X?] |
696 |
- dev-libs/libatomic_ops |
697 |
- >=media-libs/libsndfile-1.0.20 |
698 |
- >=media-libs/speexdsp-1.2 |
699 |
- || ( |
700 |
- elibc_glibc? ( virtual/libc ) |
701 |
- dev-libs/libpcre:3 |
702 |
- ) |
703 |
- alsa? ( >=media-libs/alsa-lib-1.0.24 ) |
704 |
- aptx? ( ${gstreamer_deps} ) |
705 |
- asyncns? ( >=net-libs/libasyncns-0.1 ) |
706 |
- bluetooth? ( |
707 |
- >=net-wireless/bluez-5 |
708 |
- media-libs/sbc |
709 |
- ) |
710 |
- dev-libs/libltdl |
711 |
- sys-kernel/linux-headers |
712 |
- >=sys-libs/libcap-2.22-r2 |
713 |
- dbus? ( >=sys-apps/dbus-1.4.12 ) |
714 |
- elogind? ( sys-auth/elogind ) |
715 |
- equalizer? ( |
716 |
- sci-libs/fftw:3.0= |
717 |
- ) |
718 |
- fftw? ( |
719 |
- sci-libs/fftw:3.0= |
720 |
- ) |
721 |
- gdbm? ( sys-libs/gdbm:= ) |
722 |
- glib? ( >=dev-libs/glib-2.28.0:2 ) |
723 |
- gstreamer? ( |
724 |
- ${gstreamer_deps} |
725 |
- >=dev-libs/glib-2.26.0:2 |
726 |
- ) |
727 |
- jack? ( virtual/jack ) |
728 |
- ldac? ( ${gstreamer_deps} ) |
729 |
- lirc? ( app-misc/lirc ) |
730 |
- ofono-headset? ( >=net-misc/ofono-1.13 ) |
731 |
- orc? ( >=dev-lang/orc-0.4.15 ) |
732 |
- selinux? ( sec-policy/selinux-pulseaudio ) |
733 |
- sox? ( >=media-libs/soxr-0.1.1 ) |
734 |
- ssl? ( dev-libs/openssl:= ) |
735 |
- systemd? ( sys-apps/systemd:= ) |
736 |
- tcpd? ( sys-apps/tcp-wrappers ) |
737 |
- udev? ( >=virtual/udev-143[hwdb(+)] ) |
738 |
- valgrind? ( dev-util/valgrind ) |
739 |
- webrtc-aec? ( >=media-libs/webrtc-audio-processing-0.2:0 ) |
740 |
- X? ( |
741 |
- >=x11-libs/libxcb-1.6 |
742 |
- x11-libs/libICE |
743 |
- x11-libs/libSM |
744 |
- >=x11-libs/libX11-1.4.0 |
745 |
- >=x11-libs/libXtst-1.0.99.2 |
746 |
- ) |
747 |
- zeroconf? ( >=net-dns/avahi-0.6.12[dbus] ) |
748 |
- !<media-sound/pulseaudio-15.0-r100 |
749 |
-" |
750 |
- |
751 |
-# pulseaudio ships a bundle xmltoman, which uses XML::Parser |
752 |
-DEPEND=" |
753 |
- ${COMMON_DEPEND} |
754 |
- test? ( >=dev-libs/check-0.9.10 ) |
755 |
- X? ( x11-base/xorg-proto ) |
756 |
-" |
757 |
- |
758 |
-# alsa-utils dep is for the alsasound init.d script (see bug 155707); TODO: read it |
759 |
-# NOTE: Only system-wide needs acct-group/audio unless elogind/systemd is not used |
760 |
-RDEPEND=" |
761 |
- ${COMMON_DEPEND} |
762 |
- system-wide? ( |
763 |
- alsa? ( media-sound/alsa-utils ) |
764 |
- acct-user/pulse |
765 |
- acct-group/audio |
766 |
- acct-group/pulse-access |
767 |
- ) |
768 |
- bluetooth? ( |
769 |
- ldac? ( media-plugins/gst-plugins-ldac ) |
770 |
- aptx? ( media-plugins/gst-plugins-openaptx ) |
771 |
- ) |
772 |
-" |
773 |
-unset gstreamer_deps |
774 |
- |
775 |
-# This is a PDEPEND to avoid a circular dep |
776 |
-PDEPEND=" |
777 |
- alsa? ( alsa-plugin? ( >=media-plugins/alsa-plugins-1.0.27-r1[pulseaudio] ) ) |
778 |
-" |
779 |
- |
780 |
-BDEPEND=" |
781 |
- dev-lang/perl |
782 |
- dev-perl/XML-Parser |
783 |
- sys-devel/gettext |
784 |
- virtual/libiconv |
785 |
- virtual/libintl |
786 |
- virtual/pkgconfig |
787 |
- orc? ( >=dev-lang/orc-0.4.15 ) |
788 |
- system-wide? ( dev-util/unifdef ) |
789 |
-" |
790 |
- |
791 |
-DOCS=( NEWS README ) |
792 |
- |
793 |
-S="${WORKDIR}/${MY_P}" |
794 |
- |
795 |
-# patches merged upstream, to be removed with 16.1 or later bump |
796 |
-PATCHES=( |
797 |
- "${FILESDIR}"/pulseaudio-16.0-fix-rtp-receiver-sdp-record.patch |
798 |
- "${FILESDIR}"/pulseaudio-16.0-optional-module-console-kit.patch |
799 |
- "${FILESDIR}"/pulseaudio-16.0-fix-combine-sink-underrun-crash.patch |
800 |
- "${FILESDIR}"/pulseaudio-16.0-fix-gstreamer-bluetooth-arm-crash.patch |
801 |
- "${FILESDIR}"/pulseaudio-16.0-fix-pacmd-play-file-crash.patch |
802 |
-) |
803 |
- |
804 |
-src_prepare() { |
805 |
- default |
806 |
- |
807 |
- gnome2_environment_reset |
808 |
-} |
809 |
- |
810 |
-src_configure() { |
811 |
- local enable_bluez5_gstreamer="disabled" |
812 |
- if use aptx || use ldac ; then |
813 |
- enable_bluez5_gstreamer="enabled" |
814 |
- fi |
815 |
- |
816 |
- local enable_fftw="disabled" |
817 |
- if use equalizer || use fftw ; then |
818 |
- enable_fftw="enabled" |
819 |
- fi |
820 |
- |
821 |
- local emesonargs=( |
822 |
- --localstatedir="${EPREFIX}"/var |
823 |
- |
824 |
- -Ddaemon=true |
825 |
- -Dclient=false |
826 |
- -Ddoxygen=false |
827 |
- -Dgcov=false |
828 |
- -Dman=true |
829 |
- # tests involve random modules, so just do them for the native # TODO: tests should run always |
830 |
- $(meson_use test tests) |
831 |
- -Ddatabase=$(usex gdbm gdbm simple) # tdb is also an option but no one cares about it |
832 |
- -Dstream-restore-clear-old-devices=true |
833 |
- -Drunning-from-build-tree=false |
834 |
- |
835 |
- # Paths |
836 |
- -Dmodlibexecdir="${EPREFIX}/usr/$(get_libdir)/pulseaudio/modules" # Was $(get_libdir)/${P} |
837 |
- -Dsystemduserunitdir=$(systemd_get_userunitdir) |
838 |
- -Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d" |
839 |
- -Dbashcompletiondir="$(get_bashcompdir)" # Alternatively DEPEND on app-shells/bash-completion for pkg-config to provide the value |
840 |
- |
841 |
- # Optional features |
842 |
- $(meson_feature alsa) |
843 |
- $(meson_feature asyncns) |
844 |
- $(meson_feature zeroconf avahi) |
845 |
- $(meson_feature bluetooth bluez5) |
846 |
- -Dbluez5-gstreamer=${enable_bluez5_gstreamer} |
847 |
- $(meson_use bluetooth bluez5-native-headset) |
848 |
- $(meson_use ofono-headset bluez5-ofono-headset) |
849 |
- -Dconsolekit=disabled |
850 |
- $(meson_feature dbus) |
851 |
- $(meson_feature elogind) |
852 |
- -Dfftw=${enable_fftw} |
853 |
- $(meson_feature glib) # WARNING: toggling this likely changes ABI |
854 |
- $(meson_feature glib gsettings) # Supposedly correct? |
855 |
- $(meson_feature gstreamer) |
856 |
- -Dgtk=disabled |
857 |
- -Dhal-compat=false |
858 |
- -Dipv6=true |
859 |
- $(meson_feature jack) |
860 |
- $(meson_feature lirc) |
861 |
- $(meson_feature ssl openssl) |
862 |
- $(meson_feature orc) |
863 |
- $(meson_feature oss oss-output) |
864 |
- -Dsamplerate=disabled # Matches upstream |
865 |
- $(meson_feature sox soxr) |
866 |
- -Dspeex=enabled |
867 |
- $(meson_feature systemd) |
868 |
- $(meson_feature tcpd tcpwrap) |
869 |
- $(meson_feature udev) |
870 |
- $(meson_feature valgrind) |
871 |
- $(meson_feature X x11) |
872 |
- |
873 |
- # Echo cancellation |
874 |
- -Dadrian-aec=false # Not packaged? |
875 |
- $(meson_feature webrtc-aec) |
876 |
- ) |
877 |
- |
878 |
- meson_src_configure |
879 |
-} |
880 |
- |
881 |
-src_install() { |
882 |
- meson_src_install |
883 |
- |
884 |
- # Upstream installs 'pactl' if client is built, with all symlinks except for |
885 |
- # 'pulseaudio', 'pacmd' and 'pasuspender' which are installed if server is built. |
886 |
- # This trips QA warning, workaround: |
887 |
- # - install missing aliases in media-libs/libpulse (client build) |
888 |
- # - remove corresponding symlinks in media-sound/pulseaudio-daemonclient (server build) |
889 |
- rm "${D}/$(get_bashcompdir)"/pulseaudio || die |
890 |
- rm "${D}/$(get_bashcompdir)"/pacmd || die |
891 |
- rm "${D}/$(get_bashcompdir)"/pasuspender || die |
892 |
- |
893 |
- # Daemon configuration scripts will try to load snippets from corresponding '.d' dirs. |
894 |
- # Install these dirs to silence a warning if they are missing. |
895 |
- keepdir /etc/pulse/default.pa.d |
896 |
- keepdir /etc/pulse/system.pa.d |
897 |
- |
898 |
- if use system-wide; then |
899 |
- newconfd "${FILESDIR}"/pulseaudio.conf.d pulseaudio |
900 |
- |
901 |
- use_define() { |
902 |
- local define=${2:-$(echo ${1} | tr '[:lower:]' '[:upper:]')} |
903 |
- |
904 |
- use "${1}" && echo "-D${define}" || echo "-U${define}" |
905 |
- } |
906 |
- |
907 |
- unifdef -x 1 \ |
908 |
- $(use_define zeroconf AVAHI) \ |
909 |
- $(use_define alsa) \ |
910 |
- $(use_define bluetooth) \ |
911 |
- $(use_define udev) \ |
912 |
- "${FILESDIR}"/pulseaudio.init.d-5 \ |
913 |
- > "${T}"/pulseaudio \ |
914 |
- || die |
915 |
- |
916 |
- doinitd "${T}"/pulseaudio |
917 |
- |
918 |
- systemd_dounit "${FILESDIR}"/pulseaudio.service |
919 |
- |
920 |
- # We need /var/run/pulse, bug 442852 |
921 |
- newtmpfiles "${FILESDIR}"/pulseaudio.tmpfiles pulseaudio.conf |
922 |
- else |
923 |
- # Prevent warnings when system-wide is not used, bug 447694 |
924 |
- if use dbus; then |
925 |
- rm "${ED}"/etc/dbus-1/system.d/pulseaudio-system.conf || die |
926 |
- fi |
927 |
- fi |
928 |
- |
929 |
- if use zeroconf; then |
930 |
- sed -i \ |
931 |
- -e '/module-zeroconf-publish/s:^#::' \ |
932 |
- "${ED}/etc/pulse/default.pa" \ |
933 |
- || die |
934 |
- fi |
935 |
- |
936 |
- # Only enable autospawning pulseaudio daemon on systems without systemd |
937 |
- if ! use systemd; then |
938 |
- insinto /etc/pulse/client.conf.d |
939 |
- newins "${FILESDIR}/enable-autospawn.conf" "enable-autospawn.conf" |
940 |
- fi |
941 |
- |
942 |
- find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die |
943 |
-} |
944 |
- |
945 |
-pkg_postinst() { |
946 |
- gnome2_schemas_update |
947 |
- |
948 |
- use udev && udev_reload |
949 |
- |
950 |
- if use system-wide; then |
951 |
- tmpfiles_process "pulseaudio.conf" |
952 |
- |
953 |
- elog "You have enabled the 'system-wide' USE flag for pulseaudio." |
954 |
- elog "This mode should only be used on headless servers, embedded systems," |
955 |
- elog "or thin clients. It will usually require manual configuration, and is" |
956 |
- elog "incompatible with many expected pulseaudio features." |
957 |
- elog "On normal desktop systems, system-wide mode is STRONGLY DISCOURAGED." |
958 |
- elog "" |
959 |
- elog "For more information, see" |
960 |
- elog " https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/" |
961 |
- elog " https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/SystemWide/" |
962 |
- elog " https://wiki.gentoo.org/wiki/PulseAudio#Headless_server" |
963 |
- elog "" |
964 |
- fi |
965 |
- |
966 |
- if use equalizer; then |
967 |
- elog "You will need to load some extra modules to make qpaeq work." |
968 |
- elog "You can do that by adding the following two lines in" |
969 |
- elog "/etc/pulse/default.pa and restarting pulseaudio:" |
970 |
- elog "load-module module-equalizer-sink" |
971 |
- elog "load-module module-dbus-protocol" |
972 |
- elog "" |
973 |
- fi |
974 |
- |
975 |
- if use bluetooth; then |
976 |
- elog "You have enabled bluetooth USE flag for pulseaudio. Daemon will now handle" |
977 |
- elog "bluetooth Headset (HSP HS and HSP AG) and Handsfree (HFP HF) profiles using" |
978 |
- elog "native headset backend by default. This can be selectively disabled" |
979 |
- elog "via runtime configuration arguments to module-bluetooth-discover" |
980 |
- elog "in /etc/pulse/default.pa" |
981 |
- elog "To disable HFP HF append enable_native_hfp_hf=false" |
982 |
- elog "To disable HSP HS append enable_native_hsp_hs=false" |
983 |
- elog "To disable HSP AG append headset=auto or headset=ofono" |
984 |
- elog "(note this does NOT require enabling USE ofono)" |
985 |
- elog "" |
986 |
- fi |
987 |
- |
988 |
- if use ofono-headset; then |
989 |
- elog "You have enabled both native and ofono headset profiles. The runtime decision" |
990 |
- elog "which to use is done via the 'headset' argument of module-bluetooth-discover." |
991 |
- elog "" |
992 |
- fi |
993 |
- |
994 |
- if use gstreamer; then |
995 |
- elog "GStreamer-based RTP implementation modile enabled." |
996 |
- elog "To use OPUS payload install media-plugins/gst-plugins-opus" |
997 |
- elog "and add enable_opus=1 argument to module-rtp-send" |
998 |
- elog "" |
999 |
- fi |
1000 |
- |
1001 |
- if use systemd; then |
1002 |
- elog "Pulseaudio autospawn by client library is no longer enabled when systemd is available." |
1003 |
- elog "It's recommended to start pulseaudio via its systemd user units:" |
1004 |
- elog "" |
1005 |
- elog " systemctl --user enable pulseaudio.service pulseaudio.socket" |
1006 |
- elog "" |
1007 |
- elog "Root user can change system default configuration for all users:" |
1008 |
- elog "" |
1009 |
- elog " systemctl --global enable pulseaudio.service pulseaudio.socket" |
1010 |
- elog "" |
1011 |
- elog "If you would like to enable autospawn by client library, edit autospawn flag in /etc/pulse/client.conf like this:" |
1012 |
- elog "" |
1013 |
- elog " autospawn = yes" |
1014 |
- elog "" |
1015 |
- elog "The change from autospawn to user units will take effect after restarting." |
1016 |
- elog "" |
1017 |
- fi |
1018 |
- |
1019 |
- optfeature_header "PulseAudio can be enhanced by installing the following:" |
1020 |
- use equalizer && optfeature "using the qpaeq script" dev-python/PyQt5[dbus,widgets] |
1021 |
- use dbus && optfeature "restricted realtime capabilities via D-Bus" sys-auth/rtkit |
1022 |
-} |
1023 |
- |
1024 |
-pkg_postrm() { |
1025 |
- gnome2_schemas_update |
1026 |
- use udev && udev_reload |
1027 |
-} |