Date: Tue, 14 May 2013 16:48:37 GMT From: Boris Samorodov <bsam@FreeBSD.org> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/178637: [patch] net-mgmt/collectd5: add non-default option MODBUS Message-ID: <201305141648.r4EGmbfM002320@oldred.FreeBSD.org> Resent-Message-ID: <201305141650.r4EGo1qH087420@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 178637 >Category: ports >Synopsis: [patch] net-mgmt/collectd5: add non-default option MODBUS >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Tue May 14 16:50:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Boris Samorodov >Release: FreeBSD 9-i386 >Organization: BSDprint >Environment: FreeBSD srv.bb.tel.ru 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #7 r243514: Sun Nov 25 20:10:07 SAMT 2012 bsam@srv.bb.tel.ru:/usr/obj/usr/src/sys/BB i386 >Description: Add option MODBUS (off by default). >How-To-Repeat: >Fix: Patch attached with submission follows: Index: Makefile =================================================================== --- Makefile (revision 317544) +++ Makefile (working copy) @@ -21,7 +21,7 @@ OPTIONS_GROUP= INPUT OUTPUT OPTIONS_GROUP_OUTPUT= RRDTOOL RRDCACHED WRITE_GRAPHITE WRITE_HTTP NOTIFYEMAIL OPTIONS_GROUP_INPUT= APACHE APCUPS CURL CURL_JSON CURL_XML DBI DISK GCRYPT \ - NUTUPS INTERFACE IPMI MBMON MEMCACHED MYSQL NGINX \ + NUTUPS INTERFACE IPMI MBMON MEMCACHED MODBUS MYSQL NGINX \ OPENVPN PDNS PGSQL PING PYTHON ROUTEROS SNMP TABLE \ TOKYOTYRANT VARNISH XMMS @@ -45,6 +45,7 @@ IPMI_DESC= IPMI plugin (openipmi) MBMON_DESC= MBMon MEMCACHED_DESC= Memcached +MODBUS_DESC= modbus support via libmodbus MYSQL_DESC= MySQL NOTIFYEMAIL_DESC= Email notifications (libesmtp) NGINX_DESC= Nginx @@ -110,8 +111,6 @@ --disable-match_timediff \ --disable-match_value \ --disable-memcachec \ - --disable-modbus \ - --without-libmodbus \ --disable-multimeter \ --disable-netapp \ --without-libnetapp \ @@ -288,6 +287,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 Index: files/patch-src_modbus.c =================================================================== --- files/patch-src_modbus.c (revision 0) +++ files/patch-src_modbus.c (working copy) @@ -0,0 +1,12 @@ +--- src/modbus.c.orig 2013-01-27 17:47:18.246255000 +0400 ++++ src/modbus.c 2013-05-14 18:40:05.000000000 +0400 +@@ -25,6 +25,9 @@ + #include "plugin.h" + #include "configfile.h" + ++/* FreeBSD needs this */ ++#include <sys/socket.h> ++ + #include <netdb.h> + + #include <modbus/modbus.h> Property changes on: files/patch-src_modbus.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: pkg-plist =================================================================== --- pkg-plist (revision 317544) +++ pkg-plist (working copy) @@ -56,6 +56,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 >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305141648.r4EGmbfM002320>