pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

collectd/collectd-*: rework library handling



Module Name:	pkgsrc-wip
Committed By:	Edgar Fuß <ef%math.uni-bonn.de@localhost>
Pushed By:	ef
Date:		Fri Jul 17 18:20:51 2020 +0200
Changeset:	ef06509adc968741448ea3f0571451cb94a8ea57

Modified Files:
	collectd-amqp/Makefile
	collectd-curl/Makefile
	collectd-dbi/Makefile
	collectd-dns/Makefile
	collectd-memcached/Makefile
	collectd-mysql/Makefile
	collectd-network/Makefile
	collectd-notify-email/Makefile
	collectd-postgresql/Makefile
	collectd-redis/Makefile
	collectd-riemann/Makefile
	collectd-rrdtool/Makefile
	collectd-snmp/Makefile
	collectd-write_prometheus/Makefile
	collectd/Makefile.common

Log Message:
collectd/collectd-*: rework library handling

Rework --with-libfoo handling: Let a package for a plugin needing libfoo set COLLECTD_LIB.foo (typically to BUILDLINK_PREFIX.somefoo) instead of explicitly adding --with-libfoo to CONFIGURE_ARGS.
Also, in Makefile.common, only set --with-libbar=no if COLLECTD_LIB.bar is unset (for bar included in COLLECT_LIBS) instead of collectd/Makefile.common setting --with-libbar=no and collectd-bar/Makefile adding --with-libbar=something later to CONFIGURE_ARGS (which seems to work, but probably is undefined behaviour to autoconf).

Special case: use COLLECTD_LIB.grpcpp as a Variable name for libgrpc++.

Additionally, the collectd-write_riemann and collectd-write_prometheus plugin packages seem not to need devel/protobuf-c/buildlink3.mk.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=ef06509adc968741448ea3f0571451cb94a8ea57

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 collectd-amqp/Makefile             |  6 +++---
 collectd-curl/Makefile             | 11 ++++++-----
 collectd-dbi/Makefile              |  6 +++---
 collectd-dns/Makefile              |  6 +++---
 collectd-memcached/Makefile        |  6 +++---
 collectd-mysql/Makefile            |  7 +++----
 collectd-network/Makefile          |  6 +++---
 collectd-notify-email/Makefile     |  6 +++---
 collectd-postgresql/Makefile       |  6 +++---
 collectd-redis/Makefile            |  6 +++---
 collectd-riemann/Makefile          |  6 ++++--
 collectd-rrdtool/Makefile          |  6 +++---
 collectd-snmp/Makefile             |  6 +++---
 collectd-write_prometheus/Makefile |  6 ++++--
 collectd/Makefile.common           | 15 ++++++++++-----
 15 files changed, 57 insertions(+), 48 deletions(-)

diffs:
diff --git a/collectd-amqp/Makefile b/collectd-amqp/Makefile
index e14ac22534..6fa0952f19 100644
--- a/collectd-amqp/Makefile
+++ b/collectd-amqp/Makefile
@@ -5,9 +5,9 @@ COLLECTD_PACKAGE=	amqp
 COMMENT=		Statistics collection daemon - amqp plugin
 PKGREVISION=		3
 
-.include "../../wip/collectd/Makefile.common"
+.include "../../net/rabbitmq-c/buildlink3.mk"
+COLLECTD_LIB.rabbitmq=	${BUILDLINK_PREFIX.rabbitmq-c}
 
-CONFIGURE_ARGS+=	--with-librabbitmq=${BUILDLINK_PREFIX.rabbitmq-c}
+.include "../../wip/collectd/Makefile.common"
 
-.include "../../net/rabbitmq-c/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/collectd-curl/Makefile b/collectd-curl/Makefile
index d860cebd61..856ce7c074 100644
--- a/collectd-curl/Makefile
+++ b/collectd-curl/Makefile
@@ -6,13 +6,14 @@ COLLECTD_PLUGINS=	curl curl_json curl_xml apache bind nginx write_http ascent
 COMMENT=		Statistics collection daemon - curl-based plugins
 PKGREVISION=		15
 
-.include "../../wip/collectd/Makefile.common"
-
-CONFIGURE_ARGS+=	--with-libcurl=${BUILDLINK_PREFIX.curl}
-CONFIGURE_ARGS+=	--with-libyajl=${BUILDLINK_PREFIX.yajl}
-
 .include "../../devel/yajl/buildlink3.mk"
 .include "../../textproc/libxml2/buildlink3.mk"
 .include "../../www/curl/buildlink3.mk"
 
