commit:     e8adb99b7d499c9e3080946dda18ccccc0b6ced2
Author:     Niklāvs Koļesņikovs <89q1r14hd <AT> relay <DOT> firefox <DOT> com>
AuthorDate: Fri May 21 17:18:33 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Sep 13 22:08:35 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8adb99b

media-video/wireplumber: initial commit based on the PipeWire ebuild

Apart from not yet supporting generation of API documentation, the
ebuild should be fully functional.

Thanks-to: Jaco Kroon <jaco <AT> uls.co.za> (for noticing incorrect RDEPEND)
Thanks-to: Ionen Wolkens <ionen <AT> gentoo.org> (Lua target enforcement)
Co-authored-by: Sam James <sam <AT> gentoo.org>
Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd <AT> relay.firefox.com>
Closes: https://github.com/gentoo/gentoo/pull/22278
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-video/wireplumber/Manifest                 |  1 +
 media-video/wireplumber/metadata.xml             | 17 ++++++
 media-video/wireplumber/wireplumber-0.4.2.ebuild | 78 ++++++++++++++++++++++++
 media-video/wireplumber/wireplumber-9999.ebuild  | 78 ++++++++++++++++++++++++
 profiles/targets/desktop/package.use             |  2 +-
 5 files changed, 175 insertions(+), 1 deletion(-)

diff --git a/media-video/wireplumber/Manifest b/media-video/wireplumber/Manifest
new file mode 100644
index 00000000000..885d24e6eec
--- /dev/null
+++ b/media-video/wireplumber/Manifest
@@ -0,0 +1 @@
+DIST wireplumber-0.4.2.tar.gz 332499 BLAKE2B 
4747ae405a824b019415188ff1a586d32fc2e97aba6777cd1e403aadf0e44458156d1f8b6dbc706b812a7ea8c873d0f506f2b42817d1bc5312874530edaf7234
 SHA512 
8ded43fba5de58068516558918d49c86be7d67330e8a14e735561fefadba5e27952d556987b7304dead52b4e2f72a7d9626da0170e768c4702dd164840b08e3c

diff --git a/media-video/wireplumber/metadata.xml 
b/media-video/wireplumber/metadata.xml
new file mode 100644
index 00000000000..b9b45abb671
--- /dev/null
+++ b/media-video/wireplumber/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person" proxied="yes">
+               <email>[email protected]</email>
+               <name>Niklāvs Koļesņikovs</name>
+       </maintainer>
+       <maintainer type="person" proxied="proxy">
+               <email>[email protected]</email>
+               <name>Sam James</name>
+       </maintainer>
+       <upstream>
+               
<bugs-to>https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues</bugs-to>
+               
<changelog>https://gitlab.freedesktop.org/pipewire/wireplumber/-/releases</changelog>
+               
<!--doc>https://gitlab.freedesktop.org/pipewire/wireplumber/-/wikis/home</doc-->
+       </upstream>
+</pkgmetadata>

diff --git a/media-video/wireplumber/wireplumber-0.4.2.ebuild 
b/media-video/wireplumber/wireplumber-0.4.2.ebuild
new file mode 100644
index 00000000000..802558549d7
--- /dev/null
+++ b/media-video/wireplumber/wireplumber-0.4.2.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( lua5-{3,4} )
+
+inherit lua-single meson systemd
+
+if [[ ${PV} == 9999 ]]; then
+       EGIT_REPO_URI="https://gitlab.freedesktop.org/pipewire/${PN}.git";
+       EGIT_BRANCH="master"
+       inherit git-r3
+else
+       
SRC_URI="https://gitlab.freedesktop.org/pipewire/${PN}/-/archive/${PV}/${P}.tar.gz";
+       KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Replacement for pipewire-media-session"
+HOMEPAGE="https://gitlab.freedesktop.org/pipewire/wireplumber";
+
+LICENSE="MIT"
+SLOT="0/0.4"
+IUSE="systemd"
+
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+
+# introspection? ( dev-libs/gobject-introspection ) is valid but likely only 
used for doc building
+BDEPEND="
+       dev-libs/glib
+       dev-util/gdbus-codegen
+       dev-util/glib-utils
+"
+
+DEPEND="
+       ${LUA_DEPS}
+       >=dev-libs/glib-2.62
+       >=media-video/pipewire-0.3.26
+       virtual/libc
+       systemd? ( sys-apps/systemd )
+"
+
+# Any dev-lua/* deps get declared like this inside RDEPEND:
+#      $(lua_gen_cond_dep '
+#              dev-lua/<NAME>[${LUA_USEDEP}]
+#      ')
+RDEPEND="${DEPEND}"
+
+DOCS=( {NEWS,README}.rst )
+
+src_configure() {
+       local emesonargs=(
+               -Dintrospection=disabled # Only used for Sphinx doc generation
+               -Dsystem-lua=true # We always unbundle everything we can
+               -Dsystem-lua-version=$(ver_cut 1-2 $(lua_get_version))
+               $(meson_feature systemd)
+               -Dsystemd-system-service=false # Matches upstream
+               $(meson_use systemd systemd-user-service)
+               -Dsystemd-system-unit-dir=$(systemd_get_systemunitdir)
+               -Dsystemd-user-unit-dir=$(systemd_get_userunitdir)
+       )
+
+       meson_src_configure
+}
+
+pkg_postinst() {
+       if systemd_is_booted ; then
+               elog "To replace media-session with WirePlumber immediately:"
+               elog "systemctl --user disable --now 
pipewire-media-session.service"
+               elog "systemctl --user enable --now wireplumber.service"
+       else
+               elog "OpenRC users need to copy 
${EROOT}/usr/share/pipewire/pipewire.conf"
+               elog "to ${EROOT}/etc/pipewire/pipewire.conf and in it replace"
+               elog "${EROOT}/usr/bin/pipewire-media-session with 
${EROOT}/usr/bin/wireplumber"
+               elog "The switch to WirePlumber will happen the next time 
pipewire is started."
+       fi
+       elog
+}

