pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/sysutils/xbattbar



Module Name:    pkgsrc
Committed By:   jmcneill
Date:           Sun May  6 14:32:06 UTC 2018

Modified Files:
        pkgsrc/sysutils/xbattbar: Makefile distinfo
        pkgsrc/sysutils/xbattbar/patches: patch-ab

Log Message:
Properly report battery and AC info from axppmic sensors.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 pkgsrc/sysutils/xbattbar/Makefile
cvs rdiff -u -r1.16 -r1.17 pkgsrc/sysutils/xbattbar/distinfo
cvs rdiff -u -r1.9 -r1.10 pkgsrc/sysutils/xbattbar/patches/patch-ab

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/sysutils/xbattbar/Makefile
diff -u pkgsrc/sysutils/xbattbar/Makefile:1.35 pkgsrc/sysutils/xbattbar/Makefile:1.36
--- pkgsrc/sysutils/xbattbar/Makefile:1.35      Wed Sep  6 10:40:33 2017
+++ pkgsrc/sysutils/xbattbar/Makefile   Sun May  6 14:32:06 2018
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.35 2017/09/06 10:40:33 wiz Exp $
+# $NetBSD: Makefile,v 1.36 2018/05/06 14:32:06 jmcneill Exp $
 
 DISTNAME=      xbattbar_1.4.2
 PKGNAME=       ${DISTNAME:S/_/-/}
-PKGREVISION=   9
+PKGREVISION=   10
 CATEGORIES=    sysutils x11
 MASTER_SITES=  http://iplab.aist-nara.ac.jp/member/suguru/
 

Index: pkgsrc/sysutils/xbattbar/distinfo
diff -u pkgsrc/sysutils/xbattbar/distinfo:1.16 pkgsrc/sysutils/xbattbar/distinfo:1.17
--- pkgsrc/sysutils/xbattbar/distinfo:1.16      Wed Nov  4 01:32:39 2015
+++ pkgsrc/sysutils/xbattbar/distinfo   Sun May  6 14:32:06 2018
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.16 2015/11/04 01:32:39 agc Exp $
+$NetBSD: distinfo,v 1.17 2018/05/06 14:32:06 jmcneill Exp $
 
 SHA1 (xbattbar_1.4.2.tar.gz) = 14e9aafd62919e4a625d3f84df3b074b9eef8279
 RMD160 (xbattbar_1.4.2.tar.gz) = f28a273a1865a0919e32144bbb5b16b3c0340061
 SHA512 (xbattbar_1.4.2.tar.gz) = d06aca5c70d0d7feac48f791f676b465d713ca941fbfaa9e8effa80c896873b9cc3f18f1122793cfd096804767e69f1f38dbeeec06a2fe1f82386d53f56372bf
 Size (xbattbar_1.4.2.tar.gz) = 14079 bytes
 SHA1 (patch-aa) = cef5072e9fa9dd8beeceff41e6f2d1c1a45196eb
-SHA1 (patch-ab) = 17def14cb44ef4374aaa0e67e5bef3f1eeb042f7
+SHA1 (patch-ab) = 1d329ca83f6a3ad71c101c7f5fa07ee4fe98b833
 SHA1 (patch-ac) = 507cdf9b4e79dc577d020963142e262d04536527

Index: pkgsrc/sysutils/xbattbar/patches/patch-ab
diff -u pkgsrc/sysutils/xbattbar/patches/patch-ab:1.9 pkgsrc/sysutils/xbattbar/patches/patch-ab:1.10
--- pkgsrc/sysutils/xbattbar/patches/patch-ab:1.9       Fri Jan  4 01:43:58 2008
+++ pkgsrc/sysutils/xbattbar/patches/patch-ab   Sun May  6 14:32:06 2018
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.9 2008/01/04 01:43:58 pooka Exp $
+$NetBSD: patch-ab,v 1.10 2018/05/06 14:32:06 jmcneill Exp $
 
---- xbattbar.c.orig    2001-02-02 07:25:29.000000000 +0200
-+++ xbattbar.c 2008-01-04 03:32:10.000000000 +0200
-@@ -27,6 +27,16 @@
+--- xbattbar.c.orig    2001-02-02 05:25:29.000000000 +0000
++++ xbattbar.c
+@@ -27,6 +27,16 @@ static char *ReleaseVersion="1.4.2";
  
  #include <sys/types.h>
  #include <sys/time.h>
@@ -19,7 +19,7 @@ $NetBSD: patch-ab,v 1.9 2008/01/04 01:43
  #include <signal.h>
  #include <stdio.h>
  #include <unistd.h>
-@@ -577,33 +587,177 @@
+@@ -577,33 +587,190 @@ void battery_check(void)
  
  #ifdef __NetBSD__
  
@@ -164,6 +164,7 @@ $NetBSD: patch-ab,v 1.9 2008/01/04 01:43
 +       if (acpi) {
 +#ifdef HAVE_NETBSD_ACPI
 +              int32_t rtot = 0, maxtot = 0;
++              int have_pct = 0;
 +              p = APM_AC_ON;
 +              for (i = 0 ; i < ns ; i++) {
 +                      if ((etds[i].validflags & ENVSYS_FCURVALID) == 0)
@@ -191,8 +192,20 @@ $NetBSD: patch-ab,v 1.9 2008/01/04 01:43
 +                          strcmp(&ebis[i].desc[cc - 14], "discharge rate") == 0) {
 +                              p = APM_AC_OFF;
 +                      }
++
++                      if (ebis[i].units == ENVSYS_INTEGER &&
++                          strcmp(ebis[i].desc, "battery percent") == 0) {
++                              have_pct = 1;
++                              r = etds[i].cur.data_s;
++                      }
++                      if (ebis[i].units == ENVSYS_INDICATOR &&
++                          strcmp(ebis[i].desc, "ACIN present") == 0 &&
++                          etds[i].cur.data_s == 0) {
++                              p = APM_AC_OFF;
++                      }
 +              }
-+              r = (rtot * 100.0) / maxtot;
++              if (!have_pct)
++                      r = (rtot * 100.0) / maxtot;
 +#endif
 +#ifndef _NO_APM
 +       } else {
@@ -200,7 +213,7 @@ $NetBSD: patch-ab,v 1.9 2008/01/04 01:43
         if (info.battery_life > 100) {
                 /* some APM BIOSes return values slightly > 100 */
                 r = 100;
-@@ -617,6 +771,8 @@
+@@ -617,6 +784,8 @@ void battery_check(void)
         } else {
                 p = APM_AC_OFF;
         }



Home | Main Index | Thread Index | Old Index