Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 May 2019 17:40:02 +0000 (UTC)
From:      Guido Falsi <madpilot@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r501188 - in head/sysutils/xfce4-power-manager: . files
Message-ID:  <201905101740.x4AHe2MU015002@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: madpilot
Date: Fri May 10 17:40:02 2019
New Revision: 501188
URL: https://svnweb.freebsd.org/changeset/ports/501188

Log:
  - Fix reported sporadic crashes
  - Enumerate all displays for backlight support
  - Fix some compile warnings
  - When building debug binaries enable extra debugging code too
  
  PR:		237714
  Submitted by:	rozhuk.im@gmail.com
  MFH:		2019Q2

Added:
  head/sysutils/xfce4-power-manager/files/
  head/sysutils/xfce4-power-manager/files/patch-panel-plugins_power-manager-plugin_power-manager-button.c   (contents, props changed)
  head/sysutils/xfce4-power-manager/files/patch-settings_xfpm-settings-app.c   (contents, props changed)
  head/sysutils/xfce4-power-manager/files/patch-settings_xfpm-settings.c   (contents, props changed)
  head/sysutils/xfce4-power-manager/files/patch-src_xfpm-backlight-helper.c   (contents, props changed)
  head/sysutils/xfce4-power-manager/files/patch-src_xfpm-dpms.c   (contents, props changed)
Modified:
  head/sysutils/xfce4-power-manager/Makefile

Modified: head/sysutils/xfce4-power-manager/Makefile
==============================================================================
--- head/sysutils/xfce4-power-manager/Makefile	Fri May 10 16:36:23 2019	(r501187)
+++ head/sysutils/xfce4-power-manager/Makefile	Fri May 10 17:40:02 2019	(r501188)
@@ -3,6 +3,7 @@
 
 PORTNAME=	xfce4-power-manager
 PORTVERSION=	1.6.1
+PORTREVISION=	1
 CATEGORIES=	sysutils xfce
 MASTER_SITES=	XFCE/src/xfce/${PORTNAME}/${PORTVERSION:R}/
 DIST_SUBDIR=	xfce4
@@ -36,4 +37,10 @@ OPTIONS_SUB=		yes
 NLS_CONFIGURE_ENABLE=	nls
 NLS_USES=		gettext-runtime
 
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_DEBUG)
+CONFIGURE_ARGS+=	--enable-debug
+.endif
+
+.include <bsd.port.post.mk>

Added: head/sysutils/xfce4-power-manager/files/patch-panel-plugins_power-manager-plugin_power-manager-button.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/xfce4-power-manager/files/patch-panel-plugins_power-manager-plugin_power-manager-button.c	Fri May 10 17:40:02 2019	(r501188)
@@ -0,0 +1,10 @@
+--- panel-plugins/power-manager-plugin/power-manager-button.c.orig	2017-11-23 23:52:06 UTC
++++ panel-plugins/power-manager-plugin/power-manager-button.c
+@@ -512,6 +512,7 @@ power_manager_button_update_device_icon_and_details (P
+          * so we can disconnect it later */
+         battery_device->img = gtk_image_new_from_pixbuf (battery_device->pix);
+ 
++        g_object_ref (battery_device->img);
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+         gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(battery_device->menu_item), battery_device->img);
+ G_GNUC_END_IGNORE_DEPRECATIONS

