summaryrefslogtreecommitdiff
path: root/user/mate-session-manager
diff options
context:
space:
mode:
Diffstat (limited to 'user/mate-session-manager')
-rw-r--r--user/mate-session-manager/APKBUILD39
-rw-r--r--user/mate-session-manager/no-systemd.patch65
2 files changed, 104 insertions, 0 deletions
diff --git a/user/mate-session-manager/APKBUILD b/user/mate-session-manager/APKBUILD
new file mode 100644
index 000000000..09ee4cc78
--- /dev/null
+++ b/user/mate-session-manager/APKBUILD
@@ -0,0 +1,39 @@
+# Contributor: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com>
+pkgname=mate-session-manager
+pkgver=1.22.0
+pkgrel=0
+pkgdesc="Session manager for the MATE desktop environment"
+url="https://mate-desktop.org"
+arch="all"
+license="GPL-2.0+ AND LGPL-2.0+"
+depends=""
+makedepends="dbus-glib-dev gtk+3.0-dev intltool libsm-dev"
+subpackages="$pkgname-doc $pkgname-lang"
+source="https://pub.mate-desktop.org/releases/${pkgver%.*}/mate-session-manager-$pkgver.tar.xz
+ no-systemd.patch"
+
+build() {
+ cd "$builddir"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var
+ make
+}
+
+check() {
+ cd "$builddir"
+ make check
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="7e5e21e37c7ac55ca7d71302edef9aabeccf39233aec9edfe93a2fdcd4150d039e8121adecebb3d0a4a707eccef0c7afa1b54c5b52b57853242964c7506eeb9a mate-session-manager-1.22.0.tar.xz
+ea84e562b3a5d08b373f270d8d5fa9eeae9b803e3eb4ef925c31bad0e4e185eecfcff5465864a4a449fc5cade000b3ee18dea515744fcb59ac2efaf9df420a43 no-systemd.patch"
diff --git a/user/mate-session-manager/no-systemd.patch b/user/mate-session-manager/no-systemd.patch
new file mode 100644
index 000000000..79c19f34a
--- /dev/null
+++ b/user/mate-session-manager/no-systemd.patch
@@ -0,0 +1,65 @@
+From 254a091b31517a25bc037b31daff27fbb74ac90d Mon Sep 17 00:00:00 2001
+From: Victor Kareh <vkareh@redhat.com>
+Date: Wed, 6 Mar 2019 09:20:36 -0500
+Subject: [PATCH] Guard against missing systemd
+
+---
+ mate-session/gsm-systemd.c | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/mate-session/gsm-systemd.c b/mate-session/gsm-systemd.c
+index da3f23b..d03cafd 100644
+--- a/mate-session/gsm-systemd.c
++++ b/mate-session/gsm-systemd.c
+@@ -429,16 +429,31 @@ gsm_systemd_is_last_session_for_user (GsmSystemd *manager)
+ gboolean is_last_session;
+ int ret, i;
+
++#ifdef HAVE_SYSTEMD
+ ret = sd_pid_get_session (getpid (), &session);
++#endif
++
++ if (session == NULL) {
++ return FALSE;
++ }
+
+ if (ret != 0) {
++ free (session);
+ return FALSE;
+ }
+
++#ifdef HAVE_SYSTEMD
+ ret = sd_uid_get_sessions (getuid (), FALSE, &sessions);
++#endif
++
++ if (sessions == NULL) {
++ free (session);
++ return FALSE;
++ }
+
+ if (ret <= 0) {
+ free (session);
++ free (sessions);
+ return FALSE;
+ }
+
+@@ -450,7 +465,9 @@ gsm_systemd_is_last_session_for_user (GsmSystemd *manager)
+ if (g_strcmp0 (sessions[i], session) == 0)
+ continue;
+
++#ifdef HAVE_SYSTEMD
+ ret = sd_session_get_state (sessions[i], &state);
++#endif
+
+ if (ret != 0)
+ continue;
+@@ -461,7 +478,9 @@ gsm_systemd_is_last_session_for_user (GsmSystemd *manager)
+ }
+ free (state);
+
++#ifdef HAVE_SYSTEMD
+ ret = sd_session_get_type (sessions[i], &type);
++#endif
+
+ if (ret != 0)
+ continue;