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