aboutsummaryrefslogtreecommitdiff
path: root/sysutils/asapm
diff options
context:
space:
mode:
authorFlorent Thoumie <flz@FreeBSD.org>2005-05-31 17:37:12 +0000
committerFlorent Thoumie <flz@FreeBSD.org>2005-05-31 17:37:12 +0000
commitbbbf56220434552bfe93013ae111a084b2f4b9d1 (patch)
tree5ead91923498fc60195656d0c77a25fe445555aa /sysutils/asapm
parent8257f10f27885ac22ea1191f17b7433e03667e03 (diff)
downloadports-bbbf56220434552bfe93013ae111a084b2f4b9d1.tar.gz
ports-bbbf56220434552bfe93013ae111a084b2f4b9d1.zip
Notes
Diffstat (limited to 'sysutils/asapm')
-rw-r--r--sysutils/asapm/Makefile6
-rw-r--r--sysutils/asapm/distinfo4
-rw-r--r--sysutils/asapm/files/patch-apm_read.c29
-rw-r--r--sysutils/asapm/pkg-descr2
4 files changed, 35 insertions, 6 deletions
diff --git a/sysutils/asapm/Makefile b/sysutils/asapm/Makefile
index 7a1a7160c37c..b9818ea15cb9 100644
--- a/sysutils/asapm/Makefile
+++ b/sysutils/asapm/Makefile
@@ -6,11 +6,9 @@
#
PORTNAME= asapm
-PORTVERSION= 2.13
+PORTVERSION= 3.0
CATEGORIES= sysutils
-MASTER_SITES= http://www.tigr.net/afterstep/download/asapm/ \
- ${MASTER_SITE_AFTERSTEP}
-MASTER_SITE_SUBDIR= apps/asapm
+MASTER_SITES= http://www.tigr.net/afterstep/download/asapm/
MAINTAINER= ports@FreeBSD.org
COMMENT= Laptop battery status display for X11
diff --git a/sysutils/asapm/distinfo b/sysutils/asapm/distinfo
index 19aa9e966e9f..9c13c2354242 100644
--- a/sysutils/asapm/distinfo
+++ b/sysutils/asapm/distinfo
@@ -1,2 +1,2 @@
-MD5 (asapm-2.13.tar.gz) = 858d4072ef767dee76bc73dc1ef47a0c
-SIZE (asapm-2.13.tar.gz) = 59364
+MD5 (asapm-3.0.tar.gz) = 417b2432d1989ed503d1117e4464bd22
+SIZE (asapm-3.0.tar.gz) = 61354
diff --git a/sysutils/asapm/files/patch-apm_read.c b/sysutils/asapm/files/patch-apm_read.c
new file mode 100644
index 000000000000..d89e2d64a0ee
--- /dev/null
+++ b/sysutils/asapm/files/patch-apm_read.c
@@ -0,0 +1,29 @@
+--- apm_read.c.orig Tue May 17 06:49:13 2005
++++ apm_read.c Sun May 29 20:38:24 2005
+@@ -301,6 +301,9 @@
+ unsigned int remaining_capacity = 0;
+ unsigned int present_rate = 0;
+
++ unsigned int percent;
++ unsigned int time_left;
++
+ /* First check if there is an ACPI system */
+ if ((fd = open("/proc/acpi/info", O_RDONLY)) == -1) {
+ error_handle(1, "open_acpi_info_file");
+@@ -503,7 +506,7 @@
+ * Calculate the percentage and time to full charge
+ * or discharge based on the reported rate.
+ */
+- unsigned int percent =
++ percent =
+ last_full_capacity ?
+ (float)remaining_capacity / (float)last_full_capacity * 100
+ : 0;
+@@ -512,7 +515,6 @@
+ ++state.update;
+ }
+
+- unsigned int time_left;
+ if ( state.battery_status == BATTERY_CHARGING ) {
+ time_left =
+ present_rate ?
diff --git a/sysutils/asapm/pkg-descr b/sysutils/asapm/pkg-descr
index c9882762507e..65dafd61d256 100644
--- a/sysutils/asapm/pkg-descr
+++ b/sysutils/asapm/pkg-descr
@@ -6,3 +6,5 @@ battery remaining and (b) estimated time to dead.
NOTE: You need APM driver in your kernel. And enable it to edit
file /etc/rc.conf at `apm_enable=NO' to `YES'.
+
+WWW: http://www.tigr.net/afterstep/view.php?applet=asapm/data