summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorLars Koeller <lkoeller@FreeBSD.org>2005-07-03 12:25:23 +0000
committerLars Koeller <lkoeller@FreeBSD.org>2005-07-03 12:25:23 +0000
commit0dab7742cccccc6d3f1bab5490659e8478e4d9a0 (patch)
tree4348607c4a4e321214b50b5b44eb55bf959a70f5 /sysutils
parentThis is a program for translating mainhead grid squares to and from lat/long. (diff)
o) Add switch for SNMP support (ports/82765)
o) Add patch for propper power off of ups device with USB driver on FBSD-5 ("Mike Tancsa" <mike@sentex.net>) PR: ports/82765 Submitted by: Benjamin Constant <bconstant@be.tiauto.com>, "Mike Tancsa" <mike@sentex.net>
Notes
Notes: svn path=/head/; revision=138395
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/apcupsd/Makefile7
-rw-r--r--sysutils/apcupsd/files/patch-autoconf-variables.mak.in19
-rw-r--r--sysutils/apcupsd/files/patch-src-drivers-usb-bsd-hidutils.c19
3 files changed, 45 insertions, 0 deletions
diff --git a/sysutils/apcupsd/Makefile b/sysutils/apcupsd/Makefile
index 1dcdf78165a7..b5a996862a3a 100644
--- a/sysutils/apcupsd/Makefile
+++ b/sysutils/apcupsd/Makefile
@@ -31,6 +31,7 @@ CONFIGURE_ARGS= --prefix=${PREFIX} --sbindir=${PREFIX}/sbin \
OPTIONS= CLIENT_ONLY "Build apcupsd client only (no network server)" off
OPTIONS+= CGI "Compile with CGI programms to show status" off
OPTIONS+= USB "Compile with USB Support (READ MANUAL!!!)" off
+OPTIONS+= SNMP "Compile with SNMP Support (READ MANUAL!!!)" off
.include <bsd.port.pre.mk>
@@ -52,6 +53,11 @@ CONFIGURE_ARGS+=--enable-net
CONFIGURE_ARGS+=--enable-master-slave
.endif
+.if defined(WITH_SNMP)
+LIB_DEPENDS+= netsnmp.7:${PORTSDIR}/net-mgmt/net-snmp
+CONFIGURE_ARGS+=--enable-snmp
+.endif
+
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -L${LOCALBASE}/lib" \
CFLAGS="-I${LOCALBASE}/include -L${LOCALBASE}/lib" \
LDFLAGS="-L${LOCALBASE}/lib"
@@ -75,6 +81,7 @@ pre-everything::
@${ECHO_MSG} " WITH_CGI=yes if you want to build CGI support."
@${ECHO_MSG} " WITH_CLIENT_ONLY=yes if you only want a network client."
@${ECHO_MSG} " WITH_USB=yes to compile with USB support (READ MANUAL!!!)"
+ @${ECHO_MSG} " WITH_SNMP=yes to compile with SNMP support (READ MANUAL!!!)"
@${ECHO_MSG} ""
.if defined(WITH_CGI)
@${ECHO_MSG} "===> Building with CGI support."
diff --git a/sysutils/apcupsd/files/patch-autoconf-variables.mak.in b/sysutils/apcupsd/files/patch-autoconf-variables.mak.in
new file mode 100644
index 000000000000..b7cc967dd77d
--- /dev/null
+++ b/sysutils/apcupsd/files/patch-autoconf-variables.mak.in
@@ -0,0 +1,19 @@
+*** autoconf/variables.mak.in.orig Thu Apr 1 22:32:21 2004
+--- autoconf/variables.mak.in Sun Jul 3 13:00:08 2005
+***************
+*** 90,96 ****
+
+ # Made INCFLAGS relative to the topdir and hardcoded into the Makefiles
+ # For GDINCLUDE see src/cgi/Makefile.in
+! INCFLAGS = $(GDINCLUDE) -I$(topdir)/include
+ CFLAGS = @CFLAGS@ $(CPPFLAGS) @PTHREAD_CFLAGS@ $(INCFLAGS)
+ LDFLAGS = @LDFLAGS@
+ LIBS = $(DRVLIBS) $(APCLIBS) $(INTLLIBS) @PTHREAD_LFLAGS@ @LIBS@
+--- 90,96 ----
+
+ # Made INCFLAGS relative to the topdir and hardcoded into the Makefiles
+ # For GDINCLUDE see src/cgi/Makefile.in
+! INCFLAGS = $(GDINCLUDE) -I$(topdir)/include $(EXTRAINCS)
+ CFLAGS = @CFLAGS@ $(CPPFLAGS) @PTHREAD_CFLAGS@ $(INCFLAGS)
+ LDFLAGS = @LDFLAGS@
+ LIBS = $(DRVLIBS) $(APCLIBS) $(INTLLIBS) @PTHREAD_LFLAGS@ @LIBS@
diff --git a/sysutils/apcupsd/files/patch-src-drivers-usb-bsd-hidutils.c b/sysutils/apcupsd/files/patch-src-drivers-usb-bsd-hidutils.c
new file mode 100644
index 000000000000..681fbe6b89eb
--- /dev/null
+++ b/sysutils/apcupsd/files/patch-src-drivers-usb-bsd-hidutils.c
@@ -0,0 +1,19 @@
+*** src/drivers/usb/bsd/hidutils.c.orig Fri Apr 22 02:28:40 2005
+--- src/drivers/usb/bsd/hidutils.c Sun Jul 3 13:02:26 2005
+***************
+*** 327,333 ****
+ req.ucr_actlen = 0;
+ req.ucr_addr = 0;
+ req.ucr_data = data;
+! req.ucr_request.bmRequestType = UT_WRITE_CLASS_ENDPOINT;
+ req.ucr_request.bRequest = UR_SET_REPORT;
+ USETW(req.ucr_request.wValue, ((item->kind+1) << 8) | item->report_ID);
+ USETW(req.ucr_request.wIndex, 0);
+--- 327,333 ----
+ req.ucr_actlen = 0;
+ req.ucr_addr = 0;
+ req.ucr_data = data;
+! req.ucr_request.bmRequestType = UT_WRITE_CLASS_INTERFACE;
+ req.ucr_request.bRequest = UR_SET_REPORT;
+ USETW(req.ucr_request.wValue, ((item->kind+1) << 8) | item->report_ID);
+ USETW(req.ucr_request.wIndex, 0);