mate-extra/mate-system-monitor: Add USE elogind
authorAndreas Sturmlechner <asturm@gentoo.org>
Sun, 31 Mar 2019 09:33:42 +0000 (11:33 +0200)
committerAndreas Sturmlechner <asturm@gentoo.org>
Sun, 31 Mar 2019 10:47:31 +0000 (12:47 +0200)
Bug: https://bugs.gentoo.org/681334
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
mate-extra/mate-system-monitor/mate-system-monitor-1.22.0.ebuild

index 58b518131b091e13c11a2a01ae1a675db4580341..2df1fb376d2548d12dbb3a1132f268bfa0f2f685 100644 (file)
@@ -10,10 +10,12 @@ if [[ ${PV} != 9999 ]]; then
 fi
 
 DESCRIPTION="The MATE System Monitor"
+
 LICENSE="GPL-2"
 SLOT="0"
+IUSE="elogind systemd"
 
-IUSE="systemd"
+REQUIRED_USE="?? ( elogind systemd )"
 
 COMMON_DEPEND="
        >=dev-cpp/glibmm-2.26:2
@@ -28,6 +30,7 @@ COMMON_DEPEND="
        >=x11-libs/gtk+-3.22:3
        >=x11-libs/libwnck-3.0:3
        virtual/libintl
+       elogind? ( sys-auth/elogind )
        systemd? ( sys-apps/systemd )"
 
 RDEPEND="${COMMON_DEPEND}
@@ -41,6 +44,19 @@ DEPEND="${COMMON_DEPEND}
        virtual/pkgconfig:*"
 
 src_configure() {
-       mate_src_configure \
-               $(use_enable systemd)
+       local myconf=()
+
+       if use elogind || use systemd; then
+               myconf+=( --enable-systemd )
+               if use elogind; then
+                       myconf+=(
+                               SYSTEMD_CFLAGS=`pkg-config --cflags "libelogind" 2>/dev/null`
+                               SYSTEMD_LIBS=`pkg-config --libs "libelogind" 2>/dev/null`
+                       )
+               fi
+       else
+               myconf+=( --disable-systemd )
+       fi
+
+       mate_src_configure "${myconf[@]}"
 }