+COLLECTD_LIB.curl=	${BUILDLINK_PREFIX.curl}
+COLLECTD_LIB.yajl=	${BUILDLINK_PREFIX.yajl}
+COLLECTD_LIB.xml2=	${BUILDLINK_PREFIX.libxml2}
+
+.include "../../wip/collectd/Makefile.common"
+
 .include "../../mk/bsd.pkg.mk"
diff --git a/collectd-dbi/Makefile b/collectd-dbi/Makefile
index e4646eb86c..9e20a64c13 100644
--- a/collectd-dbi/Makefile
+++ b/collectd-dbi/Makefile
@@ -5,9 +5,9 @@ COLLECTD_PACKAGE=	dbi
 COMMENT=		Statistics collection daemon - dbi plugin
 PKGREVISION=		2
 
-.include "../../wip/collectd/Makefile.common"
+.include "../../databases/libdbi/buildlink3.mk"
+COLLECTD_LIB.dbi=	${BUILDLINK_PREFIX.libdbi}
 
-CONFIGURE_ARGS+=	--with-libdbi=${BUILDLINK_PREFIX.libdbi}
+.include "../../wip/collectd/Makefile.common"
 
-.include "../../databases/libdbi/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/collectd-dns/Makefile b/collectd-dns/Makefile
index cc85644102..daa2b3cb71 100644
--- a/collectd-dns/Makefile
+++ b/collectd-dns/Makefile
@@ -5,14 +5,14 @@ COLLECTD_PACKAGE=	dns
 COMMENT=		Statistics collection daemon - dns plugin
 PKGREVISION=		3
 
-.include "../../wip/collectd/Makefile.common"
+.include "../../net/libpcap/buildlink3.mk"
+COLLECTD_LIB.pcap=	${BUILDLINK_PREFIX.libpcap}
 
-CONFIGURE_ARGS+=	--with-libpcap=${BUILDLINK_PREFIX.libpcap}
+.include "../../wip/collectd/Makefile.common"
 
 # On NetBSD, built-in pcap lacks headers needed
 .if ${OPSYS} == "NetBSD"
 PREFER.libpcap=	pkgsrc
 .endif
 
-.include "../../net/libpcap/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/collectd-memcached/Makefile b/collectd-memcached/Makefile
index 56ab70c017..b42cf8a500 100644
--- a/collectd-memcached/Makefile
+++ b/collectd-memcached/Makefile
@@ -6,9 +6,9 @@ COLLECTD_PLUGINS=	memcachec memcached
 COMMENT=		Statistics collection daemon - memcached plugins
 PKGREVISION=		2
 
-.include "../../wip/collectd/Makefile.common"
+.include "../../devel/libmemcached/buildlink3.mk"
+COLLECTD_LIB.memcached=	${BUILDLINK_PREFIX.libmemcached}
 
-CONFIGURE_ARGS+=	--with-libmemcached=${BUILDLINK_PREFIX.libmemcached}
+.include "../../wip/collectd/Makefile.common"
 
-.include "../../devel/libmemcached/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/collectd-mysql/Makefile b/collectd-mysql/Makefile
index 6301b436c7..6119952b4c 100644
--- a/collectd-mysql/Makefile
+++ b/collectd-mysql/Makefile
@@ -6,10 +6,9 @@ PKGNAME=		${DISTNAME:S/collectd/collectd-${COLLECTD_PACKAGE}${MYSQL_VERSION}/}
 PKGREVISION=		2
 COMMENT=		Statistics collection daemon - mysql plugin
 
-.include "../../wip/collectd/Makefile.common"
-
+.include "../../mk/mysql.buildlink3.mk"
+COLLECTD_LIB.mysql=	${BUILDLINK_PREFIX.mysql-client}
 
-CONFIGURE_ARGS+=	--with-libmysql=${BUILDLINK_PREFIX.mysql-client}
+.include "../../wip/collectd/Makefile.common"
 
-.include "../../mk/mysql.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/collectd-network/Makefile b/collectd-network/Makefile
index 3c574fe192..32aaf3a048 100644
--- a/collectd-network/Makefile
+++ b/collectd-network/Makefile
@@ -4,9 +4,9 @@ COLLECTD_PACKAGE=	network
 
 COMMENT=		Statistics collection daemon - network plugin
 
