1 # Copyright 1999-2025 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 # 1. Please regularly check (even at the point of bumping) Fedora's packaging
7 # for needed backports at https://src.fedoraproject.org/rpms/wireplumber/tree/rawhide
9 # 2. Keep an eye on git master (for both PipeWire and WirePlumber) as things
10 # continue to move quickly. It's not uncommon for fixes to be made shortly
13 LUA_COMPAT=( lua5-{3,4} )
15 inherit lua-single meson systemd
17 DESCRIPTION="Replacement for pipewire-media-session"
18 HOMEPAGE="https://gitlab.freedesktop.org/pipewire/wireplumber"
20 if [[ ${PV} == 9999 ]]; then
21 EGIT_REPO_URI="https://gitlab.freedesktop.org/pipewire/${PN}.git"
25 SRC_URI="https://gitlab.freedesktop.org/pipewire/${PN}/-/archive/${PV}/${P}.tar.bz2"
26 KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86"
31 IUSE="elogind system-service systemd test"
35 ?? ( elogind systemd )
36 system-service? ( systemd )
39 RESTRICT="!test? ( test )"
41 # introspection? ( dev-libs/gobject-introspection ) is valid but likely only used for doc building
44 dev-util/gdbus-codegen
47 test? ( sys-apps/dbus )
52 >=media-video/pipewire-1.0.5-r1:=
54 elogind? ( sys-auth/elogind )
55 systemd? ( sys-apps/systemd )
65 DOCS=( {NEWS,README}.rst )
68 # Defer enabling sound server parts to media-video/pipewire
69 # TODO: Soon, we should be able to migrate to just a dropin at
70 # /usr/share. See https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/652#note_2399735.
71 "${FILESDIR}"/${PN}-0.5.6-config-disable-sound-server-parts.patch
79 # Ebuild not wired up yet (Sphinx, Doxygen?)
81 # Only used for Sphinx doc generation
82 -Dintrospection=disabled
84 -Dsystem-lua-version=$(ver_cut 1-2 $(lua_get_version))
85 $(meson_feature elogind)
86 $(meson_feature systemd)
87 $(meson_use system-service systemd-system-service)
88 $(meson_use systemd systemd-user-service)
89 -Dsystemd-system-unit-dir=$(systemd_get_systemunitdir)
90 -Dsystemd-user-unit-dir=$(systemd_get_userunitdir)
91 $(meson_use test tests)
92 $(meson_use test dbus-tests)
101 mv "${ED}"/usr/share/doc/wireplumber/* "${ED}"/usr/share/doc/${PF} || die
102 rmdir "${ED}"/usr/share/doc/wireplumber || die
106 if systemd_is_booted ; then
107 ewarn "pipewire-media-session.service is no longer installed. You must switch"
108 ewarn "to wireplumber.service user unit before your next logout/reboot:"
109 ewarn "systemctl --user disable pipewire-media-session.service"
110 ewarn "systemctl --user --force enable wireplumber.service"
112 ewarn "Switch to WirePlumber will happen the next time gentoo-pipewire-launcher"
113 ewarn "is started (a replacement for directly calling pipewire binary)."
115 ewarn "Please ensure that ${EROOT}/etc/pipewire/pipewire.conf either does not exist"
116 ewarn "or, if it does exist, that any reference to"
117 ewarn "${EROOT}/usr/bin/pipewire-media-session is commented out (begins with a #)."
120 if use system-service; then
122 ewarn "WARNING: you have enabled the system-service USE flag, which installs"
123 ewarn "the system-wide systemd units that enable WirePlumber to run as a system"
124 ewarn "service. This is more than likely NOT what you want. You are strongly"
125 ewarn "advised not to enable this mode and instead stick with systemd user"
126 ewarn "units. The default configuration files will likely not work out of"
127 ewarn "box, and you are on your own with configuration."