diff --git a/comms/lcdproc/Makefile b/comms/lcdproc/Makefile index 488da67887a..c70e3b6a687 100644 --- a/comms/lcdproc/Makefile +++ b/comms/lcdproc/Makefile @@ -1,10 +1,10 @@ -# $OpenBSD: Makefile,v 1.6 2012/01/25 16:15:22 sthen Exp $ +# $OpenBSD: Makefile,v 1.7 2012/02/28 10:32:00 edd Exp $ SHARED_ONLY = Yes COMMENT = interface to various LCD displays DISTNAME = lcdproc-0.5.5 -REVISION = 2 +REVISION = 3 CATEGORIES = comms devel HOMEPAGE = http://www.lcdproc.org MAINTAINER = Edd Barrett @@ -27,7 +27,7 @@ USE_GMAKE = Yes MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=lcdproc/} CONFIGURE_STYLE = gnu -CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}/include" \ +CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}/include ${WITH_APM}" \ LDFLAGS="-L${LOCALBASE}/lib -pthread" # xosd driver is busted, working on it upstream # http://lists.omnipotent.net/pipermail/lcdproc/2011-November/013871.html @@ -53,4 +53,10 @@ PKG_ARGS += -Dparallel=1 PKG_ARGS += -Dparallel=0 .endif +.include + +.if ${PROPERTIES:Mapm} +WITH_APM = -DWITH_APM +.endif + .include diff --git a/comms/lcdproc/patches/patch-clients_lcdproc_machine_OpenBSD_c b/comms/lcdproc/patches/patch-clients_lcdproc_machine_OpenBSD_c index 8aecc7a500d..9fa1097aced 100644 --- a/comms/lcdproc/patches/patch-clients_lcdproc_machine_OpenBSD_c +++ b/comms/lcdproc/patches/patch-clients_lcdproc_machine_OpenBSD_c @@ -1,19 +1,22 @@ -$OpenBSD: patch-clients_lcdproc_machine_OpenBSD_c,v 1.1.1.1 2011/12/01 19:05:11 edd Exp $ +$OpenBSD: patch-clients_lcdproc_machine_OpenBSD_c,v 1.2 2012/02/28 10:32:00 edd Exp $ The code distributed with LCDproc for querying the process table is out of date. ---- clients/lcdproc/machine_OpenBSD.c.orig Tue Nov 15 13:12:02 2011 -+++ clients/lcdproc/machine_OpenBSD.c Tue Nov 15 13:34:52 2011 -@@ -50,7 +50,7 @@ +--- clients/lcdproc/machine_OpenBSD.c.orig Mon Dec 27 13:32:56 2010 ++++ clients/lcdproc/machine_OpenBSD.c Tue Feb 21 08:40:04 2012 +@@ -49,8 +49,9 @@ + #include #include #include - /* take care if $ARCH != i386! */ +-/* take care if $ARCH != i386! */ -#include ++#ifdef WITH_APM +#include ++#endif #include #include -@@ -61,7 +61,7 @@ +@@ -61,7 +62,7 @@ static int pageshift; #define pagetok(size) ((size) << pageshift) @@ -22,7 +25,27 @@ The code distributed with LCDproc for querying the process table is out of date. int machine_init(void) -@@ -294,7 +294,7 @@ int machine_get_procs(LinkedList *procs) +@@ -88,6 +89,7 @@ int machine_close(void) + + int machine_get_battstat(int *acstat, int *battflag, int *percent) + { ++#ifdef WITH_APM + int apmd; + struct apm_power_info api; + +@@ -145,6 +147,11 @@ int machine_get_battstat(int *acstat, int *battflag, i + *percent = api.battery_life; + + close(apmd); ++#else ++ *acstat = LCDP_AC_ON; ++ *battflag = LCDP_BATT_ABSENT; ++ *percent = 100; ++#endif + + return(TRUE); + } +@@ -294,7 +301,7 @@ int machine_get_procs(LinkedList *procs) return(FALSE); } @@ -31,7 +54,7 @@ The code distributed with LCDproc for querying the process table is out of date. if (kprocs == NULL) { perror("kvm_getprocs"); -@@ -311,10 +311,10 @@ int machine_get_procs(LinkedList *procs) +@@ -311,10 +318,10 @@ int machine_get_procs(LinkedList *procs) kvm_close(kvmd); return(FALSE); }