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, 23 Sep 2021 23:04:53
Message-Id: 1632438275.22b1b30a0cf08f75915049a7306ffbebd661b1d1.sam@gentoo
1 commit: 22b1b30a0cf08f75915049a7306ffbebd661b1d1
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 23 23:04:35 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 23 23:04:35 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22b1b30a
7
8 media-video/pipewire: add 0.3.37
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.37.ebuild | 285 ++++++++++++++++++++++++++++
14 2 files changed, 286 insertions(+)
15
16 diff --git a/media-video/pipewire/Manifest b/media-video/pipewire/Manifest
17 index 3fdd58008e1..3e2400ff6d7 100644
18 --- a/media-video/pipewire/Manifest
19 +++ b/media-video/pipewire/Manifest
20 @@ -4,3 +4,4 @@ DIST pipewire-0.3.33.tar.gz 1629559 BLAKE2B de48956ac87ed6d63a08dd354b1e4abf81b9
21 DIST pipewire-0.3.34.tar.gz 1682396 BLAKE2B 1a3524a833bde6facf637071f905bb0237f3fc53a86d6160083f36c7a42fb7c71c873a0dc9eea04cfb08cbec08807557c2b83efc1ac403adf6a9998d83441338 SHA512 cbf8eb410d2cd1923e67ac9ee9eca0e74567bb7e8ea407a536e64b3ec27b5bbb1e7fdd74a5a7cbffbac3f9996d8a08f8c723401fb44cb2920f044a3a2f3a6c18
22 DIST pipewire-0.3.35.tar.gz 1704419 BLAKE2B 5c0debd19b29a9488be26125794f04e57e8b3cd3842654cb935decae18ffefc4137927d969448f60f1c1c2985d54db139fc3dcf07e36e81014021d63490096d8 SHA512 08a2e305fe4e9d3c3f4533c163b725dd32d26513e51a9f476bd18d6157ebf67e97e48b8df9595d45c81599f416e6b3f76e90df575dd460a8d26fe951db30e0f6
23 DIST pipewire-0.3.36.tar.gz 1708209 BLAKE2B 20fce0d7f88347fe594491d4fae7b6a8edee67ff7749f1a40b807a5d5094d792e61e3efd05dca2221f781c263e34ff0a50ad3c162231911d4b1d87704df6c775 SHA512 f0fc68ea005018b420a4f65a24dc9c85eb6263c24e66852a7ce2b03f966990d62487b388c7d73ff5adfc10c80c439b1200ae876e41d78f91db190036a1799a14
24 +DIST pipewire-0.3.37.tar.gz 1716320 BLAKE2B ce98b28015de69a0c91953a4839d5f86a29cfa19e2058ba0a2476a75a03b782ae67239b418306e4ed7dab81fe7e77928a417b966ff3c72ac552006cea66e3218 SHA512 3f4cf1ac66117a56a7a264262e2e238a54060457da6a986bd9227f51cc7e8d1a8fd282aef8462c096819282c5baec22779d2025c2e1918bbfb3d6ff75829aea6
25
26 diff --git a/media-video/pipewire/pipewire-0.3.37.ebuild b/media-video/pipewire/pipewire-0.3.37.ebuild
27 new file mode 100644
28 index 00000000000..7725dfa300f
29 --- /dev/null
30 +++ b/media-video/pipewire/pipewire-0.3.37.ebuild
31 @@ -0,0 +1,285 @@
32 +# Copyright 1999-2021 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI="7"
36 +
37 +PYTHON_COMPAT=( python3_{8..10} )
38 +
39 +inherit meson-multilib optfeature 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 ~x86"
47 +fi
48 +
49 +DESCRIPTION="Multimedia processing graphs"
50 +HOMEPAGE="https://pipewire.org/"
51 +
52 +LICENSE="MIT LGPL-2.1+ GPL-2"
53 +SLOT="0/0.3"
54 +IUSE="bluetooth doc echo-cancel extra gstreamer jack-client jack-sdk pipewire-alsa systemd test v4l"
55 +
56 +# Once replacing system JACK libraries is possible, it's likely that
57 +# jack-client IUSE will need blocking to avoid users accidentally
58 +# configuring their systems to send PW sink output to the emulated
59 +# JACK's sink - doing so is likely to yield no audio, cause a CPU
60 +# cycles consuming loop (and may even cause GUI crashes)!
61 +
62 +REQUIRED_USE="jack-sdk? ( !jack-client )"
63 +
64 +RESTRICT="!test? ( test )"
65 +
66 +BDEPEND="
67 + app-doc/xmltoman
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/ncurses:=[unicode(+)]
82 + virtual/libintl[${MULTILIB_USEDEP}]
83 + virtual/libudev[${MULTILIB_USEDEP}]
84 + bluetooth? (
85 + media-libs/fdk-aac
86 + media-libs/libldac
87 + media-libs/libfreeaptx
88 + media-libs/sbc
89 + >=net-wireless/bluez-4.101:=
90 + )
91 + echo-cancel? ( media-libs/webrtc-audio-processing:0 )
92 + extra? (
93 + >=media-libs/libsndfile-1.0.20
94 + )
95 + gstreamer? (
96 + >=dev-libs/glib-2.32.0:2
97 + >=media-libs/gstreamer-1.10.0:1.0
98 + media-libs/gst-plugins-base:1.0
99 + )
100 + jack-client? ( >=media-sound/jack2-1.9.10:2[dbus] )
101 + jack-sdk? (
102 + !media-sound/jack-audio-connection-kit
103 + !media-sound/jack2
104 + )
105 + pipewire-alsa? (
106 + >=media-libs/alsa-lib-1.1.7[${MULTILIB_USEDEP}]
107 + !media-plugins/alsa-plugins[${MULTILIB_USEDEP},pulseaudio]
108 + )
109 + !pipewire-alsa? ( media-plugins/alsa-plugins[${MULTILIB_USEDEP},pulseaudio] )
110 + systemd? ( sys-apps/systemd )
111 + v4l? ( media-libs/libv4l )
112 +"
113 +
114 +DEPEND="${RDEPEND}"
115 +
116 +# Present RDEPEND that are currently always disabled due to the PW
117 +# code using them being required to be disabled by Gentoo guidelines
118 +# (i.e. developer binaries not meant for users) and unready code
119 +# media-video/ffmpeg:=
120 +# media-libs/libsdl2
121 +# >=media-libs/vulkan-loader-1.1.69
122 +#
123 +# Ditto for DEPEND
124 +# >=dev-util/vulkan-headers-1.1.69
125 +
126 +DOCS=( {README,INSTALL}.md NEWS )
127 +
128 +PATCHES=(
129 + "${FILESDIR}"/${PN}-0.3.25-enable-failed-mlock-warning.patch
130 +)
131 +
132 +# limitsdfile related code taken from =sys-auth/realtime-base-0.1
133 +# with changes as necessary.
134 +limitsdfile=40-${PN}.conf
135 +
136 +python_check_deps() {
137 + has_version -b "dev-python/docutils[${PYTHON_USEDEP}]"
138 +}
139 +
140 +src_prepare() {
141 + default
142 +
143 + if ! use systemd; then
144 + # This can be applied non-conditionally but would make for a
145 + # significantly worse user experience on systemd then.
146 + eapply "${FILESDIR}"/${PN}-0.3.36-non-systemd-integration.patch
147 + fi
148 +
149 + einfo "Generating ${limitsdfile}"
150 + cat > ${limitsdfile} <<- EOF || die
151 + # Start of ${limitsdfile} from ${P}
152 +
153 + @audio - memlock 256
154 +
155 + # End of ${limitsdfile} from ${P}
156 + EOF
157 +}
158 +
159 +multilib_src_configure() {
160 + local emesonargs=(
161 + -Ddocdir="${EPREFIX}"/usr/share/doc/${PF}
162 + $(meson_native_use_feature doc docs)
163 + $(meson_native_enabled examples) # Disabling this implicitly disables -Dmedia-session
164 + # Replaced upstream by -Dsession-managers=..., needs more work, bug #812809
165 + # but default is same as before and right now, this is fatal with unreleased Meson.
166 + #$(meson_native_enabled media-session)
167 + $(meson_native_enabled man)
168 + $(meson_feature test tests)
169 + -Dinstalled_tests=disabled # Matches upstream; Gentoo never installs tests
170 + $(meson_native_use_feature gstreamer)
171 + $(meson_native_use_feature gstreamer gstreamer-device-provider)
172 + $(meson_native_use_feature systemd)
173 + -Dsystemd-system-service=disabled # Matches upstream
174 + $(meson_native_use_feature systemd systemd-user-service)
175 + $(meson_feature pipewire-alsa) # Allows integrating ALSA apps into PW graph
176 + -Dspa-plugins=enabled
177 + -Dalsa=enabled # Allows using kernel ALSA for sound I/O (-Dmedia-session depends on this)
178 + -Daudiomixer=enabled # Matches upstream
179 + -Daudioconvert=enabled # Matches upstream
180 + $(meson_native_use_feature bluetooth bluez5)
181 + $(meson_native_use_feature bluetooth bluez5-backend-hsp-native)
182 + $(meson_native_use_feature bluetooth bluez5-backend-hfp-native)
183 + $(meson_native_use_feature bluetooth bluez5-backend-ofono)
184 + $(meson_native_use_feature bluetooth bluez5-backend-hsphfpd)
185 + $(meson_native_use_feature bluetooth bluez5-codec-aac)
186 + $(meson_native_use_feature bluetooth bluez5-codec-aptx)
187 + $(meson_native_use_feature bluetooth bluez5-codec-ldac)
188 + $(meson_native_use_feature echo-cancel echo-cancel-webrtc) #807889
189 + -Dcontrol=enabled # Matches upstream
190 + -Daudiotestsrc=enabled # Matches upstream
191 + -Dffmpeg=disabled # Disabled by upstream and no major developments to spa/plugins/ffmpeg/ since May 2020
192 + -Dpipewire-jack=enabled # Allows integrating JACK apps into PW graph
193 + $(meson_native_use_feature jack-client jack) # Allows PW to act as a JACK client
194 + $(meson_use jack-sdk jack-devel)
195 + $(usex jack-sdk "-Dlibjack-path=${EPREFIX}/usr/$(get_libdir)" '')
196 + -Dsupport=enabled # Miscellaneous/common plugins, such as null sink
197 + -Devl=disabled # Matches upstream
198 + -Dtest=disabled # fakesink and fakesource plugins
199 + $(meson_native_use_feature v4l v4l2)
200 + -Dlibcamera=disabled # libcamera is not in Portage tree
201 + -Dvideoconvert=enabled # Matches upstream
202 + -Dvideotestsrc=enabled # Matches upstream
203 + -Dvolume=enabled # Matches upstream
204 + -Dvulkan=disabled # Uses pre-compiled Vulkan compute shader to provide a CGI video source (dev thing; disabled by upstream)
205 + $(meson_native_use_feature extra pw-cat)
206 + -Dudev=enabled
207 + -Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d"
208 + -Dsdl2=disabled # Controls SDL2 dependent code (currently only examples when -Dinstalled_tests=enabled which we never install)
209 + $(meson_native_use_feature extra sndfile) # Enables libsndfile dependent code (currently only pw-cat)
210 + )
211 +
212 + meson_src_configure
213 +}
214 +
215 +multilib_src_install() {
216 + # Our customs DOCS do not exist in multilib source directory
217 + DOCS= meson_src_install
218 +}
219 +
220 +multilib_src_install_all() {
221 + einstalldocs
222 +
223 + insinto /etc/security/limits.d
224 + doins ${limitsdfile}
225 +
226 + if use pipewire-alsa; then
227 + dodir /etc/alsa/conf.d
228 + # These will break if someone has /etc that is a symbol link to a subfolder! See #724222
229 + # And the current dosym8 -r implementation is likely affected by the same issue, too.
230 + dosym ../../../usr/share/alsa/alsa.conf.d/50-pipewire.conf /etc/alsa/conf.d/50-pipewire.conf
231 + dosym ../../../usr/share/alsa/alsa.conf.d/99-pipewire-default.conf /etc/alsa/conf.d/99-pipewire-default.conf
232 + fi
233 +
234 + if ! use systemd; then
235 + insinto /etc/xdg/autostart
236 + newins "${FILESDIR}"/pipewire.desktop pipewire.desktop
237 +
238 + exeinto /usr/libexec
239 + newexe "${FILESDIR}"/pipewire-launcher.sh pipewire-launcher
240 + fi
241 +}
242 +
243 +pkg_postinst() {
244 + elog "It is recommended to raise RLIMIT_MEMLOCK to 256 for users"
245 + elog "using PipeWire. Do it either manually or add yourself"
246 + elog "to the 'audio' group:"
247 + elog
248 + elog " usermod -aG audio <youruser>"
249 + elog
250 +
251 + if ! use jack-sdk; then
252 + elog "JACK emulation is incomplete and not all programs will work. PipeWire's"
253 + elog "alternative libraries have been installed to a non-default location."
254 + elog "To use them, put pw-jack <application> before every JACK application."
255 + elog "When using pw-jack, do not run jackd/jackdbus. However, a virtual/jack"
256 + elog "provider is still needed to compile the JACK applications themselves."
257 + elog
258 + fi
259 +
260 + if use systemd; then
261 + elog "To use PipeWire for audio, the user units must be manually enabled"
262 + elog "by running this command as each user you use for desktop activities:"
263 + elog
264 + elog " systemctl --user enable --now pipewire.socket pipewire-pulse.socket"
265 + elog
266 + elog "When switching from PulseAudio, do not forget to disable PulseAudio likewise:"
267 + elog
268 + elog " systemctl --user disable --now pulseaudio.service pulseaudio.socket"
269 + elog
270 + elog "A reboot is recommended to avoid interferences from still running"
271 + elog "PulseAudio daemon."
272 + elog
273 + elog "Both, new users and those upgrading, need to enable pipewire-media-session"
274 + elog "for relevant users:"
275 + elog
276 + elog " systemctl --user enable --now pipewire-media-session.service"
277 + elog
278 + else
279 + elog "This ebuild auto-enables PulseAudio replacement. Because of that, users"
280 + elog "are recommended to edit: ${EROOT}/etc/pulse/client.conf and disable"
281 + elog "autospawning of the original daemon by setting:"
282 + elog
283 + elog " autospawn = no"
284 + elog
285 + elog "Please note that the semicolon (;) must _NOT_ be at the beginning of the line!"
286 + elog
287 + elog "Alternatively, if replacing PulseAudio daemon is not desired, edit"
288 + elog "${EROOT}/etc/pipewire/pipewire.conf by commenting out the relevant"
289 + elog "command near the end of the file:"
290 + elog
291 + elog "#\"/usr/bin/pipewire\" = { args = \"-c pipewire-pulse.conf\" }"
292 + elog
293 + elog "NOTE:"
294 + elog "Starting with PipeWire-0.3.30, this package is no longer installing its config"
295 + elog "into ${EROOT}/etc/pipewire by default. In case you need to change"
296 + elog "its config, please start by copying default config from ${EROOT}/usr/share/pipewire"
297 + elog "and just override the sections you want to change."
298 + fi
299 +
300 + elog "For latest tips and tricks, troubleshooting information and documentation"
301 + elog "in general, please refer to https://wiki.gentoo.org/wiki/PipeWire"
302 + elog
303 +
304 + optfeature_header "The following can be installed for optional runtime features:"
305 + optfeature "restricted realtime capabilities via D-Bus" sys-auth/rtkit
306 +
307 + if has_version 'net-misc/ofono' ; then
308 + ewarn "Native backend has become default. Please disable oFono via:"
309 + if systemd_is_booted ; then
310 + ewarn "systemctl disable --now ofono"
311 + else
312 + ewarn "rc-update delete ofono"
313 + fi
314 + ewarn
315 + fi
316 +}