summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorRaghav Gururajan <raghavgururajan@disroot.org>2020-09-07 06:45:37 -0400
committerDanny Milosavljevic <dannym@scratchpost.org>2020-09-07 13:53:35 +0200
commit3326cca406edca874993b71d71cc01dbf49087c8 (patch)
treee53bdc3eb5fbc34427df0b523112476e4be67704 /gnu/packages
parentba3144ebc7de301fa50d098831abc3e81004401b (diff)
downloadguix-3326cca406edca874993b71d71cc01dbf49087c8.tar.gz
gnu: gnome-session: Support elogind.
* gnu/packages/patches/gnome-session-elogind.patch: New file.
* gnu/packages/gnome.scm (gnome-session) [patches]: Add it.
* gnu/local.mk (dist_patch_DATA): Add it.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/gnome.scm7
-rw-r--r--gnu/packages/patches/gnome-session-elogind.patch68
2 files changed, 73 insertions, 2 deletions
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 058d245a0b..446883c777 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -8183,7 +8183,9 @@ the archive.")
                        (version-major+minor version) "/"
                        name "-" version ".tar.xz"))
        (sha256
-        (base32 "0ymvf1bap35348rpjqp63qwnwnnawdwi4snch95zc4n832w3hjym"))))
+        (base32 "0ymvf1bap35348rpjqp63qwnwnnawdwi4snch95zc4n832w3hjym"))
+       (patches
+        (search-patches "gnome-session-elogind.patch"))))
     (build-system meson-build-system)
     (outputs '("out" "doc"))
     (arguments
@@ -8235,7 +8237,8 @@ the archive.")
        ("xmlto" ,xmlto)
        ("xsltproc" ,libxslt)))
     (inputs
-     `(("epoxy" ,libepoxy)
+     `(("elogind" ,elogind)
+       ("epoxy" ,libepoxy)
        ("glib" ,glib)
        ("gnome-desktop" ,gnome-desktop)
        ("gtk+" ,gtk+)
diff --git a/gnu/packages/patches/gnome-session-elogind.patch b/gnu/packages/patches/gnome-session-elogind.patch
new file mode 100644
index 0000000000..b5b7097474
--- /dev/null
+++ b/gnu/packages/patches/gnome-session-elogind.patch
@@ -0,0 +1,68 @@
+From c0b4093e68850cc0ac612edf454c3f567e40b68f Mon Sep 17 00:00:00 2001
+From: Mart Raudsepp <leio@gentoo.org>
+Date: Sun, 15 Mar 2020 14:34:39 +0200
+Subject: [PATCH 15/15] 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 7190aad9..df3e19bd 100644
+--- a/meson.build
++++ b/meson.build
+@@ -123,8 +123,10 @@ enable_systemd = get_option('systemd')
+ enable_systemd_session = get_option('systemd_session') != 'disable'
+ use_systemd_session = get_option('systemd_session') == 'default'
+ 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
+@@ -147,6 +149,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
+@@ -156,7 +162,7 @@ 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'
+@@ -166,7 +172,7 @@ endif
+ if enable_systemd_session
+   assert(enable_systemd, 'Systemd support must be enabled when using systemd session management')
+ endif
+-config_h.set('HAVE_SYSTEMD', enable_systemd)
++config_h.set('HAVE_SYSTEMD', enable_systemd or enable_elogind)
+ config_h.set('ENABLE_SYSTEMD_SESSION', enable_systemd_session)
+ 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 4c05dc6e..512d1528 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_session', type: 'combo', choices: ['disable', 'enable', 'default'], value: 'default', description: 'Whether to include systemd session support and use it by default')
+-- 
+2.20.1
+