summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorhira <hira@pkgsrc.org>2008-01-05 05:35:20 +0000
committerhira <hira@pkgsrc.org>2008-01-05 05:35:20 +0000
commit8dd5a4bbf24b78661fee61bbf9e44a7a1cbca158 (patch)
tree86147395301909d28b34e1c91af82d9af4dfcbdc /sysutils
parentf3e98e52d145c99636b1d4a22b87ba5bf8deecc5 (diff)
downloadpkgsrc-8dd5a4bbf24b78661fee61bbf9e44a7a1cbca158.tar.gz
On NetBSD/sparc64, use /usr/include/sparc/apmvar.h instead of
/usr/include/machine/apmvar.h until PR pkg/36735 is fixed. Pointed out by obache@. OK'd by maintainer.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/xfce4-battery-plugin/Makefile8
-rw-r--r--sysutils/xfce4-battery-plugin/distinfo4
-rw-r--r--sysutils/xfce4-battery-plugin/patches/patch-aa28
3 files changed, 26 insertions, 14 deletions
diff --git a/sysutils/xfce4-battery-plugin/Makefile b/sysutils/xfce4-battery-plugin/Makefile
index 27ee1274665..0d6343e7c37 100644
--- a/sysutils/xfce4-battery-plugin/Makefile
+++ b/sysutils/xfce4-battery-plugin/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2007/12/30 09:37:23 hira Exp $
+# $NetBSD: Makefile,v 1.5 2008/01/05 05:35:20 hira Exp $
.include "../../meta-pkgs/xfce4/Makefile.common"
@@ -10,7 +10,11 @@ CATEGORIES= sysutils
MASTER_SITES= http://goodies.xfce.org/releases/xfce4-battery-plugin/
COMMENT= Xfce battey monitor plugin
-.if ${OPSYS} == "NetBSD" && !exists(/usr/include/machine/apmvar.h)
+# On NetBSD/sparc64, apmvar.h is not exist in /usr/include/machine.
+# Reported in PR pkg/36735.
+.if ${OPSYS} == "NetBSD" && \
+ (!exists(/usr/include/machine/apmvar.h) && \
+ !exists(/usr/include/sparc/apmvar.h))
PKG_FAIL_REASON+= "APM is not available on ${MACHINE_PLATFORM}."
.endif
diff --git a/sysutils/xfce4-battery-plugin/distinfo b/sysutils/xfce4-battery-plugin/distinfo
index badc3377d9d..6248725f3c4 100644
--- a/sysutils/xfce4-battery-plugin/distinfo
+++ b/sysutils/xfce4-battery-plugin/distinfo
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.4 2007/06/30 17:40:50 joerg Exp $
+$NetBSD: distinfo,v 1.5 2008/01/05 05:35:20 hira Exp $
SHA1 (xfce4-battery-plugin-0.5.0.tar.bz2) = 63439d32bfe8411458d41c38824cb393bc31d6e0
RMD160 (xfce4-battery-plugin-0.5.0.tar.bz2) = bbf64994c7686b11b6a51bd7728569cd2a5d9777
Size (xfce4-battery-plugin-0.5.0.tar.bz2) = 222269 bytes
-SHA1 (patch-aa) = b0eb860a4c1f18c2ececa01e4e8e3816cecc852c
+SHA1 (patch-aa) = ee4a4ff7f38d1bb5b018dad4dcf0d8cd339972b0
diff --git a/sysutils/xfce4-battery-plugin/patches/patch-aa b/sysutils/xfce4-battery-plugin/patches/patch-aa
index a958881a90f..381558ced88 100644
--- a/sysutils/xfce4-battery-plugin/patches/patch-aa
+++ b/sysutils/xfce4-battery-plugin/patches/patch-aa
@@ -1,7 +1,7 @@
-$NetBSD: patch-aa,v 1.4 2007/06/30 17:40:50 joerg Exp $
+$NetBSD: patch-aa,v 1.5 2008/01/05 05:35:20 hira Exp $
---- panel-plugin/battery.c.orig 2007-01-17 17:56:51.000000000 +0000
-+++ panel-plugin/battery.c
+--- panel-plugin/battery.c.orig 2007-01-18 02:56:51.000000000 +0900
++++ panel-plugin/battery.c 2008-01-03 21:30:22.000000000 +0900
@@ -25,7 +25,7 @@
#include <config.h>
#endif
@@ -11,15 +11,23 @@ $NetBSD: patch-aa,v 1.4 2007/06/30 17:40:50 joerg Exp $
#include <machine/apm_bios.h>
#elif __OpenBSD__
#include <sys/param.h>
-@@ -35,6 +35,7 @@
+@@ -33,8 +33,15 @@
+ #elif __NetBSD__
+ #include <sys/param.h>
#include <sys/ioctl.h>
++#if defined(__sparc64__)
++/* On NetBSD/sparc64, apmvar.h is not exist in /usr/include/machine. */
++/* Reported in PR pkg/36735. */
++#include <sparc/apmvar.h>
++#else
#include <machine/apmvar.h>
++#endif
#define APMDEVICE "/dev/apm"
+#define _ACPI_APM_BATT_UNKNOWN 0xffff /* from sys/dev/acpi/acpi_apm.c */
#elif __linux__
#include <libapm.h>
#endif
-@@ -155,7 +156,7 @@ init_options(t_battmon_options *options)
+@@ -155,7 +162,7 @@
gboolean
detect_battery_info(t_battmon *battmon)
{
@@ -28,7 +36,7 @@ $NetBSD: patch-aa,v 1.4 2007/06/30 17:40:50 joerg Exp $
/* 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.
-@@ -209,7 +210,7 @@ detect_battery_info(t_battmon *battmon)
+@@ -209,7 +216,7 @@
battmon->method = BM_BROKEN;
fd = open(APMDEVICE, O_RDONLY);
if (fd == -1) return FALSE;
@@ -37,7 +45,7 @@ $NetBSD: patch-aa,v 1.4 2007/06/30 17:40:50 joerg Exp $
close(fd);
return FALSE;
}
-@@ -302,13 +303,16 @@ update_apm_status(t_battmon *battmon)
+@@ -302,13 +309,16 @@
battmon->method = BM_BROKEN;
fd = open(APMDEVICE, O_RDONLY);
if (fd == -1) return TRUE;
@@ -55,7 +63,7 @@ $NetBSD: patch-aa,v 1.4 2007/06/30 17:40:50 joerg Exp $
#else
struct apm_info apm;
DBG ("Updating battery status...");
-@@ -400,7 +404,7 @@ update_apm_status(t_battmon *battmon)
+@@ -400,7 +410,7 @@
acline = apm.ac_line_status ? TRUE : FALSE;
}
@@ -64,7 +72,7 @@ $NetBSD: patch-aa,v 1.4 2007/06/30 17:40:50 joerg Exp $
else {
/* This is how I read the information from the APM subsystem under
FreeBSD. Each time this functions is called (once every second)
-@@ -460,6 +464,11 @@ battmon.c:241: for each function it appe
+@@ -460,6 +470,11 @@
if(battmon->options.display_percentage && !(battmon->options.hide_when_full && acline && charge >= 99)){
gtk_widget_show((GtkWidget *)battmon->charge);
@@ -76,7 +84,7 @@ $NetBSD: patch-aa,v 1.4 2007/06/30 17:40:50 joerg Exp $
g_snprintf(buffer, sizeof(buffer),"%d%% ", charge);
gtk_label_set_text(battmon->charge,buffer);
} else {
-@@ -477,6 +486,11 @@ battmon.c:241: for each function it appe
+@@ -477,6 +492,11 @@
}
gtk_widget_show((GtkWidget *)active_label);