-.include "../../wip/collectd/Makefile.common"
+.include "../../security/libgcrypt/buildlink3.mk"
+COLLECTD_LIB.gcrypt=	${BUILDLINK_PREFIX.libgcrypt}/bin/libgcrypt-config
 
-CONFIGURE_ARGS+=	--with-libgcrypt=${BUILDLINK_PREFIX.libgcrypt}/bin/libgcrypt-config
+.include "../../wip/collectd/Makefile.common"
 
-.include "../../security/libgcrypt/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/collectd-notify-email/Makefile b/collectd-notify-email/Makefile
index b6b8345b06..bd23c411f3 100644
--- a/collectd-notify-email/Makefile
+++ b/collectd-notify-email/Makefile
@@ -5,9 +5,9 @@ COLLECTD_PACKAGE=	notify-email
 COMMENT=		Statistics collection daemon - notify_email plugin
 PKGREVISION=		3
 
-.include "../../wip/collectd/Makefile.common"
+.include "../../mail/libesmtp/buildlink3.mk"
+COLLECTD_LIB.esmtp=	${BUILDLINK_PREFIX.libesmtp}
 
-CONFIGURE_ARGS+=	--with-libesmtp=${BUILDLINK_PREFIX.libesmtp}
+.include "../../wip/collectd/Makefile.common"
 
-.include "../../mail/libesmtp/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/collectd-postgresql/Makefile b/collectd-postgresql/Makefile
index 6b887f86a3..b8406069db 100644
--- a/collectd-postgresql/Makefile
+++ b/collectd-postgresql/Makefile
@@ -6,9 +6,9 @@ PKGNAME=		${DISTNAME:S/collectd/collectd-${COLLECTD_PACKAGE}${PGSQL_VERSION}/}
 PKGREVISION=		2
 COMMENT=		Statistics collection daemon - postgresql plugin
 
-.include "../../wip/collectd/Makefile.common"
+.include "../../mk/pgsql.buildlink3.mk"
+COLLECTD_LIB.pq=	${PGSQL_PREFIX}
 
-CONFIGURE_ARGS+=	--with-libpq=${PGSQL_PREFIX}
+.include "../../wip/collectd/Makefile.common"
 
-.include "../../mk/pgsql.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/collectd-redis/Makefile b/collectd-redis/Makefile
index cbbcfccd86..989b0ed5ce 100644
--- a/collectd-redis/Makefile
+++ b/collectd-redis/Makefile
@@ -5,9 +5,9 @@ COLLECTD_PLUGINS=	redis write_redis
 
 COMMENT=		Statistics collection daemon - redis plugins
 
-.include "../../wip/collectd/Makefile.common"
+.include "../../databases/hiredis/buildlink3.mk"
+COLLECTD_LIB.hiredis=	${BUILDLINK_PREFIX.hiredis}
 
-CONFIGURE_ARGS+=	--with-libhires=${BUILDLINK_PREFIX.hiredis}
+.include "../../wip/collectd/Makefile.common"
 
-.include "../../databases/hiredis/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/collectd-riemann/Makefile b/collectd-riemann/Makefile
index 4a5519ad9d..9438d02a75 100644
--- a/collectd-riemann/Makefile
+++ b/collectd-riemann/Makefile
@@ -6,8 +6,10 @@ COLLECTD_PLUGINS=	write_riemann
 COMMENT=		Statistics collection daemon - riemann plugin
 PKGREVISION=		7
 
+#.include "../../devel/protobuf-c/buildlink3.mk"
+.include "../../sysutils/riemann-client/buildlink3.mk"
+COLLECTD_LIB.riemann-client=${BUILDLINK_PREFIX.riemann-client}
+
 .include "../../wip/collectd/Makefile.common"
 
-.include "../../devel/protobuf-c/buildlink3.mk"
-.include "../../sysutils/riemann-client/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/collectd-rrdtool/Makefile b/collectd-rrdtool/Makefile
index 0dc6bbb9ef..752f899b62 100644
--- a/collectd-rrdtool/Makefile
+++ b/collectd-rrdtool/Makefile
@@ -6,9 +6,9 @@ COLLECTD_PLUGINS=	rrdtool rrdcached
 COMMENT=		Statistics collection daemon - rrdtool plugins
 PKGREVISION=		9
 
