aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/xfce4-power-manager
diff options
context:
space:
mode:
authorolivierd <olivierd@FreeBSD.org>2015-08-09 23:22:11 +0800
committerolivierd <olivierd@FreeBSD.org>2015-08-09 23:22:11 +0800
commit8d0b91332bc3fd034074150c443eb817a5c71bc3 (patch)
treecb7fe58516dc92faca0f41c80e25d2f844efed9e /sysutils/xfce4-power-manager
parent6ed7471fc0599e937ed379765f577641360a3a2f (diff)
downloadfreebsd-ports-gnome-8d0b91332bc3fd034074150c443eb817a5c71bc3.tar.gz
freebsd-ports-gnome-8d0b91332bc3fd034074150c443eb817a5c71bc3.tar.zst
freebsd-ports-gnome-8d0b91332bc3fd034074150c443eb817a5c71bc3.zip
- Update to 1.5.2
- Sort USES - Remove unneeded patches Obtained from: Xfce devel repo
Diffstat (limited to 'sysutils/xfce4-power-manager')
-rw-r--r--sysutils/xfce4-power-manager/Makefile4
-rw-r--r--sysutils/xfce4-power-manager/distinfo4
-rw-r--r--sysutils/xfce4-power-manager/files/patch-config.h.in28
-rw-r--r--sysutils/xfce4-power-manager/files/patch-configure117
-rw-r--r--sysutils/xfce4-power-manager/files/patch-panel-plugins_power-manager-plugin_power-manager-button.c26
-rw-r--r--sysutils/xfce4-power-manager/files/patch-src_xfpm-power.c206
6 files changed, 4 insertions, 381 deletions
diff --git a/sysutils/xfce4-power-manager/Makefile b/sysutils/xfce4-power-manager/Makefile
index d7a0d9c314e0..c77be9765a57 100644
--- a/sysutils/xfce4-power-manager/Makefile
+++ b/sysutils/xfce4-power-manager/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= xfce4-power-manager
-PORTVERSION= 1.5.0
+PORTVERSION= 1.5.2
CATEGORIES= sysutils xfce
MASTER_SITES= XFCE/src/xfce/${PORTNAME}/${PORTVERSION:R}/
DIST_SUBDIR= xfce4
@@ -18,7 +18,7 @@ LIB_DEPENDS= libnotify.so:${PORTSDIR}/devel/libnotify \
libupower-glib.so:${PORTSDIR}/sysutils/upower
GNU_CONFIGURE= yes
-USES= gettext pkgconfig gmake libtool xfce:gtk3 tar:bzip2
+USES= gettext gmake libtool pkgconfig tar:bzip2 xfce:gtk3
USE_GNOME= glib20 gtk30 intltool intlhack
USE_XFCE= panel
INSTALLS_ICONS= yes
diff --git a/sysutils/xfce4-power-manager/distinfo b/sysutils/xfce4-power-manager/distinfo
index b6f8fc21c8bd..291783f9d10a 100644
--- a/sysutils/xfce4-power-manager/distinfo
+++ b/sysutils/xfce4-power-manager/distinfo
@@ -1,2 +1,2 @@
-SHA256 (xfce4/xfce4-power-manager-1.5.0.tar.bz2) = 62bc832d9474094fd7481c4658c0dd67e1b41fe89fdaa75b2803d3d2096f9fb7
-SIZE (xfce4/xfce4-power-manager-1.5.0.tar.bz2) = 1108153
+SHA256 (xfce4/xfce4-power-manager-1.5.2.tar.bz2) = 8bdc640f227ffccbdcfbbcca8ba36d1ce054236c0a32dbf87a4a751f3a835415
+SIZE (xfce4/xfce4-power-manager-1.5.2.tar.bz2) = 1165775
diff --git a/sysutils/xfce4-power-manager/files/patch-config.h.in b/sysutils/xfce4-power-manager/files/patch-config.h.in
deleted file mode 100644
index e1d331faf89e..000000000000
--- a/sysutils/xfce4-power-manager/files/patch-config.h.in
+++ /dev/null
@@ -1,28 +0,0 @@
---- config.h.in.orig 2014-12-01 11:37:05 UTC
-+++ config.h.in
-@@ -60,6 +60,12 @@
- /* Define if libxfce4panel-1.0 >= libxfce4panel_minimum_version present */
- #undef HAVE_LIBXFCE4PANEL
-
-+/* Define to 1 if you have the `Xss' library (-lXss). */
-+#undef HAVE_LIBXSS
-+
-+/* Define to 1 if you have the `Xtst' library (-lXtst). */
-+#undef HAVE_LIBXTST
-+
- /* Define to 1 if you have the <locale.h> header file. */
- #undef HAVE_LOCALE_H
-
-@@ -132,6 +138,12 @@
- /* Define to 1 if you have the <unistd.h> header file. */
- #undef HAVE_UNISTD_H
-
-+/* Define to 1 if you have the <X11/extensions/scrnsaver.h> header file. */
-+#undef HAVE_X11_EXTENSIONS_SCRNSAVER_H
-+
-+/* Define to 1 if you have the <X11/extensions/XTest.h> header file. */
-+#undef HAVE_X11_EXTENSIONS_XTEST_H
-+
- /* Define if XF86XK_Hibernate is available */
- #undef HAVE_XF86XK_HIBERNATE
-
diff --git a/sysutils/xfce4-power-manager/files/patch-configure b/sysutils/xfce4-power-manager/files/patch-configure
deleted file mode 100644
index 88f6447e7b79..000000000000
--- a/sysutils/xfce4-power-manager/files/patch-configure
+++ /dev/null
@@ -1,117 +0,0 @@
---- configure.orig 2014-12-01 11:37:01 UTC
-+++ configure
-@@ -13481,7 +13481,8 @@ fi
- for ac_header in errno.h signal.h stddef.h sys/types.h memory.h stdlib.h \
- string.h sys/stat.h sys/user.h sys/wait.h time.h math.h \
- unistd.h sys/resource.h sys/socket.h sys/sysctl.h fcntl.h \
-- sys/param.h procfs.h
-+ sys/param.h procfs.h X11/extensions/scrnsaver.h \
-+ X11/extensions/XTest.h
- do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
- ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-@@ -13558,6 +13559,104 @@ fi
-
-
- # ===================================================== #
-+# Check for XScreenSaverSuspend #
-+# ===================================================== #
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XScreenSaverSuspend in -lXss" >&5
-+$as_echo_n "checking for XScreenSaverSuspend in -lXss... " >&6; }
-+if ${ac_cv_lib_Xss_XScreenSaverSuspend+:} false; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lXss $LIBS"
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+
-+/* Override any GCC internal prototype to avoid an error.
-+ Use char because int might match the return type of a GCC
-+ builtin and then its argument prototype would still apply. */
-+#ifdef __cplusplus
-+extern "C"
-+#endif
-+char XScreenSaverSuspend ();
-+int
-+main ()
-+{
-+return XScreenSaverSuspend ();
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_link "$LINENO"; then :
-+ ac_cv_lib_Xss_XScreenSaverSuspend=yes
-+else
-+ ac_cv_lib_Xss_XScreenSaverSuspend=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+LIBS=$ac_check_lib_save_LIBS
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xss_XScreenSaverSuspend" >&5
-+$as_echo "$ac_cv_lib_Xss_XScreenSaverSuspend" >&6; }
-+if test "x$ac_cv_lib_Xss_XScreenSaverSuspend" = xyes; then :
-+ cat >>confdefs.h <<_ACEOF
-+#define HAVE_LIBXSS 1
-+_ACEOF
-+
-+ LIBS="-lXss $LIBS"
-+
-+fi
-+
-+
-+# ===================================================== #
-+# Check for XTestFakeKeyEvent #
-+# ===================================================== #
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XTestFakeKeyEvent in -lXtst" >&5
-+$as_echo_n "checking for XTestFakeKeyEvent in -lXtst... " >&6; }
-+if ${ac_cv_lib_Xtst_XTestFakeKeyEvent+:} false; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lXtst $LIBS"
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+
-+/* Override any GCC internal prototype to avoid an error.
-+ Use char because int might match the return type of a GCC
-+ builtin and then its argument prototype would still apply. */
-+#ifdef __cplusplus
-+extern "C"
-+#endif
-+char XTestFakeKeyEvent ();
-+int
-+main ()
-+{
-+return XTestFakeKeyEvent ();
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_link "$LINENO"; then :
-+ ac_cv_lib_Xtst_XTestFakeKeyEvent=yes
-+else
-+ ac_cv_lib_Xtst_XTestFakeKeyEvent=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+LIBS=$ac_check_lib_save_LIBS
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xtst_XTestFakeKeyEvent" >&5
-+$as_echo "$ac_cv_lib_Xtst_XTestFakeKeyEvent" >&6; }
-+if test "x$ac_cv_lib_Xtst_XTestFakeKeyEvent" = xyes; then :
-+ cat >>confdefs.h <<_ACEOF
-+#define HAVE_LIBXTST 1
-+_ACEOF
-+
-+ LIBS="-lXtst $LIBS"
-+
-+fi
-+
-+
-+# ===================================================== #
- # Check for i18n support #
- # ===================================================== #
-
diff --git a/sysutils/xfce4-power-manager/files/patch-panel-plugins_power-manager-plugin_power-manager-button.c b/sysutils/xfce4-power-manager/files/patch-panel-plugins_power-manager-plugin_power-manager-button.c
deleted file mode 100644
index 5498fd9a68a6..000000000000
--- a/sysutils/xfce4-power-manager/files/patch-panel-plugins_power-manager-plugin_power-manager-button.c
+++ /dev/null
@@ -1,26 +0,0 @@
---- panel-plugins/power-manager-plugin/power-manager-button.c.orig 2015-05-25 16:10:37 UTC
-+++ panel-plugins/power-manager-plugin/power-manager-button.c
-@@ -382,7 +382,7 @@ power_manager_button_update_device_icon_
- details = get_device_description (button->priv->upower, device);
-
- /* If UPower doesn't give us an icon, just use the default */
-- if (icon_name == NULL)
-+ if (icon_name == NULL || g_strcmp0 (icon_name, "") == 0)
- icon_name = g_strdup (PANEL_DEFAULT_ICON);
-
- pix = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
-@@ -407,7 +407,13 @@ power_manager_button_update_device_icon_
- DBG("this is the display device, updating");
- /* it is! update the panel button */
- g_free (button->priv->panel_icon_name);
--
-+#ifdef XFCE_PLUGIN
-+ g_object_get (device,
-+ "icon-name", &icon_name,
-+ NULL);
-+ if (icon_name == NULL || g_strcmp0 (icon_name, "") == 0)
-+ icon_name = g_strdup (PANEL_DEFAULT_ICON);
-+#endif
- button->priv->panel_icon_name = g_strdup (icon_name);
- power_manager_button_set_icon (button);
- /* update tooltip */
diff --git a/sysutils/xfce4-power-manager/files/patch-src_xfpm-power.c b/sysutils/xfce4-power-manager/files/patch-src_xfpm-power.c
deleted file mode 100644
index 122c2b882380..000000000000
--- a/sysutils/xfce4-power-manager/files/patch-src_xfpm-power.c
+++ /dev/null
@@ -1,206 +0,0 @@
-From: Eric Koegel <eric.koegel@gmail.com>
-Date: Mon, 1 Sep 2014 20:19:15 +0300
-Subject: [PATCH] Use XScreenSaverSuspend and XTestFakeKeyEvent (Bug 11083)
-
---- src/xfpm-power.c.orig 2014-12-01 11:33:52 UTC
-+++ src/xfpm-power.c
-@@ -63,6 +63,13 @@
- #include "xfpm-suspend.h"
- #include "xfpm-brightness.h"
-
-+#ifdef HAVE_LIBXTST
-+#include "X11/extensions/XTest.h"
-+#endif
-+
-+#ifdef HAVE_LIBXSS
-+#include <X11/extensions/scrnsaver.h>
-+#endif /* HAVE_LIBXSS */
-
- static void xfpm_power_finalize (GObject *object);
-
-@@ -112,6 +119,8 @@ struct XfpmPowerPrivate
- EggIdletime *idletime;
-
- gboolean inhibited;
-+ gboolean screensaver_inhibited;
-+ gulong screensaver_id;
-
- XfpmNotify *notify;
- #ifdef ENABLE_POLKIT
-@@ -886,10 +895,106 @@ xfpm_power_remove_device (XfpmPower *pow
- g_hash_table_remove (power->priv->hash, object_path);
- }
-
-+static gboolean
-+idle_reset_screen_saver (XfpmPower *power)
-+{
-+ Display *dpy = gdk_x11_get_default_xdisplay ();
-+
-+ TRACE("entering");
-+
-+ XResetScreenSaver (dpy);
-+
-+#ifdef HAVE_LIBXTST
-+ /* keycode of 255 does not map to any actual key,
-+ * this works for xscreensaver */
-+ XTestFakeKeyEvent (dpy, 255, TRUE, 0);
-+ XTestFakeKeyEvent (dpy, 255, FALSE, 0);
-+#endif /* HAVE_LIBXTST */
-+
-+ XFlush (dpy);
-+
-+ /* continue until we're removed */
-+ return TRUE;
-+}
-+
-+static void
-+screen_saver_suspend(XfpmPower *power, gboolean suspend)
-+{
-+#ifndef HAVE_LIBXSS
-+ TRACE("!HAVE_XSS");
-+#else
-+ int event, dummy, major, minor;
-+ Display *dpy = gdk_x11_get_default_xdisplay();
-+
-+ TRACE("entering");
-+
-+ if (XScreenSaverQueryExtension(dpy, &event, &dummy) != TRUE ||
-+ XScreenSaverQueryVersion(dpy, &major, &minor) != TRUE)
-+ {
-+ XFPM_DEBUG ("XScreenSaverQueryExtension or XScreenSaverQueryVersion call failed");
-+ }
-+
-+ /* XScreenSaverSuspend was introduced in MIT-SCREEN-SAVER 1.1 */
-+ if (major < 1 || (major == 1 && minor < 1))
-+ {
-+ XFPM_DEBUG ("version %d.%d not supported", major, minor);
-+ }
-+
-+ XFPM_DEBUG ("XScreenSaverSuspend: %s", suspend ? "TRUE" : "FALSE");
-+ XScreenSaverSuspend(dpy, suspend);
-+#endif /* HAVE_LIBXSS */
-+
-+ if (power->priv->screensaver_id != 0)
-+ {
-+ g_source_remove (power->priv->screensaver_id);
-+ power->priv->screensaver_id = 0;
-+ }
-+
-+ if (suspend)
-+ {
-+ /* Reset the screensaver timers every so often so they don't activate */
-+ power->priv->screensaver_id = g_timeout_add_seconds (20,
-+ (GSourceFunc)idle_reset_screen_saver,
-+ power);
-+ }
-+}
-+
- static void
- xfpm_power_inhibit_changed_cb (XfpmInhibit *inhibit, gboolean is_inhibit, XfpmPower *power)
- {
-- power->priv->inhibited = is_inhibit;
-+ if (power->priv->inhibited != is_inhibit)
-+ {
-+ power->priv->inhibited = is_inhibit;
-+
-+ DBG ("is_inhibit %s, screensaver_inhibited %s, presentation_mode %s",
-+ power->priv->inhibited ? "TRUE" : "FALSE",
-+ power->priv->screensaver_inhibited ? "TRUE" : "FALSE",
-+ power->priv->presentation_mode ? "TRUE" : "FALSE");
-+
-+ /* If we are inhibited make sure we inhibit the screensaver too */
-+ if (is_inhibit)
-+ {
-+ if (!power->priv->screensaver_inhibited)
-+ {
-+ screen_saver_suspend (power, TRUE);
-+ power->priv->screensaver_inhibited = TRUE;
-+ }
-+ }
-+ else
-+ {
-+ /* Or make sure we remove the screensaver inhibit */
-+ if (power->priv->screensaver_inhibited && !power->priv->presentation_mode)
-+ {
-+ screen_saver_suspend (power, FALSE);
-+ power->priv->screensaver_inhibited = FALSE;
-+ }
-+ }
-+ }
-+
-+ DBG ("is_inhibit %s, screensaver_inhibited %s, presentation_mode %s",
-+ power->priv->inhibited ? "TRUE" : "FALSE",
-+ power->priv->screensaver_inhibited ? "TRUE" : "FALSE",
-+ power->priv->presentation_mode ? "TRUE" : "FALSE");
- }
-
- static void
-@@ -1270,6 +1375,12 @@ xfpm_power_finalize (GObject *object)
-
- g_object_unref(power->priv->dpms);
-
-+ if (power->priv->screensaver_id != 0)
-+ {
-+ g_source_remove (power->priv->screensaver_id);
-+ power->priv->screensaver_id = 0;
-+ }
-+
- G_OBJECT_CLASS (xfpm_power_parent_class)->finalize (object);
- }
-
-@@ -1375,24 +1486,49 @@ xfpm_power_change_presentation_mode (Xfp
- if (power->priv->presentation_mode == presentation_mode)
- return;
-
-- XFPM_DEBUG ("presentation mode %s, changing to %s",
-- power->priv->presentation_mode ? "TRUE" : "FALSE",
-- presentation_mode ? "TRUE" : "FALSE");
--
- power->priv->presentation_mode = presentation_mode;
-
- /* presentation mode inhibits dpms */
- xfpm_dpms_inhibit (power->priv->dpms, presentation_mode);
-
-- if (presentation_mode == FALSE)
-+ DBG ("is_inhibit %s, screensaver_inhibited %s, presentation_mode %s",
-+ power->priv->inhibited ? "TRUE" : "FALSE",
-+ power->priv->screensaver_inhibited ? "TRUE" : "FALSE",
-+ power->priv->presentation_mode ? "TRUE" : "FALSE");
-+
-+ if (presentation_mode)
- {
-- EggIdletime *idletime;
-+ /* presentation mode inhibits the screensaver */
-+ if (!power->priv->screensaver_inhibited)
-+ {
-+ screen_saver_suspend (power, TRUE);
-+ power->priv->screensaver_inhibited = TRUE;
-+ }
-+ }
-+ else
-+ {
-+ EggIdletime *idletime;
-+
-+ /* make sure we remove the screensaver inhibit */
-+ if (power->priv->screensaver_inhibited && !power->priv->inhibited)
-+ {
-+ DBG("here");
-+ screen_saver_suspend (power, FALSE);
-+ power->priv->screensaver_inhibited = FALSE;
-+ }
-+
-+ /* reset the timers */
- idletime = egg_idletime_new ();
- egg_idletime_alarm_reset_all (idletime);
-
- g_object_unref (idletime);
- }
-
-+ DBG ("is_inhibit %s, screensaver_inhibited %s, presentation_mode %s",
-+ power->priv->inhibited ? "TRUE" : "FALSE",
-+ power->priv->screensaver_inhibited ? "TRUE" : "FALSE",
-+ power->priv->presentation_mode ? "TRUE" : "FALSE");
-+
- xfpm_update_blank_time (power);
- }
-