From wtp@bsdserwis.com  Tue Dec 20 12:03:22 2011
Return-Path: <wtp@bsdserwis.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 258BE1065675
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 20 Dec 2011 12:03:22 +0000 (UTC)
	(envelope-from wtp@bsdserwis.com)
Received: from cmd.bsdserwis.com (ns37332.ovh.net [91.121.4.86])
	by mx1.freebsd.org (Postfix) with ESMTP id 8AF028FC1F
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 20 Dec 2011 12:03:21 +0000 (UTC)
Received: by cmd.bsdserwis.com (Postfix, from userid 1000)
	id 80E732CA23AC; Tue, 20 Dec 2011 13:03:20 +0100 (CET)
Message-Id: <20111220120320.80E732CA23AC@cmd.bsdserwis.com>
Date: Tue, 20 Dec 2011 13:03:20 +0100 (CET)
From: Krzysztof Stryjek <ports@bsdserwis.com>
Reply-To: Krzysztof Stryjek <ports@bsdserwis.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: net-mgmt/collectd port update with new KNOBS
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         163475
>Category:       ports
>Synopsis:       net-mgmt/collectd port update with new KNOBS
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pawel
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 20 12:10:11 UTC 2011
>Closed-Date:    Mon Dec 26 16:35:00 UTC 2011
>Last-Modified:  Mon Dec 26 16:40:12 UTC 2011
>Originator:     Krzysztof Stryjek
>Release:        FreeBSD 7.3-STABLE amd64
>Organization:
private
>Environment:
System: FreeBSD cmd.wtp3.local 7.3-STABLE FreeBSD 7.3-STABLE #1: Fri May 7 15:18:19 CEST 2010 toor@cmd.wtp3.local:/usr/obj/usr/src/sys/QQA amd64

>Description:
	net-mgmt/collectd port update to add new KNOBS. Also CONFIGURE_ARGS
cleaning.

>How-To-Repeat:
	make all install
>Fix:

--- collectd4_1.patch begins here ---
diff -ruN collectd.orig/Makefile collectd/Makefile
--- collectd.orig/Makefile	2011-12-14 05:13:58.000000000 +0100
+++ collectd/Makefile	2011-12-20 12:16:30.000000000 +0100
@@ -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 @@
 		NUTUPS		"Input: NUT UPS daemon" 			Off \
 		INTERFACE 	"Input: Network interfaces (libstatgrab)" 	On  \
 		MBMON		"Input: MBMon" 					Off \
+		MEMCACHED	"Input: Memcahed"				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
@@ -108,7 +112,6 @@
 		--disable-oracle \
 		--disable-perl \
 		--disable-pinba \
-		--disable-python \
 		--disable-protocols \
 		--disable-routeros \
 		--disable-sensors \
@@ -122,7 +125,6 @@
 		--disable-teamspeak2 \
 		--disable-ted \
 		--disable-thermal \
-		--disable-tokyotyrant \
 		--disable-users \
 		--disable-vmem \
 		--disable-vserver \
