Date: Sun, 16 Aug 2009 14:10:08 GMT From: Daniel Roethlisberger <daniel@roe.ch> To: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/137381: Minor patch for collectd Makefile allowing collection of UPS data via nut. Message-ID: <200908161410.n7GEA8Op061481@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/137381; it has been noted by GNATS. From: Daniel Roethlisberger <daniel@roe.ch> To: bug-followup@FreeBSD.org Cc: svein@stillbilde.net Subject: Re: ports/137381: Minor patch for collectd Makefile allowing collection of UPS data via nut. Date: Sun, 16 Aug 2009 16:03:43 +0200 --Dxnq1zWXvFF0Q93v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline As maintainer of the port, I had a look at it. Please commit the adapted version attached to this message. I fixed the pkg-plist and changed the warning message about the required dependency knob to a conditional IGNORE. Thanks for your contribution! -- Daniel Roethlisberger http://daniel.roe.ch/ --Dxnq1zWXvFF0Q93v Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="collectd-nutups.diff" diff -ruN collectd.orig/Makefile collectd/Makefile --- collectd.orig/Makefile 2009-01-23 16:43:05.000000000 +0100 +++ collectd/Makefile 2009-08-16 14:13:57.000000000 +0200 @@ -23,6 +23,7 @@ DEBUG "Enable debugging" Off \ APACHE "Input: Apache mod_status (libcurl)" Off \ APCUPS "Input: APC UPS (apcupsd)" Off \ + NUTUPS "Input: NUT UPS daemon" Off \ INTERFACE "Input: Network interfaces (libstatgrab)" On \ MBMON "Input: MBMon" Off \ MYSQL "Input: MySQL" Off \ @@ -48,9 +49,9 @@ # NOTE: Feel free to submit patches adding support for any of these # disabled plugins. If a plugin requires external dependencies, -# make it optional through OPTIONS. Some of these are Linux -# specific, but others will probably run on FreeBSD as well, -# given a bit of careful attention. +# make it optional through OPTIONS defaulting to Off. Some of +# these are Linux specific, but others will probably run on +# FreeBSD as well, given a bit of careful attention. CONFIGURE_ARGS= --localstatedir=/var \ --disable-apple_sensors \ --disable-ascent \ @@ -70,7 +71,6 @@ --disable-nginx \ --disable-notify_desktop \ --disable-notify_email \ - --disable-nut \ --disable-onewire \ --disable-perl \ --disable-postgresql \ @@ -115,6 +115,15 @@ PLIST_SUB+= APCUPS="@comment " .endif +.if defined(WITH_NUTUPS) +CONFIGURE_ARGS+=--enable-nut +BUILD_DEPENDS+= ${LOCALBASE}/include/upsclient.h:${PORTSDIR}/sysutils/nut +PLIST_SUB+= NUTUPS="" +.else +CONFIGURE_ARGS+=--disable-nut +PLIST_SUB+= NUTUPS="@comment " +.endif + .if defined(WITH_INTERFACE) BUILD_DEPENDS+= pkg-config:${PORTSDIR}/devel/pkg-config CONFIGURE_ARGS+=--enable-interface @@ -181,6 +190,10 @@ PLIST_SUB+= XMMS="@comment " .endif +.if defined(WITH_NUTUPS) && !exists(${LOCALBASE}/include/upsclient.h) +IGNORE= requires sysutils/nut to be built with WITH_DEVEL=yes +.endif + post-patch: @${REINPLACE_CMD} \ -e 's;@prefix@/var/;/var/;' \ diff -ruN collectd.orig/pkg-plist collectd/pkg-plist --- collectd.orig/pkg-plist 2008-11-01 23:19:09.000000000 +0100 +++ collectd/pkg-plist 2009-08-16 15:15:58.000000000 +0200 @@ -45,6 +45,8 @@ %%MYSQL%%lib/collectd/mysql.so lib/collectd/network.la lib/collectd/network.so +%%NUTUPS%%lib/collectd/nut.la +%%NUTUPS%%lib/collectd/nut.so lib/collectd/ntpd.la lib/collectd/ntpd.so %%PING%%lib/collectd/ping.la --Dxnq1zWXvFF0Q93v--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908161410.n7GEA8Op061481>