pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/databases/rrdtool Make options for the python, tcl, an...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c2bf089a9329
branches:  trunk
changeset: 351756:c2bf089a9329
user:      dholland <dholland%pkgsrc.org@localhost>
date:      Sat Aug 27 06:42:43 2016 +0000

description:
Make options for the python, tcl, and lua bindings. Enable them by
default and bump PKGREVISION to 2.

Also, don't depend on python unless the python option is turned
on, and make the lua bindings behave themselves on netbsd where
there's a copy of lua in base.

Note that the ruby bindings are built in a separate package
(databases/ruby-rrdtool) ...probably the python bindings should be as
well. Also note that there's another apparently different set of
python bindings in databases/py-python-rrdtool. I have no idea which
is preferred.

diffstat:

 databases/rrdtool/Makefile   |  10 ++----
 databases/rrdtool/PLIST      |  15 +++++++++-
 databases/rrdtool/options.mk |  64 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 81 insertions(+), 8 deletions(-)

diffs (169 lines):

diff -r 58015b49999e -r c2bf089a9329 databases/rrdtool/Makefile
--- a/databases/rrdtool/Makefile        Sat Aug 27 03:16:56 2016 +0000
+++ b/databases/rrdtool/Makefile        Sat Aug 27 06:42:43 2016 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.123 2016/07/09 06:38:03 wiz Exp $
+# $NetBSD: Makefile,v 1.124 2016/08/27 06:42:43 dholland Exp $
 #
 # Please, also update databases/ruby-rrdtool
 
 DISTNAME=      rrdtool-1.6.0
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    databases graphics net
 MASTER_SITES=  http://oss.oetiker.ch/rrdtool/pub/
 
@@ -19,10 +19,7 @@
 GNU_CONFIGURE=         yes
 CONFIGURE_ARGS+=       --enable-shared
 CONFIGURE_ARGS+=       --with-perl-options=${MAKE_PARAMS:Q}
-CONFIGURE_ARGS+=       --disable-tcl
-CONFIGURE_ARGS+=       --disable-python
 CONFIGURE_ARGS+=       --disable-ruby
-CONFIGURE_ARGS+=       --disable-lua
 CONFIGURE_ARGS+=       --disable-libdbi
 
 PTHREAD_OPTS+=         require
@@ -39,7 +36,6 @@
 SUBST_FILES.prefix=    examples/cgi-demo.cgi
 SUBST_SED.prefix=      -e '1s,^\#! \$${prefix},\#! ${PREFIX},'
 
-REPLACE_PYTHON=                examples/stripes.py
 TEST_TARGET=           # *** No rule to make target 'test'.
 
 RCD_SCRIPTS=           rrdcached
@@ -49,6 +45,7 @@
        ${INSTALL_DATA} ${WRKSRC}/src/rrd_config.h ${DESTDIR}${PREFIX}/include/
 
 .include "../../mk/bsd.prefs.mk"
+.include "options.mk"
 
 RRDCACHED_USER?=       rrdcached
 RRDCACHED_GROUP?=      ${RRDCACHED_USER}
@@ -69,7 +66,6 @@
 .include "../../textproc/libxml2/buildlink3.mk"
 .include "../../x11/pixman/buildlink3.mk"
 .include "../../lang/perl5/module.mk"
-.include "../../lang/python/application.mk"
 
 .include "../../mk/pthread.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 58015b49999e -r c2bf089a9329 databases/rrdtool/PLIST
--- a/databases/rrdtool/PLIST   Sat Aug 27 03:16:56 2016 +0000
+++ b/databases/rrdtool/PLIST   Sat Aug 27 06:42:43 2016 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.17 2016/04/23 06:23:49 adam Exp $
+@comment $NetBSD: PLIST,v 1.18 2016/08/27 06:42:43 dholland Exp $
 bin/rrdcached
 bin/rrdcgi
 bin/rrdcreate
@@ -10,7 +10,16 @@
 include/rrd_config.h
 include/rrd_format.h
 lib/librrd.la
