aboutsummaryrefslogtreecommitdiff
path: root/databases/rrdtool
diff options
context:
space:
mode:
authorNiclas Zeising <zeising@FreeBSD.org>2014-07-23 20:11:10 +0000
committerNiclas Zeising <zeising@FreeBSD.org>2014-07-23 20:11:10 +0000
commit3b22ad40b17d4be934ba1e7259f9ab4e4b0e47f8 (patch)
treeacff0235f236dc6bc7ca0a1d89a25befeba12ef2 /databases/rrdtool
parent64ce5e6fc7a586899bd5f8f4b6984a7ef7297fbf (diff)
downloadports-3b22ad40b17d4be934ba1e7259f9ab4e4b0e47f8.tar.gz
ports-3b22ad40b17d4be934ba1e7259f9ab4e4b0e47f8.zip
Notes
Diffstat (limited to 'databases/rrdtool')
-rw-r--r--databases/rrdtool/Makefile57
-rw-r--r--databases/rrdtool/files/patch-configure11
-rw-r--r--databases/rrdtool/files/patch-src__rrd_graph.c68
-rw-r--r--databases/rrdtool/pkg-plist163
4 files changed, 242 insertions, 57 deletions
diff --git a/databases/rrdtool/Makefile b/databases/rrdtool/Makefile
index 3d2d38421a8a..e8cf543267e1 100644
--- a/databases/rrdtool/Makefile
+++ b/databases/rrdtool/Makefile
@@ -3,7 +3,7 @@
PORTNAME= rrdtool
PORTVERSION= 1.4.8
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= databases graphics
MASTER_SITES= http://oss.oetiker.ch/rrdtool/pub/
@@ -12,29 +12,24 @@ COMMENT= Round Robin Database Tools
LICENSE= GPLv2
-LIB_DEPENDS= libfreetype.so:${PORTSDIR}/print/freetype2 \
- libcairo.so:${PORTSDIR}/graphics/cairo \
- libpng15.so:${PORTSDIR}/graphics/png \
- libxml2.so:${PORTSDIR}/textproc/libxml2 \
- libpangocairo-1.0.so:${PORTSDIR}/x11-toolkits/pango
-
CONFLICTS= rrdtool10-* rrdtool12-*
USE_RC_SUBR= rrdcached
-USE_AUTOTOOLS= libtool
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
-USES= gmake pkgconfig
-USE_GNOME= gnomehack intltool
+USES= gmake libtool pathfix pkgconfig
+USE_GNOME= glib20 libxml2
+INSTALL_TARGET= install-strip
-CONFIGURE_ARGS= --disable-tcl
+CONFIGURE_ARGS= --disable-tcl --disable-silent-rules
-PORTDOCS= *
PORTEXAMPLES= 4charts.pl bigtops.pl cgi-demo.cgi minmax.pl perftest.pl \
piped-demo.pl shared-demo.pl stripes.pl
-OPTIONS_DEFINE= DEJAVU JSON MMAP PERL_MODULE PYTHON_MODULE RUBY_MODULE EXAMPLES DOCS
-OPTIONS_DEFAULT= MMAP PERL_MODULE
+OPTIONS_DEFINE= DEJAVU GRAPH JSON MMAP NLS PERL_MODULE PYTHON_MODULE \
+ RUBY_MODULE EXAMPLES DOCS
+OPTIONS_DEFAULT= GRAPH MMAP PERL_MODULE
+GRAPH_DESC= Enable the rrdtool graph command (needs cairo)
DEJAVU_DESC= Use DejaVu fonts (requires X11)
JSON_DESC= Support of json export
MMAP_DESC= Use mmap in rrd_update
@@ -68,6 +63,7 @@ PLIST_SUB+= WITH_RUBY="@comment "
.if ${PORT_OPTIONS:MPERL_MODULE}
USES+= perl5
+USE_PERL5+= build run fixpacklist
CONFIGURE_ARGS+= --enable-perl --enable-perl-site-install
PLIST_SUB+= WITH_PERL=""
.else
@@ -83,26 +79,43 @@ CONFIGURE_ARGS+= --disable-mmap
EXTRA_PATCHES+= ${FILESDIR}/thirdparty-json.diff
.endif
+.if ${PORT_OPTIONS:MGRAPH}
+LIB_DEPENDS+= libfreetype.so:${PORTSDIR}/print/freetype2 \
+ libpng15.so:${PORTSDIR}/graphics/png
+USE_GNOME+= cairo pango
+PLIST_SUB+= WITH_GRAPH=""
+.else
+CONFIGURE_ARGS+=--disable-rrdcgi --disable-rrd_graph
+PLIST_SUB+= WITH_GRAPH="@comment "
+.endif
+
+.if ${PORT_OPTIONS:MNLS}
+USES+= gettext
+USE_GNOME+= intltool
+.else
+CONFIGURE_ARGS+=--disable-nls
+.endif
+
.if exists(${LOCALBASE}/lib/X11/fonts/dejavu) || ${PORT_OPTIONS:MDEJAVU}
RUN_DEPENDS+= ${LOCALBASE}/lib/X11/fonts/dejavu:${PORTSDIR}/x11-fonts/dejavu
.endif
CPPFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/include/freetype2
-##LDFLAGS+= -L${LOCALBASE}/lib
-CFLAGS:= ${CFLAGS:N-ffast-math}
post-extract:
- @${REINPLACE_CMD} -e 's/^POD3/#POD3/' ${WRKSRC}/doc/Makefile.in
.if ! ${PORT_OPTIONS:MDOCS}
- @${REINPLACE_CMD} -e 's/[[:space:]]install-idocDATA//g' \
- -e 's/[[:space:]]install-ihtmlDATA//g' \
- -e 's/^[[:space:]].*cd .* rrdtool.html index.html/ #/' \
- ${WRKSRC}/doc/Makefile.in
+ @${REINPLACE_CMD} -e '/^SUBDIRS = /s| doc | |' \
+ ${WRKSRC}/Makefile.in
.endif
.if ! ${PORT_OPTIONS:MEXAMPLES}
- ${REINPLACE_CMD} -e '/^SUBDIRS = /s| examples | |' \
+ @${REINPLACE_CMD} -e '/^SUBDIRS = /s| examples | |' \
${WRKSRC}/Makefile.in
.endif
+ @${REINPLACE_CMD} -E 's|(^rrdcached_LDADD = librrd_th.la)|\1 $$\(ALL_LIBS\)|' \
+ ${WRKSRC}/src/Makefile.in
+
+ @${REINPLACE_CMD} -E 's|(^rrdtool_LDADD = librrd.la)|\1 $$\(ALL_LIBS\)|' \
+ ${WRKSRC}/src/Makefile.in
post-install:
.if !defined(BATCH) && ${PORT_OPTIONS:MEXAMPLES}
diff --git a/databases/rrdtool/files/patch-configure b/databases/rrdtool/files/patch-configure
new file mode 100644
index 000000000000..baf59b07e1af
--- /dev/null
+++ b/databases/rrdtool/files/patch-configure
@@ -0,0 +1,11 @@
+--- configure.orig 2013-05-23 09:55:19.000000000 +0200
++++ configure 2014-07-15 19:59:43.000000000 +0200
+@@ -12846,7 +12846,7 @@
+
+
+ if test "x$GCC" = "xyes"; then
+- for flag in -fno-strict-aliasing -Wall -std=gnu99 -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wold-style-definition -W; do
++ for flag in -fno-strict-aliasing -Wall -std=gnu99 -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wold-style-definition; do
+ oCFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $flag"
+ cachename=rd_cv_gcc_flag_`echo $flag|sed 's/[^A-Za-z]/_/g'`
diff --git a/databases/rrdtool/files/patch-src__rrd_graph.c b/databases/rrdtool/files/patch-src__rrd_graph.c
new file mode 100644
index 000000000000..5cccdcf53c73
--- /dev/null
+++ b/databases/rrdtool/files/patch-src__rrd_graph.c
@@ -0,0 +1,68 @@
+--- src/rrd_graph.c.orig 2013-05-23 09:55:07.000000000 +0200
++++ src/rrd_graph.c 2014-07-20 22:11:58.000000000 +0200
+@@ -305,6 +305,52 @@
+
+ #undef conv_if
+
++
++static int bad_format_imginfo(
++ char *fmt)
++{
++ char *ptr;
++ int n = 0;
++
++ ptr = fmt;
++ while (*ptr != '\0')
++ if (*ptr++ == '%') {
++
++ /* line cannot end with percent char */
++ if (*ptr == '\0')
++ return 1;
++ /* '%%' is allowed */
++ if (*ptr == '%')
++ ptr++;
++ /* '%s', '%S' are allowed */
++ else if (*ptr == 's' || *ptr == 'S') {
++ n = 1;
++ ptr++;
++ }
++
++ /* or else '% 4lu' and such are allowed */
++ else {
++ /* optional padding character */
++ if (*ptr == ' ')
++ ptr++;
++ /* This should take care of 'm' */
++ while (*ptr >= '0' && *ptr <= '9')
++ ptr++;
++ /* 'lu' must follow here */
++ if (*ptr++ != 'l')
++ return 1;
++ if (*ptr == 'u')
++ ptr++;
++ else
++ return 1;
++ n++;
++ }
++ }
++
++ return (n != 3);
++}
++
++
+ int im_free(
+ image_desc_t *im)
+ {
+@@ -4022,6 +4068,12 @@
+ char *path;
+ char *filename;
+
++ if (bad_format_imginfo(im.imginfo)) {
++ rrd_info_free(im.grinfo);
++ im_free(&im);
++ rrd_set_error("bad format for imginfo");
++ return NULL;
++ }
+ path = strdup(im.graphfile);
+ filename = basename(path);
+ info.u_str =
diff --git a/databases/rrdtool/pkg-plist b/databases/rrdtool/pkg-plist
index 483166758af1..81ce140461b1 100644
--- a/databases/rrdtool/pkg-plist
+++ b/databases/rrdtool/pkg-plist
@@ -1,5 +1,5 @@
bin/rrdcached
-bin/rrdcgi
+%%WITH_GRAPH%%bin/rrdcgi
bin/rrdcreate
bin/rrdinfo
bin/rrdtool
@@ -8,42 +8,43 @@ include/rrd.h
include/rrd_client.h
include/rrd_format.h
lib/librrd.a
-lib/librrd.la
lib/librrd.so
-lib/librrd.so.6
+lib/librrd.so.4
+lib/librrd.so.4.2.1
lib/librrd_th.a
-lib/librrd_th.la
lib/librrd_th.so
-lib/librrd_th.so.6
+lib/librrd_th.so.4
+lib/librrd_th.so.4.2.1
libdata/pkgconfig/librrd.pc
-man/man1/bin_dec_hex.1.gz
-man/man1/cdeftutorial.1.gz
-man/man1/rpntutorial.1.gz
-man/man1/rrd-beginners.1.gz
-man/man1/rrdbuild.1.gz
-man/man1/rrdcached.1.gz
-man/man1/rrdcgi.1.gz
-man/man1/rrdcreate.1.gz
-man/man1/rrddump.1.gz
-man/man1/rrdfetch.1.gz
-man/man1/rrdfirst.1.gz
-man/man1/rrdflushcached.1.gz
-man/man1/rrdgraph.1.gz
-man/man1/rrdgraph_data.1.gz
-man/man1/rrdgraph_examples.1.gz
-man/man1/rrdgraph_graph.1.gz
-man/man1/rrdgraph_rpn.1.gz
-man/man1/rrdinfo.1.gz
-man/man1/rrdlast.1.gz
-man/man1/rrdlastupdate.1.gz
-man/man1/rrdresize.1.gz
-man/man1/rrdrestore.1.gz
-man/man1/rrdthreads.1.gz
-man/man1/rrdtool.1.gz
-man/man1/rrdtune.1.gz
-man/man1/rrdtutorial.1.gz
-man/man1/rrdupdate.1.gz
-man/man1/rrdxport.1.gz
+%%PORTDOCS%%man/man1/bin_dec_hex.1.gz
+%%PORTDOCS%%man/man1/cdeftutorial.1.gz
+%%PORTDOCS%%man/man1/rpntutorial.1.gz
+%%PORTDOCS%%man/man1/rrd-beginners.1.gz
+%%PORTDOCS%%man/man1/rrdbuild.1.gz
+%%PORTDOCS%%man/man1/rrdcached.1.gz
+%%PORTDOCS%%man/man1/rrdcgi.1.gz
+%%PORTDOCS%%man/man1/rrdcreate.1.gz
+%%PORTDOCS%%man/man1/rrddump.1.gz
+%%PORTDOCS%%man/man1/rrdfetch.1.gz
+%%PORTDOCS%%man/man1/rrdfirst.1.gz
+%%PORTDOCS%%man/man1/rrdflushcached.1.gz
+%%PORTDOCS%%man/man1/rrdgraph.1.gz
+%%PORTDOCS%%man/man1/rrdgraph_data.1.gz
+%%PORTDOCS%%man/man1/rrdgraph_examples.1.gz
+%%PORTDOCS%%man/man1/rrdgraph_graph.1.gz
+%%PORTDOCS%%man/man1/rrdgraph_rpn.1.gz
+%%PORTDOCS%%man/man1/rrdinfo.1.gz
+%%PORTDOCS%%man/man1/rrdlast.1.gz
+%%PORTDOCS%%man/man1/rrdlastupdate.1.gz
+%%PORTDOCS%%man/man1/rrdresize.1.gz
+%%PORTDOCS%%man/man1/rrdrestore.1.gz
+%%PORTDOCS%%man/man1/rrdthreads.1.gz
+%%PORTDOCS%%man/man1/rrdtool.1.gz
+%%PORTDOCS%%man/man1/rrdtune.1.gz
+%%PORTDOCS%%man/man1/rrdtutorial.1.gz
+%%PORTDOCS%%man/man1/rrdupdate.1.gz
+%%PORTDOCS%%man/man1/rrdxport.1.gz
+%%PORTDOCS%%man/man3/librrd.3.gz
%%WITH_PERL%%%%PERL5_MAN3%%/RRDp.3.gz
%%WITH_PERL%%%%PERL5_MAN3%%/RRDs.3.gz
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/RRDp/.packlist
@@ -53,10 +54,102 @@ man/man1/rrdxport.1.gz
%%WITH_PERL%%%%SITE_PERL%%/RRDp.pm
%%WITH_PYTHON%%%%PYTHON_SITELIBDIR%%/rrdtoolmodule.so
%%WITH_RUBY%%%%RUBY_SITEARCHLIBDIR%%/RRD.so
-%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/RRDp
-%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/RRDs
%%PORTEXAMPLES%%share/rrdtool/examples/rrdcached/RRDCached.pm
%%PORTEXAMPLES%%share/rrdtool/examples/rrdcached/rrdcached-size.pl
+%%PORTDOCS%%%%DOCSDIR%%/html/RRDp.html
+%%PORTDOCS%%%%DOCSDIR%%/html/RRDs.html
+%%PORTDOCS%%%%DOCSDIR%%/html/bin_dec_hex.html
+%%PORTDOCS%%%%DOCSDIR%%/html/cdeftutorial.html
+%%PORTDOCS%%%%DOCSDIR%%/html/index.html
+%%PORTDOCS%%%%DOCSDIR%%/html/librrd.html
+%%PORTDOCS%%%%DOCSDIR%%/html/rpntutorial.html
+%%PORTDOCS%%%%DOCSDIR%%/html/rrd-beginners.html
+%%PORTDOCS%%%%DOCSDIR%%/html/rrdbuild.html
+%%PORTDOCS%%%%DOCSDIR%%/html/rrdcached.html
+%%PORTDOCS%%%%DOCSDIR%%/html/rrdcgi.html
+%%PORTDOCS%%%%DOCSDIR%%/html/rrdcreate.html
+%%PORTDOCS%%%%DOCSDIR%%/html/rrddump.html
+%%PORTDOCS%%%%DOCSDIR%%/html/rrdfetch.html
+%%PORTDOCS%%%%DOCSDIR%%/html/rrdfirst.html
+%%PORTDOCS%%%%DOCSDIR%%/html/rrdflushcached.html
+%%PORTDOCS%%%%DOCSDIR%%/html/rrdgraph.html
+%%PORTDOCS%%%%DOCSDIR%%/html/rrdgraph_data.html
+%%PORTDOCS%%%%DOCSDIR%%/html/rrdgraph_examples.html
+%%PORTDOCS%%%%DOCSDIR%%/html/rrdgraph_graph.html
+%%PORTDOCS%%%%DOCSDIR%%/html/rrdgraph_rpn.html
+%%PORTDOCS%%%%DOCSDIR%%/html/rrdinfo.html
+%%PORTDOCS%%%%DOCSDIR%%/html/rrdlast.html
+%%PORTDOCS%%%%DOCSDIR%%/html/rrdlastupdate.html
+%%PORTDOCS%%%%DOCSDIR%%/html/rrdresize.html
+%%PORTDOCS%%%%DOCSDIR%%/html/rrdrestore.html
+%%PORTDOCS%%%%DOCSDIR%%/html/rrdthreads.html
+%%PORTDOCS%%%%DOCSDIR%%/html/rrdtool.html
+%%PORTDOCS%%%%DOCSDIR%%/html/rrdtune.html
+%%PORTDOCS%%%%DOCSDIR%%/html/rrdtutorial.html
+%%PORTDOCS%%%%DOCSDIR%%/html/rrdupdate.html
+%%PORTDOCS%%%%DOCSDIR%%/html/rrdxport.html
+%%PORTDOCS%%%%DOCSDIR%%/txt/bin_dec_hex.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/bin_dec_hex.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/cdeftutorial.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/cdeftutorial.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/librrd.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/rpntutorial.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/rpntutorial.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrd-beginners.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrd-beginners.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdbuild.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdbuild.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdcached.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdcached.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdcgi.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdcgi.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdcreate.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdcreate.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrddump.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrddump.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdfetch.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdfetch.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdfirst.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdfirst.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdflushcached.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdflushcached.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdgraph.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdgraph.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdgraph_data.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdgraph_data.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdgraph_examples.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdgraph_examples.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdgraph_graph.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdgraph_graph.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdgraph_rpn.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdgraph_rpn.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdinfo.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdinfo.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdlast.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdlast.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdlastupdate.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdlastupdate.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdresize.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdresize.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdrestore.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdrestore.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdthreads.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdthreads.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdtool.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdtool.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdtune.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdtune.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdtutorial.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdtutorial.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdupdate.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdupdate.txt
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdxport.pod
+%%PORTDOCS%%%%DOCSDIR%%/txt/rrdxport.txt
+%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/RRDp
+%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/RRDs
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/html
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/txt
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
%%PORTEXAMPLES%%@dirrm share/rrdtool/examples/rrdcached
%%PORTEXAMPLES%%@dirrm share/rrdtool/examples
%%PORTEXAMPLES%%@dirrm share/rrdtool