dev-python/mpmath: Bump to 1.4.0_alpha4
[gentoo/gentoo.git] / media-video / wireplumber / wireplumber-0.5.7.ebuild
blobd1f979b31c3aaec47d71ae73abdd846091f78c6f
1 # Copyright 1999-2025 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
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
11 # after releases.
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"
22         EGIT_BRANCH="master"
23         inherit git-r3
24 else
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"
29 LICENSE="MIT"
30 SLOT="0/0.5"
31 IUSE="elogind system-service systemd test"
33 REQUIRED_USE="
34         ${LUA_REQUIRED_USE}
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
42 BDEPEND="
43         dev-libs/glib
44         dev-util/gdbus-codegen
45         dev-util/glib-utils
46         sys-devel/gettext
47         test? ( sys-apps/dbus )
49 DEPEND="
50         ${LUA_DEPS}
51         >=dev-libs/glib-2.68
52         >=media-video/pipewire-1.0.5-r1:=
53         virtual/libintl
54         elogind? ( sys-auth/elogind )
55         systemd? ( sys-apps/systemd )
57 RDEPEND="
58         ${DEPEND}
59         system-service? (
60                 acct-user/pipewire
61                 acct-group/pipewire
62         )
65 DOCS=( {NEWS,README}.rst )
67 PATCHES=(
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
74 src_configure() {
75         local emesonargs=(
76                 -Ddaemon=true
77                 -Dtools=true
78                 -Dmodules=true
79                 # Ebuild not wired up yet (Sphinx, Doxygen?)
80                 -Ddoc=disabled
81                 # Only used for Sphinx doc generation
82                 -Dintrospection=disabled
83                 -Dsystem-lua=true
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)
93         )
95         meson_src_configure
98 src_install() {
99         meson_src_install
101         mv "${ED}"/usr/share/doc/wireplumber/* "${ED}"/usr/share/doc/${PF} || die
102         rmdir "${ED}"/usr/share/doc/wireplumber || die
105 pkg_postinst() {
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"
111         else
112                 ewarn "Switch to WirePlumber will happen the next time gentoo-pipewire-launcher"
113                 ewarn "is started (a replacement for directly calling pipewire binary)."
114                 ewarn
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 #)."
118         fi
120         if use system-service; then
121                 ewarn
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."
128                 ewarn
129         fi