pkg/42280: sysutils/xfce4-battery-plugin fails compile on NetBSD amd64

View: New views
4 Messages — Rating Filter:   Alert me  

Parent Message unknown pkg/42280: sysutils/xfce4-battery-plugin fails compile on NetBSD amd64

by sno-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>Number:         42280
>Category:       pkg
>Synopsis:       sysutils/xfce4-battery-plugin fails compile on NetBSD amd64
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 07 11:35:00 +0000 2009
>Originator:     Jens Rehsack
>Release:        5.99.21
>Organization:
>Environment:
NetBSD bert 5.99.21 NetBSD 5.99.21 (BERT) #2: Fri Nov  6 22:47:30 CET 2009  trevor@bert:/usr/obj/usr/src/sys/arch/amd64/compile/BERT amd64
>Description:
On my NetBSD-5.99.21 the required <machine/apmvar.h> doesn't exists. So I modified patches/patch-aa to use <i386/apmvar.h> from amd64.
Because I'm not sure if this is correct or I did anything else wrong, instead of blind committing I ask for someone with more experience there to take the issue and have a look.
>How-To-Repeat:
Compile sysutils/xfce4-battery-plugin on NetBSD-5.99.21/amd64
>Fix:
Index: sysutils/xfce4-battery-plugin/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/xfce4-battery-plugin/distinfo,v
retrieving revision 1.7
diff -u -u -r1.7 distinfo
--- sysutils/xfce4-battery-plugin/distinfo      17 Dec 2008 12:57:27 -0000      1.7
+++ sysutils/xfce4-battery-plugin/distinfo      7 Nov 2009 11:30:16 -0000
@@ -3,4 +3,4 @@
 SHA1 (xfce4-battery-plugin-0.5.1.tar.bz2) = f97c1b6445c8da07c17353ae385b5fadb2fd5f1a
 RMD160 (xfce4-battery-plugin-0.5.1.tar.bz2) = ee770f06226cf8dfed95892c152ae3a2a446079a
 Size (xfce4-battery-plugin-0.5.1.tar.bz2) = 227940 bytes
-SHA1 (patch-aa) = 2293c172ad3f8414168e012d6a982d1ff017c5e3
+SHA1 (patch-aa) = cae6416447358b9584249990ff273a85c7439980
Index: sysutils/xfce4-battery-plugin/patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/xfce4-battery-plugin/patches/patch-aa,v
retrieving revision 1.7
diff -u -u -r1.7 patch-aa
--- sysutils/xfce4-battery-plugin/patches/patch-aa      17 Dec 2008 12:57:27 -0000      1.7
+++ sysutils/xfce4-battery-plugin/patches/patch-aa      7 Nov 2009 11:30:16 -0000
@@ -1,7 +1,7 @@
 $NetBSD: patch-aa,v 1.7 2008/12/17 12:57:27 hira Exp $
 
---- panel-plugin/battery.c.orig        2008-09-05 05:53:40.000000000 +0900
-+++ panel-plugin/battery.c     2008-11-27 22:16:05.000000000 +0900
+--- panel-plugin/battery.c.orig        2008-09-04 22:53:40.000000000 +0200
++++ panel-plugin/battery.c     2009-10-19 11:49:34.000000000 +0200
 @@ -25,7 +25,7 @@
  #include <config.h>
  #endif
@@ -11,7 +11,7 @@
  #include <machine/apm_bios.h>
  #elif __OpenBSD__
  #include <sys/param.h>
-@@ -33,8 +33,15 @@
+@@ -33,8 +33,17 @@
  #elif __NetBSD__
  #include <sys/param.h>
  #include <sys/ioctl.h>
@@ -19,6 +19,8 @@
 +/* On NetBSD/sparc64, apmvar.h is not exist in /usr/include/machine. */
 +/* Reported in PR port-sparc64/36735. */
 +#include <sparc/apmvar.h>
++#elif defined(__amd64__)
++#include <i386/apmvar.h>
 +#else
  #include <machine/apmvar.h>
 +#endif
@@ -27,7 +29,7 @@
  #elif __linux__
  #include <libapm.h>
  #endif
-@@ -155,7 +162,7 @@
+@@ -155,7 +164,7 @@
  gboolean
  detect_battery_info(t_battmon *battmon)
  {
@@ -36,7 +38,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 +216,7 @@
+@@ -209,7 +218,7 @@
        battmon->method = BM_BROKEN;
        fd = open(APMDEVICE, O_RDONLY);
        if (fd == -1) return FALSE;
@@ -45,7 +47,7 @@
          close(fd);
               return FALSE;
      }