diff --git a/media-video/wireplumber/wireplumber-9999.ebuild 
b/media-video/wireplumber/wireplumber-9999.ebuild
new file mode 100644
index 00000000000..802558549d7
--- /dev/null
+++ b/media-video/wireplumber/wireplumber-9999.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( lua5-{3,4} )
+
+inherit lua-single meson systemd
+
+if [[ ${PV} == 9999 ]]; then
+       EGIT_REPO_URI="https://gitlab.freedesktop.org/pipewire/${PN}.git";
+       EGIT_BRANCH="master"
+       inherit git-r3
+else
+       
SRC_URI="https://gitlab.freedesktop.org/pipewire/${PN}/-/archive/${PV}/${P}.tar.gz";
+       KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Replacement for pipewire-media-session"
+HOMEPAGE="https://gitlab.freedesktop.org/pipewire/wireplumber";
+
+LICENSE="MIT"
+SLOT="0/0.4"
+IUSE="systemd"
+
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+
+# introspection? ( dev-libs/gobject-introspection ) is valid but likely only 
used for doc building
+BDEPEND="
+       dev-libs/glib
+       dev-util/gdbus-codegen
+       dev-util/glib-utils
+"
+
+DEPEND="
+       ${LUA_DEPS}
+       >=dev-libs/glib-2.62
+       >=media-video/pipewire-0.3.26
+       virtual/libc
+       systemd? ( sys-apps/systemd )
+"
+
+# Any dev-lua/* deps get declared like this inside RDEPEND:
+#      $(lua_gen_cond_dep '
+#              dev-lua/<NAME>[${LUA_USEDEP}]
+#      ')
+RDEPEND="${DEPEND}"
+
+DOCS=( {NEWS,README}.rst )
+
+src_configure() {
+       local emesonargs=(
+               -Dintrospection=disabled # Only used for Sphinx doc generation
+               -Dsystem-lua=true # We always unbundle everything we can
+               -Dsystem-lua-version=$(ver_cut 1-2 $(lua_get_version))
+               $(meson_feature systemd)
+               -Dsystemd-system-service=false # Matches upstream
+               $(meson_use systemd systemd-user-service)
+               -Dsystemd-system-unit-dir=$(systemd_get_systemunitdir)
+               -Dsystemd-user-unit-dir=$(systemd_get_userunitdir)
+       )
+
+       meson_src_configure
+}
+
+pkg_postinst() {
+       if systemd_is_booted ; then
+               elog "To replace media-session with WirePlumber immediately:"
+               elog "systemctl --user disable --now 
pipewire-media-session.service"
+               elog "systemctl --user enable --now wireplumber.service"
+       else
+               elog "OpenRC users need to copy 
${EROOT}/usr/share/pipewire/pipewire.conf"
+               elog "to ${EROOT}/etc/pipewire/pipewire.conf and in it replace"
+               elog "${EROOT}/usr/bin/pipewire-media-session with 
${EROOT}/usr/bin/wireplumber"
+               elog "The switch to WirePlumber will happen the next time 
pipewire is started."
+       fi
+       elog
+}

diff --git a/profiles/targets/desktop/package.use 
b/profiles/targets/desktop/package.use
index 94c1b5d773e..65d0afd8ce3 100644
--- a/profiles/targets/desktop/package.use
+++ b/profiles/targets/desktop/package.use
@@ -3,7 +3,7 @@
 
 # Niklāvs Koļesņikovs <[email protected]> (2021-09-13)
 # WirePlumber obligatory links and embeds either Lua 5.3 or 5.4
-# interpreter with the later being the upstream default.
+# interpreter with the latter being the upstream default.
 media-video/wireplumber lua_single_target_lua5-4
 
 # Marek Szuba <[email protected]> (2020-12-24)

Reply via email to