Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 May 2013 01:28:41 +0400
From:      Boris Samorodov <bsam@passap.ru>
To:        Peter Mueller <pmueller@occsilva.de>
Cc:        "ports@FreeBSD.org" <ports@FreeBSD.org>, "ports@bsdserwis.com" <ports@bsdserwis.com>
Subject:   Re: FreeBSD Port: collectd-4.10.4_7
Message-ID:  <51915B09.8090907@passap.ru>
In-Reply-To: <8A5E7425-D383-4071-8D92-5444CE60BAB7@occsilva.de>
References:  <8A5E7425-D383-4071-8D92-5444CE60BAB7@occsilva.de>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------030105070000040701040803
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

13.05.2013 20:20, Peter Mueller пишет:
> 
> I like to use the modbus plugin. But it is not listed in the config options. How can I enable this plugin to compile it.

I've just added comms/libmodbus upon your request.
And here is attached (an untested) patch to net-mgmt/collectd.

Test and feedback are welcome.
Thanks!
-- 
WBR, Boris Samorodov (bsam)
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve

--------------030105070000040701040803
Content-Type: text/x-diff;
 name="collectd.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="collectd.diff"

Index: Makefile
===================================================================
--- Makefile	(revision 317544)
+++ Makefile	(working copy)
@@ -19,8 +19,9 @@
 OPTIONS_GROUP=		INPUT OUTPUT
 OPTIONS_GROUP_OUTPUT=	RRDTOOL RRDCACHED WRITE_HTTP
 OPTIONS_GROUP_INPUT=	APACHE APCUPS CURL CURL_JSON CURL_XML DBI DISK \
-			NUTUPS INTERFACE MBMON MEMCACHED MYSQL NGINX OPENVPN \
-			PDNS PGSQL PING PYTHON ROUTEROS SNMP TOKYOTYRANT XMMS
+			NUTUPS INTERFACE MBMON MEMCACHED MODBUS MYSQL NGINX \
+			OPENVPN PDNS PGSQL PING PYTHON ROUTEROS SNMP \
+			TOKYOTYRANT XMMS
 OPTIONS_DEFAULT=	BIND INTERFACE PING SNMP RRDTOOL RRDCACHED
 
 CGI_DESC=		Install collection.cgi (requires RRDTOOL)
@@ -40,6 +41,7 @@
 INTERFACE_DESC=		Network interfaces (libstatgrab)
 MBMON_DESC=		MBMon
 MEMCACHED_DESC=		Memcached
+MODBUS_DESC=		modbus support via libmodbus
 MYSQL_DESC=		MySQL
 NGINX_DESC=		Nginx
 OPENVPN_DESC=		OpenVPN statistics
@@ -100,7 +102,6 @@
 		--disable-match_timediff \
 		--disable-match_value \
 		--disable-memcachec \
-		--disable-modbus \
 		--disable-multimeter \
 		--disable-netapp \
 		--disable-netlink \
@@ -276,6 +277,15 @@
 PLIST_SUB+=	MEMCACHED="@comment "
 .endif
 
+.if ${PORT_OPTIONS:MMODBUS}
+CONFIGURE_ARGS+=--enable-modbus
+LIB_DEPENDS+=	modbus:${PORTSDIR}/comms/libmodbus
+PLIST_SUB+=	MODBUS=""
+.else
+CONFIGURE_ARGS+=--disable-modbus
+PLIST_SUB+=	MODBUS="@comment "
+.endif
+
 .if ${PORT_OPTIONS:MMYSQL}
 USE_MYSQL=	yes
 CONFIGURE_ARGS+=--enable-mysql
@@ -362,7 +372,7 @@
 CONFIGURE_ARGS+=--enable-rrdcached
 PLIST_SUB+=	RRDCACHED=""
 .else
-CONFIGURE_ARGS+=--disable--rrdcached
+CONFIGURE_ARGS+=--disable-rrdcached
 PLIST_SUB+=	RRDCACHED="@comment "
 .endif
 
Index: pkg-plist
===================================================================
--- pkg-plist	(revision 317544)
+++ pkg-plist	(working copy)
@@ -49,6 +49,8 @@
 lib/collectd/load.so
 lib/collectd/logfile.la
 lib/collectd/logfile.so
+%%MODBUS%%lib/collectd/modbus.la
+%%MODBUS%%lib/collectd/modbus.so
 %%MBMON%%lib/collectd/mbmon.la
 %%MBMON%%lib/collectd/mbmon.so
 %%MEMCACHED%%lib/collectd/memcached.la

--------------030105070000040701040803--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51915B09.8090907>