-@@ -302,13 +309,16 @@
+@@ -302,13 +311,16 @@
        battmon->method = BM_BROKEN;
        fd = open(APMDEVICE, O_RDONLY);
        if (fd == -1) return TRUE;
@@ -63,7 +65,7 @@
  #else
      struct apm_info apm;
      DBG ("Updating battery status...");
-@@ -404,7 +414,7 @@
+@@ -404,7 +416,7 @@
          acline = apm.ac_line_status ? TRUE : FALSE;
 
      }
@@ -72,7 +74,7 @@
      else {
   /* This is how I read the information from the APM subsystem under
       FreeBSD.  Each time this functions is called (once every second)
-@@ -464,6 +474,11 @@
+@@ -464,6 +476,11 @@
 
      if(battmon->options.display_percentage && !(battmon->options.hide_when_full && acline && charge >= 99)){
          gtk_widget_show((GtkWidget *)battmon->charge);
@@ -84,7 +86,7 @@
          g_snprintf(buffer, sizeof(buffer),"%d%% ", charge);
          gtk_label_set_text(battmon->charge,buffer);
      } else {
-@@ -481,6 +496,11 @@
+@@ -481,6 +498,11 @@
          }
 
          gtk_widget_show((GtkWidget *)active_label);


Parent Message unknown Re: pkg/42280: sysutils/xfce4-battery-plugin fails compile on NetBSD amd64

by OBATA Akio-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The following reply was made to PR pkg/42280; it has been noted by GNATS.

From: "OBATA Akio" <obache@...>
To: gnats-bugs@...
Cc:
Subject: Re: pkg/42280: sysutils/xfce4-battery-plugin fails compile on NetBSD
 amd64
Date: Thu, 12 Nov 2009 17:52:28 +0900

 For NetBSD, dev/apm/apmio.h should be included instead of machine/apmvar.h?
 

Re: pkg/42280: sysutils/xfce4-battery-plugin fails compile on NetBSD amd64

by Jens Rehsack-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

OBATA Akio wrote:

> The following reply was made to PR pkg/42280; it has been noted by GNATS.
>
> From: "OBATA Akio" <obache@...>
> To: gnats-bugs@...
> Cc:
> Subject: Re: pkg/42280: sysutils/xfce4-battery-plugin fails compile on NetBSD
>  amd64
> Date: Thu, 12 Nov 2009 17:52:28 +0900
>
>  For NetBSD, dev/apm/apmio.h should be included instead of machine/apmvar.h?
Results in:

battery.c: In function 'update_apm_status':
battery.c:480: error: 'APM_BATT_ABSENT' undeclared (first use in this function)
battery.c:480: error: (Each undeclared identifier is reported only once
battery.c:480: error: for each function it appears in.)
gmake[2]: *** [xfce4_battery_plugin-battery.o] Error 1

But thanks for the hint.

Jens

Parent Message unknown Re: pkg/42280: sysutils/xfce4-battery-plugin fails compile on NetBSD amd64

by Jens Rehsack-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The following reply was made to PR pkg/42280; it has been noted by GNATS.

From: Jens Rehsack <rehsack@...>
To: gnats-bugs@...
Cc: pkg-manager@..., gnats-admin@...,
 pkgsrc-bugs@...
Subject: Re: pkg/42280: sysutils/xfce4-battery-plugin fails compile on NetBSD
 amd64
Date: Sat, 14 Nov 2009 09:26:30 +0000

 OBATA Akio wrote:
 > The following reply was made to PR pkg/42280; it has been noted by GNATS.
 >
 > From: "OBATA Akio" <obache@...>
 > To: gnats-bugs@...
 > Cc:
 > Subject: Re: pkg/42280: sysutils/xfce4-battery-plugin fails compile on NetBSD
 >  amd64
 > Date: Thu, 12 Nov 2009 17:52:28 +0900
 >
 >  For NetBSD, dev/apm/apmio.h should be included instead of machine/apmvar.h?
 Results in:
 
 battery.c: In function 'update_apm_status':
 battery.c:480: error: 'APM_BATT_ABSENT' undeclared (first use in this function)
 battery.c:480: error: (Each undeclared identifier is reported only once
 battery.c:480: error: for each function it appears in.)
 gmake[2]: *** [xfce4_battery_plugin-battery.o] Error 1
 
 But thanks for the hint.
 
 Jens