@@ -130,6 +132,12 @@
 		--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 +150,7 @@
 		${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 +200,7 @@
 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
 
@@ -234,7 +243,7 @@
 BUILD_DEPENDS+=	${LOCALBASE}/include/upsclient.h:${PORTSDIR}/sysutils/nut
 PLIST_SUB+=	NUTUPS=""
 .else
-CONFIGURE_ARGS+=--disable-nut
+CONFIGURE_ARGS+=--disable-nut --without-libupsclient
 PLIST_SUB+=	NUTUPS="@comment "
 .endif
 
@@ -258,6 +267,16 @@
 PLIST_SUB+=	MBMON="@comment "
 .endif
 
+.if defined(WITH_MEMCACHED)
+LIB_DEPENDS+=	memcached.8:${PORTSDIR}/databases/libmemcached
+CONFIGURE_ARGS+=--enable-memcached
+CONFIGURE_ARGS+=--with-libmemcahed=${LOCALBASE}
+PLIST_SUB+=	MEMCACHED=""
+.else
+CONFIGURE_ARGS+=--disable-memcached --without-libmemcahed
+PLIST_SUB+=	MEMCACHED="@comment "
+.endif
+
 .if defined(WITH_MYSQL)
 USE_MYSQL=	yes
 CONFIGURE_ARGS+=--enable-mysql
@@ -313,6 +332,17 @@
 PLIST_SUB+=	PING="@comment "
 .endif
 
+.if defined(WITH_PYTHON)
+USE_PYTHON=		yes
+.include "${PORTSDIR}/Mk/bsd.python.mk"
+USE_PYDISTUTILS=	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 +369,16 @@
 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
diff -ruN collectd.orig/files/patch-configure collectd/files/patch-configure
--- collectd.orig/files/patch-configure	2010-05-05 10:12:04.000000000 +0200
+++ collectd/files/patch-configure	2011-12-20 01:13:12.000000000 +0100
@@ -1,11 +1,20 @@
---- configure.orig	2010-04-22 11:30:19.000000000 +0200
-+++ configure	2010-05-05 10:08:43.000000000 +0200
-@@ -13818,7 +13818,7 @@
- fi
+--- 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=$?
  
- # Where to install .pc files.
--pkgconfigdir="${libdir}/pkgconfig"
-+pkgconfigdir="${prefix}/libdata/pkgconfig"
+ 	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"
  
- 
- # Check for standards compliance mode
+ 	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 -ruN collectd.orig/files/patch-configure.in collectd/files/patch-configure.in
--- collectd.orig/files/patch-configure.in	1970-01-01 01:00:00.000000000 +0100
+++ collectd/files/patch-configure.in	2011-12-20 01:13:12.000000000 +0100
@@ -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 -ruN collectd.orig/files/patch-src__meta_data.c collectd/files/patch-src__meta_data.c
--- collectd.orig/files/patch-src__meta_data.c	2011-05-30 22:18:19.000000000 +0200
+++ collectd/files/patch-src__meta_data.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,10 +0,0 @@
---- ./src/meta_data.c.orig	2011-05-30 06:58:07.055492500 -0400
-+++ ./src/meta_data.c	2011-05-30 06:59:10.383490225 -0400
-@@ -215,6 +215,7 @@
-     return;
- 
-   md_entry_free (md->head);
-+  pthread_mutex_destroy(&md->lock);
-   free (md);
- } /* }}} void meta_data_destroy */
- 
diff -ruN collectd.orig/pkg-plist collectd/pkg-plist
--- collectd.orig/pkg-plist	2011-12-14 05:13:58.000000000 +0100
+++ collectd/pkg-plist	2011-12-20 01:12:56.000000000 +0100
@@ -51,8 +51,8 @@
 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 @@
 %%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.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
--- collectd4_1.patch ends here ---

>Release-Note:
>Audit-Trail:

From: Ruslan Mahmatkhanov <cvs-src@yandex.ru>
To: Krzysztof Stryjek <ports@bsdserwis.com>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: ports/163475: net-mgmt/collectd port update with new KNOBS
Date: Tue, 20 Dec 2011 16:49:22 +0400

 There is `memcahed' (instead of `memcached') in the lines of patch
 bellow. Are they correct?
 
 > +		MEMCACHED	"Input: Memcahed"				Off \
 > +CONFIGURE_ARGS+=--with-libmemcahed=${LOCALBASE}
 > +CONFIGURE_ARGS+=--disable-memcached --without-libmemcahed
 
 -- 
 Regards,
 Ruslan
 
 Tinderboxing kills... the drives.
Responsible-Changed-From-To: freebsd-ports-bugs->pawel 
Responsible-Changed-By: pawel 
Responsible-Changed-When: Mon Dec 26 12:41:26 UTC 2011 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=163475 
State-Changed-From-To: open->closed 
State-Changed-By: pawel 
State-Changed-When: Mon Dec 26 16:34:59 UTC 2011 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=163475 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/163475: commit references a PR
Date: Mon, 26 Dec 2011 16:34:00 +0000 (UTC)

 pawel       2011-12-26 16:33:51 UTC
 
   FreeBSD ports repository
 
   Modified files:
     net-mgmt/collectd    Makefile pkg-plist 
   Added files:
     net-mgmt/collectd/files patch-configure patch-configure.in 
   Log:
   - 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]
   
   Revision  Changes    Path
   1.35      +46 -16    ports/net-mgmt/collectd/Makefile
   1.1       +20 -0     ports/net-mgmt/collectd/files/patch-configure (new)
   1.1       +20 -0     ports/net-mgmt/collectd/files/patch-configure.in (new)
   1.13      +6 -2      ports/net-mgmt/collectd/pkg-plist
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
