diff options
author | wiz <wiz@pkgsrc.org> | 2004-07-26 23:25:19 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2004-07-26 23:25:19 +0000 |
commit | 71298233110b0a07a97886c97f964cc03124ec05 (patch) | |
tree | 144d5aacde18ccce075ad3a31585bf3db58416b5 /sysutils/asapm | |
parent | f594025eadf6c89495f48d29f926a0acf5575fac (diff) | |
download | pkgsrc-71298233110b0a07a97886c97f964cc03124ec05.tar.gz |
Add patch from Michael Eriksson in PR 26438:
The patches for asapm to try sysmon if APM fails, only support battery
info in units of Watts and Watt hours. However, some machines like my
Compaq Presario X1007EA laptop uses units of Amperes and Ampere hours.
Bump PKGREVISION.
Diffstat (limited to 'sysutils/asapm')
-rw-r--r-- | sysutils/asapm/Makefile | 4 | ||||
-rw-r--r-- | sysutils/asapm/distinfo | 4 | ||||
-rw-r--r-- | sysutils/asapm/patches/patch-af | 14 |
3 files changed, 12 insertions, 10 deletions
diff --git a/sysutils/asapm/Makefile b/sysutils/asapm/Makefile index 01e09333878..ebb27395ac5 100644 --- a/sysutils/asapm/Makefile +++ b/sysutils/asapm/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.28 2004/06/30 14:22:49 kivinen Exp $ +# $NetBSD: Makefile,v 1.29 2004/07/26 23:25:19 wiz Exp $ # DISTNAME= asapm-2.11 CATEGORIES= sysutils x11 -PKGREVISION= 2 +PKGREVISION= 3 MASTER_SITES= http://www.tigr.net/afterstep/download/asapm/ \ ftp://ftp.afterstep.org/apps/asapm/ \ ftp://fuf.sh.cvut.cz/pub/AfterStep/apps/asapm/ diff --git a/sysutils/asapm/distinfo b/sysutils/asapm/distinfo index e230d354acc..983faf9c2e6 100644 --- a/sysutils/asapm/distinfo +++ b/sysutils/asapm/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.8 2004/06/30 14:22:49 kivinen Exp $ +$NetBSD: distinfo,v 1.9 2004/07/26 23:25:19 wiz Exp $ SHA1 (asapm-2.11.tar.gz) = cd89c5557d76dbb19ee565435b533ab48f05f102 Size (asapm-2.11.tar.gz) = 58729 bytes @@ -7,4 +7,4 @@ SHA1 (patch-ab) = 8796f1f6220ecdbd23d360bb18f721e1ef83febf SHA1 (patch-ac) = edfe7deae628b9e2aa57b67666f4e7dea13c19bf SHA1 (patch-ad) = 4b6bf84a4cf1881ef0c4e97fbe64201e3437aba1 SHA1 (patch-ae) = 28b0e4c446c466a90d4a2ae0952b2326385a8c6c -SHA1 (patch-af) = 8ae72f1cb8eb6e2d449f37dd186b0bae362c6a13 +SHA1 (patch-af) = 5e16e48db6bdcbc13a27cf32f270ff83e2a2f11d diff --git a/sysutils/asapm/patches/patch-af b/sysutils/asapm/patches/patch-af index 7133a819a7e..e18af936340 100644 --- a/sysutils/asapm/patches/patch-af +++ b/sysutils/asapm/patches/patch-af @@ -1,4 +1,4 @@ -$NetBSD: patch-af,v 1.4 2004/06/30 14:22:49 kivinen Exp $ +$NetBSD: patch-af,v 1.5 2004/07/26 23:25:19 wiz Exp $ --- apm_read.c.orig 2001-11-23 23:07:19.000000000 +0200 +++ apm_read.c @@ -10,7 +10,7 @@ $NetBSD: patch-af,v 1.4 2004/06/30 14:22:49 kivinen Exp $ #include "state.h" extern struct apm_state state; -@@ -136,18 +137,183 @@ void ReadAPMDevice( ) /* FreeBSD versio +@@ -136,18 +137,185 @@ state.time_left = info.ai_batt_time / 60; } #elif defined(__NetBSD__)||defined(__OpenBSD__) @@ -84,8 +84,9 @@ $NetBSD: patch-af,v 1.4 2004/06/30 14:22:49 kivinen Exp $ + continue; + +#ifdef HAVE_ENVSYS_SWATTHOUR -+ if (etds.units == ENVSYS_SWATTHOUR) { -+ /* Watt hours, this must be battery capacity info. */ ++ if (etds.units == ENVSYS_SWATTHOUR || ++ etds.units == ENVSYS_SAMPHOUR) { ++ /* Watt or amp hours, this must be battery cap info. */ + if (match_end(ebis.desc, " design cap")) { + design += etds.cur.data_s; + } else if (match_end(ebis.desc, " charge")) { @@ -108,8 +109,9 @@ $NetBSD: patch-af,v 1.4 2004/06/30 14:22:49 kivinen Exp $ + + } +#endif /* HAVE_ENVSYS_INDICATOR */ -+ if (etds.units == ENVSYS_SWATTS) { -+ /* Watts, this must discharge rate. */ ++ if (etds.units == ENVSYS_SWATTS || ++ etds.units == ENVSYS_SAMPS) { ++ /* Watts or apms, this must discharge rate. */ + if (match_end(ebis.desc, " discharge rate")) { + discharge_rate += etds.cur.data_s; + } else if (match_end(ebis.desc, " charge rate")) { |