- Update to 3.0.
PR: ports/81728 Submitted by: Ports Fury
This commit is contained in:
parent
8257f10f27
commit
bbbf562204
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=136545
4 changed files with 35 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
29
sysutils/asapm/files/patch-apm_read.c
Normal file
29
sysutils/asapm/files/patch-apm_read.c
Normal file
|
@ -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 ?
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue