aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/batmon
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2011-10-20 02:53:33 +0800
committerdinoex <dinoex@FreeBSD.org>2011-10-20 02:53:33 +0800
commite598321a3445e9226e6c864edf1df0564778abad (patch)
treed5ebe81a1ab9d3b0dca2e4fa8caff39385d24020 /sysutils/batmon
parent6ea23239d5e80c67de7beb86c3af573df9c198e1 (diff)
downloadfreebsd-ports-gnome-e598321a3445e9226e6c864edf1df0564778abad.tar.gz
freebsd-ports-gnome-e598321a3445e9226e6c864edf1df0564778abad.tar.zst
freebsd-ports-gnome-e598321a3445e9226e6c864edf1df0564778abad.zip
- fix build for FreeBSD-8-STABLE and FreeBSD-9
Diffstat (limited to 'sysutils/batmon')
-rw-r--r--sysutils/batmon/Makefile8
-rw-r--r--sysutils/batmon/files/patch-BatteryModel.m14
2 files changed, 15 insertions, 7 deletions
diff --git a/sysutils/batmon/Makefile b/sysutils/batmon/Makefile
index 52f3cdca3e8c..bbf97eaf297a 100644
--- a/sysutils/batmon/Makefile
+++ b/sysutils/batmon/Makefile
@@ -25,10 +25,4 @@ post-patch:
${REINPLACE_CMD} -e 's|^GNUSTEP_INSTALLATION_DIR|#GNUSTEP_INSTALLATION_DIR|' \
${WRKSRC}/GNUmakefile
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 900007
-BROKEN= needed API not availible
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/sysutils/batmon/files/patch-BatteryModel.m b/sysutils/batmon/files/patch-BatteryModel.m
new file mode 100644
index 000000000000..ac15b2a3fed2
--- /dev/null
+++ b/sysutils/batmon/files/patch-BatteryModel.m
@@ -0,0 +1,14 @@
+--- BatteryModel.m.orig 2011-07-15 11:05:22.000000000 +0200
++++ BatteryModel.m 2011-10-19 20:45:35.000000000 +0200
+@@ -246,7 +246,11 @@
+ if( battio.bst.state & ACPI_BATT_STAT_CRITICAL )
+ batteryType = @"CRITICAL "; // could be complementary!
+
++#ifdef ACPI_BATT_STAT_BST_MASK
++ if( battio.bst.state & ACPI_BATT_STAT_BST_MASK )
++#else
+ if( battio.bst.state & ACPI_BATT_STAT_MAX )
++#endif
+ status = @"Charged";
+ if( battio.bst.state & ACPI_BATT_STAT_CHARGING )
+ status = @"Charging";