pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/sysutils/xfce4-battery-plugin Add untested DragonFly s...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ac04d74eb7fb
branches:  trunk
changeset: 530445:ac04d74eb7fb
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Sat Jun 30 17:40:50 2007 +0000

description:
Add untested DragonFly support.

diffstat:

 sysutils/xfce4-battery-plugin/distinfo         |   4 +-
 sysutils/xfce4-battery-plugin/patches/patch-aa |  41 +++++++++++++++++++++----
 2 files changed, 36 insertions(+), 9 deletions(-)

diffs (89 lines):

diff -r 0673e95829a3 -r ac04d74eb7fb sysutils/xfce4-battery-plugin/distinfo
--- a/sysutils/xfce4-battery-plugin/distinfo    Sat Jun 30 17:17:33 2007 +0000
+++ b/sysutils/xfce4-battery-plugin/distinfo    Sat Jun 30 17:40:50 2007 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.3 2007/05/04 10:13:12 hira Exp $
+$NetBSD: distinfo,v 1.4 2007/06/30 17:40:50 joerg Exp $
 
 SHA1 (xfce4-battery-plugin-0.5.0.tar.bz2) = 63439d32bfe8411458d41c38824cb393bc31d6e0
 RMD160 (xfce4-battery-plugin-0.5.0.tar.bz2) = bbf64994c7686b11b6a51bd7728569cd2a5d9777
 Size (xfce4-battery-plugin-0.5.0.tar.bz2) = 222269 bytes
-SHA1 (patch-aa) = 0b65b74f40079416167b6d85abc76006f2f2eced
+SHA1 (patch-aa) = b0eb860a4c1f18c2ececa01e4e8e3816cecc852c
diff -r 0673e95829a3 -r ac04d74eb7fb sysutils/xfce4-battery-plugin/patches/patch-aa
--- a/sysutils/xfce4-battery-plugin/patches/patch-aa    Sat Jun 30 17:17:33 2007 +0000
+++ b/sysutils/xfce4-battery-plugin/patches/patch-aa    Sat Jun 30 17:40:50 2007 +0000
@@ -1,7 +1,16 @@
-$NetBSD: patch-aa,v 1.3 2007/05/04 10:13:12 hira Exp $
+$NetBSD: patch-aa,v 1.4 2007/06/30 17:40:50 joerg Exp $
 
---- panel-plugin/battery.c.orig        2007-01-18 02:56:51.000000000 +0900
-+++ panel-plugin/battery.c     2007-05-01 01:32:49.000000000 +0900
+--- panel-plugin/battery.c.orig        2007-01-17 17:56:51.000000000 +0000
++++ panel-plugin/battery.c
+@@ -25,7 +25,7 @@
+ #include <config.h>
+ #endif
+ 
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__DragonFly__)
+ #include <machine/apm_bios.h>
+ #elif __OpenBSD__
+ #include <sys/param.h>
 @@ -35,6 +35,7 @@
  #include <sys/ioctl.h>
  #include <machine/apmvar.h>
@@ -10,7 +19,16 @@
  #elif __linux__
  #include <libapm.h>
  #endif
-@@ -209,7 +210,7 @@
+@@ -155,7 +156,7 @@ init_options(t_battmon_options *options)
+ gboolean
+ detect_battery_info(t_battmon *battmon)
+ {
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__DragonFly__)
+   /* This is how I read the information from the APM subsystem under
+      FreeBSD.  Each time this functions is called (once every second)
+      the APM device is opened, read from and then closed.
+@@ -209,7 +210,7 @@ detect_battery_info(t_battmon *battmon)
        battmon->method = BM_BROKEN;
        fd = open(APMDEVICE, O_RDONLY);
        if (fd == -1) return FALSE;
@@ -19,7 +37,7 @@
          close(fd);
               return FALSE;
      }
-@@ -302,13 +303,16 @@
+@@ -302,13 +303,16 @@ update_apm_status(t_battmon *battmon)
        battmon->method = BM_BROKEN;
        fd = open(APMDEVICE, O_RDONLY);
        if (fd == -1) return TRUE;
@@ -37,7 +55,16 @@
  #else
      struct apm_info apm;
      DBG ("Updating battery status...");
-@@ -460,6 +464,11 @@
+@@ -400,7 +404,7 @@ update_apm_status(t_battmon *battmon)
+         acline = apm.ac_line_status ? TRUE : FALSE;
+         
+     }
+-#elif __FreeBSD__
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
+     else {
+  /* This is how I read the information from the APM subsystem under
+      FreeBSD.  Each time this functions is called (once every second)
+@@ -460,6 +464,11 @@ battmon.c:241: for each function it appe
  
      if(battmon->options.display_percentage && !(battmon->options.hide_when_full && acline && charge >= 99)){
          gtk_widget_show((GtkWidget *)battmon->charge);
@@ -49,7 +76,7 @@
          g_snprintf(buffer, sizeof(buffer),"%d%% ", charge);
          gtk_label_set_text(battmon->charge,buffer);
      } else {
-@@ -477,6 +486,11 @@
+@@ -477,6 +486,11 @@ battmon.c:241: for each function it appe
          }
  
          gtk_widget_show((GtkWidget *)active_label);



Home | Main Index | Thread Index | Old Index