+${PLIST.lua}${LUA_CDIR}/rrd.la
+${PLIST.python}${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
+${PLIST.python}${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
+${PLIST.python}${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
+${PLIST.python}${PYSITELIB}/${EGG_INFODIR}/top_level.txt
+${PLIST.python}${PYSITELIB}/rrdtool.so
 lib/pkgconfig/librrd.pc
+${PLIST.tcl}lib/rrdtool/ifOctets.tcl
+${PLIST.tcl}lib/rrdtool/pkgIndex.tcl
+${PLIST.tcl}lib/tclrrd1.6.0.so
 man/man1/bin_dec_hex.1
 man/man1/cdeftutorial.1
 man/man1/rpntutorial.1
@@ -31,6 +40,7 @@
 man/man1/rrdinfo.1
 man/man1/rrdlast.1
 man/man1/rrdlastupdate.1
+${PLIST.lua}man/man1/rrdlua.1
 man/man1/rrdresize.1
 man/man1/rrdrestore.1
 man/man1/rrdthreads.1
@@ -64,6 +74,7 @@
 share/doc/rrdtool-${PKGVERSION}/html/rrdinfo.html
 share/doc/rrdtool-${PKGVERSION}/html/rrdlast.html
 share/doc/rrdtool-${PKGVERSION}/html/rrdlastupdate.html
+${PLIST.lua}share/doc/rrdtool-${PKGVERSION}/html/rrdlua.html
 share/doc/rrdtool-${PKGVERSION}/html/rrdresize.html
 share/doc/rrdtool-${PKGVERSION}/html/rrdrestore.html
 share/doc/rrdtool-${PKGVERSION}/html/rrdthreads.html
@@ -113,6 +124,8 @@
 share/doc/rrdtool-${PKGVERSION}/txt/rrdlast.txt
 share/doc/rrdtool-${PKGVERSION}/txt/rrdlastupdate.pod
 share/doc/rrdtool-${PKGVERSION}/txt/rrdlastupdate.txt
+${PLIST.lua}share/doc/rrdtool-${PKGVERSION}/txt/rrdlua.pod
+${PLIST.lua}share/doc/rrdtool-${PKGVERSION}/txt/rrdlua.txt
 share/doc/rrdtool-${PKGVERSION}/txt/rrdresize.pod
 share/doc/rrdtool-${PKGVERSION}/txt/rrdresize.txt
 share/doc/rrdtool-${PKGVERSION}/txt/rrdrestore.pod
diff -r 58015b49999e -r c2bf089a9329 databases/rrdtool/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/rrdtool/options.mk      Sat Aug 27 06:42:43 2016 +0000
@@ -0,0 +1,64 @@
+# $NetBSD: options.mk,v 1.1 2016/08/27 06:42:43 dholland Exp $
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.rrdtool
+PKG_SUPPORTED_OPTIONS= lua python tcl
+PKG_SUGGESTED_OPTIONS= lua python tcl
+
+# Note that there's another (apparently different) python library
+# in databases/py-python-rrdtool.
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS+=           python tcl lua
+
+
+#
+# XXX: this should include egg.mk, but that doesn't work: it includes
+# extension.mk, which sets do-build and do-install rules, in such a
+# way that we can't override it. Instead we need to cutpaste the
+# definition of EGG_INFODIR and its plist bits. Sigh. Probably the
+# right thing to do is make this a separate package.
+# 
+.if !empty(PKG_OPTIONS:Mpython)
+CONFIGURE_ARGS+=       --enable-python
+
+REPLACE_PYTHON=                examples/stripes.py
+.include "../../lang/python/application.mk"
+
+PLIST.python=          yes
+EGG_NAME=              py_rrdtool-0.2.2
+EGG_INFODIR?=          ${EGG_NAME}-py${PYVERSSUFFIX}.egg-info
+PLIST_SUBST+=          PYSITELIB=${PYSITELIB}
+PLIST_SUBST+=          EGG_INFODIR=${EGG_INFODIR}
+#.include "../../lang/python/egg.mk"
+
+.else # python
+CONFIGURE_ARGS+=       --disable-python
+.endif
+
+
+.if !empty(PKG_OPTIONS:Mtcl)
+USE_TOOLS+=            tclsh:run
+CONFIGURE_ARGS+=       --enable-tcl
+CONFIGURE_ARGS+=       --with-tcllib=${BUILDLINK_PREFIX.tcl}/lib
+
+REPLACE_INTERPRETER+=  tclsh
+REPLACE.tclsh.old=     .*tclsh@TCL_VERSION@
+REPLACE.tclsh.new=     ${BUILDLINK_PREFIX.tcl}/bin/tclsh
+REPLACE_FILES.tclsh=   bindings/tcl/ifOctets.tcl.in
+
+PLIST.tcl=             yes
+.include "../../lang/tcl/buildlink3.mk"
+
+.else # tcl
+CONFIGURE_ARGS+=       --disable-tcl
+.endif
+
+.if !empty(PKG_OPTIONS:Mlua)
+CONFIGURE_ARGS+=       --enable-lua
+CONFIGURE_ENV+=                ac_cv_path_LUA=${LUA_INTERPRETER}
+PLIST.lua=             yes
+.include "../../lang/lua/module.mk"
+.else
+CONFIGURE_ARGS+=       --disable-lua
+.endif



Home | Main Index | Thread Index | Old Index