The battery plugin is currently i386 only and failes to build on amd64 because apm is not available there. This patch enables apm only for i386 and fixes some apm variable declarations which makes it build and usable on amd64. (submitted by:Bernhard Froehlich <decke@bluelife.at>)
Created attachment 1496 patch here the patch
This patch doesn't seem sufficient, at least on Debian/kfreebsd-amd64: cc -DHAVE_CONFIG_H -I. -I.. -I.. -DG_LOG_DOMAIN=\"xfce4-battery-plugin\" -DPACKAGE_LOCALE_DIR=\"/usr/share/locale\" -DPNG_NO_MMX_CODE -I/usr/include/xfce4/ -I/usr/include/xfce4 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/atk-1.0 -DPNG_NO_MMX_CODE -I/usr/include/xfce4 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/atk-1.0 -I/usr/include/xfce4 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DPNG_NO_MMX_CODE -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -g -Wall -O2 -c -o xfce4_battery_plugin-battery.o `test -f 'battery.c' || echo './'`battery.c In file included from battery.c:29: /usr/include/machine/apm_bios.h:8:3: error: #error This header is not available for amd64 battery.c: In function ‘update_apm_status’: battery.c:313: error: storage size of ‘apm’ isn’t known battery.c:313: warning: unused variable ‘apm’ make[3]: *** [xfce4_battery_plugin-battery.o] Error 1 make[3]: Leaving directory `/home/corsac/xfce/xfce4-battery-plugin-0.5.0/panel-plugin' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/corsac/xfce/xfce4-battery-plugin-0.5.0' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/corsac/xfce/xfce4-battery-plugin-0.5.0' make: *** [debian/stamp-makefile-build] Error 2 debuild: fatal error at line 1237: debian/rules build failed Anyway, the patch comment says it enables apm only for i386 but I can't see anything in it doing that. Is it the good one? Cheers
Created attachment 1498 this is the right patch now I'm sorry, this is the right patch now. The other one seems to be a different one not related to this problem.
Your patch will break linux builds (where apm is present but APMDEVICE is not)
Attached patch builds on kfreebsd-amd64 and linux-amd64. Cheers,
Created attachment 1501 Patch fixing build on kfreebsd-amd64, works on linux
patch applied with minor modifications. Thanks