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 On NetBSD/sparc64, use /...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/87cef1996a76
branches:  trunk
changeset: 537222:87cef1996a76
user:      hira <hira%pkgsrc.org@localhost>
date:      Sat Jan 05 05:35:20 2008 +0000

description:
On NetBSD/sparc64, use /usr/include/sparc/apmvar.h instead of
/usr/include/machine/apmvar.h until PR pkg/36735 is fixed.
Pointed out by obache@.  OK'd by maintainer.

diffstat:

 sysutils/xfce4-battery-plugin/Makefile         |   8 +++++-
 sysutils/xfce4-battery-plugin/distinfo         |   4 +-
 sysutils/xfce4-battery-plugin/patches/patch-aa |  28 ++++++++++++++++---------
 3 files changed, 26 insertions(+), 14 deletions(-)

diffs (119 lines):

diff -r 6b9a6effad63 -r 87cef1996a76 sysutils/xfce4-battery-plugin/Makefile
--- a/sysutils/xfce4-battery-plugin/Makefile    Sat Jan 05 05:27:39 2008 +0000
+++ b/sysutils/xfce4-battery-plugin/Makefile    Sat Jan 05 05:35:20 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2007/12/30 09:37:23 hira Exp $
+# $NetBSD: Makefile,v 1.5 2008/01/05 05:35:20 hira Exp $
 
 .include "../../meta-pkgs/xfce4/Makefile.common"
 
@@ -10,7 +10,11 @@
 MASTER_SITES=  http://goodies.xfce.org/releases/xfce4-battery-plugin/
 COMMENT=       Xfce battey monitor plugin
 
-.if ${OPSYS} == "NetBSD" && !exists(/usr/include/machine/apmvar.h)
+# On NetBSD/sparc64, apmvar.h is not exist in /usr/include/machine.
+# Reported in PR pkg/36735.
+.if ${OPSYS} == "NetBSD" &&                    \
+    (!exists(/usr/include/machine/apmvar.h) && \
+     !exists(/usr/include/sparc/apmvar.h))
 PKG_FAIL_REASON+=      "APM is not available on ${MACHINE_PLATFORM}."
 .endif
 
diff -r 6b9a6effad63 -r 87cef1996a76 sysutils/xfce4-battery-plugin/distinfo
--- a/sysutils/xfce4-battery-plugin/distinfo    Sat Jan 05 05:27:39 2008 +0000
+++ b/sysutils/xfce4-battery-plugin/distinfo    Sat Jan 05 05:35:20 2008 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.4 2007/06/30 17:40:50 joerg Exp $
+$NetBSD: distinfo,v 1.5 2008/01/05 05:35:20 hira 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) = b0eb860a4c1f18c2ececa01e4e8e3816cecc852c
+SHA1 (patch-aa) = ee4a4ff7f38d1bb5b018dad4dcf0d8cd339972b0
diff -r 6b9a6effad63 -r 87cef1996a76 sysutils/xfce4-battery-plugin/patches/patch-aa
--- a/sysutils/xfce4-battery-plugin/patches/patch-aa    Sat Jan 05 05:27:39 2008 +0000
+++ b/sysutils/xfce4-battery-plugin/patches/patch-aa    Sat Jan 05 05:35:20 2008 +0000
@@ -1,7 +1,7 @@
-$NetBSD: patch-aa,v 1.4 2007/06/30 17:40:50 joerg Exp $
+$NetBSD: patch-aa,v 1.5 2008/01/05 05:35:20 hira Exp $
 
---- panel-plugin/battery.c.orig        2007-01-17 17:56:51.000000000 +0000
-+++ panel-plugin/battery.c
+--- panel-plugin/battery.c.orig        2007-01-18 02:56:51.000000000 +0900
++++ panel-plugin/battery.c     2008-01-03 21:30:22.000000000 +0900
 @@ -25,7 +25,7 @@
  #include <config.h>
  #endif
@@ -11,15 +11,23 @@
  #include <machine/apm_bios.h>
  #elif __OpenBSD__
  #include <sys/param.h>
-@@ -35,6 +35,7 @@
+@@ -33,8 +33,15 @@
+ #elif __NetBSD__
+ #include <sys/param.h>
  #include <sys/ioctl.h>
++#if defined(__sparc64__)
++/* On NetBSD/sparc64, apmvar.h is not exist in /usr/include/machine. */
++/* Reported in PR pkg/36735. */
++#include <sparc/apmvar.h>
++#else
  #include <machine/apmvar.h>
++#endif
  #define APMDEVICE "/dev/apm"
 +#define _ACPI_APM_BATT_UNKNOWN 0xffff /* from sys/dev/acpi/acpi_apm.c */
  #elif __linux__
  #include <libapm.h>
  #endif
-@@ -155,7 +156,7 @@ init_options(t_battmon_options *options)
+@@ -155,7 +162,7 @@
  gboolean
  detect_battery_info(t_battmon *battmon)
  {
@@ -28,7 +36,7 @@
    /* 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)
+@@ -209,7 +216,7 @@
        battmon->method = BM_BROKEN;
        fd = open(APMDEVICE, O_RDONLY);
        if (fd == -1) return FALSE;
@@ -37,7 +45,7 @@
          close(fd);
               return FALSE;
      }
-@@ -302,13 +303,16 @@ update_apm_status(t_battmon *battmon)
+@@ -302,13 +309,16 @@
        battmon->method = BM_BROKEN;
        fd = open(APMDEVICE, O_RDONLY);
        if (fd == -1) return TRUE;
@@ -55,7 +63,7 @@
  #else
      struct apm_info apm;
      DBG ("Updating battery status...");
-@@ -400,7 +404,7 @@ update_apm_status(t_battmon *battmon)
+@@ -400,7 +410,7 @@
          acline = apm.ac_line_status ? TRUE : FALSE;
          
      }
@@ -64,7 +72,7 @@
      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
+@@ -460,6 +470,11 @@
  
      if(battmon->options.display_percentage && !(battmon->options.hide_when_full && acline && charge >= 99)){
          gtk_widget_show((GtkWidget *)battmon->charge);
@@ -76,7 +84,7 @@
          g_snprintf(buffer, sizeof(buffer),"%d%% ", charge);
          gtk_label_set_text(battmon->charge,buffer);
      } else {
-@@ -477,6 +486,11 @@ battmon.c:241: for each function it appe
+@@ -477,6 +492,11 @@
          }
  
          gtk_widget_show((GtkWidget *)active_label);



Home | Main Index | Thread Index | Old Index