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