aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/collectd
diff options
context:
space:
mode:
authorpawel <pawel@FreeBSD.org>2011-12-27 00:33:51 +0800
committerpawel <pawel@FreeBSD.org>2011-12-27 00:33:51 +0800
commit11b5ee30a77b59ead047583df7c8a7361f73543e (patch)
tree545f987ad9e462d5658fb482803ab12893f8b9a7 /net-mgmt/collectd
parentbacf1d2251da1d078e24c3c3f67cd6f430204e2c (diff)
downloadfreebsd-ports-gnome-11b5ee30a77b59ead047583df7c8a7361f73543e.tar.gz
freebsd-ports-gnome-11b5ee30a77b59ead047583df7c8a7361f73543e.tar.zst
freebsd-ports-gnome-11b5ee30a77b59ead047583df7c8a7361f73543e.zip
- Add MEMCACHED, PYTHON, TOKYOTYRANT options [1]
- Clean up CONFIGURE_ARGS [1] - Remove 6.x bits, not supported anymore - Use bsd.port.options.mk instead of bsd.port.pre.mk - Fix build for NUTUPS option PR: ports/163475 [1] Submitted by: Krzysztof Stryjek <ports@bsdserwis.com> (maintainer) [1]
Diffstat (limited to 'net-mgmt/collectd')
-rw-r--r--net-mgmt/collectd/Makefile62
-rw-r--r--net-mgmt/collectd/files/patch-configure20
-rw-r--r--net-mgmt/collectd/files/patch-configure.in20
-rw-r--r--net-mgmt/collectd/pkg-plist8
4 files changed, 92 insertions, 18 deletions
diff --git a/net-mgmt/collectd/Makefile b/net-mgmt/collectd/Makefile
index aa21f60449d1..23edb4066080 100644
--- a/net-mgmt/collectd/Makefile
+++ b/net-mgmt/collectd/Makefile
@@ -7,6 +7,7 @@
PORTNAME= collectd
PORTVERSION= 4.10.4
+PORTREVISION= 1
CATEGORIES= net-mgmt
MASTER_SITES= http://collectd.org/files/
@@ -32,13 +33,16 @@ OPTIONS= CGI "Install collection.cgi (requires RRDTOOL)" Off \
NUTUPS "Input: NUT UPS daemon" Off \
INTERFACE "Input: Network interfaces (libstatgrab)" On \
MBMON "Input: MBMon" Off \
+ MEMCACHED "Input: Memcached" Off \
MYSQL "Input: MySQL" Off \
NGINX "Input: Nginx" Off \
OPENVPN "Input: OpenVPN statistics" Off \
PDNS "Input: PowerDNS" Off \
PGSQL "Input: PostgreSQL" Off \
PING "Input: Network latency (liboping)" On \
+ PYTHON "Input: Python plugin" Off \
SNMP "Input: SNMP" On \
+ TOKYOTYRANT "Input: Tokyotyrant database" Off \
XMMS "Input: XMMS" Off \
RRDTOOL "Output: RRDTool" On \
RRDCACHED "Output: RRDTool Cached (require RRDTOOL)" On
@@ -56,15 +60,7 @@ CONFLICTS= collectd-5.[0-9]*
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
-.include <bsd.port.pre.mk>
-
-.if ( ${OSVERSION} < 601103 )
-BROKEN= Need bind9 import post 6.1
-.endif
-
-.if ${OSVERSION} < 700000
-BROKEN= does not configure on 6.X
-.endif
+.include <bsd.port.options.mk>
# NOTE: Feel free to submit patches adding support for any of these
# disabled plugins. If a plugin requires external dependencies,
@@ -108,7 +104,6 @@ CONFIGURE_ARGS= --localstatedir=/var \
--disable-oracle \
--disable-perl \
--disable-pinba \
- --disable-python \
--disable-protocols \
--disable-routeros \
--disable-sensors \
@@ -122,7 +117,6 @@ CONFIGURE_ARGS= --localstatedir=/var \
--disable-teamspeak2 \
--disable-ted \
--disable-thermal \
- --disable-tokyotyrant \
--disable-users \
--disable-vmem \
--disable-vserver \
@@ -130,6 +124,12 @@ CONFIGURE_ARGS= --localstatedir=/var \
--disable-write_http \
--disable-zfs_arc \
--without-perl-bindings \
+ --without-librabbitmq \
+ --disable-varnish \
+ --without-libvarnish \
+ --without-libcredis \
+ --without-libganglia \
+ --without-libesmtp \
--disable-static
.if defined(WITH_DEBUG)
@@ -142,6 +142,7 @@ RUN_DEPENDS+= ${SITE_PERL}/URI/Escape.pm:${PORTSDIR}/net/p5-URI \
${SITE_PERL}/${PERL_ARCH}/Data/Dumper.pm:${PORTSDIR}/devel/p5-Data-Dumper \
${SITE_PERL}/${PERL_ARCH}/HTML/Entities.pm:${PORTSDIR}/www/p5-HTML-Parser
PLIST_SUB+= CGI=""
+WITH_RRDTOOL= YES
.else
PLIST_SUB+= CGI="@comment "
.endif
@@ -191,7 +192,7 @@ CONFIGURE_ARGS+=--enable-curl_json
LIB_DEPENDS+= yajl:${PORTSDIR}/devel/yajl
PLIST_SUB+= CURL_JSON=""
.else
-CONFIGURE_ARGS+=--disable-curl_json
+CONFIGURE_ARGS+=--disable-curl_json --without-libyajl
PLIST_SUB+= CURL_JSON="@comment "
.endif
@@ -230,11 +231,11 @@ LIB_DEPENDS+= gcrypt.18:${PORTSDIR}/security/libgcrypt
.endif
.if defined(WITH_NUTUPS)
-CONFIGURE_ARGS+=--enable-nut
-BUILD_DEPENDS+= ${LOCALBASE}/include/upsclient.h:${PORTSDIR}/sysutils/nut
+CONFIGURE_ARGS+=--enable-nut --with-upsclient
+LIB_DEPENDS+= upsclient.1:${PORTSDIR}/sysutils/nut
PLIST_SUB+= NUTUPS=""
.else
-CONFIGURE_ARGS+=--disable-nut
+CONFIGURE_ARGS+=--disable-nut --without-libupsclient
PLIST_SUB+= NUTUPS="@comment "
.endif
@@ -258,6 +259,16 @@ CONFIGURE_ARGS+=--disable-mbmon
PLIST_SUB+= MBMON="@comment "
.endif
+.if defined(WITH_MEMCACHED)
+LIB_DEPENDS+= memcached.8:${PORTSDIR}/databases/libmemcached
+CONFIGURE_ARGS+=--enable-memcached
+CONFIGURE_ARGS+=--with-libmemcached=${LOCALBASE}
+PLIST_SUB+= MEMCACHED=""
+.else
+CONFIGURE_ARGS+=--disable-memcached --without-libmemcached
+PLIST_SUB+= MEMCACHED="@comment "
+.endif
+
.if defined(WITH_MYSQL)
USE_MYSQL= yes
CONFIGURE_ARGS+=--enable-mysql
@@ -313,6 +324,15 @@ CONFIGURE_ARGS+=--disable-ping
PLIST_SUB+= PING="@comment "
.endif
+.if defined(WITH_PYTHON)
+USE_PYTHON= yes
+CONFIGURE_ARGS+=--enable-python
+PLIST_SUB+= PYTHON=""
+.else
+CONFIGURE_ARGS+=--disable-python
+PLIST_SUB+= PYTHON="@comment "
+.endif
+
.if defined(WITH_RRDTOOL)
LIB_DEPENDS+= rrd:${PORTSDIR}/databases/rrdtool
CONFIGURE_ARGS+=--enable-rrdtool
@@ -339,6 +359,16 @@ CONFIGURE_ARGS+=--disable-snmp
PLIST_SUB+= SNMP="@comment "
.endif
+.if defined(WITH_TOKYOTYRANT)
+LIB_DEPENDS+= tokyotyrant.3:${PORTSDIR}/databases/tokyotyrant
+CONFIGURE_ARGS+=--enable-tokyotyrant
+CONFIGURE_ARGS+=--with-libtokyotyrant=${LOCALBASE}
+PLIST_SUB+= TOKYOTYRANT=""
+.else
+CONFIGURE_ARGS+=--disable-tokyotyrant --without-libtokyotyrant
+PLIST_SUB+= TOKYOTYRANT="@comment "
+.endif
+
.if defined(WITH_XMMS)
LIB_DEPENDS+= xmms.4:${PORTSDIR}/multimedia/xmms
CONFIGURE_ARGS+=--enable-xmms
@@ -386,4 +416,4 @@ post-install:
fi
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/net-mgmt/collectd/files/patch-configure b/net-mgmt/collectd/files/patch-configure
new file mode 100644
index 000000000000..d5347180adc1
--- /dev/null
+++ b/net-mgmt/collectd/files/patch-configure
@@ -0,0 +1,20 @@
+--- configure.orig 2011-10-14 22:54:07.000000000 +0200
++++ configure 2011-12-19 23:25:58.000000000 +0100
+@@ -21745,7 +21745,7 @@
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python LIBS" >&5
+ $as_echo_n "checking for Python LIBS... " >&6; }
+- python_library_flags=`echo "import distutils.sysconfig;import sys;sys.stdout.write(distutils.sysconfig.get_config_vars(\"BLDLIBRARY\").__getitem__(0))" | "$with_python_prog" 2>&1`
++ python_library_flags=`echo "import distutils.sysconfig;import sys;sys.stdout.write(distutils.sysconfig.get_config_vars(\"LIBDIR\").__getitem__(0)+\"/\"+distutils.sysconfig.get_config_vars(\"BLDLIBRARY\").__getitem__(0))" | "$with_python_prog" 2>&1`
+ python_config_status=$?
+
+ if test "$python_config_status" -ne 0 || test "x$python_library_flags" = "x"
+@@ -21762,7 +21762,7 @@
+ if test "x$with_python" = "xyes"
+ then
+ LDFLAGS="-L$python_library_path $LDFLAGS"
+- LIBS="$python_library_flags $LIBS"
++ LIBS="$python_library_flags $LIBS -lm -lpthread -lutil"
+
+ ac_fn_c_check_func "$LINENO" "PyObject_CallFunction" "ac_cv_func_PyObject_CallFunction"
+ if test "x$ac_cv_func_PyObject_CallFunction" = x""yes; then :
diff --git a/net-mgmt/collectd/files/patch-configure.in b/net-mgmt/collectd/files/patch-configure.in
new file mode 100644
index 000000000000..30f150d17cc7
--- /dev/null
+++ b/net-mgmt/collectd/files/patch-configure.in
@@ -0,0 +1,20 @@
+--- configure.in.orig 2011-10-14 22:49:49.000000000 +0200
++++ configure.in 2011-12-19 23:07:31.000000000 +0100
+@@ -3165,7 +3165,7 @@
+ if test "x$with_python" = "xyes"
+ then
+ AC_MSG_CHECKING([for Python LIBS])
+- python_library_flags=`echo "import distutils.sysconfig;import sys;sys.stdout.write(distutils.sysconfig.get_config_vars(\"BLDLIBRARY\").__getitem__(0))" | "$with_python_prog" 2>&1`
++ python_library_flags=`echo "import distutils.sysconfig;import sys;sys.stdout.write(distutils.sysconfig.get_config_vars(\"LIBDIR\").__getitem__(0)+\"/\"+distutils.sysconfig.get_config_vars(\"BLDLIBRARY\").__getitem__(0))" | "$with_python_prog" 2>&1`
+ python_config_status=$?
+
+ if test "$python_config_status" -ne 0 || test "x$python_library_flags" = "x"
+@@ -3180,7 +3180,7 @@
+ if test "x$with_python" = "xyes"
+ then
+ LDFLAGS="-L$python_library_path $LDFLAGS"
+- LIBS="$python_library_flags $LIBS"
++ LIBS="$python_library_flags $LIBS -lm -lpthread -lutil"
+
+ AC_CHECK_FUNC(PyObject_CallFunction,
+ [with_python="yes"],
diff --git a/net-mgmt/collectd/pkg-plist b/net-mgmt/collectd/pkg-plist
index 36ef0c55a41e..7ae16778b644 100644
--- a/net-mgmt/collectd/pkg-plist
+++ b/net-mgmt/collectd/pkg-plist
@@ -51,8 +51,8 @@ lib/collectd/logfile.la
lib/collectd/logfile.so
%%MBMON%%lib/collectd/mbmon.la
%%MBMON%%lib/collectd/mbmon.so
-lib/collectd/memcached.so
-lib/collectd/memcached.la
+%%MEMCACHED%%lib/collectd/memcached.la
+%%MEMCACHED%%lib/collectd/memcached.so
lib/collectd/memory.la
lib/collectd/memory.so
%%MYSQL%%lib/collectd/mysql.la
@@ -73,6 +73,8 @@ lib/collectd/ntpd.so
%%PING%%lib/collectd/ping.so
%%PDNS%%lib/collectd/powerdns.so
%%PDNS%%lib/collectd/powerdns.la
+%%PYTHON%%lib/collectd/python.la
+%%PYTHON%%lib/collectd/python.so
lib/collectd/processes.so
lib/collectd/processes.la
%%RRD%%lib/collectd/rrdtool.la
@@ -89,6 +91,8 @@ lib/collectd/tail.so
lib/collectd/tail.la
lib/collectd/tcpconns.so
lib/collectd/tcpconns.la
+%%TOKYOTYRANT%%lib/collectd/tokyotyrant.la
+%%TOKYOTYRANT%%lib/collectd/tokyotyrant.so
lib/collectd/unixsock.la
lib/collectd/unixsock.so
lib/collectd/uptime.so