1 |
commit: 1ab5f9453a5e0dd235df0aec6c3cfe923a9237fd |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 1 03:57:37 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 1 03:57:37 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ab5f945 |
7 |
|
8 |
media-video/pipewire: add 0.3.49 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
media-video/pipewire/Manifest | 1 + |
13 |
media-video/pipewire/pipewire-0.3.49.ebuild | 352 ++++++++++++++++++++++++++++ |
14 |
2 files changed, 353 insertions(+) |
15 |
|
16 |
diff --git a/media-video/pipewire/Manifest b/media-video/pipewire/Manifest |
17 |
index c0ba2ff3125d..8c4f26ab78c0 100644 |
18 |
--- a/media-video/pipewire/Manifest |
19 |
+++ b/media-video/pipewire/Manifest |
20 |
@@ -5,3 +5,4 @@ DIST pipewire-0.3.44.tar.gz 1731260 BLAKE2B 5dd4fbffa21c34984836d097028e48654e2c |
21 |
DIST pipewire-0.3.45_p20220205.tar.bz2 1296767 BLAKE2B 2dbdb1db9ffdaa36579d7a6ee459fa001997ecd7b4ece006cf1265267ce956b65c752e8dd51affbff9c17b2934480e1fb86c6950c70ab5ecc8d61063c31a410b SHA512 eae64ccf484c051a10a7a7ac11522de6cd3760c87414febe4868b76f22a8651b1bf94c04cd305fbacd1c6e7233fedb8008933c0dbd6809d4507eb27e633c3930 |
22 |
DIST pipewire-0.3.47.tar.gz 1746286 BLAKE2B a34e5378d99b2b3c98731baaabf695b7aab882e557635b1a7f1cf542a5012014685bcf4254e4a81d4aab2ec2c8dd804115d5a57eaf13cbb042db2d4232f4bdfc SHA512 2f188910b6a04ebc6ebf288e2f6eab8a227056fd9c5c97a8a279ebff0f88cd6b98b9bfc3bf6aff55104fa537ca04f2c89a8d45da7f2104e07e1b2e531f6cc21c |
23 |
DIST pipewire-0.3.48.tar.gz 1754730 BLAKE2B 2ba562cdfdb179ab7c36e1227405dd83cc2a9fda3b3496e8d9339a4efc607cfbc1866eb2a9b2be9d44a2e3e4412a2c8af593028086c7c6b81dd14aa7158f19a5 SHA512 67699015612dfafd12f8e0908fa028a1ae91f8ce3a6cd7aeaf313ce991c6cfa206ace24a559bf64631c0a690ea8aa03f878c7f73e3c123881f1b015cf6627c50 |
24 |
+DIST pipewire-0.3.49.tar.gz 1769037 BLAKE2B 2567bc98933bfbb295358886e8f97db2af2f0a6ee3c2586c1718e39f7eedaed8528a4663753ba56d3295e42576da015ce9278f22aff9bbd9ca43d883bff5a2f6 SHA512 36398872f7d7b31193d7a8885bbdfb415a122bd779874107a0642202dfd8408f39fddf769bfbae4533c2cc99fe9ef67903d50cc721e936aa4802229f1c46d809 |
25 |
|
26 |
diff --git a/media-video/pipewire/pipewire-0.3.49.ebuild b/media-video/pipewire/pipewire-0.3.49.ebuild |
27 |
new file mode 100644 |
28 |
index 000000000000..0a674de08b12 |
29 |
--- /dev/null |
30 |
+++ b/media-video/pipewire/pipewire-0.3.49.ebuild |
31 |
@@ -0,0 +1,352 @@ |
32 |
+# Copyright 1999-2022 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=8 |
36 |
+ |
37 |
+PYTHON_COMPAT=( python3_{8..10} ) |
38 |
+ |
39 |
+inherit meson-multilib optfeature prefix python-any-r1 systemd udev |
40 |
+ |
41 |
+if [[ ${PV} == 9999 ]]; then |
42 |
+ EGIT_REPO_URI="https://gitlab.freedesktop.org/${PN}/${PN}.git" |
43 |
+ inherit git-r3 |
44 |
+else |
45 |
+ if [[ ${PV} == *_p* ]] ; then |
46 |
+ MY_COMMIT="" |
47 |
+ SRC_URI="https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/${MY_COMMIT}/pipewire-${MY_COMMIT}.tar.bz2 -> ${P}.tar.bz2" |
48 |
+ S="${WORKDIR}"/${PN}-${MY_COMMIT} |
49 |
+ else |
50 |
+ SRC_URI="https://gitlab.freedesktop.org/${PN}/${PN}/-/archive/${PV}/${P}.tar.gz" |
51 |
+ fi |
52 |
+ |
53 |
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86" |
54 |
+fi |
55 |
+ |
56 |
+DESCRIPTION="Multimedia processing graphs" |
57 |
+HOMEPAGE="https://pipewire.org/" |
58 |
+ |
59 |
+LICENSE="MIT LGPL-2.1+ GPL-2" |
60 |
+# ABI was broken in 0.3.42 for https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/49 |
61 |
+SLOT="0/0.4" |
62 |
+IUSE="bluetooth doc echo-cancel extra gstreamer jack-client jack-sdk lv2 pipewire-alsa ssl system-service systemd test v4l X zeroconf" |
63 |
+ |
64 |
+# Once replacing system JACK libraries is possible, it's likely that |
65 |
+# jack-client IUSE will need blocking to avoid users accidentally |
66 |
+# configuring their systems to send PW sink output to the emulated |
67 |
+# JACK's sink - doing so is likely to yield no audio, cause a CPU |
68 |
+# cycles consuming loop (and may even cause GUI crashes)! |
69 |
+ |
70 |
+REQUIRED_USE=" |
71 |
+ jack-sdk? ( !jack-client ) |
72 |
+ system-service? ( systemd ) |
73 |
+" |
74 |
+ |
75 |
+RESTRICT="!test? ( test )" |
76 |
+ |
77 |
+BDEPEND=" |
78 |
+ >=dev-util/meson-0.59 |
79 |
+ virtual/pkgconfig |
80 |
+ ${PYTHON_DEPS} |
81 |
+ $(python_gen_any_dep 'dev-python/docutils[${PYTHON_USEDEP}]') |
82 |
+ doc? ( |
83 |
+ app-doc/doxygen |
84 |
+ media-gfx/graphviz |
85 |
+ ) |
86 |
+" |
87 |
+RDEPEND=" |
88 |
+ acct-group/audio |
89 |
+ media-libs/alsa-lib |
90 |
+ sys-apps/dbus[${MULTILIB_USEDEP}] |
91 |
+ sys-libs/readline:= |
92 |
+ sys-libs/ncurses:=[unicode(+)] |
93 |
+ virtual/libintl[${MULTILIB_USEDEP}] |
94 |
+ virtual/libudev[${MULTILIB_USEDEP}] |
95 |
+ bluetooth? ( |
96 |
+ media-libs/fdk-aac |
97 |
+ media-libs/libldac |
98 |
+ media-libs/libfreeaptx |
99 |
+ media-libs/sbc |
100 |
+ >=net-wireless/bluez-4.101:= |
101 |
+ virtual/libusb:1 |
102 |
+ ) |
103 |
+ echo-cancel? ( media-libs/webrtc-audio-processing:0 ) |
104 |
+ extra? ( |
105 |
+ >=media-libs/libsndfile-1.0.20 |
106 |
+ ) |
107 |
+ gstreamer? ( |
108 |
+ >=dev-libs/glib-2.32.0:2 |
109 |
+ >=media-libs/gstreamer-1.10.0:1.0 |
110 |
+ media-libs/gst-plugins-base:1.0 |
111 |
+ ) |
112 |
+ jack-client? ( >=media-sound/jack2-1.9.10:2[dbus] ) |
113 |
+ jack-sdk? ( |
114 |
+ !media-sound/jack-audio-connection-kit |
115 |
+ !media-sound/jack2 |
116 |
+ ) |
117 |
+ lv2? ( media-libs/lilv ) |
118 |
+ pipewire-alsa? ( |
119 |
+ >=media-libs/alsa-lib-1.1.7[${MULTILIB_USEDEP}] |
120 |
+ !media-plugins/alsa-plugins[${MULTILIB_USEDEP},pulseaudio] |
121 |
+ ) |
122 |
+ !pipewire-alsa? ( media-plugins/alsa-plugins[${MULTILIB_USEDEP},pulseaudio] ) |
123 |
+ ssl? ( dev-libs/openssl:= ) |
124 |
+ systemd? ( sys-apps/systemd ) |
125 |
+ system-service? ( |
126 |
+ acct-user/pipewire |
127 |
+ acct-group/pipewire |
128 |
+ ) |
129 |
+ v4l? ( media-libs/libv4l ) |
130 |
+ X? ( |
131 |
+ media-libs/libcanberra |
132 |
+ x11-libs/libX11 |
133 |
+ x11-libs/libXfixes |
134 |
+ ) |
135 |
+ zeroconf? ( net-dns/avahi ) |
136 |
+" |
137 |
+ |
138 |
+DEPEND="${RDEPEND}" |
139 |
+ |
140 |
+# TODO: Consider use cases where pipewire is not used for driving audio |
141 |
+# Doing so with WirePlumber currently involves editing Lua scripts |
142 |
+PDEPEND=">=media-video/wireplumber-0.4.8-r3" |
143 |
+ |
144 |
+# Present RDEPEND that are currently always disabled due to the PW |
145 |
+# code using them being required to be disabled by Gentoo guidelines |
146 |
+# (i.e. developer binaries not meant for users) and unready code |
147 |
+# media-video/ffmpeg:= |
148 |
+# media-libs/libsdl2 |
149 |
+# >=media-libs/vulkan-loader-1.1.69 |
150 |
+# |
151 |
+# Ditto for DEPEND |
152 |
+# >=dev-util/vulkan-headers-1.1.69 |
153 |
+ |
154 |
+DOCS=( {README,INSTALL}.md NEWS ) |
155 |
+ |
156 |
+PATCHES=( |
157 |
+ "${FILESDIR}"/${PN}-0.3.25-enable-failed-mlock-warning.patch |
158 |
+) |
159 |
+ |
160 |
+# limitsdfile related code taken from =sys-auth/realtime-base-0.1 |
161 |
+# with changes as necessary. |
162 |
+limitsdfile=40-${PN}.conf |
163 |
+ |
164 |
+python_check_deps() { |
165 |
+ has_version -b "dev-python/docutils[${PYTHON_USEDEP}]" |
166 |
+} |
167 |
+ |
168 |
+src_prepare() { |
169 |
+ default |
170 |
+ |
171 |
+ einfo "Generating ${limitsdfile}" |
172 |
+ cat > ${limitsdfile} <<- EOF || die |
173 |
+ # Start of ${limitsdfile} from ${P} |
174 |
+ |
175 |
+ @audio - memlock 256 |
176 |
+ |
177 |
+ $(use system-service && { |
178 |
+ echo @pipewire - rtprio 95 |
179 |
+ echo @pipewire - priority -19 |
180 |
+ echo @pipewire - memlock 4194304 |
181 |
+ }) |
182 |
+ |
183 |
+ # End of ${limitsdfile} from ${P} |
184 |
+ EOF |
185 |
+} |
186 |
+ |
187 |
+multilib_src_configure() { |
188 |
+ local emesonargs=( |
189 |
+ -Ddocdir="${EPREFIX}"/usr/share/doc/${PF} |
190 |
+ |
191 |
+ $(meson_native_use_feature zeroconf avahi) |
192 |
+ $(meson_native_use_feature doc docs) |
193 |
+ $(meson_native_enabled examples) # TODO: Figure out if this is still important now that media-session gone |
194 |
+ $(meson_native_enabled man) |
195 |
+ $(meson_feature test tests) |
196 |
+ -Dinstalled_tests=disabled # Matches upstream; Gentoo never installs tests |
197 |
+ $(meson_native_use_feature gstreamer) |
198 |
+ $(meson_native_use_feature gstreamer gstreamer-device-provider) |
199 |
+ $(meson_native_use_feature systemd) |
200 |
+ |
201 |
+ $(meson_native_use_feature system-service systemd-system-service) |
202 |
+ -Dsystemd-system-unit-dir="$(systemd_get_systemunitdir)" |
203 |
+ -Dsystemd-user-unit-dir="$(systemd_get_userunitdir)" |
204 |
+ |
205 |
+ $(meson_native_use_feature systemd systemd-user-service) |
206 |
+ $(meson_feature pipewire-alsa) # Allows integrating ALSA apps into PW graph |
207 |
+ -Dspa-plugins=enabled |
208 |
+ -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) |
209 |
+ -Daudiomixer=enabled # Matches upstream |
210 |
+ -Daudioconvert=enabled # Matches upstream |
211 |
+ $(meson_native_use_feature bluetooth bluez5) |
212 |
+ $(meson_native_use_feature bluetooth bluez5-backend-hsp-native) |
213 |
+ $(meson_native_use_feature bluetooth bluez5-backend-hfp-native) |
214 |
+ $(meson_native_use_feature bluetooth bluez5-backend-ofono) |
215 |
+ $(meson_native_use_feature bluetooth bluez5-backend-hsphfpd) |
216 |
+ $(meson_native_use_feature bluetooth bluez5-codec-aac) |
217 |
+ $(meson_native_use_feature bluetooth bluez5-codec-aptx) |
218 |
+ $(meson_native_use_feature bluetooth bluez5-codec-ldac) |
219 |
+ $(meson_native_use_feature bluetooth libusb) # At least for now only used by bluez5 native (quirk detection of adapters) |
220 |
+ $(meson_native_use_feature echo-cancel echo-cancel-webrtc) #807889 |
221 |
+ -Dcontrol=enabled # Matches upstream |
222 |
+ -Daudiotestsrc=enabled # Matches upstream |
223 |
+ -Dffmpeg=disabled # Disabled by upstream and no major developments to spa/plugins/ffmpeg/ since May 2020 |
224 |
+ -Dpipewire-jack=enabled # Allows integrating JACK apps into PW graph |
225 |
+ $(meson_native_use_feature jack-client jack) # Allows PW to act as a JACK client |
226 |
+ $(meson_use jack-sdk jack-devel) |
227 |
+ $(usex jack-sdk "-Dlibjack-path=${EPREFIX}/usr/$(get_libdir)" '') |
228 |
+ -Dsupport=enabled # Miscellaneous/common plugins, such as null sink |
229 |
+ -Devl=disabled # Matches upstream |
230 |
+ -Dtest=disabled # fakesink and fakesource plugins |
231 |
+ $(meson_native_use_feature lv2) |
232 |
+ $(meson_native_use_feature v4l v4l2) |
233 |
+ -Dlibcamera=disabled # libcamera is not in Portage tree |
234 |
+ $(meson_native_use_feature ssl raop) |
235 |
+ -Dvideoconvert=enabled # Matches upstream |
236 |
+ -Dvideotestsrc=enabled # Matches upstream |
237 |
+ -Dvolume=enabled # Matches upstream |
238 |
+ -Dvulkan=disabled # Uses pre-compiled Vulkan compute shader to provide a CGI video source (dev thing; disabled by upstream) |
239 |
+ $(meson_native_use_feature extra pw-cat) |
240 |
+ -Dudev=enabled |
241 |
+ -Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d" |
242 |
+ -Dsdl2=disabled # Controls SDL2 dependent code (currently only examples when -Dinstalled_tests=enabled which we never install) |
243 |
+ $(meson_native_use_feature extra sndfile) # Enables libsndfile dependent code (currently only pw-cat) |
244 |
+ -Dsession-managers="[]" # All available session managers are now their own projects, so there's nothing to build |
245 |
+ |
246 |
+ # Just for bell sounds in X11 right now. |
247 |
+ $(meson_native_use_feature X x11) |
248 |
+ $(meson_native_use_feature X x11-xfixes) |
249 |
+ $(meson_native_use_feature X libcanberra) |
250 |
+ ) |
251 |
+ |
252 |
+ meson_src_configure |
253 |
+} |
254 |
+ |
255 |
+multilib_src_install() { |
256 |
+ # Our custom DOCS do not exist in multilib source directory |
257 |
+ DOCS= meson_src_install |
258 |
+} |
259 |
+ |
260 |
+multilib_src_install_all() { |
261 |
+ einstalldocs |
262 |
+ |
263 |
+ insinto /etc/security/limits.d |
264 |
+ doins ${limitsdfile} |
265 |
+ |
266 |
+ if use pipewire-alsa; then |
267 |
+ dodir /etc/alsa/conf.d |
268 |
+ # These will break if someone has /etc that is a symbolic link to a subfolder! See #724222 |
269 |
+ # And the current dosym8 -r implementation is likely affected by the same issue, too. |
270 |
+ dosym ../../../usr/share/alsa/alsa.conf.d/50-pipewire.conf /etc/alsa/conf.d/50-pipewire.conf |
271 |
+ dosym ../../../usr/share/alsa/alsa.conf.d/99-pipewire-default.conf /etc/alsa/conf.d/99-pipewire-default.conf |
272 |
+ fi |
273 |
+ |
274 |
+ if ! use systemd; then |
275 |
+ insinto /etc/xdg/autostart |
276 |
+ newins "${FILESDIR}"/pipewire.desktop-r1 pipewire.desktop |
277 |
+ |
278 |
+ exeinto /usr/bin |
279 |
+ newexe "${FILESDIR}"/gentoo-pipewire-launcher.in gentoo-pipewire-launcher |
280 |
+ eprefixify "${ED}"/usr/bin/gentoo-pipewire-launcher |
281 |
+ fi |
282 |
+} |
283 |
+ |
284 |
+pkg_postinst() { |
285 |
+ elog "It is recommended to raise RLIMIT_MEMLOCK to 256 for users" |
286 |
+ elog "using PipeWire. Do it either manually or add yourself" |
287 |
+ elog "to the 'audio' group:" |
288 |
+ elog |
289 |
+ elog " usermod -aG audio <youruser>" |
290 |
+ elog |
291 |
+ |
292 |
+ if ! use jack-sdk; then |
293 |
+ elog "JACK emulation is incomplete and not all programs will work. PipeWire's" |
294 |
+ elog "alternative libraries have been installed to a non-default location." |
295 |
+ elog "To use them, put pw-jack <application> before every JACK application." |
296 |
+ elog "When using pw-jack, do not run jackd/jackdbus. However, a virtual/jack" |
297 |
+ elog "provider is still needed to compile the JACK applications themselves." |
298 |
+ elog |
299 |
+ fi |
300 |
+ |
301 |
+ if use systemd; then |
302 |
+ elog "When switching from PulseAudio, you may need to disable PulseAudio:" |
303 |
+ elog |
304 |
+ elog " systemctl --user disable pulseaudio.service pulseaudio.socket" |
305 |
+ elog |
306 |
+ elog "To use PipeWire, the user units must be manually enabled" |
307 |
+ elog "by running this command as each user you use for desktop activities:" |
308 |
+ elog |
309 |
+ elog " systemctl --user enable pipewire.socket pipewire-pulse.socket" |
310 |
+ elog |
311 |
+ elog "A reboot is recommended to avoid interferences from still running" |
312 |
+ elog "PulseAudio daemon." |
313 |
+ elog |
314 |
+ elog "Both new users and those upgrading need to enable WirePlumber" |
315 |
+ elog "for relevant users:" |
316 |
+ elog |
317 |
+ elog " systemctl --user disable pipewire-media-session.service" |
318 |
+ elog " systemctl --user --force enable wireplumber.service" |
319 |
+ elog |
320 |
+ elog "Root user may replace --user with --global to change system default" |
321 |
+ elog "configuration for all of the above commands." |
322 |
+ else |
323 |
+ ewarn "PipeWire daemon startup has been moved to a launcher script!" |
324 |
+ ewarn "Make sure that ${EROOT}/etc/pipewire/pipewire.conf either does not exist or no" |
325 |
+ ewarn "longer is set to start a session manager or PulseAudio compatibility daemon (all" |
326 |
+ ewarn "lines similar to '{ path = /usr/bin/pipewire*' should be commented out)" |
327 |
+ ewarn |
328 |
+ ewarn "Those manually starting /usr/bin/pipewire via .xinitrc or similar _must_ from" |
329 |
+ ewarn "now on start ${EROOT}/usr/bin/gentoo-pipewire-launcher instead! It is highly" |
330 |
+ ewarn "advised that a D-Bus user session is set up before starting the script." |
331 |
+ ewarn |
332 |
+ if has_version 'media-sound/pulseaudio[daemon]' || has_version 'media-sound/pulseaudio-daemon'; then |
333 |
+ elog "This ebuild auto-enables PulseAudio replacement. Because of that, users" |
334 |
+ elog "are recommended to edit: ${EROOT}/etc/pulse/client.conf and disable" |
335 |
+ elog "autospawning of the original daemon by setting:" |
336 |
+ elog |
337 |
+ elog " autospawn = no" |
338 |
+ elog |
339 |
+ elog "Please note that the semicolon (;) must _NOT_ be at the beginning of the line!" |
340 |
+ elog |
341 |
+ elog "Alternatively, if replacing PulseAudio daemon is not desired, edit" |
342 |
+ elog "${EROOT}/usr/bin/gentoo-pipewire-launcher by commenting out the relevant" |
343 |
+ elog "command:" |
344 |
+ elog |
345 |
+ elog "#${EROOT}/usr/bin/pipewire -c pipewire-pulse.conf &" |
346 |
+ elog |
347 |
+ fi |
348 |
+ elog "NOTE:" |
349 |
+ elog "Starting with PipeWire-0.3.30, this package is no longer installing its config" |
350 |
+ elog "into ${EROOT}/etc/pipewire by default. In case you need to change" |
351 |
+ elog "its config, please start by copying default config from ${EROOT}/usr/share/pipewire" |
352 |
+ elog "and just override the sections you want to change." |
353 |
+ fi |
354 |
+ elog |
355 |
+ |
356 |
+ elog "For latest tips and tricks, troubleshooting information and documentation" |
357 |
+ elog "in general, please refer to https://wiki.gentoo.org/wiki/PipeWire" |
358 |
+ elog |
359 |
+ |
360 |
+ optfeature_header "The following can be installed for optional runtime features:" |
361 |
+ optfeature "restricted realtime capabilities via D-Bus" sys-auth/rtkit |
362 |
+ |
363 |
+ if has_version 'net-misc/ofono' ; then |
364 |
+ ewarn "Native backend has become default. Please disable oFono via:" |
365 |
+ if systemd_is_booted ; then |
366 |
+ ewarn "systemctl disable ofono" |
367 |
+ else |
368 |
+ ewarn "rc-update delete ofono" |
369 |
+ fi |
370 |
+ ewarn |
371 |
+ fi |
372 |
+ |
373 |
+ if use system-service; then |
374 |
+ ewarn |
375 |
+ ewarn "WARNING: you have enabled the system-service USE flag, which installs" |
376 |
+ ewarn "the system-wide systemd units that enable PipeWire to run as a system" |
377 |
+ ewarn "service. This is more than likely NOT what you want. You are strongly" |
378 |
+ ewarn "advised not to enable this mode and instead stick with systemd user" |
379 |
+ ewarn "units. The default configuration files will likely not work out of" |
380 |
+ ewarn "box, and you are on your own with configuration." |
381 |
+ ewarn |
382 |
+ fi |
383 |
+} |