Added: head/sysutils/xfce4-power-manager/files/patch-settings_xfpm-settings-app.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/xfce4-power-manager/files/patch-settings_xfpm-settings-app.c	Fri May 10 17:40:02 2019	(r501188)
@@ -0,0 +1,10 @@
+--- settings/xfpm-settings-app.c.orig	2017-11-23 23:52:06 UTC
++++ settings/xfpm-settings-app.c
+@@ -195,7 +195,6 @@ xfpm_settings_app_launch (GApplication *app)
+         if (start_xfpm_if_not_running == GTK_RESPONSE_YES)
+         {
+             GAppInfo *app_info;
+-            GError   *error = NULL;
+ 
+             app_info = g_app_info_create_from_commandline ("xfce4-power-manager", "Xfce4 Power Manager",
+                                                            G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION, NULL);

Added: head/sysutils/xfce4-power-manager/files/patch-settings_xfpm-settings.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/xfce4-power-manager/files/patch-settings_xfpm-settings.c	Fri May 10 17:40:02 2019	(r501188)
@@ -0,0 +1,14 @@
+--- settings/xfpm-settings.c.orig	2017-11-23 23:52:06 UTC
++++ settings/xfpm-settings.c
+@@ -1499,9 +1499,9 @@ format_light_locker_value_cb (GtkScale *scale, gdouble
+ 
+     if ( (gint)value <= 0 )
+         return g_strdup (_("Never"));
+-    else if ( value <= 59.0 )
++    else if ( value < 60.0 )
+         return g_strdup_printf ("%d %s", (gint)value, _("seconds"));
+-    else if ( value >= 60.0)
++    else
+     {
+         min = (gint)value - 60;
+         if (min == 0)

Added: head/sysutils/xfce4-power-manager/files/patch-src_xfpm-backlight-helper.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/xfce4-power-manager/files/patch-src_xfpm-backlight-helper.c	Fri May 10 17:40:02 2019	(r501188)
@@ -0,0 +1,42 @@
+--- src/xfpm-backlight-helper.c.orig	2017-11-23 23:52:06 UTC
++++ src/xfpm-backlight-helper.c
+@@ -49,6 +49,8 @@
+ #define EXIT_CODE_INVALID_USER		4
+ #define EXIT_CODE_NO_BRIGHTNESS_SWITCH	5
+ 
++#define MAX_DEVICE_NUM			8
++
+ #if !defined(BACKEND_TYPE_FREEBSD)
+ #define BACKLIGHT_SYSFS_LOCATION	"/sys/class/backlight"
+ #define BRIGHTNESS_SWITCH_LOCATION	"/sys/module/video/parameters/brightness_switch_enabled"
+@@ -204,19 +206,23 @@ backlight_helper_get_device (void)
+ 	/* devices in priority order */
+ 	gchar *types[] = { "lcd", "crt", "out", "ext", "tv", NULL };
+ 	gchar *device = NULL;
+-	gint i;
++	gint i, j;
+ 
+-	device = (gchar *) g_malloc (sizeof (gchar));
++	device = (gchar *) g_malloc (sizeof (gchar) * 8);
+ 
+ 	for (i = 0; types[i] != NULL; i++) {
+-		g_snprintf (device, (gulong) strlen (types[i]), "%s0", types[i]);
++		for (j = 0; j < MAX_DEVICE_NUM; j++) {
++			g_snprintf (device, 8, "%s%i", types[i], j);
+ 
+-		/* stop, when first device is found */
+-		if (acpi_video_is_enabled (device))
+-			break;
++			/* stop, when first device is found */
++			if (acpi_video_is_enabled (device))
++				return (device);
++		}
+ 	}
+ 
+-	return device;
++	g_free (device);
++
++	return (NULL);
+ }
+ 
+ /*

Added: head/sysutils/xfce4-power-manager/files/patch-src_xfpm-dpms.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/xfce4-power-manager/files/patch-src_xfpm-dpms.c	Fri May 10 17:40:02 2019	(r501188)
@@ -0,0 +1,18 @@
+--- src/xfpm-dpms.c.orig	2015-07-14 08:02:18 UTC
++++ src/xfpm-dpms.c
+@@ -122,13 +122,13 @@ xfpm_dpms_get_enabled (XfpmDpms *dpms, gboolean *dpms_
+ static void
+ xfpm_dpms_get_sleep_mode (XfpmDpms *dpms, gboolean *ret_standby_mode)
+ {
+-    gchar *sleep_mode;
++    gchar *sleep_mode = NULL;
+     
+     g_object_get (G_OBJECT (dpms->priv->conf),
+ 		  DPMS_SLEEP_MODE, &sleep_mode,
+ 		  NULL);
+     
+-    if ( !g_strcmp0 (sleep_mode, "Standby"))
++    if (sleep_mode != NULL && !g_strcmp0 (sleep_mode, "Standby"))
+ 	*ret_standby_mode = TRUE;
+     else
+ 	*ret_standby_mode = FALSE;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905101740.x4AHe2MU015002>