From owner-svn-ports-head@freebsd.org Fri May 10 17:40:04 2019 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4310915A8B37; Fri, 10 May 2019 17:40:04 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DE03E83C62; Fri, 10 May 2019 17:40:03 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B8492787B; Fri, 10 May 2019 17:40:03 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4AHe38S015008; Fri, 10 May 2019 17:40:03 GMT (envelope-from madpilot@FreeBSD.org) Received: (from madpilot@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4AHe2MU015002; Fri, 10 May 2019 17:40:02 GMT (envelope-from madpilot@FreeBSD.org) Message-Id: <201905101740.x4AHe2MU015002@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: madpilot set sender to madpilot@FreeBSD.org using -f From: Guido Falsi Date: Fri, 10 May 2019 17:40:02 +0000 (UTC) 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 X-SVN-Group: ports-head X-SVN-Commit-Author: madpilot X-SVN-Commit-Paths: in head/sysutils/xfce4-power-manager: . files X-SVN-Commit-Revision: 501188 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DE03E83C62 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 May 2019 17:40:04 -0000 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 +.include + +.if defined(WITH_DEBUG) +CONFIGURE_ARGS+= --enable-debug +.endif + +.include 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;