Date: Thu, 11 Sep 2008 01:19:39 GMT From: Carlos Santos <unixmania@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/127282: sysutils/xfce4-battery-plugin build on non-i386 again Message-ID: <200809110119.m8B1JdmS071591@www.freebsd.org> Resent-Message-ID: <200809110120.m8B1K2OD095298@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 127282 >Category: ports >Synopsis: sysutils/xfce4-battery-plugin build on non-i386 again >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Sep 11 01:20:02 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Carlos Santos >Release: 7_STABLE >Organization: Not applicable >Environment: FreeBSD casantos.casantos.org 7.0-STABLE FreeBSD 7.0-STABLE #4: Thu Jul 17 21:07:23 BRT 2008 root@casantos.casantos.org:/local/FreeBSD/src-stable/sys/amd64/compile/HP_NX6320_70_AMD64 amd64 >Description: The upgrade to version 0.5.1 disabled the build for AMD64 that was enabled by PR #125514. I guess that this was because of a potential build failure because panel-plugin/battery.c attempts to include machine/apm_bios.h. APM is available only on i386 but the plugin can use ACPI, that is available on other platforms. >How-To-Repeat: Try to build sysutils/xfce4-battery-plugin as of Fri Sep 5 14:15:36 2008 UTC on AMD64. >Fix: Apply the attached patch. It makes the inclusion of machine/apm_bios.h conditional to the i386 architecture. Patch attached with submission follows: diff -dur xfce4-battery-plugin.orig/Makefile xfce4-battery-plugin/Makefile --- xfce4-battery-plugin.orig/Makefile 2008-09-05 11:15:36.000000000 -0300 +++ xfce4-battery-plugin/Makefile 2008-09-10 21:36:11.000000000 -0300 @@ -7,6 +7,7 @@ PORTNAME= xfce4-battery-plugin PORTVERSION= 0.5.1 +PORTREVISION= 1 CATEGORIES= sysutils xfce MASTER_SITES= http://goodies.xfce.org/releases/${PORTNAME}/ DIST_SUBDIR= xfce4 @@ -14,8 +15,6 @@ MAINTAINER= miwi@FreeBSD.org COMMENT= Battery monitor panel plugin for XFce4 -ONLY_FOR_ARCHS= i386 - GNU_CONFIGURE= yes USE_BZIP2= yes USE_GETTEXT= yes diff -dur xfce4-battery-plugin.orig/files/patch-panel-plug-battery.c xfce4-battery-plugin/files/patch-panel-plug-battery.c --- xfce4-battery-plugin.orig/files/patch-panel-plug-battery.c 2008-09-06 20:07:25.000000000 -0300 +++ xfce4-battery-plugin/files/patch-panel-plug-battery.c 2008-09-10 21:54:59.000000000 -0300 @@ -1,6 +1,16 @@ ---- panel-plugin/battery.c.orgi 2008-09-04 22:53:40.000000000 +0200 -+++ panel-plugin/battery.c 2008-09-05 10:02:08.000000000 +0200 -@@ -163,7 +163,9 @@ +--- panel-plugin/battery.c.orig 2008-09-04 17:53:40.000000000 -0300 ++++ panel-plugin/battery.c 2008-09-10 21:53:56.000000000 -0300 +@@ -26,7 +26,9 @@ + #endif + + #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ++#if defined(__i386___) + #include <machine/apm_bios.h> ++#endif + #elif __OpenBSD__ + #include <sys/param.h> + #include <machine/apmvar.h> +@@ -163,7 +165,9 @@ except that is does not work on FreeBSD */ @@ -10,7 +20,7 @@ int fd; /* First check to see if ACPI is available */ -@@ -310,7 +312,9 @@ +@@ -310,7 +314,9 @@ acline = apm.ac_state ? TRUE : FALSE; #else @@ -21,7 +31,7 @@ DBG ("Updating battery status..."); if(battmon->method == BM_BROKEN) { -@@ -382,6 +386,7 @@ +@@ -382,6 +388,7 @@ rate = last_rate; } @@ -29,7 +39,7 @@ charge = (((float)ccapacity)/((float)lcapacity))*100; if ( last_acline ) -@@ -394,6 +399,17 @@ +@@ -394,6 +401,17 @@ last_acline = acline; >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200809110119.m8B1JdmS071591>