-.include "../../wip/collectd/Makefile.common"
+.include "../../databases/rrdtool/buildlink3.mk"
+COLLECTD_LIB.rrd=	${BUILDLINK_PREFIX.rrdtool}
 
-CONFIGURE_ARGS+=	--with-librrd=${BUILDLINK_PREFIX.rrdtool}
+.include "../../wip/collectd/Makefile.common"
 
-.include "../../databases/rrdtool/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/collectd-snmp/Makefile b/collectd-snmp/Makefile
index 79d4c226e6..57da69f053 100644
--- a/collectd-snmp/Makefile
+++ b/collectd-snmp/Makefile
@@ -5,9 +5,9 @@ COLLECTD_PACKAGE=	snmp
 COMMENT=		Statistics collection daemon - snmp plugin
 PKGREVISION=		3
 
-.include "../../wip/collectd/Makefile.common"
+.include "../../net/net-snmp/buildlink3.mk"
+COLLECTD_LIB.netsnmp=	${BUILDLINK_PREFIX.net-snmp}/bin/net-snmp-config
 
-CONFIGURE_ARGS+=	--with-libnetsnmp=${BUILDLINK_PREFIX.net-snmp}/bin/net-snmp-config
+.include "../../wip/collectd/Makefile.common"
 
-.include "../../net/net-snmp/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/collectd-write_prometheus/Makefile b/collectd-write_prometheus/Makefile
index 8a566a06df..fb5bda1bab 100644
--- a/collectd-write_prometheus/Makefile
+++ b/collectd-write_prometheus/Makefile
@@ -5,8 +5,10 @@ COLLECTD_PACKAGE=	write_prometheus
 COMMENT=		Statistics collection daemon - write_prometheus plugin
 PKGREVISION=		7
 
+#.include "../../devel/protobuf-c/buildlink3.mk"
+.include "../../www/libmicrohttpd/buildlink3.mk"
+COLLECTD_LIB.microhttpd=${BUILDLINK_PREFIX.libmicrohttpd}
+
 .include "../../wip/collectd/Makefile.common"
 
-.include "../../devel/protobuf-c/buildlink3.mk"
-.include "../../www/libmicrohttpd/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/collectd/Makefile.common b/collectd/Makefile.common
index 023faa7b42..6dee7d39af 100644
--- a/collectd/Makefile.common
+++ b/collectd/Makefile.common
@@ -54,19 +54,24 @@ GENERATE_PLIST+=	${ECHO} "lib/collectd/${plugin}.la";
 
 BUILD_DEFS+=		VARBASE
 
-# Disable all libs support by default
-DISABLED_LIBS=		aquaero5 hiredis curl dbi esmtp ganglia gcrypt	\
+# special case for grpc++ below
+COLLECTD_LIBS=		aquaero5 hiredis curl dbi esmtp ganglia gcrypt	\
 			iptc lvm2app memcached mnl modbus mongoc mysql	\
 			netsnmp oping owcapi pcap perl pq python	\
 			rabbitmq routeros rrd sensors statgrab	\
 			tokyotyrant upsclient varnish xmms yajl
-DISABLED_LIBS+=		atasmart dpdk gps iptc jevents ldap microhttpd mosquitto netapp netsnmpagent pqos protobuf protobuf-c rdkafka udev xenctrl
+COLLECTD_LIBS+=		atasmart dpdk gps iptc jevents ldap microhttpd mosquitto netapp netsnmpagent pqos protobuf protobuf-c rdkafka udev xenctrl
+
 CONFIGURE_ARGS+=	--with-java=no --with-mic=no --with-oracle=no	\
 			--with-perl-bindings=no 			\
 			--disable-all-plugins
-.for lib in ${DISABLED_LIBS}
-CONFIGURE_ARGS+=	--with-lib${lib}=no
+
+.for lib in ${COLLECTD_LIBS}
+CONFIGURE_ARGS+=	--with-lib${lib}=${COLLECTD_LIB.${lib}:Uno}
 .endfor
+# can't use ENABLE_LIB.grpc++ as a variable name
+CONFIGURE_ARGS+=	--with-libgrpc++=${COLLECTD_LIB.grpcpp:Uno}
+
 CONFIGURE_ARGS+=	--disable-werror
 CONFIGURE_ARGS+=	--localstatedir=${VARBASE}
 


Home | Main Index | Thread Index | Old Index