Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git sysutils/mate-power-manager/files/patch-configure sysutils/mate-power-manager/files/patch-configure
- new file mode 100644
- index 0000000..26dd034
- --- /dev/null
- +++ sysutils/mate-power-manager/files/patch-configure
- @@ -0,0 +1,93 @@
- +--- configure.orig 2014-04-20 19:21:13.253223081 +0000
- ++++ configure 2014-04-20 19:23:58.216210372 +0000
- +@@ -13884,6 +13884,90 @@
- + ;;
- + 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
- ++
- +
- + pkg_failed=no
- + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5
- diff --git sysutils/mate-power-manager/files/patch-src_gpm-control.c sysutils/mate-power-manager/files/patch-src_gpm-control.c
- new file mode 100644
- index 0000000..93111de
- --- /dev/null
- +++ sysutils/mate-power-manager/files/patch-src_gpm-control.c
- @@ -0,0 +1,26 @@
- +--- src/gpm-control.c.orig 2014-04-20 19:32:33.624174324 +0000
- ++++ src/gpm-control.c 2014-04-20 19:33:52.860168682 +0000
- +@@ -290,7 +290,11 @@
- + g_object_unref(proxy);
- + }
- + else {
- ++#ifdef HAVE_OLD_UPOWER
- + ret = up_client_suspend_sync (control->priv->client, NULL, error);
- ++#else
- ++ ret = FALSE;
- ++#endif
- + }
- +
- + egg_debug ("emitting resume");
- +@@ -400,7 +404,11 @@
- + }
- + }
- + else {
- ++#ifdef HAVE_OLD_UPOWER
- + ret = up_client_hibernate_sync (control->priv->client, NULL, error);
- ++#else
- ++ ret = FALSE;
- ++#endif
- + }
- +
- + egg_debug ("emitting resume");
- diff --git sysutils/mate-power-manager/files/patch-src_gpm-engine.c sysutils/mate-power-manager/files/patch-src_gpm-engine.c
- new file mode 100644
- index 0000000..b90ba56
- --- /dev/null
- +++ sysutils/mate-power-manager/files/patch-src_gpm-engine.c
- @@ -0,0 +1,14 @@
- +--- src/gpm-engine.c.orig 2014-04-20 19:34:27.136166463 +0000
- ++++ src/gpm-engine.c 2014-04-20 19:35:40.970161631 +0000
- +@@ -812,7 +812,11 @@
- + g_return_val_if_fail (GPM_IS_ENGINE (engine), FALSE);
- +
- + /* get devices from UPower */
- ++#ifdef HAVE_OLD_UPOWER
- + ret = up_client_enumerate_devices_sync (engine->priv->client, NULL, &error);
- ++#else
- ++ ret = FALSE;
- ++#endif
- + if (!ret) {
- + egg_error ("failed to get device list: %s", error->message);
- + g_error_free (error);
- diff --git sysutils/mate-power-manager/files/patch-src_gpm-prefs-core.c sysutils/mate-power-manager/files/patch-src_gpm-prefs-core.c
- new file mode 100644
- index 0000000..47b3a72
- --- /dev/null
- +++ sysutils/mate-power-manager/files/patch-src_gpm-prefs-core.c
- @@ -0,0 +1,28 @@
- +--- src/gpm-prefs-core.c.orig 2014-04-20 19:36:10.387159774 +0000
- ++++ src/gpm-prefs-core.c 2014-04-20 19:38:42.711413590 +0000
- +@@ -898,8 +898,13 @@
- + /* are we allowed to shutdown? */
- + egg_console_kit_can_stop (prefs->priv->console, &prefs->priv->can_shutdown, NULL);
- + /* get values from UpClient */
- ++#ifdef HAVE_OLD_UPOWER
- + prefs->priv->can_suspend = up_client_get_can_suspend (prefs->priv->client);
- + prefs->priv->can_hibernate = up_client_get_can_hibernate (prefs->priv->client);
- ++#else
- ++ prefs->priv->can_suspend = FALSE;
- ++ prefs->priv->can_hibernate = FALSE;
- ++#endif
- + }
- +
- + if (LOGIND_RUNNING()) {
- +@@ -955,7 +960,11 @@
- + g_object_unref (brightness);
- +
- + /* get device list */
- ++#ifdef HAVE_OLD_UPOWER
- + ret = up_client_enumerate_devices_sync (prefs->priv->client, NULL, &error);
- ++#else
- ++ ret = FALSE;
- ++#endif
- + if (!ret) {
- + egg_warning ("failed to get device list: %s", error->message);
- + g_error_free (error);
- diff --git sysutils/mate-power-manager/files/patch-src_gpm-statistics.c sysutils/mate-power-manager/files/patch-src_gpm-statistics.c
- new file mode 100644
- index 0000000..faa3bc2
- --- /dev/null
- +++ sysutils/mate-power-manager/files/patch-src_gpm-statistics.c
- @@ -0,0 +1,14 @@
- +--- src/gpm-statistics.c.orig 2014-04-20 19:31:29.658178466 +0000
- ++++ src/gpm-statistics.c 2014-04-20 19:32:20.889177637 +0000
- +@@ -1796,7 +1796,11 @@
- + g_signal_connect (wakeups, "data-changed", G_CALLBACK (gpm_stats_data_changed_cb), NULL);
- +
- + /* coldplug */
- ++#ifdef HAVE_OLD_UPOWER
- + ret = up_client_enumerate_devices_sync (client, NULL, NULL);
- ++#else
- ++ ret = FALSE;
- ++#endif
- + if (!ret)
- + goto out;
- + devices = up_client_get_devices (client);
- diff --git x11/mate-session-manager/files/patch-configure x11/mate-session-manager/files/patch-configure
- new file mode 100644
- index 0000000..03ccb0c
- --- /dev/null
- +++ 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 x11/mate-session-manager/files/patch-mate-session_gsm-logout-dialog.c x11/mate-session-manager/files/patch-mate-session_gsm-logout-dialog.c
- new file mode 100644
- index 0000000..83910fc
- --- /dev/null
- +++ 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 x11/mate-session-manager/files/patch-mate-session_gsm-manager.c x11/mate-session-manager/files/patch-mate-session_gsm-manager.c
- new file mode 100644
- index 0000000..63d84cc
- --- /dev/null
- +++ 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement