commit:     ff46897d6fa08727f2f8b25f633aafacf854103b
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 31 09:33:42 2019 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Mar 31 10:47:31 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff46897d

mate-extra/mate-system-monitor: Add USE elogind

Bug: https://bugs.gentoo.org/681334
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../mate-system-monitor-1.22.0.ebuild              | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/mate-extra/mate-system-monitor/mate-system-monitor-1.22.0.ebuild 
b/mate-extra/mate-system-monitor/mate-system-monitor-1.22.0.ebuild
index 58b518131b0..2df1fb376d2 100644
--- a/mate-extra/mate-system-monitor/mate-system-monitor-1.22.0.ebuild
+++ b/mate-extra/mate-system-monitor/mate-system-monitor-1.22.0.ebuild
@@ -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[@]}"
 }

Reply via email to