summaryrefslogtreecommitdiff
path: root/sysutils/xfce4-battery-plugin
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2010-03-22 15:46:02 +0000
committerjoerg <joerg@pkgsrc.org>2010-03-22 15:46:02 +0000
commit9fb4299787e35308a8576c0ee8e9c19995bd3a60 (patch)
tree3a012d38f1811122a97623abf69f67f201783d50 /sysutils/xfce4-battery-plugin
parentc2cc5cc0b55c731576655e755cee1713b9b837de (diff)
downloadpkgsrc-9fb4299787e35308a8576c0ee8e9c19995bd3a60.tar.gz
Use /usr/include/dev/apm/* on AMD64. Add explicit failure message for
systems that have neither those nor /usr/include/machine/apmvar.h. Mark as DESTDIR ready.
Diffstat (limited to 'sysutils/xfce4-battery-plugin')
-rw-r--r--sysutils/xfce4-battery-plugin/Makefile15
-rw-r--r--sysutils/xfce4-battery-plugin/distinfo4
-rw-r--r--sysutils/xfce4-battery-plugin/patches/patch-aa19
3 files changed, 22 insertions, 16 deletions
diff --git a/sysutils/xfce4-battery-plugin/Makefile b/sysutils/xfce4-battery-plugin/Makefile
index 8e18e2496c7..ff1a6981749 100644
--- a/sysutils/xfce4-battery-plugin/Makefile
+++ b/sysutils/xfce4-battery-plugin/Makefile
@@ -1,4 +1,6 @@
-# $NetBSD: Makefile,v 1.9 2009/08/26 19:56:54 sno Exp $
+# $NetBSD: Makefile,v 1.10 2010/03/22 15:46:02 joerg Exp $
+
+PKG_DESTDIR_SUPPORT= user-destdir
.include "../../meta-pkgs/xfce4/Makefile.common"
@@ -12,11 +14,12 @@ COMMENT= Xfce battey 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/sparc/apmvar.h))
-#PKG_FAIL_REASON+= "APM is not available on ${MACHINE_PLATFORM}."
-#.endif
+.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
USE_TOOLS+= perl:run
diff --git a/sysutils/xfce4-battery-plugin/distinfo b/sysutils/xfce4-battery-plugin/distinfo
index 4b9464ae7ca..4a37431c51c 100644
--- a/sysutils/xfce4-battery-plugin/distinfo
+++ b/sysutils/xfce4-battery-plugin/distinfo
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.7 2008/12/17 12:57:27 hira Exp $
+$NetBSD: distinfo,v 1.8 2010/03/22 15:46:02 joerg Exp $
SHA1 (xfce4-battery-plugin-0.5.1.tar.bz2) = f97c1b6445c8da07c17353ae385b5fadb2fd5f1a
RMD160 (xfce4-battery-plugin-0.5.1.tar.bz2) = ee770f06226cf8dfed95892c152ae3a2a446079a
Size (xfce4-battery-plugin-0.5.1.tar.bz2) = 227940 bytes
-SHA1 (patch-aa) = 2293c172ad3f8414168e012d6a982d1ff017c5e3
+SHA1 (patch-aa) = 09679ad7084cd25f05d4026d22cf69f185aaf5a9
diff --git a/sysutils/xfce4-battery-plugin/patches/patch-aa b/sysutils/xfce4-battery-plugin/patches/patch-aa
index f1fe0cb7f74..53c3d342ca7 100644
--- a/sysutils/xfce4-battery-plugin/patches/patch-aa
+++ b/sysutils/xfce4-battery-plugin/patches/patch-aa
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.7 2008/12/17 12:57:27 hira Exp $
+$NetBSD: patch-aa,v 1.8 2010/03/22 15:46:03 joerg Exp $
--- panel-plugin/battery.c.orig 2008-09-05 05:53:40.000000000 +0900
+++ panel-plugin/battery.c 2008-11-27 22:16:05.000000000 +0900
@@ -11,7 +11,7 @@ $NetBSD: patch-aa,v 1.7 2008/12/17 12:57:27 hira Exp $
#include <machine/apm_bios.h>
#elif __OpenBSD__
#include <sys/param.h>
-@@ -33,8 +33,15 @@
+@@ -33,8 +33,18 @@
#elif __NetBSD__
#include <sys/param.h>
#include <sys/ioctl.h>
@@ -19,6 +19,9 @@ $NetBSD: patch-aa,v 1.7 2008/12/17 12:57:27 hira Exp $
+/* On NetBSD/sparc64, apmvar.h is not exist in /usr/include/machine. */
+/* Reported in PR port-sparc64/36735. */
+#include <sparc/apmvar.h>
++#elif defined(__x86_64__)
++#include <dev/apm/apmbios.h>
++#include <dev/apm/apmio.h>
+#else
#include <machine/apmvar.h>
+#endif
@@ -27,7 +30,7 @@ $NetBSD: patch-aa,v 1.7 2008/12/17 12:57:27 hira Exp $
#elif __linux__
#include <libapm.h>
#endif
-@@ -155,7 +162,7 @@
+@@ -155,7 +165,7 @@
gboolean
detect_battery_info(t_battmon *battmon)
{
@@ -36,7 +39,7 @@ $NetBSD: patch-aa,v 1.7 2008/12/17 12:57:27 hira 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 +216,7 @@
+@@ -209,7 +217,7 @@
battmon->method = BM_BROKEN;
fd = open(APMDEVICE, O_RDONLY);
if (fd == -1) return FALSE;
@@ -45,7 +48,7 @@ $NetBSD: patch-aa,v 1.7 2008/12/17 12:57:27 hira Exp $
close(fd);
return FALSE;
}
-@@ -302,13 +309,16 @@
+@@ -302,13 +312,16 @@
battmon->method = BM_BROKEN;
fd = open(APMDEVICE, O_RDONLY);
if (fd == -1) return TRUE;
@@ -63,7 +66,7 @@ $NetBSD: patch-aa,v 1.7 2008/12/17 12:57:27 hira Exp $
#else
struct apm_info apm;
DBG ("Updating battery status...");
-@@ -404,7 +414,7 @@
+@@ -404,7 +417,7 @@
acline = apm.ac_line_status ? TRUE : FALSE;
}
@@ -72,7 +75,7 @@ $NetBSD: patch-aa,v 1.7 2008/12/17 12:57:27 hira Exp $
else {
/* This is how I read the information from the APM subsystem under
FreeBSD. Each time this functions is called (once every second)
-@@ -464,6 +474,11 @@
+@@ -464,6 +475,11 @@
if(battmon->options.display_percentage && !(battmon->options.hide_when_full && acline && charge >= 99)){
gtk_widget_show((GtkWidget *)battmon->charge);
@@ -84,7 +87,7 @@ $NetBSD: patch-aa,v 1.7 2008/12/17 12:57:27 hira Exp $
g_snprintf(buffer, sizeof(buffer),"%d%% ", charge);
gtk_label_set_text(battmon->charge,buffer);
} else {
-@@ -481,6 +496,11 @@
+@@ -481,6 +501,11 @@
}
gtk_widget_show((GtkWidget *)active_label);