aboutsummaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2007-02-09 09:14:15 +0000
committerMartin Wilke <miwi@FreeBSD.org>2007-02-09 09:14:15 +0000
commitad9967f52450895304dc16f1ddfaed47e4caf8dd (patch)
treebbe2a16c35e15426a44233a8fa71f2e4b580837d /sysutils
parent362febc85c137780722464d3219a355f2c9d44cd (diff)
Notes
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/xfce4-battery-plugin/Makefile1
-rw-r--r--sysutils/xfce4-battery-plugin/files/patch-battery.c31
-rw-r--r--sysutils/xfce4-battery-plugin/pkg-descr2
3 files changed, 33 insertions, 1 deletions
diff --git a/sysutils/xfce4-battery-plugin/Makefile b/sysutils/xfce4-battery-plugin/Makefile
index ee5b17675590..fca129331909 100644
--- a/sysutils/xfce4-battery-plugin/Makefile
+++ b/sysutils/xfce4-battery-plugin/Makefile
@@ -7,6 +7,7 @@
PORTNAME= xfce4-battery-plugin
PORTVERSION= 0.5.0
+PORTREVISION= 1
CATEGORIES= sysutils xfce
MASTER_SITES= http://goodies.xfce.org/releases/${PORTNAME}/
DIST_SUBDIR= xfce4
diff --git a/sysutils/xfce4-battery-plugin/files/patch-battery.c b/sysutils/xfce4-battery-plugin/files/patch-battery.c
new file mode 100644
index 000000000000..847a8f9cd880
--- /dev/null
+++ b/sysutils/xfce4-battery-plugin/files/patch-battery.c
@@ -0,0 +1,31 @@
+--- panel-plugin/battery.c.orig Wed Jan 24 20:42:09 2007
++++ panel-plugin/battery.c Wed Jan 24 20:46:51 2007
+@@ -378,6 +378,7 @@
+ rate = last_rate;
+ }
+
++#ifdef __linux__
+ charge = (((float)ccapacity)/((float)lcapacity))*100;
+
+ if ( last_acline )
+@@ -389,6 +390,20 @@
+ time_remaining = 0;
+
+ last_acline = acline;
++
++#elif __FreeBSD__
++ charge = acpistate->percentage;
++
++ if ( last_acline )
++ time_remaining = acpistate->rtime;
++ else
++ time_remaining = acpistate->rtime;
++
++ if ( time_remaining < 0 )
++ time_remaining = 0;
++
++ last_acline = acline;
++#endif
+
+ }
+ #ifdef __linux__
diff --git a/sysutils/xfce4-battery-plugin/pkg-descr b/sysutils/xfce4-battery-plugin/pkg-descr
index cfaa0e46e1ec..ebeeca3d4ea1 100644
--- a/sysutils/xfce4-battery-plugin/pkg-descr
+++ b/sysutils/xfce4-battery-plugin/pkg-descr
@@ -1,3 +1,3 @@
Battery monitor panel plugin for XFce4.
-WWW: http://www.xfce.org/
+WWW: http://goodies.xfce.org/projects/panel-plugins/xfce4-battery-plugin