summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorjoerg <joerg>2007-06-30 17:40:50 +0000
committerjoerg <joerg>2007-06-30 17:40:50 +0000
commitc0ab6dc309463904ce8ab0a88adfd5dcc9040d37 (patch)
tree385b4c8320752f7f95509f63e3b74d21338617e9 /sysutils
parent71254aca7c554977a47c0b7add1e942f325efe71 (diff)
downloadpkgsrc-c0ab6dc309463904ce8ab0a88adfd5dcc9040d37.tar.gz
Add untested DragonFly support.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/xfce4-battery-plugin/distinfo4
-rw-r--r--sysutils/xfce4-battery-plugin/patches/patch-aa41
2 files changed, 36 insertions, 9 deletions
diff --git a/sysutils/xfce4-battery-plugin/distinfo b/sysutils/xfce4-battery-plugin/distinfo
index ef55688f9db..badc3377d9d 100644
--- a/sysutils/xfce4-battery-plugin/distinfo
+++ b/sysutils/xfce4-battery-plugin/distinfo
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.3 2007/05/04 10:13:12 hira Exp $
+$NetBSD: distinfo,v 1.4 2007/06/30 17:40:50 joerg 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) = 0b65b74f40079416167b6d85abc76006f2f2eced
+SHA1 (patch-aa) = b0eb860a4c1f18c2ececa01e4e8e3816cecc852c
diff --git a/sysutils/xfce4-battery-plugin/patches/patch-aa b/sysutils/xfce4-battery-plugin/patches/patch-aa
index a1a671c42df..a958881a90f 100644
--- a/sysutils/xfce4-battery-plugin/patches/patch-aa
+++ b/sysutils/xfce4-battery-plugin/patches/patch-aa
@@ -1,7 +1,16 @@
-$NetBSD: patch-aa,v 1.3 2007/05/04 10:13:12 hira Exp $
+$NetBSD: patch-aa,v 1.4 2007/06/30 17:40:50 joerg Exp $
---- panel-plugin/battery.c.orig 2007-01-18 02:56:51.000000000 +0900
-+++ panel-plugin/battery.c 2007-05-01 01:32:49.000000000 +0900
+--- panel-plugin/battery.c.orig 2007-01-17 17:56:51.000000000 +0000
++++ panel-plugin/battery.c
+@@ -25,7 +25,7 @@
+ #include <config.h>
+ #endif
+
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__DragonFly__)
+ #include <machine/apm_bios.h>
+ #elif __OpenBSD__
+ #include <sys/param.h>
@@ -35,6 +35,7 @@
#include <sys/ioctl.h>
#include <machine/apmvar.h>
@@ -10,7 +19,16 @@ $NetBSD: patch-aa,v 1.3 2007/05/04 10:13:12 hira Exp $
#elif __linux__
#include <libapm.h>
#endif
-@@ -209,7 +210,7 @@
+@@ -155,7 +156,7 @@ init_options(t_battmon_options *options)
+ gboolean
+ detect_battery_info(t_battmon *battmon)
+ {
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__DragonFly__)
+ /* 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)
battmon->method = BM_BROKEN;
fd = open(APMDEVICE, O_RDONLY);
if (fd == -1) return FALSE;
@@ -19,7 +37,7 @@ $NetBSD: patch-aa,v 1.3 2007/05/04 10:13:12 hira Exp $
close(fd);
return FALSE;
}
-@@ -302,13 +303,16 @@
+@@ -302,13 +303,16 @@ update_apm_status(t_battmon *battmon)
battmon->method = BM_BROKEN;
fd = open(APMDEVICE, O_RDONLY);
if (fd == -1) return TRUE;
@@ -37,7 +55,16 @@ $NetBSD: patch-aa,v 1.3 2007/05/04 10:13:12 hira Exp $
#else
struct apm_info apm;
DBG ("Updating battery status...");
-@@ -460,6 +464,11 @@
+@@ -400,7 +404,7 @@ update_apm_status(t_battmon *battmon)
+ acline = apm.ac_line_status ? TRUE : FALSE;
+
+ }
+-#elif __FreeBSD__
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
+ 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
if(battmon->options.display_percentage && !(battmon->options.hide_when_full && acline && charge >= 99)){
gtk_widget_show((GtkWidget *)battmon->charge);
@@ -49,7 +76,7 @@ $NetBSD: patch-aa,v 1.3 2007/05/04 10:13:12 hira Exp $
g_snprintf(buffer, sizeof(buffer),"%d%% ", charge);
gtk_label_set_text(battmon->charge,buffer);
} else {
-@@ -477,6 +486,11 @@
+@@ -477,6 +486,11 @@ battmon.c:241: for each function it appe
}
gtk_widget_show((GtkWidget *)active_label);