commit:     9ae390be48c6095fcbaf109ec67dc76667da1380
Author:     Niklāvs Koļesņikovs <89q1r14hd <AT> relay <DOT> firefox <DOT> com>
AuthorDate: Mon Oct 18 20:05:28 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Oct 24 01:57:48 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ae390be

media-video/pipewire: replace media-session with WirePlumber

Upstream has fast-tracked media-session deprecation to the point
that it only exists as a separate project that we do not package.

Since there's nothing to build anymore, this commit disables building
the unavailable to avoid configuration failure and adds instructions
for systemd users to use WirePlumber instead.

The next commit will add improved OpenRC support that no longer
required conditional patching and update OpenRC instructions, too.

If docutils is in the BDEPEND, then xmltoman is no longer supported.
However fixing that for every ebuild would be too much work, so only
doing that for future ebuilds via the live ebuild.

Thanks-to: Mart Raudsepp <leio <AT> gentoo.org> (review & suggestions)
Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd <AT> relay.firefox.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-video/pipewire/pipewire-9999.ebuild | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/media-video/pipewire/pipewire-9999.ebuild 
b/media-video/pipewire/pipewire-9999.ebuild
index b6c000cf8a5..eaa51173cfc 100644
--- a/media-video/pipewire/pipewire-9999.ebuild
+++ b/media-video/pipewire/pipewire-9999.ebuild
@@ -33,7 +33,6 @@ REQUIRED_USE="jack-sdk? ( !jack-client )"
 RESTRICT="!test? ( test )"
 
 BDEPEND="
-       app-doc/xmltoman
        >=dev-util/meson-0.59
        virtual/pkgconfig
        ${PYTHON_DEPS}
@@ -83,6 +82,10 @@ RDEPEND="
 
 DEPEND="${RDEPEND}"
 
+# TODO: Consider use cases where pipewire is not used for driving audio
+# Doing so with WirePlumber currently involves editing Lua scripts
+PDEPEND="media-video/wireplumber"
+
 # Present RDEPEND that are currently always disabled due to the PW
 # code using them being required to be disabled by Gentoo guidelines
 # (i.e. developer binaries not meant for users) and unready code
@@ -130,10 +133,7 @@ multilib_src_configure() {
        local emesonargs=(
                -Ddocdir="${EPREFIX}"/usr/share/doc/${PF}
                $(meson_native_use_feature doc docs)
-               $(meson_native_enabled examples) # Disabling this implicitly 
disables -Dmedia-session
-               # Replaced upstream by -Dsession-managers=..., needs more work, 
bug #812809
-               # but default is same as before and right now, this is fatal 
with unreleased Meson.
-               #$(meson_native_enabled media-session)
+               $(meson_native_enabled examples) # TODO: Figure out if this is 
still important now that media-session gone
                $(meson_native_enabled man)
                $(meson_feature test tests)
                -Dinstalled_tests=disabled # Matches upstream; Gentoo never 
installs tests
@@ -144,7 +144,7 @@ multilib_src_configure() {
                $(meson_native_use_feature systemd systemd-user-service)
                $(meson_feature pipewire-alsa) # Allows integrating ALSA apps 
into PW graph
                -Dspa-plugins=enabled
-               -Dalsa=enabled # Allows using kernel ALSA for sound I/O 
(-Dmedia-session depends on this)
+               -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)
                -Daudiomixer=enabled # Matches upstream
                -Daudioconvert=enabled # Matches upstream
                $(meson_native_use_feature bluetooth bluez5)
@@ -177,13 +177,14 @@ multilib_src_configure() {
                -Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d"
                -Dsdl2=disabled # Controls SDL2 dependent code (currently only 
examples when -Dinstalled_tests=enabled which we never install)
                $(meson_native_use_feature extra sndfile) # Enables libsndfile 
dependent code (currently only pw-cat)
+               -Dsession-managers="[]" # All available session managers are 
now their own projects, so there's nothing to build
        )
 
        meson_src_configure
 }
 
 multilib_src_install() {
-       # Our customs DOCS do not exist in multilib source directory
+       # Our custom DOCS do not exist in multilib source directory
        DOCS= meson_src_install
 }
 
@@ -195,7 +196,7 @@ multilib_src_install_all() {
 
        if use pipewire-alsa; then
                dodir /etc/alsa/conf.d
-               # These will break if someone has /etc that is a symbol link to 
a subfolder! See #724222
+               # These will break if someone has /etc that is a symbolic link 
to a subfolder! See #724222
                # And the current dosym8 -r implementation is likely affected 
by the same issue, too.
                dosym ../../../usr/share/alsa/alsa.conf.d/50-pipewire.conf 
/etc/alsa/conf.d/50-pipewire.conf
                dosym 
../../../usr/share/alsa/alsa.conf.d/99-pipewire-default.conf 
/etc/alsa/conf.d/99-pipewire-default.conf
@@ -240,10 +241,10 @@ pkg_postinst() {
                elog "A reboot is recommended to avoid interferences from still 
running"
                elog "PulseAudio daemon."
                elog
-               elog "Both, new users and those upgrading, need to enable 
pipewire-media-session"
+               elog "Both, new users and those upgrading, need to enable 
WirePlumber"
                elog "for relevant users:"
                elog
-               elog "  systemctl --user enable --now 
pipewire-media-session.service"
+               elog "  systemctl --user enable --now wireplumber.service"
                elog
        else
                elog "This ebuild auto-enables PulseAudio replacement. Because 
of that, users"

Reply via email to