summaryrefslogtreecommitdiff
path: root/x11/mate-session-manager/files
diff options
context:
space:
mode:
Diffstat (limited to 'x11/mate-session-manager/files')
-rw-r--r--x11/mate-session-manager/files/patch-configure92
-rw-r--r--x11/mate-session-manager/files/patch-mate-session_gsm-logout-dialog.c26
-rw-r--r--x11/mate-session-manager/files/patch-mate-session_gsm-manager.c64
3 files changed, 182 insertions, 0 deletions
diff --git a/x11/mate-session-manager/files/patch-configure b/x11/mate-session-manager/files/patch-configure
new file mode 100644
index 000000000000..03ccb0ce7efe
--- /dev/null
+++ b/x11/mate-session-manager/files/patch-configure
@@ -0,0 +1,92 @@
+--- configure.orig 2014-04-20 19:14:11.248250628 +0000
++++ configure 2014-04-20 19:14:11.260251121 +0000
+@@ -13329,7 +13329,89 @@
+ esac
+
+
++# We can only support old upower
+
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UPOWER" >&5
++$as_echo_n "checking for UPOWER... " >&6; }
++
++if test -n "$UPOWER_CFLAGS"; then
++ pkg_cv_UPOWER_CFLAGS="$UPOWER_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"upower-glib < 0.99.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "upower-glib < 0.99.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_UPOWER_CFLAGS=`$PKG_CONFIG --cflags "upower-glib < 0.99.0" 2>/dev/null`
++ test "x$?" != "x0" && pkg_failed=yes
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$UPOWER_LIBS"; then
++ pkg_cv_UPOWER_LIBS="$UPOWER_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"upower-glib < 0.99.0\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "upower-glib < 0.99.0") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_UPOWER_LIBS=`$PKG_CONFIG --libs "upower-glib < 0.99.0" 2>/dev/null`
++ test "x$?" != "x0" && pkg_failed=yes
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ UPOWER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "upower-glib < 0.99.0" 2>&1`
++ else
++ UPOWER_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "upower-glib < 0.99.0" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$UPOWER_PKG_ERRORS" >&5
++
++ have_old_upower=no
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++ have_old_upower=no
++else
++ UPOWER_CFLAGS=$pkg_cv_UPOWER_CFLAGS
++ UPOWER_LIBS=$pkg_cv_UPOWER_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++ have_old_upower=yes
++fi
++if test x$have_old_upower = xyes; then :
++
++
++$as_echo "#define HAVE_OLD_UPOWER 1" >>confdefs.h
++
++
++fi
++ if test x$have_old_upower = xyes; then
++ HAVE_OLD_UPOWER_TRUE=
++ HAVE_OLD_UPOWER_FALSE='#'
++else
++ HAVE_OLD_UPOWER_TRUE='#'
++ HAVE_OLD_UPOWER_FALSE=
++fi
+
+
+
diff --git a/x11/mate-session-manager/files/patch-mate-session_gsm-logout-dialog.c b/x11/mate-session-manager/files/patch-mate-session_gsm-logout-dialog.c
new file mode 100644
index 000000000000..83910fc665d4
--- /dev/null
+++ b/x11/mate-session-manager/files/patch-mate-session_gsm-logout-dialog.c
@@ -0,0 +1,26 @@
+--- mate-session/gsm-logout-dialog.c.orig 2014-03-05 20:39:13.000000000 +0000
++++ mate-session/gsm-logout-dialog.c 2014-04-20 18:19:12.537577789 +0000
+@@ -214,8 +214,10 @@
+ #if defined(HAVE_SYSTEMD) && defined(HAVE_UPOWER)
+ else
+ #endif
+-#ifdef HAVE_UPOWER
++#ifdef HAVE_OLD_UPOWER
+ ret = up_client_get_can_suspend (logout_dialog->priv->up_client);
++#else
++ ret = FALSE;
+ #endif
+ return ret;
+ }
+@@ -232,8 +234,10 @@
+ #if defined(HAVE_SYSTEMD) && defined(HAVE_UPOWER)
+ else
+ #endif
+-#ifdef HAVE_UPOWER
++#ifdef HAVE_OLD_UPOWER
+ ret = up_client_get_can_hibernate (logout_dialog->priv->up_client);
++#else
++ ret = FALSE;
+ #endif
+ return ret;
+ }
diff --git a/x11/mate-session-manager/files/patch-mate-session_gsm-manager.c b/x11/mate-session-manager/files/patch-mate-session_gsm-manager.c
new file mode 100644
index 000000000000..63d84cc82236
--- /dev/null
+++ b/x11/mate-session-manager/files/patch-mate-session_gsm-manager.c
@@ -0,0 +1,64 @@
+--- mate-session/gsm-manager.c.orig 2014-03-05 20:39:13.000000000 +0000
++++ mate-session/gsm-manager.c 2014-04-20 18:31:08.980429286 +0000
+@@ -1166,22 +1166,28 @@
+ #if defined(HAVE_SYSTEMD) && defined(HAVE_UPOWER)
+ else {
+ #endif
+-#ifdef HAVE_UPOWER
++#ifdef HAVE_OLD_UPOWER
+ can_hibernate = up_client_get_can_hibernate (manager->priv->up_client);
++#else
++ can_hibernate = FALSE;
++#endif
+ if (can_hibernate) {
+
+ /* lock the screen before we suspend */
+ manager_perhaps_lock (manager);
+
+ error = NULL;
++#ifdef HAVE_OLD_UPOWER
+ ret = up_client_hibernate_sync (manager->priv->up_client, NULL, &error);
++#else
++ ret = FALSE;
++#endif
+ if (!ret) {
+ g_warning ("Unexpected hibernate failure: %s",
+ error->message);
+ g_error_free (error);
+ }
+ }
+-#endif
+ #if defined(HAVE_SYSTEMD) && defined(HAVE_UPOWER)
+ }
+ #endif
+@@ -1211,22 +1217,28 @@
+ #if defined(HAVE_SYSTEMD) && defined(HAVE_UPOWER)
+ else {
+ #endif
+-#ifdef HAVE_UPOWER
++#ifdef HAVE_OLD_UPOWER
+ can_suspend = up_client_get_can_suspend (manager->priv->up_client);
++#else
++ can_suspend = FALSE;
++#endif
+ if (can_suspend) {
+
+ /* lock the screen before we suspend */
+ manager_perhaps_lock (manager);
+
+ error = NULL;
++#ifdef HAVE_OLD_UPOWER
+ ret = up_client_suspend_sync (manager->priv->up_client, NULL, &error);
++#else
++ ret = FALSE;
++#endif
+ if (!ret) {
+ g_warning ("Unexpected suspend failure: %s",
+ error->message);
+ g_error_free (error);
+ }
+ }
+-#endif
+ #if defined(HAVE_SYSTEMD) && defined(HAVE_UPOWER)
+ }
+ #endif