Received: by mail.netbsd.org (Postfix, from userid 605) id 7B83B84D99; Sun, 25 Nov 2018 20:55:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 64F7684D99 for ; Sun, 25 Nov 2018 20:55:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id ppXfj3Ezo4eP for ; Sun, 25 Nov 2018 20:55:42 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 4927584CBC for ; Sun, 25 Nov 2018 20:55:42 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 429C5FB1F; Sun, 25 Nov 2018 20:55:42 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1543179342148650" MIME-Version: 1.0 Date: Sun, 25 Nov 2018 20:55:42 +0000 From: "Martin Husemann" Subject: CVS commit: pkgsrc/sysutils/xfce4-battery-plugin To: pkgsrc-changes@NetBSD.org Reply-To: martin@netbsd.org X-Mailer: log_accum Message-Id: <20181125205542.429C5FB1F@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1543179342148650 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: martin Date: Sun Nov 25 20:55:42 UTC 2018 Modified Files: pkgsrc/sysutils/xfce4-battery-plugin: Makefile distinfo pkgsrc/sysutils/xfce4-battery-plugin/patches: patch-panel-plugin_battery.c Log Message: Make NetBSD support architecture independent. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 pkgsrc/sysutils/xfce4-battery-plugin/Makefile cvs rdiff -u -r1.12 -r1.13 pkgsrc/sysutils/xfce4-battery-plugin/distinfo cvs rdiff -u -r1.2 -r1.3 \ pkgsrc/sysutils/xfce4-battery-plugin/patches/patch-panel-plugin_battery.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1543179342148650 Content-Disposition: inline Content-Length: 5708 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/sysutils/xfce4-battery-plugin/Makefile diff -u pkgsrc/sysutils/xfce4-battery-plugin/Makefile:1.48 pkgsrc/sysutils/xfce4-battery-plugin/Makefile:1.49 --- pkgsrc/sysutils/xfce4-battery-plugin/Makefile:1.48 Wed Nov 14 22:22:28 2018 +++ pkgsrc/sysutils/xfce4-battery-plugin/Makefile Sun Nov 25 20:55:41 2018 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.48 2018/11/14 22:22:28 kleink Exp $ +# $NetBSD: Makefile,v 1.49 2018/11/25 20:55:41 martin Exp $ -PKGREVISION= 6 +PKGREVISION= 7 .include "../../meta-pkgs/xfce4/Makefile.common" VERSION= 1.1.0 @@ -11,15 +11,6 @@ MASTER_SITES= http://archive.xfce.org/sr HOMEPAGE= http://goodies.xfce.org/projects/panel-plugins/xfce4-battery-plugin COMMENT= Xfce battery monitor plugin -# On NetBSD/sparc64, apmvar.h is not exist in /usr/include/machine. -# Reported in PR port-sparc64/36735. -.if ${OPSYS} == "NetBSD" && \ - (!exists(/usr/include/machine/apmvar.h) && \ - !exists(/usr/include/dev/apm/apmio.h) && \ - !exists(/usr/include/sparc/apmio.h)) -PKG_FAIL_REASON+= "APM is not available on ${MACHINE_PLATFORM}." -.endif - .include "../../graphics/hicolor-icon-theme/buildlink3.mk" .include "../../x11/xfce4-panel/buildlink3.mk" .include "../../mk/bsd.pkg.mk" Index: pkgsrc/sysutils/xfce4-battery-plugin/distinfo diff -u pkgsrc/sysutils/xfce4-battery-plugin/distinfo:1.12 pkgsrc/sysutils/xfce4-battery-plugin/distinfo:1.13 --- pkgsrc/sysutils/xfce4-battery-plugin/distinfo:1.12 Tue Jun 20 21:26:54 2017 +++ pkgsrc/sysutils/xfce4-battery-plugin/distinfo Sun Nov 25 20:55:41 2018 @@ -1,7 +1,7 @@ -$NetBSD: distinfo,v 1.12 2017/06/20 21:26:54 youri Exp $ +$NetBSD: distinfo,v 1.13 2018/11/25 20:55:41 martin Exp $ SHA1 (xfce4-battery-plugin-1.1.0.tar.bz2) = 60e341cbac086b774024372f18ccee09473f52df RMD160 (xfce4-battery-plugin-1.1.0.tar.bz2) = 024ed07993b8bdf8c6d8831170e43205794de7c4 SHA512 (xfce4-battery-plugin-1.1.0.tar.bz2) = d3f5b6d3657abfba2c4c5cb3ab8ddc87f4862f24eb614cb91af48332b3082c3dce7f32eb2e3cb8a9d501ddb01c6259c4fbfbab8ed9c221633e47eb17c623cf09 Size (xfce4-battery-plugin-1.1.0.tar.bz2) = 398621 bytes -SHA1 (patch-panel-plugin_battery.c) = d2a227639d1f7ca1533823cbcbe6933a3b092fb0 +SHA1 (patch-panel-plugin_battery.c) = 65a4b74fd3a59aea6e2adc00a8a9010410dd76b0 Index: pkgsrc/sysutils/xfce4-battery-plugin/patches/patch-panel-plugin_battery.c diff -u pkgsrc/sysutils/xfce4-battery-plugin/patches/patch-panel-plugin_battery.c:1.2 pkgsrc/sysutils/xfce4-battery-plugin/patches/patch-panel-plugin_battery.c:1.3 --- pkgsrc/sysutils/xfce4-battery-plugin/patches/patch-panel-plugin_battery.c:1.2 Tue Jun 20 21:26:54 2017 +++ pkgsrc/sysutils/xfce4-battery-plugin/patches/patch-panel-plugin_battery.c Sun Nov 25 20:55:42 2018 @@ -1,11 +1,25 @@ -$NetBSD: patch-panel-plugin_battery.c,v 1.2 2017/06/20 21:26:54 youri Exp $ +$NetBSD: patch-panel-plugin_battery.c,v 1.3 2018/11/25 20:55:42 martin Exp $ Fix for NetBSD. ---- panel-plugin/battery.c.orig 2012-06-17 20:05:17.000000000 +0000 -+++ panel-plugin/battery.c -@@ -30,8 +30,16 @@ - #elif (defined(__OpenBSD__) || defined(__NetBSD__)) +--- panel-plugin/battery.c.orig 2016-10-29 08:37:38.000000000 +0200 ++++ panel-plugin/battery.c 2018-11-25 21:49:59.741230700 +0100 +@@ -26,13 +26,28 @@ + #include + #endif + +-#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && (defined(i386) || defined(__i386__)) ++#ifdef __NetBSD__ ++#include ++#include ++#include ++#include ++#define APMDEVICE "/dev/apm" ++#define _ACPI_APM_BATT_UNKNOWN 0xffff /* from sys/dev/acpi/acpi_apm.c */ ++#elif (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && (defined(i386) || defined(__i386__)) + #include +-#elif (defined(__OpenBSD__) || defined(__NetBSD__)) ++#elif (defined(__OpenBSD__) #include #include +#if defined(__sparc64__) @@ -21,7 +35,7 @@ Fix for NetBSD. #elif __linux__ #include #endif -@@ -172,7 +180,7 @@ init_options(t_battmon_options *options) +@@ -162,7 +177,7 @@ init_options(t_battmon_options *options) gboolean detect_battery_info(t_battmon *battmon) { @@ -30,7 +44,7 @@ Fix for NetBSD. /* This is how I read the information from the APM subsystem under FreeBSD. Each time this functions is called (once every second) the APM device is opened, read from and then closed. -@@ -411,7 +419,7 @@ update_apm_status(t_battmon *battmon) +@@ -401,7 +416,7 @@ update_apm_status(t_battmon *battmon) acline = apm.ac_line_status ? TRUE : FALSE; } @@ -39,7 +53,7 @@ Fix for NetBSD. else { /* This is how I read the information from the APM subsystem under FreeBSD. Each time this functions is called (once every second) -@@ -510,6 +518,11 @@ battmon.c:241: for each function it appe +@@ -500,6 +515,11 @@ battmon.c:241: for each function it appe if(battmon->options.display_percentage && charge > 0 && !(battmon->options.hide_when_full && acline && charge >= 99)){ gtk_widget_show(GTK_WIDGET(battmon->charge)); gtk_widget_show(GTK_WIDGET(battmon->timechargealignment)); @@ -51,7 +65,7 @@ Fix for NetBSD. g_snprintf(buffer, sizeof(buffer),"%d%% ", charge); gtk_label_set_text(battmon->charge,buffer); } else { -@@ -519,6 +532,10 @@ battmon.c:241: for each function it appe +@@ -509,6 +529,10 @@ battmon.c:241: for each function it appe if (battmon->options.display_time && time_remaining > 0 && !(battmon->options.hide_when_full && acline && charge >= 99 )){ gtk_widget_show(GTK_WIDGET(battmon->rtime)); gtk_widget_show(GTK_WIDGET(battmon->timechargealignment)); --_----------=_1543179342148650--