diff options
author | fhajny <fhajny@pkgsrc.org> | 2015-04-14 11:27:30 +0000 |
---|---|---|
committer | fhajny <fhajny@pkgsrc.org> | 2015-04-14 11:27:30 +0000 |
commit | bef274c0f437c215f238c2a7ecc54aed0fd65fc5 (patch) | |
tree | ccf8a23f20047cbea7b92558064638806d89c204 /sysutils | |
parent | a9ea7c885a3325b07d5cd409ef2166639dd94580 (diff) | |
download | pkgsrc-bef274c0f437c215f238c2a7ecc54aed0fd65fc5.tar.gz |
Remove non-default perl and python options in sysutils/collectd. Use
separate p5-collectd and py-collectd packages instead for same purpose.
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/collectd/Makefile.common | 4 | ||||
-rw-r--r-- | sysutils/collectd/PLIST | 4 | ||||
-rw-r--r-- | sysutils/collectd/distinfo | 3 | ||||
-rw-r--r-- | sysutils/collectd/options.mk | 20 | ||||
-rw-r--r-- | sysutils/collectd/patches/patch-src_python.c | 37 | ||||
-rw-r--r-- | sysutils/p5-collectd/DESCR | 1 | ||||
-rw-r--r-- | sysutils/p5-collectd/Makefile | 28 | ||||
-rw-r--r-- | sysutils/py-collectd/DESCR | 1 | ||||
-rw-r--r-- | sysutils/py-collectd/Makefile | 13 |
9 files changed, 89 insertions, 22 deletions
diff --git a/sysutils/collectd/Makefile.common b/sysutils/collectd/Makefile.common index dd57d9f8473..5dffeab8761 100644 --- a/sysutils/collectd/Makefile.common +++ b/sysutils/collectd/Makefile.common @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.6 2015/04/07 13:20:41 fhajny Exp $ +# $NetBSD: Makefile.common,v 1.7 2015/04/14 11:27:30 fhajny Exp $ # # used by sysutils/collectd/Makefile # used by sysutils/collectd-amqp/Makefile @@ -12,6 +12,8 @@ # used by sysutils/collectd-postgresql/Makefile # used by sysutils/collectd-rrdtool/Makefile # used by sysutils/collectd-snmp/Makefile +# used by sysutils/p5-collectd/Makefile +# used by sysutils/py-collectd/Makefile DISTNAME= collectd-5.4.2 MASTER_SITES= http://collectd.org/files/ diff --git a/sysutils/collectd/PLIST b/sysutils/collectd/PLIST index 0e3d6fb3fd1..d93d87b1fba 100644 --- a/sysutils/collectd/PLIST +++ b/sysutils/collectd/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.2 2014/03/11 14:05:15 jperkin Exp $ +@comment $NetBSD: PLIST,v 1.3 2015/04/14 11:27:30 fhajny Exp $ bin/collectd-nagios bin/collectd-tg bin/collectdctl @@ -33,11 +33,9 @@ ${PLIST.nfs}lib/collectd/nfs.la lib/collectd/ntpd.la lib/collectd/olsrd.la lib/collectd/openvpn.la -${PLIST.perl}lib/collectd/perl.la ${PLIST.pf}lib/collectd/pf.la lib/collectd/powerdns.la ${PLIST.processes}lib/collectd/processes.la -${PLIST.python}lib/collectd/python.la lib/collectd/statsd.la ${PLIST.swap}lib/collectd/swap.la ${PLIST.syslog}lib/collectd/syslog.la diff --git a/sysutils/collectd/distinfo b/sysutils/collectd/distinfo index 11199eb9241..de5ec256193 100644 --- a/sysutils/collectd/distinfo +++ b/sysutils/collectd/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.6 2015/04/07 13:20:41 fhajny Exp $ +$NetBSD: distinfo,v 1.7 2015/04/14 11:27:30 fhajny Exp $ SHA1 (collectd-5.4.2.tar.gz) = 2664808997dd186609ee542895c37bb692d557b6 RMD160 (collectd-5.4.2.tar.gz) = 5ee7af2d88699d70e57f5106e22e02d6d5479ea2 @@ -11,5 +11,6 @@ SHA1 (patch-src_collectd.conf.in) = 97400dbc16a31a440750beed0bc16927afdcb570 SHA1 (patch-src_df.c) = 19cca888b183a90759b359702e4d65c8afa6e58d SHA1 (patch-src_libcollectclient_network__buffer.c) = e07d403d299613fa0885a0e7285849eb85510253 SHA1 (patch-src_network.c) = ba4a1083bd3dd6ac4cf94e95c24833125fc8c5f0 +SHA1 (patch-src_python.c) = 5be972dd0ec6f80b07bf7da8545e8aca03a19356 SHA1 (patch-src_tcpconns.c) = a1ad8fa2eb9e899375b7b99d12becb4e98ac4e10 SHA1 (patch-src_utils__dns.c) = c3782dc9127f42da30e3142b853aa2cb2259af94 diff --git a/sysutils/collectd/options.mk b/sysutils/collectd/options.mk index 0f181f67497..8b3a7f0c120 100644 --- a/sysutils/collectd/options.mk +++ b/sysutils/collectd/options.mk @@ -1,7 +1,7 @@ -# $NetBSD: options.mk,v 1.1 2014/02/17 11:21:54 fhajny Exp $ +# $NetBSD: options.mk,v 1.2 2015/04/14 11:27:30 fhajny Exp $ PKG_OPTIONS_VAR= PKG_OPTIONS.collectd -PKG_SUPPORTED_OPTIONS= cpu df interface load memory perl python syslog uptime +PKG_SUPPORTED_OPTIONS= cpu df interface load memory syslog uptime PKG_SUGGESTED_OPTIONS+= cpu df interface load memory syslog uptime .if ${OPSYS} == "NetBSD" @@ -29,7 +29,7 @@ PKG_SUGGESTED_OPTIONS+= disk nfs swap users zfs-arc .include "../../mk/bsd.options.mk" PLIST_VARS+= apple-sensors battery contextswitch cpu df disk \ - interface load memory nfs perl pf processes python swap \ + interface load memory nfs pf processes swap \ syslog tcpconns uptime users zfs-arc .for option in ${PLIST_VARS} @@ -38,17 +38,3 @@ CONFIGURE_ARGS+= --enable-${option:S/-/_/} PLIST.${option}= yes . endif .endfor - -.if !empty(PKG_OPTIONS:Mperl) -USE_TOOLS+= perl -PERL5_CONFIGURE= no -PERL5_PACKLIST+= auto/Collectd/.packlist -CONFIGURE_ARGS+= --with-libperl=${BUILDLINK_PREFIX.perl} -CONFIGURE_ARGS+= --with-perl-bindings=${MAKE_PARAMS:Q} -. include "../../lang/perl5/module.mk" -.endif - -.if !empty(PKG_OPTIONS:Mpython) -CONFIGURE_ARGS+= --with-python=${PYTHONBIN} -. include "../../lang/python/application.mk" -.endif diff --git a/sysutils/collectd/patches/patch-src_python.c b/sysutils/collectd/patches/patch-src_python.c new file mode 100644 index 00000000000..e117bcda604 --- /dev/null +++ b/sysutils/collectd/patches/patch-src_python.c @@ -0,0 +1,37 @@ +$NetBSD: patch-src_python.c,v 1.1 2015/04/14 11:27:30 fhajny Exp $ + +Backport Python 3 fixes from upstream trunk. +https://github.com/collectd/collectd/pull/890 +--- src/python.c.orig 2015-02-26 10:43:48.488180825 +0000 ++++ src/python.c +@@ -988,13 +988,15 @@ PyMODINIT_FUNC PyInit_collectd(void) { + #endif + + static int cpy_init_python() { +- char *argv = ""; + PyObject *sys; + PyObject *module; + + #ifdef IS_PY3K ++ wchar_t *argv = L""; + /* Add a builtin module, before Py_Initialize */ + PyImport_AppendInittab("collectd", PyInit_collectd); ++#else ++ char *argv = ""; + #endif + + Py_Initialize(); +@@ -1067,9 +1069,13 @@ static int cpy_config(oconfig_item_t *ci + } else if (strcasecmp(item->key, "Encoding") == 0) { + if (item->values_num != 1 || item->values[0].type != OCONFIG_TYPE_STRING) + continue; ++#ifdef IS_PY3K ++ NOTICE("python: \"Encoding\" was used in the config file but Python3 was used, which does not support changing encodings. Ignoring this."); ++#else + /* Why is this even necessary? And undocumented? */ + if (PyUnicode_SetDefaultEncoding(item->values[0].value.string)) + cpy_log_exception("setting default encoding"); ++#endif + } else if (strcasecmp(item->key, "LogTraces") == 0) { + if (item->values_num != 1 || item->values[0].type != OCONFIG_TYPE_BOOLEAN) + continue; diff --git a/sysutils/p5-collectd/DESCR b/sysutils/p5-collectd/DESCR new file mode 100644 index 00000000000..54908dda05e --- /dev/null +++ b/sysutils/p5-collectd/DESCR @@ -0,0 +1 @@ +perl plugin for collectd diff --git a/sysutils/p5-collectd/Makefile b/sysutils/p5-collectd/Makefile new file mode 100644 index 00000000000..66e28bdb5b6 --- /dev/null +++ b/sysutils/p5-collectd/Makefile @@ -0,0 +1,28 @@ +# $NetBSD: Makefile,v 1.1 2015/04/14 11:27:30 fhajny Exp $ + +PKGNAME= p5-${DISTNAME} +COLLECTD_PACKAGE= perl + +COMMENT= Statistics collection daemon - perl plugin + +.include "../../sysutils/collectd/Makefile.common" + +USE_TOOLS+= perl + +PERL5_CONFIGURE= no +PERL5_PACKLIST+= auto/Collectd/.packlist + +CONFIGURE_ARGS+= --with-libperl=${BUILDLINK_PREFIX.perl} +CONFIGURE_ARGS+= --with-perl-bindings=${MAKE_PARAMS:Q} + +post-build: + cd ${WRKSRC}/bindings && ${BUILD_MAKE_CMD} perl + +do-install: + cd ${WRKSRC}/src && ${PKGSRC_SETENV} ${INSTALL_ENV} ${MAKE_ENV} \ + ${MAKE_PROGRAM} ${MAKE_FLAGS} ${INSTALL_MAKE_FLAGS} ${INSTALL_TARGET} + cd ${WRKSRC}/bindings && ${PKGSRC_SETENV} ${INSTALL_ENV} ${MAKE_ENV} \ + ${MAKE_PROGRAM} ${MAKE_FLAGS} ${INSTALL_MAKE_FLAGS} install + +.include "../../lang/perl5/module.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/sysutils/py-collectd/DESCR b/sysutils/py-collectd/DESCR new file mode 100644 index 00000000000..9119bdd8fad --- /dev/null +++ b/sysutils/py-collectd/DESCR @@ -0,0 +1 @@ +python plugin for collectd diff --git a/sysutils/py-collectd/Makefile b/sysutils/py-collectd/Makefile new file mode 100644 index 00000000000..e037c92eeb2 --- /dev/null +++ b/sysutils/py-collectd/Makefile @@ -0,0 +1,13 @@ +# $NetBSD: Makefile,v 1.1 2015/04/14 11:27:30 fhajny Exp $ + +PKGNAME= ${PYPKGPREFIX}-${DISTNAME} +COLLECTD_PACKAGE= python + +COMMENT= Statistics collection daemon - python plugin + +.include "../../sysutils/collectd/Makefile.common" + +CONFIGURE_ARGS+= --with-python=${PYTHONBIN} + +.include "../../lang/python/application.mk" +.include "../../mk/bsd.pkg.mk" |