Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/0.3.64/, ...
Date: Wed, 15 Mar 2023 05:53:46
Message-Id: 1678859386.173b22c1694f6202d4621c7a3c6cc2ac1a4914e0.sam@gentoo
1 commit: 173b22c1694f6202d4621c7a3c6cc2ac1a4914e0
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Wed Mar 15 05:49:46 2023 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 15 05:49:46 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=173b22c1
7
8 media-video/pipewire: drop 0.3.63-r3, 0.3.64-r2
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 media-video/pipewire/Manifest | 2 -
13 ...pa-Fix-audioconvert-overflow-when-scaling.patch | 65 ---
14 ...ter-chain-fix-AVX-dsp_sum-index-increment.patch | 22 -
15 ...on-t-remove-deprecated-symbols-by-default.patch | 61 ---
16 .../files/pipewire-0.3.63-alsa-node-target.patch | 28 --
17 .../files/pipewire-0.3.63-bluetooth-typo.patch | 21 -
18 .../files/pipewire-0.3.63-bluez-ldac_abr.patch | 22 -
19 .../files/pipewire-0.3.63-rate-update.patch | 39 --
20 media-video/pipewire/pipewire-0.3.63-r3.ebuild | 454 ---------------------
21 media-video/pipewire/pipewire-0.3.64-r2.ebuild | 449 --------------------
22 10 files changed, 1163 deletions(-)
23
24 diff --git a/media-video/pipewire/Manifest b/media-video/pipewire/Manifest
25 index 7ad7e1d2b95d..0bfca7036486 100644
26 --- a/media-video/pipewire/Manifest
27 +++ b/media-video/pipewire/Manifest
28 @@ -1,5 +1,3 @@
29 -DIST pipewire-0.3.63.tar.bz2 1485423 BLAKE2B 8629bce6d11959d4b3930d7db4e0ad201981002d52c6b73b3ee2b0ac141518f553f7b0e47aef4157b3c3ef71c6b544889f60f4be0fadb01b8a35c1d457edb1aa SHA512 0a45e9017bbcd74f21c6a1f388c5b58123deec083bbc9a9e695948ea95e67b6384acfff6e5ab685ea7287b4696e01176e257b73286ecd03c2d2e43d80fd60805
30 -DIST pipewire-0.3.64.tar.bz2 1490475 BLAKE2B 9a4d9e23a5d60da7c5788ce5145ce083f13fe771f3f5bcb3dfd1e9560d982f20415f32f756b875081464e1b175ef80af56d7babb3bbbd7a5eaf034c9c43b810a SHA512 4dff77cf1ab9fefffad1b6f7182115dbb5e4f0339f052dcfcc34b62687b461d25a6f891d1ad0246dab5a8cb80ca190d97d358a6494da8c6a8cc64e0b38452093
31 DIST pipewire-0.3.65.tar.bz2 1522095 BLAKE2B d991820e8780773ccf1cd68baa3156428eb099703b82c3e3ad24a86bc634ad43fb474fe362de5e5704ee8b35832b75995fd56096b6539835e8b1f31710450d08 SHA512 0c2402044a04ab6ba724b0808279498e2126dd567920f3241d7d3d5e13ea676e353fc85a73634cf4cae5429454250dfce5cd18ba4a5444a7ed1a5ca2e0ae1eef
32 DIST pipewire-0.3.66.tar.bz2 1532022 BLAKE2B aa0db6426a04728b633ce9a40aa1b10eca69423925b1a06b70cc65e4b8466b9de23c4f16ebdc5bd6c14d41866deec66ed166053299b9bc6f5b9e81fcc06010e2 SHA512 9e43159fec81dddad618be6ea44304aba4013be14992476e54cbb01e8699c9d6291012879e1c6717e1095be2d73390f900f6d54d8d9c689b50baf93c820c2129
33 DIST pipewire-0.3.67.tar.bz2 1531871 BLAKE2B 59ea184ae11ad2999f37f0ded785551894ce6fbf478146c53f1dc6cdfeae7aa50cf6151b1e5e9c63c4f288682e5da7fde523251096af7da9d79bf96dd9d94809 SHA512 538b8ee905760775a0522dd3883d5db9bcaafe93d80eb5b588e21e73de22637a49cd139d3ed4dcfd1a5822af85e4cede624eee899c1e51a115f1ba0a6966c7a5
34
35 diff --git a/media-video/pipewire/files/0.3.64/0001-spa-Fix-audioconvert-overflow-when-scaling.patch b/media-video/pipewire/files/0.3.64/0001-spa-Fix-audioconvert-overflow-when-scaling.patch
36 deleted file mode 100644
37 index e24b8153ef6d..000000000000
38 --- a/media-video/pipewire/files/0.3.64/0001-spa-Fix-audioconvert-overflow-when-scaling.patch
39 +++ /dev/null
40 @@ -1,65 +0,0 @@
41 -https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/1d9640af5a7906620f214aa0a39c63128c8506a6.
42 -
43 -From 1d9640af5a7906620f214aa0a39c63128c8506a6 Mon Sep 17 00:00:00 2001
44 -From: Wim Taymans <wtaymans@××××××.com>
45 -Date: Mon, 16 Jan 2023 18:28:31 +0100
46 -Subject: [PATCH] spa: Fix audioconvert overflow when scaling
47 -
48 -Add SPA_SCALE32_UP that scales a uint32 without overflow.
49 -Use this for scaling the threshold in ALSA.
50 -Fix the scaling in audioconvert of the buffer size, the scaling was
51 -wrong and it was also causing an overflow resulting in choppy sound in
52 -some cases.
53 -
54 -See #2680
55 ---- a/spa/include/spa/utils/defs.h
56 -+++ b/spa/include/spa/utils/defs.h
57 -@@ -274,6 +274,14 @@ struct spa_fraction {
58 - #define SPA_ROUND_DOWN_N(num,align) ((num) & ~SPA_ROUND_MASK(num, align))
59 - #define SPA_ROUND_UP_N(num,align) ((((num)-1) | SPA_ROUND_MASK(num, align))+1)
60 -
61 -+#define SPA_SCALE32_UP(val,num,denom) \
62 -+({ \
63 -+ uint64_t _val = (val); \
64 -+ uint64_t _denom = (denom); \
65 -+ (uint32_t)(((_val) * (num) + (_denom)-1) / (_denom)); \
66 -+})
67 -+
68 -+
69 - #define SPA_PTR_ALIGNMENT(p,align) ((intptr_t)(p) & ((align)-1))
70 - #define SPA_IS_ALIGNED(p,align) (SPA_PTR_ALIGNMENT(p,align) == 0)
71 - #define SPA_PTR_ALIGN(p,align,type) ((type*)SPA_ROUND_UP_N((intptr_t)(p), (intptr_t)(align)))
72 ---- a/spa/plugins/alsa/alsa-pcm.c
73 -+++ b/spa/plugins/alsa/alsa-pcm.c
74 -@@ -1999,7 +1999,7 @@ static inline void check_position_config(struct state *state)
75 - (state->rate_denom != state->position->clock.rate.denom))) {
76 - state->duration = state->position->clock.duration;
77 - state->rate_denom = state->position->clock.rate.denom;
78 -- state->threshold = (state->duration * state->rate + state->rate_denom-1) / state->rate_denom;
79 -+ state->threshold = SPA_SCALE32_UP(state->duration, state->rate, state->rate_denom);
80 - state->max_error = SPA_MAX(256.0f, state->threshold / 2.0f);
81 - state->resample = ((uint32_t)state->rate != state->rate_denom) || state->matching;
82 - state->alsa_sync = true;
83 -@@ -2569,7 +2569,7 @@ int spa_alsa_start(struct state *state)
84 - setup_matching(state);
85 -
86 - spa_dll_init(&state->dll);
87 -- state->threshold = (state->duration * state->rate + state->rate_denom-1) / state->rate_denom;
88 -+ state->threshold = SPA_SCALE32_UP(state->duration, state->rate, state->rate_denom);
89 - state->last_threshold = state->threshold;
90 - state->max_error = SPA_MAX(256.0f, state->threshold / 2.0f);
91 -
92 ---- a/spa/plugins/audioconvert/audioconvert.c
93 -+++ b/spa/plugins/audioconvert/audioconvert.c
94 -@@ -1755,7 +1755,7 @@ impl_node_port_enum_params(void *object, int seq,
95 - size = this->quantum_limit * 2;
96 - /* scale the buffer size when we can. */
97 - if (irate != 0 && orate != 0)
98 -- size = size * (irate + orate - 1) / orate;
99 -+ size = SPA_SCALE32_UP(size, irate, orate);
100 - }
101 -
102 - param = spa_pod_builder_add_object(&b,
103 ---
104 -2.39.1
105 -
106
107 diff --git a/media-video/pipewire/files/0.3.64/0002-filter-chain-fix-AVX-dsp_sum-index-increment.patch b/media-video/pipewire/files/0.3.64/0002-filter-chain-fix-AVX-dsp_sum-index-increment.patch
108 deleted file mode 100644
109 index f33a83ab7a10..000000000000
110 --- a/media-video/pipewire/files/0.3.64/0002-filter-chain-fix-AVX-dsp_sum-index-increment.patch
111 +++ /dev/null
112 @@ -1,22 +0,0 @@
113 -https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/ccedf1722ae44c97ec0d058b349494c67a0b56dc
114 -
115 -From ccedf1722ae44c97ec0d058b349494c67a0b56dc Mon Sep 17 00:00:00 2001
116 -From: Wim Taymans <wtaymans@××××××.com>
117 -Date: Tue, 17 Jan 2023 09:24:00 +0100
118 -Subject: [PATCH] filter-chain: fix AVX dsp_sum index increment
119 -
120 -Fixes #2965
121 ---- a/src/modules/module-filter-chain/dsp-ops-avx.c
122 -+++ b/src/modules/module-filter-chain/dsp-ops-avx.c
123 -@@ -59,7 +59,7 @@ void dsp_sum_avx(struct dsp_ops *ops, float *r, const float *a, const float *b,
124 - _mm256_store_ps(&r[n+24], in[3]);
125 - }
126 - } else {
127 -- for (n = 0; n < unrolled; n += 16) {
128 -+ for (n = 0; n < unrolled; n += 32) {
129 - in[0] = _mm256_loadu_ps(&a[n+ 0]);
130 - in[1] = _mm256_loadu_ps(&a[n+ 8]);
131 - in[2] = _mm256_loadu_ps(&a[n+16]);
132 ---
133 -2.39.1
134 -
135
136 diff --git a/media-video/pipewire/files/0.3.64/0003-keys-don-t-remove-deprecated-symbols-by-default.patch b/media-video/pipewire/files/0.3.64/0003-keys-don-t-remove-deprecated-symbols-by-default.patch
137 deleted file mode 100644
138 index fe022959a913..000000000000
139 --- a/media-video/pipewire/files/0.3.64/0003-keys-don-t-remove-deprecated-symbols-by-default.patch
140 +++ /dev/null
141 @@ -1,61 +0,0 @@
142 -https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/a979c0f43078cbfefa2ba614ee078579042d2de2
143 -
144 -From a979c0f43078cbfefa2ba614ee078579042d2de2 Mon Sep 17 00:00:00 2001
145 -From: Wim Taymans <wtaymans@××××××.com>
146 -Date: Tue, 17 Jan 2023 11:58:04 +0100
147 -Subject: [PATCH] keys: don't remove deprecated symbols by default
148 -
149 -Add a new macro to mark deprecated keys. The macro will emit a warning
150 -about the symbol being deprecated.
151 -PW_ENABLE_DEPRECATED will suppress the deprecation warning.
152 -Add PW_REMOVE_DEPRECATED to completely remove the deprecated symbols.
153 -
154 -Fixes #2952
155 ---- a/src/pipewire/keys.h
156 -+++ b/src/pipewire/keys.h
157 -@@ -29,6 +29,7 @@
158 - extern "C" {
159 - #endif
160 -
161 -+#include <pipewire/utils.h>
162 - /**
163 - * \defgroup pw_keys Key Names
164 - *
165 -@@ -337,14 +338,14 @@ extern "C" {
166 - #define PW_KEY_VIDEO_FORMAT "video.format" /**< a video format */
167 - #define PW_KEY_VIDEO_SIZE "video.size" /**< a video size as "<width>x<height" */
168 -
169 --#ifdef PW_ENABLE_DEPRECATED
170 --#define PW_KEY_PRIORITY_MASTER "priority.master" /**< deprecated */
171 --#define PW_KEY_NODE_TARGET "node.target" /**< deprecated since 0.3.64, use target.object. */
172 --#endif /* PW_ENABLE_DEPRECATED */
173 --
174 - #define PW_KEY_TARGET_OBJECT "target.object" /**< a target object to link to. This can be
175 - * and object name or object.serial */
176 -
177 -+#ifndef PW_REMOVE_DEPRECATED
178 -+#define PW_KEY_PRIORITY_MASTER PW_DEPRECATED("priority.master") /**< deprecated, use priority.driver */
179 -+#define PW_KEY_NODE_TARGET PW_DEPRECATED("node.target") /**< deprecated since 0.3.64, use target.object. */
180 -+#endif /* PW_REMOVE_DEPRECATED */
181 -+
182 - /** \}
183 - */
184 -
185 ---- a/src/pipewire/utils.h
186 -+++ b/src/pipewire/utils.h
187 -@@ -94,6 +94,12 @@ ssize_t pw_getrandom(void *buf, size_t buflen, unsigned int flags);
188 -
189 - void* pw_reallocarray(void *ptr, size_t nmemb, size_t size);
190 -
191 -+#ifdef PW_ENABLE_DEPRECATED
192 -+#define PW_DEPRECATED(v) (v)
193 -+#else
194 -+#define PW_DEPRECATED(v) ({ __typeof__(v) _v SPA_DEPRECATED = (v); (void)_v; (v); })
195 -+#endif /* PW_ENABLE_DEPRECATED */
196 -+
197 - /**
198 - * \}
199 - */
200 ---
201 -2.39.1
202 -
203
204 diff --git a/media-video/pipewire/files/pipewire-0.3.63-alsa-node-target.patch b/media-video/pipewire/files/pipewire-0.3.63-alsa-node-target.patch
205 deleted file mode 100644
206 index 8a4169b57af5..000000000000
207 --- a/media-video/pipewire/files/pipewire-0.3.63-alsa-node-target.patch
208 +++ /dev/null
209 @@ -1,28 +0,0 @@
210 -https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/89ac6b353521fb9a6d6eb6bb74724c4fa968f75c
211 -https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2893
212 -
213 -From 89ac6b353521fb9a6d6eb6bb74724c4fa968f75c Mon Sep 17 00:00:00 2001
214 -From: Wim Taymans <wtaymans@××××××.com>
215 -Date: Sat, 17 Dec 2022 18:17:33 +0100
216 -Subject: [PATCH] =?UTF-8?q?alsa:=20don=C2=B4t=20set=20-1=20as=20node.targe?=
217 - =?UTF-8?q?t?=
218 -MIME-Version: 1.0
219 -Content-Type: text/plain; charset=UTF-8
220 -Content-Transfer-Encoding: 8bit
221 -
222 -Leave the target unset when -1, just like what pw-stream does.
223 -
224 -See #2893
225 ---- a/pipewire-alsa/alsa-plugins/pcm_pipewire.c
226 -+++ b/pipewire-alsa/alsa-plugins/pcm_pipewire.c
227 -@@ -579,7 +579,7 @@ static int snd_pcm_pipewire_prepare(snd_pcm_ioplug_t *io)
228 - pw_properties_setf(props, PW_KEY_NODE_LATENCY, "%lu/%u", pw->min_avail, io->rate);
229 - if (pw_properties_get(props, PW_KEY_NODE_RATE) == NULL)
230 - pw_properties_setf(props, PW_KEY_NODE_RATE, "1/%u", io->rate);
231 -- if (pw->target != NULL &&
232 -+ if (pw->target != NULL && !spa_streq(pw->target, "-1") &&
233 - pw_properties_get(props, PW_KEY_NODE_TARGET) == NULL)
234 - pw_properties_setf(props, PW_KEY_NODE_TARGET, "%s", pw->target);
235 -
236 ---
237 -GitLab
238
239 diff --git a/media-video/pipewire/files/pipewire-0.3.63-bluetooth-typo.patch b/media-video/pipewire/files/pipewire-0.3.63-bluetooth-typo.patch
240 deleted file mode 100644
241 index 78993a57831e..000000000000
242 --- a/media-video/pipewire/files/pipewire-0.3.63-bluetooth-typo.patch
243 +++ /dev/null
244 @@ -1,21 +0,0 @@
245 -https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/c7b3ef0d9ff16a1e69a299870860bebcb628e298
246 -
247 -From c7b3ef0d9ff16a1e69a299870860bebcb628e298 Mon Sep 17 00:00:00 2001
248 -From: Pauli Virtanen <pav@×××.fi>
249 -Date: Wed, 21 Dec 2022 12:54:52 +0200
250 -Subject: [PATCH] bluez5: backend-native: fix missing brace in CIND reply
251 -
252 -It should look like ...,("battchg,(0-5)) not ...,"battchg",(0-5))
253 ---- a/spa/plugins/bluez5/backend-native.c
254 -+++ b/spa/plugins/bluez5/backend-native.c
255 -@@ -74,7 +74,7 @@ enum {
256 - HFP_AG_INITIAL_CODEC_SETUP_WAIT
257 - };
258 -
259 --#define CIND_INDICATORS "(\"service\",(0-1)),(\"call\",(0-1)),(\"callsetup\",(0-3)),(\"callheld\",(0-2)),(\"signal\",(0-5)),(\"roam\",(0-1)),\"battchg\",(0-5))"
260 -+#define CIND_INDICATORS "(\"service\",(0-1)),(\"call\",(0-1)),(\"callsetup\",(0-3)),(\"callheld\",(0-2)),(\"signal\",(0-5)),(\"roam\",(0-1)),(\"battchg\",(0-5))"
261 - enum {
262 - CIND_SERVICE = 1,
263 - CIND_CALL,
264 ---
265 -GitLab
266
267 diff --git a/media-video/pipewire/files/pipewire-0.3.63-bluez-ldac_abr.patch b/media-video/pipewire/files/pipewire-0.3.63-bluez-ldac_abr.patch
268 deleted file mode 100644
269 index a6e237ddd7c7..000000000000
270 --- a/media-video/pipewire/files/pipewire-0.3.63-bluez-ldac_abr.patch
271 +++ /dev/null
272 @@ -1,22 +0,0 @@
273 -https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/7758240c79a3ed15459da5d150a0b1c3612e3f79
274 -
275 -From 7758240c79a3ed15459da5d150a0b1c3612e3f79 Mon Sep 17 00:00:00 2001
276 -From: Wim Taymans <wtaymans@××××××.com>
277 -Date: Thu, 15 Dec 2022 12:20:40 +0100
278 -Subject: [PATCH] bluez: fix compilation without ldac_abr
279 -
280 -The define for this constant was removed but it was LDACBT_EQMID_MQ
281 -before.
282 ---- a/spa/plugins/bluez5/a2dp-codec-ldac.c
283 -+++ b/spa/plugins/bluez5/a2dp-codec-ldac.c
284 -@@ -243,7 +243,7 @@ static int codec_reduce_bitpool(void *data)
285 - #else
286 - struct impl *this = data;
287 - int res;
288 -- if (this->eqmid == LDACBT_EQMID_BITRATE_330000 || !this->enable_abr)
289 -+ if (this->eqmid == LDACBT_EQMID_MQ || !this->enable_abr)
290 - return this->eqmid;
291 - res = ldacBT_alter_eqmid_priority(this->ldac, LDACBT_EQMID_INC_CONNECTION);
292 - return res;
293 ---
294 -GitLab
295
296 diff --git a/media-video/pipewire/files/pipewire-0.3.63-rate-update.patch b/media-video/pipewire/files/pipewire-0.3.63-rate-update.patch
297 deleted file mode 100644
298 index 91487def58e2..000000000000
299 --- a/media-video/pipewire/files/pipewire-0.3.63-rate-update.patch
300 +++ /dev/null
301 @@ -1,39 +0,0 @@
302 -https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/860b8fc27ffbfd0a095e3fa4b0cd125d536283d3
303 -https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2915
304 -https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2891
305 -
306 -From 860b8fc27ffbfd0a095e3fa4b0cd125d536283d3 Mon Sep 17 00:00:00 2001
307 -From: Wim Taymans <wtaymans@××××××.com>
308 -Date: Thu, 29 Dec 2022 12:22:56 +0100
309 -Subject: [PATCH] modules: fix rate update
310 -
311 -Setting the rate with the PROP_rate would actually result in a rate
312 -adjustment of 1.0f / rate, so do the same here.
313 -
314 -See #2891
315 ---- a/src/modules/module-pulse-tunnel.c
316 -+++ b/src/modules/module-pulse-tunnel.c
317 -@@ -270,7 +270,7 @@ static void update_rate(struct impl *impl, bool playback)
318 - impl->current_latency, impl->target_latency);
319 -
320 - SPA_FLAG_SET(impl->rate_match->flags, SPA_IO_RATE_MATCH_FLAG_ACTIVE);
321 -- impl->rate_match->rate = corr;
322 -+ impl->rate_match->rate = 1.0f / corr;
323 - }
324 -
325 - static void playback_stream_process(void *d)
326 ---- a/src/modules/module-rtp-source.c
327 -+++ b/src/modules/module-rtp-source.c
328 -@@ -272,7 +272,7 @@ static void stream_process(void *data)
329 -
330 - if (sess->rate_match) {
331 - SPA_FLAG_SET(sess->rate_match->flags, SPA_IO_RATE_MATCH_FLAG_ACTIVE);
332 -- sess->rate_match->rate = corr;
333 -+ sess->rate_match->rate = 1.0f / corr;
334 - }
335 - }
336 - spa_ringbuffer_read_data(&sess->ring,
337 ---
338 -GitLab
339 -
340 -
341
342 diff --git a/media-video/pipewire/pipewire-0.3.63-r3.ebuild b/media-video/pipewire/pipewire-0.3.63-r3.ebuild
343 deleted file mode 100644
344 index 7d5e71a8dcc3..000000000000
345 --- a/media-video/pipewire/pipewire-0.3.63-r3.ebuild
346 +++ /dev/null
347 @@ -1,454 +0,0 @@
348 -# Copyright 1999-2023 Gentoo Authors
349 -# Distributed under the terms of the GNU General Public License v2
350 -
351 -EAPI=8
352 -
353 -# 1. Please regularly check (even at the point of bumping) Fedora's packaging
354 -# for needed backports at https://src.fedoraproject.org/rpms/pipewire/tree/rawhide.
355 -#
356 -# 2. Upstream also sometimes amend release notes for the previous release to mention
357 -# needed patches, e.g. https://gitlab.freedesktop.org/pipewire/pipewire/-/tags/0.3.55#distros
358 -#
359 -# 3. Keep an eye on git master (for both PipeWire and WirePlumber) as things
360 -# continue to move quickly. It's not uncommon for fixes to be made shortly
361 -# after releases.
362 -
363 -PYTHON_COMPAT=( python3_{9..11} )
364 -
365 -inherit flag-o-matic meson-multilib optfeature prefix python-any-r1 systemd tmpfiles udev
366 -
367 -if [[ ${PV} == 9999 ]]; then
368 - EGIT_REPO_URI="https://gitlab.freedesktop.org/${PN}/${PN}.git"
369 - inherit git-r3
370 -else
371 - if [[ ${PV} == *_p* ]] ; then
372 - MY_COMMIT=""
373 - SRC_URI="https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/${MY_COMMIT}/pipewire-${MY_COMMIT}.tar.bz2 -> ${P}.tar.bz2"
374 - S="${WORKDIR}"/${PN}-${MY_COMMIT}
375 - else
376 - SRC_URI="https://gitlab.freedesktop.org/${PN}/${PN}/-/archive/${PV}/${P}.tar.bz2"
377 - fi
378 -
379 - KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv ~sparc x86"
380 -fi
381 -
382 -DESCRIPTION="Multimedia processing graphs"
383 -HOMEPAGE="https://pipewire.org/"
384 -
385 -LICENSE="MIT LGPL-2.1+ GPL-2"
386 -# ABI was broken in 0.3.42 for https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/49
387 -SLOT="0/0.4"
388 -IUSE="bluetooth dbus doc echo-cancel extra flatpak gstreamer gsettings jack-client jack-sdk lv2
389 -modemmanager pipewire-alsa readline sound-server ssl system-service systemd test udev v4l X zeroconf"
390 -
391 -# Once replacing system JACK libraries is possible, it's likely that
392 -# jack-client IUSE will need blocking to avoid users accidentally
393 -# configuring their systems to send PW sink output to the emulated
394 -# JACK's sink - doing so is likely to yield no audio, cause a CPU
395 -# cycles consuming loop (and may even cause GUI crashes)!
396 -
397 -# TODO: There should be "sound-server? ( || ( alsa bluetooth ) )" here, but ALSA is always enabled
398 -# TODO: Pulseaudio alsa plugin performs runtime check that pulseaudio server connection will work
399 -# which provides adequate guarantee that alsa-lib will be able to provide audio services.
400 -# If that works, pulseaudio defaults are loaded into alsa-lib runtime replacing default PCM and CTL.
401 -# When pipewire-alsa will be able to perform similar check, pipewire-alsa can be enabled unconditionally.
402 -REQUIRED_USE="
403 - jack-sdk? ( !jack-client )
404 - modemmanager? ( bluetooth )
405 - system-service? ( systemd )
406 - !sound-server? ( !pipewire-alsa )
407 - jack-client? ( dbus )
408 -"
409 -
410 -RESTRICT="!test? ( test )"
411 -
412 -BDEPEND="
413 - >=dev-util/meson-0.59
414 - virtual/pkgconfig
415 - ${PYTHON_DEPS}
416 - $(python_gen_any_dep 'dev-python/docutils[${PYTHON_USEDEP}]')
417 - doc? (
418 - app-doc/doxygen
419 - media-gfx/graphviz
420 - )
421 -"
422 -RDEPEND="
423 - acct-group/audio
424 - media-libs/alsa-lib
425 - sys-libs/ncurses:=[unicode(+)]
426 - virtual/libintl[${MULTILIB_USEDEP}]
427 - bluetooth? (
428 - media-libs/fdk-aac
429 - media-libs/libldac
430 - media-libs/libfreeaptx
431 - media-libs/opus
432 - media-libs/sbc
433 - >=net-wireless/bluez-4.101:=
434 - virtual/libusb:1
435 - )
436 - dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
437 - echo-cancel? ( media-libs/webrtc-audio-processing:0 )
438 - extra? (
439 - >=media-libs/libsndfile-1.0.20
440 - )
441 - flatpak? (
442 - dev-libs/glib
443 - )
444 - gstreamer? (
445 - >=dev-libs/glib-2.32.0:2
446 - >=media-libs/gstreamer-1.10.0:1.0
447 - media-libs/gst-plugins-base:1.0
448 - )
449 - gsettings? (
450 - >=dev-libs/glib-2.26.0:2
451 - )
452 - jack-client? ( >=media-sound/jack2-1.9.10:2[dbus] )
453 - jack-sdk? (
454 - !media-sound/jack-audio-connection-kit
455 - !media-sound/jack2
456 - )
457 - lv2? ( media-libs/lilv )
458 - modemmanager? ( >=net-misc/modemmanager-1.10.0 )
459 - pipewire-alsa? (
460 - >=media-libs/alsa-lib-1.1.7[${MULTILIB_USEDEP}]
461 - )
462 - sound-server? (
463 - !media-sound/pulseaudio[daemon(+)]
464 - !media-sound/pulseaudio-daemon
465 - )
466 - readline? ( sys-libs/readline:= )
467 - ssl? ( dev-libs/openssl:= )
468 - systemd? ( sys-apps/systemd )
469 - system-service? (
470 - acct-user/pipewire
471 - acct-group/pipewire
472 - )
473 - udev? ( virtual/libudev[${MULTILIB_USEDEP}] )
474 - v4l? ( media-libs/libv4l )
475 - X? (
476 - media-libs/libcanberra
477 - x11-libs/libX11
478 - x11-libs/libXfixes
479 - )
480 - zeroconf? ( net-dns/avahi )
481 -"
482 -
483 -DEPEND="${RDEPEND}"
484 -
485 -# TODO: Consider use cases where pipewire is not used for driving audio
486 -# Doing so with WirePlumber currently involves editing Lua scripts
487 -PDEPEND=">=media-video/wireplumber-0.4.8-r3"
488 -
489 -# Present RDEPEND that are currently always disabled due to the PW
490 -# code using them being required to be disabled by Gentoo guidelines
491 -# (i.e. developer binaries not meant for users) and unready code
492 -# media-video/ffmpeg:=
493 -# media-libs/libsdl2
494 -# >=media-libs/vulkan-loader-1.1.69
495 -#
496 -# Ditto for DEPEND
497 -# >=dev-util/vulkan-headers-1.1.69
498 -
499 -DOCS=( {README,INSTALL}.md NEWS )
500 -
501 -PATCHES=(
502 - "${FILESDIR}"/${PN}-0.3.25-enable-failed-mlock-warning.patch
503 - "${FILESDIR}"/${P}-alsa-node-target.patch
504 - "${FILESDIR}"/${P}-bluez-ldac_abr.patch
505 - "${FILESDIR}"/${P}-bluetooth-typo.patch
506 - "${FILESDIR}"/${P}-rate-update.patch
507 -)
508 -
509 -# limitsdfile related code taken from =sys-auth/realtime-base-0.1
510 -# with changes as necessary.
511 -limitsdfile=40-${PN}.conf
512 -
513 -python_check_deps() {
514 - python_has_version "dev-python/docutils[${PYTHON_USEDEP}]"
515 -}
516 -
517 -src_prepare() {
518 - default
519 -
520 - einfo "Generating ${limitsdfile}"
521 - cat > ${limitsdfile} <<- EOF || die
522 - # Start of ${limitsdfile} from ${P}
523 -
524 - @audio - memlock 256
525 -
526 - $(use system-service && {
527 - echo @pipewire - rtprio 95
528 - echo @pipewire - nice -19
529 - echo @pipewire - memlock 4194304
530 - })
531 -
532 - # End of ${limitsdfile} from ${P}
533 - EOF
534 -}
535 -
536 -multilib_src_configure() {
537 - # https://bugs.gentoo.org/838301
538 - filter-flags -fno-semantic-interposition
539 -
540 - local emesonargs=(
541 - -Ddocdir="${EPREFIX}"/usr/share/doc/${PF}
542 -
543 - $(meson_feature dbus)
544 - $(meson_native_use_feature zeroconf avahi)
545 - $(meson_native_use_feature doc docs)
546 - $(meson_native_enabled examples) # TODO: Figure out if this is still important now that media-session gone
547 - $(meson_native_enabled man)
548 - $(meson_feature test tests)
549 - -Dinstalled_tests=disabled # Matches upstream; Gentoo never installs tests
550 - $(meson_native_use_feature gstreamer)
551 - $(meson_native_use_feature gstreamer gstreamer-device-provider)
552 - $(meson_native_use_feature gsettings)
553 - $(meson_native_use_feature systemd)
554 -
555 - $(meson_native_use_feature system-service systemd-system-service)
556 - -Dsystemd-system-unit-dir="$(systemd_get_systemunitdir)"
557 - -Dsystemd-user-unit-dir="$(systemd_get_userunitdir)"
558 -
559 - $(meson_native_use_feature systemd systemd-user-service)
560 - $(meson_feature pipewire-alsa) # Allows integrating ALSA apps into PW graph
561 - -Dspa-plugins=enabled
562 - -Dalsa=enabled # Allows using kernel ALSA for sound I/O (NOTE: media-session is gone so IUSE=alsa/spa_alsa/alsa-backend might be possible)
563 - -Daudiomixer=enabled # Matches upstream
564 - -Daudioconvert=enabled # Matches upstream
565 - $(meson_native_use_feature bluetooth bluez5)
566 - $(meson_native_use_feature bluetooth bluez5-backend-hsp-native)
567 - $(meson_native_use_feature bluetooth bluez5-backend-hfp-native)
568 - # https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/1379
569 - $(meson_native_use_feature modemmanager bluez5-backend-native-mm)
570 - $(meson_native_use_feature bluetooth bluez5-backend-ofono)
571 - $(meson_native_use_feature bluetooth bluez5-backend-hsphfpd)
572 - $(meson_native_use_feature bluetooth bluez5-codec-aac)
573 - $(meson_native_use_feature bluetooth bluez5-codec-aptx)
574 - $(meson_native_use_feature bluetooth bluez5-codec-ldac)
575 - $(meson_native_use_feature bluetooth bluez5-codec-opus)
576 - $(meson_native_use_feature bluetooth libusb) # At least for now only used by bluez5 native (quirk detection of adapters)
577 - $(meson_native_use_feature echo-cancel echo-cancel-webrtc) #807889
578 - # Not yet packaged.
579 - -Dbluez5-codec-lc3=disabled
580 - -Dbluez5-codec-lc3plus=disabled
581 - -Dcontrol=enabled # Matches upstream
582 - -Daudiotestsrc=enabled # Matches upstream
583 - -Dffmpeg=disabled # Disabled by upstream and no major developments to spa/plugins/ffmpeg/ since May 2020
584 - $(meson_native_use_feature flatpak)
585 - -Dpipewire-jack=enabled # Allows integrating JACK apps into PW graph
586 - $(meson_native_use_feature jack-client jack) # Allows PW to act as a JACK client
587 - $(meson_use jack-sdk jack-devel)
588 - $(usex jack-sdk "-Dlibjack-path=${EPREFIX}/usr/$(get_libdir)" '')
589 - -Dsupport=enabled # Miscellaneous/common plugins, such as null sink
590 - -Devl=disabled # Matches upstream
591 - -Dtest=disabled # fakesink and fakesource plugins
592 - $(meson_native_use_feature lv2)
593 - $(meson_native_use_feature v4l v4l2)
594 - -Dlibcamera=disabled # libcamera is not in Portage tree
595 - $(meson_native_use_feature readline)
596 - $(meson_native_use_feature ssl raop)
597 - -Dvideoconvert=enabled # Matches upstream
598 - -Dvideotestsrc=enabled # Matches upstream
599 - -Dvolume=enabled # Matches upstream
600 - -Dvulkan=disabled # Uses pre-compiled Vulkan compute shader to provide a CGI video source (dev thing; disabled by upstream)
601 - $(meson_native_use_feature extra pw-cat)
602 - $(meson_feature udev)
603 - -Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d"
604 - -Dsdl2=disabled # Controls SDL2 dependent code (currently only examples when -Dinstalled_tests=enabled which we never install)
605 - $(meson_native_use_feature extra sndfile) # Enables libsndfile dependent code (currently only pw-cat)
606 - -Dsession-managers="[]" # All available session managers are now their own projects, so there's nothing to build
607 -
608 - # Just for bell sounds in X11 right now.
609 - $(meson_native_use_feature X x11)
610 - $(meson_native_use_feature X x11-xfixes)
611 - $(meson_native_use_feature X libcanberra)
612 - )
613 -
614 - meson_src_configure
615 -}
616 -
617 -multilib_src_test() {
618 - meson_src_test --timeout-multiplier 10
619 -}
620 -
621 -multilib_src_install() {
622 - # Our custom DOCS do not exist in multilib source directory
623 - DOCS= meson_src_install
624 -}
625 -
626 -multilib_src_install_all() {
627 - einstalldocs
628 -
629 - insinto /etc/security/limits.d
630 - doins ${limitsdfile}
631 -
632 - if use pipewire-alsa; then
633 - dodir /etc/alsa/conf.d
634 -
635 - # Install pipewire conf loader hook
636 - insinto /usr/share/alsa/alsa.conf.d
637 - doins "${FILESDIR}"/99-pipewire-default-hook.conf
638 - eprefixify "${ED}"/usr/share/alsa/alsa.conf.d/99-pipewire-default-hook.conf
639 -
640 - # These will break if someone has /etc that is a symbolic link to a subfolder! See #724222
641 - # And the current dosym8 -r implementation is likely affected by the same issue, too.
642 - dosym ../../../usr/share/alsa/alsa.conf.d/50-pipewire.conf /etc/alsa/conf.d/50-pipewire.conf
643 - dosym ../../../usr/share/alsa/alsa.conf.d/99-pipewire-default-hook.conf /etc/alsa/conf.d/99-pipewire-default-hook.conf
644 - fi
645 -
646 - # Enable required wireplumber alsa and bluez monitors
647 - if use sound-server; then
648 - dodir /etc/wireplumber/main.lua.d
649 - echo "alsa_monitor.enabled = true" > "${ED}"/etc/wireplumber/main.lua.d/89-gentoo-sound-server-enable-alsa-monitor.lua || die
650 -
651 - dodir /etc/wireplumber/bluetooth.lua.d
652 - echo "bluez_monitor.enabled = true" > "${ED}"/etc/wireplumber/bluetooth.lua.d/89-gentoo-sound-server-enable-bluez-monitor.lua || die
653 - fi
654 -
655 - if use system-service; then
656 - newtmpfiles - pipewire.conf <<-EOF || die
657 - d /run/pipewire 0755 pipewire pipewire - -
658 - EOF
659 - fi
660 -
661 - if ! use systemd; then
662 - insinto /etc/xdg/autostart
663 - newins "${FILESDIR}"/pipewire.desktop-r1 pipewire.desktop
664 -
665 - exeinto /usr/bin
666 - newexe "${FILESDIR}"/gentoo-pipewire-launcher.in gentoo-pipewire-launcher
667 -
668 - # Disable pipewire-pulse if sound-server is disabled.
669 - if ! use sound-server ; then
670 - sed -i -s '/pipewire -c pipewire-pulse.conf/s/^/#/' "${ED}"/usr/bin/gentoo-pipewire-launcher || die
671 - fi
672 -
673 - eprefixify "${ED}"/usr/bin/gentoo-pipewire-launcher
674 - fi
675 -}
676 -
677 -pkg_postrm() {
678 - use udev && udev_reload
679 -}
680 -
681 -pkg_postinst() {
682 - use udev && udev_reload
683 - use system-service && tmpfiles_process pipewire.conf
684 -
685 - elog "It is recommended to raise RLIMIT_MEMLOCK to 256 for users"
686 - elog "using PipeWire. Do it either manually or add yourself"
687 - elog "to the 'audio' group:"
688 - elog
689 - elog " usermod -aG audio <youruser>"
690 - elog
691 -
692 - local ver
693 - for ver in ${REPLACING_VERSIONS} ; do
694 - if ver_test ${ver} -le 0.3.53-r1 && ! use sound-server ; then
695 - ewarn "USE=sound-server is disabled! If you want PipeWire to provide"
696 - ewarn "your sound, please enable it. See the wiki at"
697 - ewarn "https://wiki.gentoo.org/wiki/PipeWire#Replacing_PulseAudio"
698 - ewarn "for more details."
699 -
700 - break
701 - fi
702 - done
703 -
704 - if ! use jack-sdk; then
705 - elog "JACK emulation is incomplete and not all programs will work. PipeWire's"
706 - elog "alternative libraries have been installed to a non-default location."
707 - elog "To use them, put pw-jack <application> before every JACK application."
708 - elog "When using pw-jack, do not run jackd/jackdbus. However, a virtual/jack"
709 - elog "provider is still needed to compile the JACK applications themselves."
710 - elog
711 - fi
712 -
713 - if use systemd; then
714 - elog "When switching from PulseAudio, you may need to disable PulseAudio:"
715 - elog
716 - elog " systemctl --user disable pulseaudio.service pulseaudio.socket"
717 - elog
718 - elog "To use PipeWire, the user units must be manually enabled"
719 - elog "by running this command as each user you use for desktop activities:"
720 - elog
721 - elog " systemctl --user enable pipewire.socket pipewire-pulse.socket"
722 - elog
723 - elog "A reboot is recommended to avoid interferences from still running"
724 - elog "PulseAudio daemon."
725 - elog
726 - elog "Both new users and those upgrading need to enable WirePlumber"
727 - elog "for relevant users:"
728 - elog
729 - elog " systemctl --user disable pipewire-media-session.service"
730 - elog " systemctl --user --force enable wireplumber.service"
731 - elog
732 - elog "Root user may replace --user with --global to change system default"
733 - elog "configuration for all of the above commands."
734 - else
735 - ewarn "PipeWire daemon startup has been moved to a launcher script!"
736 - ewarn "Make sure that ${EROOT}/etc/pipewire/pipewire.conf either does not exist or no"
737 - ewarn "longer is set to start a session manager or PulseAudio compatibility daemon (all"
738 - ewarn "lines similar to '{ path = /usr/bin/pipewire*' should be commented out)"
739 - ewarn
740 - ewarn "Those manually starting /usr/bin/pipewire via .xinitrc or similar _must_ from"
741 - ewarn "now on start ${EROOT}/usr/bin/gentoo-pipewire-launcher instead! It is highly"
742 - ewarn "advised that a D-Bus user session is set up before starting the script."
743 - ewarn
744 -
745 - if use sound-server && ( has_version 'media-sound/pulseaudio[daemon]' || has_version 'media-sound/pulseaudio-daemon' ) ; then
746 - elog "This ebuild auto-enables PulseAudio replacement. Because of that, users"
747 - elog "are recommended to edit pulseaudio client configuration files:"
748 - elog "${EROOT}/etc/pulse/client.conf and ${EROOT}/etc/pulse/client.conf.d/enable-autospawn.conf"
749 - elog "if it exists, and disable autospawning of the original daemon by setting:"
750 - elog
751 - elog " autospawn = no"
752 - elog
753 - elog "Please note that the semicolon (;) must _NOT_ be at the beginning of the line!"
754 - elog
755 - elog "Alternatively, if replacing PulseAudio daemon is not desired, edit"
756 - elog "${EROOT}/usr/bin/gentoo-pipewire-launcher by commenting out the relevant"
757 - elog "command:"
758 - elog
759 - elog "#${EROOT}/usr/bin/pipewire -c pipewire-pulse.conf &"
760 - elog
761 - fi
762 - elog "NOTE:"
763 - elog "Starting with PipeWire-0.3.30, this package is no longer installing its config"
764 - elog "into ${EROOT}/etc/pipewire by default. In case you need to change"
765 - elog "its config, please start by copying default config from ${EROOT}/usr/share/pipewire"
766 - elog "and just override the sections you want to change."
767 - fi
768 - elog
769 -
770 - elog "For latest tips and tricks, troubleshooting information and documentation"
771 - elog "in general, please refer to https://wiki.gentoo.org/wiki/PipeWire"
772 - elog
773 -
774 - optfeature_header "The following can be installed for optional runtime features:"
775 - optfeature "restricted realtime capabilities via D-Bus" sys-auth/rtkit
776 -
777 - if use sound-server && ! use pipewire-alsa; then
778 - optfeature "ALSA plugin to use PulseAudio interface for output" "media-plugins/alsa-plugins[pulseaudio]"
779 - fi
780 -
781 - if has_version 'net-misc/ofono' ; then
782 - ewarn "Native backend has become default. Please disable oFono via:"
783 - if systemd_is_booted ; then
784 - ewarn "systemctl disable ofono"
785 - else
786 - ewarn "rc-update delete ofono"
787 - fi
788 - ewarn
789 - fi
790 -
791 - if use system-service; then
792 - ewarn
793 - ewarn "WARNING: you have enabled the system-service USE flag, which installs"
794 - ewarn "the system-wide systemd units that enable PipeWire to run as a system"
795 - ewarn "service. This is more than likely NOT what you want. You are strongly"
796 - ewarn "advised not to enable this mode and instead stick with systemd user"
797 - ewarn "units. The default configuration files will likely not work out of"
798 - ewarn "box, and you are on your own with configuration."
799 - ewarn
800 - fi
801 -}
802
803 diff --git a/media-video/pipewire/pipewire-0.3.64-r2.ebuild b/media-video/pipewire/pipewire-0.3.64-r2.ebuild
804 deleted file mode 100644
805 index f3ff9f1a1a72..000000000000
806 --- a/media-video/pipewire/pipewire-0.3.64-r2.ebuild
807 +++ /dev/null
808 @@ -1,449 +0,0 @@
809 -# Copyright 1999-2023 Gentoo Authors
810 -# Distributed under the terms of the GNU General Public License v2
811 -
812 -EAPI=8
813 -
814 -# 1. Please regularly check (even at the point of bumping) Fedora's packaging
815 -# for needed backports at https://src.fedoraproject.org/rpms/pipewire/tree/rawhide.
816 -#
817 -# 2. Upstream also sometimes amend release notes for the previous release to mention
818 -# needed patches, e.g. https://gitlab.freedesktop.org/pipewire/pipewire/-/tags/0.3.55#distros
819 -#
820 -# 3. Keep an eye on git master (for both PipeWire and WirePlumber) as things
821 -# continue to move quickly. It's not uncommon for fixes to be made shortly
822 -# after releases.
823 -
824 -PYTHON_COMPAT=( python3_{9..11} )
825 -
826 -inherit flag-o-matic meson-multilib optfeature prefix python-any-r1 systemd udev
827 -
828 -if [[ ${PV} == 9999 ]]; then
829 - EGIT_REPO_URI="https://gitlab.freedesktop.org/${PN}/${PN}.git"
830 - inherit git-r3
831 -else
832 - if [[ ${PV} == *_p* ]] ; then
833 - MY_COMMIT=""
834 - SRC_URI="https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/${MY_COMMIT}/pipewire-${MY_COMMIT}.tar.bz2 -> ${P}.tar.bz2"
835 - S="${WORKDIR}"/${PN}-${MY_COMMIT}
836 - else
837 - SRC_URI="https://gitlab.freedesktop.org/${PN}/${PN}/-/archive/${PV}/${P}.tar.bz2"
838 - fi
839 -
840 - KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
841 -fi
842 -
843 -DESCRIPTION="Multimedia processing graphs"
844 -HOMEPAGE="https://pipewire.org/"
845 -
846 -LICENSE="MIT LGPL-2.1+ GPL-2"
847 -# ABI was broken in 0.3.42 for https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/49
848 -SLOT="0/0.4"
849 -IUSE="bluetooth dbus doc echo-cancel extra flatpak gstreamer gsettings jack-client jack-sdk lv2
850 -modemmanager pipewire-alsa readline sound-server ssl system-service systemd test v4l X zeroconf"
851 -
852 -# Once replacing system JACK libraries is possible, it's likely that
853 -# jack-client IUSE will need blocking to avoid users accidentally
854 -# configuring their systems to send PW sink output to the emulated
855 -# JACK's sink - doing so is likely to yield no audio, cause a CPU
856 -# cycles consuming loop (and may even cause GUI crashes)!
857 -
858 -# TODO: There should be "sound-server? ( || ( alsa bluetooth ) )" here, but ALSA is always enabled
859 -# TODO: Pulseaudio alsa plugin performs runtime check that pulseaudio server connection will work
860 -# which provides adequate guarantee that alsa-lib will be able to provide audio services.
861 -# If that works, pulseaudio defaults are loaded into alsa-lib runtime replacing default PCM and CTL.
862 -# When pipewire-alsa will be able to perform similar check, pipewire-alsa can be enabled unconditionally.
863 -REQUIRED_USE="
864 - bluetooth? ( dbus )
865 - jack-sdk? ( !jack-client )
866 - modemmanager? ( bluetooth )
867 - system-service? ( systemd )
868 - !sound-server? ( !pipewire-alsa )
869 - jack-client? ( dbus )
870 -"
871 -
872 -RESTRICT="!test? ( test )"
873 -
874 -BDEPEND="
875 - >=dev-util/meson-0.59
876 - virtual/pkgconfig
877 - ${PYTHON_DEPS}
878 - $(python_gen_any_dep 'dev-python/docutils[${PYTHON_USEDEP}]')
879 - doc? (
880 - app-doc/doxygen
881 - media-gfx/graphviz
882 - )
883 -"
884 -# While udev could technically be optional, it's needed for a numebr of options,
885 -# and not really worth it, bug #877769.
886 -RDEPEND="
887 - acct-group/audio
888 - media-libs/alsa-lib
889 - sys-libs/ncurses:=[unicode(+)]
890 - virtual/libintl[${MULTILIB_USEDEP}]
891 - virtual/libudev[${MULTILIB_USEDEP}]
892 - bluetooth? (
893 - media-libs/fdk-aac
894 - media-libs/libldac
895 - media-libs/libfreeaptx
896 - media-libs/opus
897 - media-libs/sbc
898 - >=net-wireless/bluez-4.101:=
899 - virtual/libusb:1
900 - )
901 - dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
902 - echo-cancel? ( media-libs/webrtc-audio-processing:0 )
903 - extra? (
904 - >=media-libs/libsndfile-1.0.20
905 - )
906 - flatpak? (
907 - dev-libs/glib
908 - )
909 - gstreamer? (
910 - >=dev-libs/glib-2.32.0:2
911 - >=media-libs/gstreamer-1.10.0:1.0
912 - media-libs/gst-plugins-base:1.0
913 - )
914 - gsettings? (
915 - >=dev-libs/glib-2.26.0:2
916 - )
917 - jack-client? ( >=media-sound/jack2-1.9.10:2[dbus] )
918 - jack-sdk? (
919 - !media-sound/jack-audio-connection-kit
920 - !media-sound/jack2
921 - )
922 - lv2? ( media-libs/lilv )
923 - modemmanager? ( >=net-misc/modemmanager-1.10.0 )
924 - pipewire-alsa? (
925 - >=media-libs/alsa-lib-1.1.7[${MULTILIB_USEDEP}]
926 - )
927 - sound-server? (
928 - !media-sound/pulseaudio[daemon(+)]
929 - !media-sound/pulseaudio-daemon
930 - )
931 - readline? ( sys-libs/readline:= )
932 - ssl? ( dev-libs/openssl:= )
933 - systemd? ( sys-apps/systemd )
934 - system-service? (
935 - acct-user/pipewire
936 - acct-group/pipewire
937 - )
938 - v4l? ( media-libs/libv4l )
939 - X? (
940 - media-libs/libcanberra
941 - x11-libs/libX11
942 - x11-libs/libXfixes
943 - )
944 - zeroconf? ( net-dns/avahi )
945 -"
946 -
947 -DEPEND="${RDEPEND}"
948 -
949 -# TODO: Consider use cases where pipewire is not used for driving audio
950 -# Doing so with WirePlumber currently involves editing Lua scripts
951 -PDEPEND=">=media-video/wireplumber-0.4.8-r3"
952 -
953 -# Present RDEPEND that are currently always disabled due to the PW
954 -# code using them being required to be disabled by Gentoo guidelines
955 -# (i.e. developer binaries not meant for users) and unready code
956 -# media-video/ffmpeg:=
957 -# media-libs/libsdl2
958 -# >=media-libs/vulkan-loader-1.1.69
959 -#
960 -# Ditto for DEPEND
961 -# >=dev-util/vulkan-headers-1.1.69
962 -
963 -DOCS=( {README,INSTALL}.md NEWS )
964 -
965 -PATCHES=(
966 - "${FILESDIR}"/${PN}-0.3.25-enable-failed-mlock-warning.patch
967 -)
968 -
969 -# limitsdfile related code taken from =sys-auth/realtime-base-0.1
970 -# with changes as necessary.
971 -limitsdfile=40-${PN}.conf
972 -
973 -python_check_deps() {
974 - python_has_version "dev-python/docutils[${PYTHON_USEDEP}]"
975 -}
976 -
977 -src_prepare() {
978 - default
979 -
980 - # Used for upstream backports
981 - [[ -d "${FILESDIR}"/${PV} ]] && eapply "${FILESDIR}"/${PV}
982 -
983 - einfo "Generating ${limitsdfile}"
984 - cat > ${limitsdfile} <<- EOF || die
985 - # Start of ${limitsdfile} from ${P}
986 -
987 - @audio - memlock 256
988 -
989 - $(use system-service && {
990 - echo @pipewire - rtprio 95
991 - echo @pipewire - nice -19
992 - echo @pipewire - memlock 4194304
993 - })
994 -
995 - # End of ${limitsdfile} from ${P}
996 - EOF
997 -}
998 -
999 -multilib_src_configure() {
1000 - # https://bugs.gentoo.org/838301
1001 - filter-flags -fno-semantic-interposition
1002 -
1003 - local emesonargs=(
1004 - -Ddocdir="${EPREFIX}"/usr/share/doc/${PF}
1005 -
1006 - $(meson_feature dbus)
1007 - $(meson_native_use_feature zeroconf avahi)
1008 - $(meson_native_use_feature doc docs)
1009 - $(meson_native_enabled examples) # TODO: Figure out if this is still important now that media-session gone
1010 - $(meson_native_enabled man)
1011 - $(meson_feature test tests)
1012 - -Dinstalled_tests=disabled # Matches upstream; Gentoo never installs tests
1013 - $(meson_native_use_feature gstreamer)
1014 - $(meson_native_use_feature gstreamer gstreamer-device-provider)
1015 - $(meson_native_use_feature gsettings)
1016 - $(meson_native_use_feature systemd)
1017 -
1018 - $(meson_native_use_feature system-service systemd-system-service)
1019 - -Dsystemd-system-unit-dir="$(systemd_get_systemunitdir)"
1020 - -Dsystemd-user-unit-dir="$(systemd_get_userunitdir)"
1021 -
1022 - $(meson_native_use_feature systemd systemd-user-service)
1023 - $(meson_feature pipewire-alsa) # Allows integrating ALSA apps into PW graph
1024 - -Dspa-plugins=enabled
1025 - -Dalsa=enabled # Allows using kernel ALSA for sound I/O (NOTE: media-session is gone so IUSE=alsa/spa_alsa/alsa-backend might be possible)
1026 - -Daudiomixer=enabled # Matches upstream
1027 - -Daudioconvert=enabled # Matches upstream
1028 - $(meson_native_use_feature bluetooth bluez5)
1029 - $(meson_native_use_feature bluetooth bluez5-backend-hsp-native)
1030 - $(meson_native_use_feature bluetooth bluez5-backend-hfp-native)
1031 - # https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/1379
1032 - $(meson_native_use_feature modemmanager bluez5-backend-native-mm)
1033 - $(meson_native_use_feature bluetooth bluez5-backend-ofono)
1034 - $(meson_native_use_feature bluetooth bluez5-backend-hsphfpd)
1035 - $(meson_native_use_feature bluetooth bluez5-codec-aac)
1036 - $(meson_native_use_feature bluetooth bluez5-codec-aptx)
1037 - $(meson_native_use_feature bluetooth bluez5-codec-ldac)
1038 - $(meson_native_use_feature bluetooth bluez5-codec-opus)
1039 - $(meson_native_use_feature bluetooth libusb) # At least for now only used by bluez5 native (quirk detection of adapters)
1040 - $(meson_native_use_feature echo-cancel echo-cancel-webrtc) #807889
1041 - # Not yet packaged.
1042 - -Dbluez5-codec-lc3=disabled
1043 - -Dbluez5-codec-lc3plus=disabled
1044 - -Dcontrol=enabled # Matches upstream
1045 - -Daudiotestsrc=enabled # Matches upstream
1046 - -Dffmpeg=disabled # Disabled by upstream and no major developments to spa/plugins/ffmpeg/ since May 2020
1047 - $(meson_native_use_feature flatpak)
1048 - -Dpipewire-jack=enabled # Allows integrating JACK apps into PW graph
1049 - $(meson_native_use_feature jack-client jack) # Allows PW to act as a JACK client
1050 - $(meson_use jack-sdk jack-devel)
1051 - $(usex jack-sdk "-Dlibjack-path=${EPREFIX}/usr/$(get_libdir)" '')
1052 - -Dsupport=enabled # Miscellaneous/common plugins, such as null sink
1053 - -Devl=disabled # Matches upstream
1054 - -Dtest=disabled # fakesink and fakesource plugins
1055 - $(meson_native_use_feature lv2)
1056 - $(meson_native_use_feature v4l v4l2)
1057 - -Dlibcamera=disabled # libcamera is not in Portage tree
1058 - $(meson_native_use_feature readline)
1059 - $(meson_native_use_feature ssl raop)
1060 - -Dvideoconvert=enabled # Matches upstream
1061 - -Dvideotestsrc=enabled # Matches upstream
1062 - -Dvolume=enabled # Matches upstream
1063 - -Dvulkan=disabled # Uses pre-compiled Vulkan compute shader to provide a CGI video source (dev thing; disabled by upstream)
1064 - $(meson_native_use_feature extra pw-cat)
1065 - -Dudev=enabled
1066 - -Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d"
1067 - -Dsdl2=disabled # Controls SDL2 dependent code (currently only examples when -Dinstalled_tests=enabled which we never install)
1068 - $(meson_native_use_feature extra sndfile) # Enables libsndfile dependent code (currently only pw-cat)
1069 - -Dsession-managers="[]" # All available session managers are now their own projects, so there's nothing to build
1070 -
1071 - # Just for bell sounds in X11 right now.
1072 - $(meson_native_use_feature X x11)
1073 - $(meson_native_use_feature X x11-xfixes)
1074 - $(meson_native_use_feature X libcanberra)
1075 - )
1076 -
1077 - meson_src_configure
1078 -}
1079 -
1080 -multilib_src_test() {
1081 - meson_src_test --timeout-multiplier 10
1082 -}
1083 -
1084 -multilib_src_install() {
1085 - # Our custom DOCS do not exist in multilib source directory
1086 - DOCS= meson_src_install
1087 -}
1088 -
1089 -multilib_src_install_all() {
1090 - einstalldocs
1091 -
1092 - insinto /etc/security/limits.d
1093 - doins ${limitsdfile}
1094 -
1095 - if use pipewire-alsa; then
1096 - dodir /etc/alsa/conf.d
1097 -
1098 - # Install pipewire conf loader hook
1099 - insinto /usr/share/alsa/alsa.conf.d
1100 - doins "${FILESDIR}"/99-pipewire-default-hook.conf
1101 - eprefixify "${ED}"/usr/share/alsa/alsa.conf.d/99-pipewire-default-hook.conf
1102 -
1103 - # These will break if someone has /etc that is a symbolic link to a subfolder! See #724222
1104 - # And the current dosym8 -r implementation is likely affected by the same issue, too.
1105 - dosym ../../../usr/share/alsa/alsa.conf.d/50-pipewire.conf /etc/alsa/conf.d/50-pipewire.conf
1106 - dosym ../../../usr/share/alsa/alsa.conf.d/99-pipewire-default-hook.conf /etc/alsa/conf.d/99-pipewire-default-hook.conf
1107 - fi
1108 -
1109 - # Enable required wireplumber alsa and bluez monitors
1110 - if use sound-server; then
1111 - dodir /etc/wireplumber/main.lua.d
1112 - echo "alsa_monitor.enabled = true" > "${ED}"/etc/wireplumber/main.lua.d/89-gentoo-sound-server-enable-alsa-monitor.lua || die
1113 -
1114 - dodir /etc/wireplumber/bluetooth.lua.d
1115 - echo "bluez_monitor.enabled = true" > "${ED}"/etc/wireplumber/bluetooth.lua.d/89-gentoo-sound-server-enable-bluez-monitor.lua || die
1116 - fi
1117 -
1118 - if ! use systemd; then
1119 - insinto /etc/xdg/autostart
1120 - newins "${FILESDIR}"/pipewire.desktop-r1 pipewire.desktop
1121 -
1122 - exeinto /usr/bin
1123 - newexe "${FILESDIR}"/gentoo-pipewire-launcher.in gentoo-pipewire-launcher
1124 -
1125 - # Disable pipewire-pulse if sound-server is disabled.
1126 - if ! use sound-server ; then
1127 - sed -i -s '/pipewire -c pipewire-pulse.conf/s/^/#/' "${ED}"/usr/bin/gentoo-pipewire-launcher || die
1128 - fi
1129 -
1130 - eprefixify "${ED}"/usr/bin/gentoo-pipewire-launcher
1131 - fi
1132 -}
1133 -
1134 -pkg_postrm() {
1135 - udev_reload
1136 -}
1137 -
1138 -pkg_postinst() {
1139 - udev_reload
1140 -
1141 - elog "It is recommended to raise RLIMIT_MEMLOCK to 256 for users"
1142 - elog "using PipeWire. Do it either manually or add yourself"
1143 - elog "to the 'audio' group:"
1144 - elog
1145 - elog " usermod -aG audio <youruser>"
1146 - elog
1147 -
1148 - local ver
1149 - for ver in ${REPLACING_VERSIONS} ; do
1150 - if ver_test ${ver} -le 0.3.53-r1 && ! use sound-server ; then
1151 - ewarn "USE=sound-server is disabled! If you want PipeWire to provide"
1152 - ewarn "your sound, please enable it. See the wiki at"
1153 - ewarn "https://wiki.gentoo.org/wiki/PipeWire#Replacing_PulseAudio"
1154 - ewarn "for more details."
1155 -
1156 - break
1157 - fi
1158 - done
1159 -
1160 - if ! use jack-sdk; then
1161 - elog "JACK emulation is incomplete and not all programs will work. PipeWire's"
1162 - elog "alternative libraries have been installed to a non-default location."
1163 - elog "To use them, put pw-jack <application> before every JACK application."
1164 - elog "When using pw-jack, do not run jackd/jackdbus. However, a virtual/jack"
1165 - elog "provider is still needed to compile the JACK applications themselves."
1166 - elog
1167 - fi
1168 -
1169 - if use systemd; then
1170 - elog "When switching from PulseAudio, you may need to disable PulseAudio:"
1171 - elog
1172 - elog " systemctl --user disable pulseaudio.service pulseaudio.socket"
1173 - elog
1174 - elog "To use PipeWire, the user units must be manually enabled"
1175 - elog "by running this command as each user you use for desktop activities:"
1176 - elog
1177 - elog " systemctl --user enable pipewire.socket pipewire-pulse.socket"
1178 - elog
1179 - elog "A reboot is recommended to avoid interferences from still running"
1180 - elog "PulseAudio daemon."
1181 - elog
1182 - elog "Both new users and those upgrading need to enable WirePlumber"
1183 - elog "for relevant users:"
1184 - elog
1185 - elog " systemctl --user disable pipewire-media-session.service"
1186 - elog " systemctl --user --force enable wireplumber.service"
1187 - elog
1188 - elog "Root user may replace --user with --global to change system default"
1189 - elog "configuration for all of the above commands."
1190 - else
1191 - ewarn "PipeWire daemon startup has been moved to a launcher script!"
1192 - ewarn "Make sure that ${EROOT}/etc/pipewire/pipewire.conf either does not exist or no"
1193 - ewarn "longer is set to start a session manager or PulseAudio compatibility daemon (all"
1194 - ewarn "lines similar to '{ path = /usr/bin/pipewire*' should be commented out)"
1195 - ewarn
1196 - ewarn "Those manually starting /usr/bin/pipewire via .xinitrc or similar _must_ from"
1197 - ewarn "now on start ${EROOT}/usr/bin/gentoo-pipewire-launcher instead! It is highly"
1198 - ewarn "advised that a D-Bus user session is set up before starting the script."
1199 - ewarn
1200 -
1201 - if use sound-server && ( has_version 'media-sound/pulseaudio[daemon]' || has_version 'media-sound/pulseaudio-daemon' ) ; then
1202 - elog "This ebuild auto-enables PulseAudio replacement. Because of that, users"
1203 - elog "are recommended to edit pulseaudio client configuration files:"
1204 - elog "${EROOT}/etc/pulse/client.conf and ${EROOT}/etc/pulse/client.conf.d/enable-autospawn.conf"
1205 - elog "if it exists, and disable autospawning of the original daemon by setting:"
1206 - elog
1207 - elog " autospawn = no"
1208 - elog
1209 - elog "Please note that the semicolon (;) must _NOT_ be at the beginning of the line!"
1210 - elog
1211 - elog "Alternatively, if replacing PulseAudio daemon is not desired, edit"
1212 - elog "${EROOT}/usr/bin/gentoo-pipewire-launcher by commenting out the relevant"
1213 - elog "command:"
1214 - elog
1215 - elog "#${EROOT}/usr/bin/pipewire -c pipewire-pulse.conf &"
1216 - elog
1217 - fi
1218 - elog "NOTE:"
1219 - elog "Starting with PipeWire-0.3.30, this package is no longer installing its config"
1220 - elog "into ${EROOT}/etc/pipewire by default. In case you need to change"
1221 - elog "its config, please start by copying default config from ${EROOT}/usr/share/pipewire"
1222 - elog "and just override the sections you want to change."
1223 - fi
1224 - elog
1225 -
1226 - elog "For latest tips and tricks, troubleshooting information and documentation"
1227 - elog "in general, please refer to https://wiki.gentoo.org/wiki/PipeWire"
1228 - elog
1229 -
1230 - optfeature_header "The following can be installed for optional runtime features:"
1231 - optfeature "restricted realtime capabilities via D-Bus" sys-auth/rtkit
1232 -
1233 - if use sound-server && ! use pipewire-alsa; then
1234 - optfeature "ALSA plugin to use PulseAudio interface for output" "media-plugins/alsa-plugins[pulseaudio]"
1235 - fi
1236 -
1237 - if has_version 'net-misc/ofono' ; then
1238 - ewarn "Native backend has become default. Please disable oFono via:"
1239 - if systemd_is_booted ; then
1240 - ewarn "systemctl disable ofono"
1241 - else
1242 - ewarn "rc-update delete ofono"
1243 - fi
1244 - ewarn
1245 - fi
1246 -
1247 - if use system-service; then
1248 - ewarn
1249 - ewarn "WARNING: you have enabled the system-service USE flag, which installs"
1250 - ewarn "the system-wide systemd units that enable PipeWire to run as a system"
1251 - ewarn "service. This is more than likely NOT what you want. You are strongly"
1252 - ewarn "advised not to enable this mode and instead stick with systemd user"
1253 - ewarn "units. The default configuration files will likely not work out of"
1254 - ewarn "box, and you are on your own with configuration."
1255 - ewarn
1256 - fi
1257 -}