blob: f5d0f27fe8718d68065abef48aa93b7db63e007e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit meson
DESCRIPTION="UPower-powered power alerter"
HOMEPAGE="https://sr.ht/~kennylevinsen/poweralertd/"
SRC_URI="https://git.sr.ht/~kennylevinsen/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
IUSE="elogind systemd"
REQUIRED_USE="?? ( elogind systemd )"
RDEPEND="
sys-apps/dbus
sys-power/upower
elogind? ( sys-auth/elogind )
systemd? ( sys-apps/systemd )
!elogind? ( !systemd? ( sys-libs/basu ) )
"
DEPEND="${RDEPEND}"
BDEPEND="
app-text/scdoc
virtual/pkgconfig
"
src_prepare() {
default
# Upstream probes basu, libelogind and libsystemd in that order and
# links against whichever turns up first; make it follow the USE
# flag
if use systemd; then
sed -i -e 's/^if basu.found()/if false/' \
-e 's/^elif elogind.found()/elif false/' meson.build || die
elif use elogind; then
sed -i -e 's/^if basu.found()/if false/' meson.build || die
fi
}
src_configure() {
local emesonargs=(
-Dman-pages=enabled
)
meson_src_configure
}
|