summaryrefslogtreecommitdiff
path: root/mate-base
diff options
context:
space:
mode:
authorV3n3RiX <venerix@gmail.com>2014-11-27 22:03:42 +0200
committerV3n3RiX <venerix@gmail.com>2014-11-27 22:03:42 +0200
commit0971bb357193d59a1a43d571c9e7ce33a3071e4c (patch)
tree248dc0fb0a0013d339457939d38cf70d624b6b02 /mate-base
parentd55d89880e9b049cd8b858ea15f676b94eb313c3 (diff)
cherry pick mate-session-manager upower1 API support
Diffstat (limited to 'mate-base')
-rw-r--r--mate-base/mate-session-manager/files/mate-session-manager-upower1.patch86
-rw-r--r--mate-base/mate-session-manager/mate-session-manager-1.8.1-r1.ebuild5
2 files changed, 90 insertions, 1 deletions
diff --git a/mate-base/mate-session-manager/files/mate-session-manager-upower1.patch b/mate-base/mate-session-manager/files/mate-session-manager-upower1.patch
new file mode 100644
index 00000000..8c86a1c6
--- /dev/null
+++ b/mate-base/mate-session-manager/files/mate-session-manager-upower1.patch
@@ -0,0 +1,86 @@
+From 80be90bb422ef8cb5a28c7ff3fe2a337dce8c368 Mon Sep 17 00:00:00 2001
+From: Stefano Karapetsas <stefano@karapetsas.com>
+Date: Tue, 22 Apr 2014 16:44:37 +0000
+Subject: Allow to build with upower 0.99
+
+---
+diff --git a/mate-session/gsm-logout-dialog.c b/mate-session/gsm-logout-dialog.c
+index da3d651..697b70d 100644
+--- a/mate-session/gsm-logout-dialog.c
++++ b/mate-session/gsm-logout-dialog.c
+@@ -211,10 +211,10 @@ gsm_logout_supports_system_suspend (GsmLogoutDialog *logout_dialog)
+ if (LOGIND_RUNNING())
+ ret = gsm_systemd_can_suspend (logout_dialog->priv->systemd);
+ #endif
+-#if defined(HAVE_SYSTEMD) && defined(HAVE_UPOWER)
++#if defined(HAVE_SYSTEMD) && defined(HAVE_UPOWER) && !UP_CHECK_VERSION(0, 99, 0)
+ else
+ #endif
+-#ifdef HAVE_UPOWER
++#if defined(HAVE_UPOWER) && !UP_CHECK_VERSION(0, 99, 0)
+ ret = up_client_get_can_suspend (logout_dialog->priv->up_client);
+ #endif
+ return ret;
+@@ -229,10 +229,10 @@ gsm_logout_supports_system_hibernate (GsmLogoutDialog *logout_dialog)
+ if (LOGIND_RUNNING())
+ ret = gsm_systemd_can_hibernate (logout_dialog->priv->systemd);
+ #endif
+-#if defined(HAVE_SYSTEMD) && defined(HAVE_UPOWER)
++#if defined(HAVE_SYSTEMD) && defined(HAVE_UPOWER) && !UP_CHECK_VERSION(0, 99, 0)
+ else
+ #endif
+-#ifdef HAVE_UPOWER
++#if defined(HAVE_UPOWER) && !UP_CHECK_VERSION(0, 99, 0)
+ ret = up_client_get_can_hibernate (logout_dialog->priv->up_client);
+ #endif
+ return ret;
+diff --git a/mate-session/gsm-manager.c b/mate-session/gsm-manager.c
+index eda565b..638ef10 100644
+--- a/mate-session/gsm-manager.c
++++ b/mate-session/gsm-manager.c
+@@ -1163,10 +1163,10 @@ manager_attempt_hibernate (GsmManager *manager)
+ gsm_systemd_attempt_hibernate (systemd);
+ }
+ #endif
+-#if defined(HAVE_SYSTEMD) && defined(HAVE_UPOWER)
++#if defined(HAVE_SYSTEMD) && defined(HAVE_UPOWER) && !UP_CHECK_VERSION(0, 99, 0)
+ else {
+ #endif
+-#ifdef HAVE_UPOWER
++#if defined(HAVE_UPOWER) && !UP_CHECK_VERSION(0, 99, 0)
+ can_hibernate = up_client_get_can_hibernate (manager->priv->up_client);
+ if (can_hibernate) {
+
+@@ -1182,7 +1182,7 @@ manager_attempt_hibernate (GsmManager *manager)
+ }
+ }
+ #endif
+-#if defined(HAVE_SYSTEMD) && defined(HAVE_UPOWER)
++#if defined(HAVE_SYSTEMD) && defined(HAVE_UPOWER) && !UP_CHECK_VERSION(0, 99, 0)
+ }
+ #endif
+ }
+@@ -1208,10 +1208,10 @@ manager_attempt_suspend (GsmManager *manager)
+ gsm_systemd_attempt_suspend (systemd);
+ }
+ #endif
+-#if defined(HAVE_SYSTEMD) && defined(HAVE_UPOWER)
++#if defined(HAVE_SYSTEMD) && defined(HAVE_UPOWER) && !UP_CHECK_VERSION(0, 99, 0)
+ else {
+ #endif
+-#ifdef HAVE_UPOWER
++#if defined(HAVE_UPOWER) && !UP_CHECK_VERSION(0, 99, 0)
+ can_suspend = up_client_get_can_suspend (manager->priv->up_client);
+ if (can_suspend) {
+
+@@ -1227,7 +1227,7 @@ manager_attempt_suspend (GsmManager *manager)
+ }
+ }
+ #endif
+-#if defined(HAVE_SYSTEMD) && defined(HAVE_UPOWER)
++#if defined(HAVE_SYSTEMD) && defined(HAVE_UPOWER) && !UP_CHECK_VERSION(0, 99, 0)
+ }
+ #endif
+ }
+--
+cgit
diff --git a/mate-base/mate-session-manager/mate-session-manager-1.8.1-r1.ebuild b/mate-base/mate-session-manager/mate-session-manager-1.8.1-r1.ebuild
index 8ae67dd8..9d848576 100644
--- a/mate-base/mate-session-manager/mate-session-manager-1.8.1-r1.ebuild
+++ b/mate-base/mate-session-manager/mate-session-manager-1.8.1-r1.ebuild
@@ -46,7 +46,7 @@ RDEPEND=">=dev-libs/dbus-glib-0.76
elibc_FreeBSD? ( dev-libs/libexecinfo )
gnome-keyring? ( gnome-base/gnome-keyring )
systemd? ( sys-apps/systemd )
- upower? ( >=sys-power/upower-pm-utils-0.9.23 )"
+ upower? ( >=sys-power/upower-0.9.23 )"
DEPEND="${RDEPEND}
>=dev-util/intltool-0.40:*
@@ -64,6 +64,9 @@ src_prepare() {
# Fix race condition in idle monitor, GNOME bug applies to MATE too,
# see https://bugzilla.gnome.org/show_bug.cgi?id=627903
epatch "${FILESDIR}"/${PN}-1.2.0-idle-transition.patch
+ # allow to build with upower1
+ # cherry picked from http://git.mate-desktop.org/mate-session-manager/commit/?id=80be90bb422ef8cb5a28c7ff3fe2a337dce8c368
+ epatch "${FILESDIR}"/${PN}-upower1.patch
eautoreconf
gnome2_src_prepare