summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMart Raudsepp <leio@gentoo.org>2019-03-19 11:53:29 +0200
committerMart Raudsepp <leio@gentoo.org>2019-03-19 11:53:50 +0200
commit1884b78144b57878b7e7497e6f7c62d5b4562b6a (patch)
tree691d140cc818c86e1545c664942bf64caafc1d73 /gnome-base
parentmate-base/mate-applets: fix cpufreq patch (diff)
downloadgentoo-1884b78144b57878b7e7497e6f7c62d5b4562b6a.tar.gz
gentoo-1884b78144b57878b7e7497e6f7c62d5b4562b6a.tar.bz2
gentoo-1884b78144b57878b7e7497e6f7c62d5b4562b6a.zip
gnome-base/gnome-session: add elogind support
Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Mart Raudsepp <leio@gentoo.org>
Diffstat (limited to 'gnome-base')
-rw-r--r--gnome-base/gnome-session/files/3.30.1-elogind-support.patch67
-rw-r--r--gnome-base/gnome-session/gnome-session-3.30.1-r1.ebuild (renamed from gnome-base/gnome-session/gnome-session-3.30.1.ebuild)15
-rw-r--r--gnome-base/gnome-session/metadata.xml1
3 files changed, 80 insertions, 3 deletions
diff --git a/gnome-base/gnome-session/files/3.30.1-elogind-support.patch b/gnome-base/gnome-session/files/3.30.1-elogind-support.patch
new file mode 100644
index 00000000000..4f1c5dab9dd
--- /dev/null
+++ b/gnome-base/gnome-session/files/3.30.1-elogind-support.patch
@@ -0,0 +1,67 @@
+From 92072c73ab74ebe0654ac5bd4f9fd2182181ee9d Mon Sep 17 00:00:00 2001
+From: Mart Raudsepp <leio@gentoo.org>
+Date: Tue, 19 Mar 2019 11:00:21 +0200
+Subject: [PATCH] meson: Support elogind
+
+---
+ meson.build | 12 +++++++++---
+ meson_options.txt | 1 +
+ 2 files changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index afc97457..7c32e3b9 100644
+--- a/meson.build
++++ b/meson.build
+@@ -121,8 +121,10 @@ session_tracking = 'null backend'
+
+ enable_systemd = get_option('systemd')
+ enable_systemd_journal = get_option('systemd_journal')
++enable_elogind = get_option('elogind')
+ enable_consolekit = get_option('consolekit')
+-if enable_systemd or enable_consolekit
++assert(not (enable_systemd and enable_elogind), 'Can not support systemd and elogind at once')
++if enable_systemd or enable_elogind or enable_consolekit
+ session_bin_deps += dependency('gio-unix-2.0', version: glib_req_version)
+
+ # Check for systemd
+@@ -145,6 +147,10 @@ if enable_systemd or enable_consolekit
+ endif
+
+ session_tracking = 'systemd'
++ elif enable_elogind
++ libelogind_dep = dependency('libelogind', version: '>= 239.4')
++ session_bin_deps += libelogind_dep
++ session_tracking = 'elogind'
+ endif
+
+ # Check for ConsoleKit
+@@ -154,14 +160,14 @@ if enable_systemd or enable_consolekit
+
+ session_bin_deps += dbus_glib_dep
+
+- if enable_systemd
++ if enable_systemd or enable_elogind
+ session_tracking += ' (with fallback to ConsoleKit)'
+ else
+ session_tracking = 'ConsoleKit'
+ endif
+ endif
+ endif
+-config_h.set('HAVE_SYSTEMD', enable_systemd)
++config_h.set('HAVE_SYSTEMD', enable_systemd or enable_elogind)
+ config_h.set('ENABLE_SYSTEMD_JOURNAL', enable_systemd_journal)
+ config_h.set('HAVE_CONSOLEKIT', enable_consolekit)
+
+diff --git a/meson_options.txt b/meson_options.txt
+index 05174fec..cd85eae8 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,4 +1,5 @@
+ option('deprecation_flags', type: 'boolean', value: false, description: 'use *_DISABLE_DEPRECATED flags')
++option('elogind', type: 'boolean', value: true, description: 'Use elogind')
+ option('session_selector', type: 'boolean', value: false, description: 'enable building a custom session selector dialog')
+ option('systemd', type: 'boolean', value: true, description: 'Use systemd')
+ option('systemd_journal', type: 'boolean', value:'true', description: 'Send log to systemd-journal')
+--
+2.17.0
+
diff --git a/gnome-base/gnome-session/gnome-session-3.30.1.ebuild b/gnome-base/gnome-session/gnome-session-3.30.1-r1.ebuild
index 8674fec66da..f62cbf2858f 100644
--- a/gnome-base/gnome-session/gnome-session-3.30.1.ebuild
+++ b/gnome-base/gnome-session/gnome-session-3.30.1-r1.ebuild
@@ -10,7 +10,10 @@ HOMEPAGE="https://gitlab.gnome.org/GNOME/gnome-session"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
-IUSE="consolekit doc systemd"
+IUSE="consolekit doc elogind systemd"
+# There is a null backend available, thus ?? not ^^
+# consolekit can be enabled alone, or together with a logind provider; in latter case CK is used as fallback
+REQUIRED_USE="?? ( elogind systemd )"
COMMON_DEPEND="
>=dev-libs/glib-2.46.0:2
@@ -25,6 +28,7 @@ COMMON_DEPEND="
x11-libs/libXcomposite
systemd? ( >=sys-apps/systemd-183:0= )
+ elogind? ( >=sys-auth/elogind-239.4 )
consolekit? ( >=dev-libs/dbus-glib-0.76 )
"
@@ -57,6 +61,10 @@ DEPEND="${COMMON_DEPEND}
app-text/docbook-xml-dtd:4.1.2 )
"
+PATCHES=(
+ "${FILESDIR}"/${PV}-elogind-support.patch
+)
+
src_prepare() {
xdg_src_prepare
# Install USE=doc in $PF if enabled
@@ -66,6 +74,7 @@ src_prepare() {
src_configure() {
local emesonargs=(
-Ddeprecation_flags=false
+ $(meson_use elogind)
-Dsession_selector=true # gnome-custom-session
$(meson_use systemd)
$(meson_use systemd systemd_journal)
@@ -108,8 +117,8 @@ pkg_postinst() {
ewarn "make sure that the commands in the xinitrc.d scripts are run."
fi
- if ! use systemd && ! use consolekit; then
- ewarn "You are building without systemd and/or consolekit support."
+ if ! use systemd && ! use elogind && ! use consolekit; then
+ ewarn "You are building without systemd, elogind and/or consolekit support."
ewarn "gnome-session won't be able to correctly track and manage your session."
fi
}
diff --git a/gnome-base/gnome-session/metadata.xml b/gnome-base/gnome-session/metadata.xml
index 506e4f9e5c5..0a5d0e69d17 100644
--- a/gnome-base/gnome-session/metadata.xml
+++ b/gnome-base/gnome-session/metadata.xml
@@ -7,5 +7,6 @@
</maintainer>
<use>
<flag name="consolekit">Support <pkg>sys-auth/consolekit</pkg> for session tracking</flag>
+ <flag name="elogind">Support <pkg>sys-auth/elogind</pkg> for session tracking</flag>
</use>
</pkgmetadata>