long overdue update to 1.2.23

remove TCL FLAVOUR
split perl bindings into a subpackage
provide python bindings as a subpackage
take maintainer

ok and 64 bit fixes sthen@, ok jasper@
This commit is contained in:
msf 2007-09-12 14:34:36 +00:00
parent 84d2ef28c5
commit fe19c489e4
41 changed files with 283 additions and 941 deletions

View File

@ -1,57 +1,64 @@
# $OpenBSD: Makefile,v 1.37 2007/04/03 14:54:26 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.38 2007/09/12 14:34:36 msf Exp $
NOT_FOR_ARCHS= ${NO_SHARED_ARCHS}
SHARED_ONLY= Yes
COMMENT= "system to store and display time-series data"
COMMENT-main= system to store and display time-series data
COMMENT-perl= perl interface to librrd
COMMENT-python= python interface to librrd
VERSION= 1.2.23
DISTNAME= rrdtool-${VERSION}
PKGNAME-main= ${DISTNAME}
PKGNAME-perl= p5-RRD-${VERSION}
PKGNAME-python= py-rrd-${VERSION}
SHARED_LIBS+= rrd 2.10
SHARED_LIBS+= rrd_th 2.8
RRDVERSION= 1.0.49
DISTNAME= rrdtool-${RRDVERSION}
PKGNAME= ${DISTNAME}p4
SHARED_LIBS= rrd 0.0
CATEGORIES= net
MASTER_SITES= ${HOMEPAGE}pub/rrdtool-1.0.x/ \
http://ftp.sunet.se/pub/network/monitoring/rrdtool/rrdtool-1.0.x/
MAINTAINER= Mathieu Sauve-Frankel <msf@openbsd.org>
HOMEPAGE= http://oss.oetiker.ch/rrdtool/
MAINTAINER= Dan Harnett <danh@openbsd.org>
# GPL
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= c freetype fontconfig jpeg m png z
MODULES= converters/libiconv
SUBST_VARS= RRDVERSION
FLAVORS= tcl
FLAVOR?=
LIB_DEPENDS= gd.>=18::graphics/gd
MASTER_SITES= ${HOMEPAGE}pub/
USE_GMAKE= Yes
USE_X11= Yes
USE_LIBTOOL= Yes
MULTI_PACKAGES= -main -perl -python
MODULES= lang/python
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS+= ${CONFIGURE_SHARED} --enable-static \
--enable-local-libpng \
--enable-local-zlib
MODGNU_CONFIG_GUESS_DIRS=${WRKSRC}/config ${WRKSRC}/contrib/php4
CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \
--enable-perl-site-install \
--enable-python \
--disable-ruby \
--disable-tcl
CPPFLAGS+= -I${LOCALBASE}/include/libart-2.0 \
-I${LOCALBASE}/include/libpng \
-I${X11BASE}/include/ \
-I${X11BASE}/include/freetype2
LDFLAGS+= -L${LOCALBASE}/lib -L${X11BASE}/lib
CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
.if ${FLAVOR:L:Mtcl}
LIB_DEPENDS+= tcl84:tcl-8.4.*:lang/tcl/8.4
USE_GMAKE= Yes
CONFIGURE_ARGS+= --with-tcllib="${LOCALBASE}/lib/tcl8.4"
CFLAGS+= -I${LOCALBASE}/include/tcl8.4
INSTALL_TARGET= install site-tcl-install
FAKE_FLAGS+= MACHINE_ARCH="${MACHINE_ARCH}"
.else
CONFIGURE_ARGS+= --without-tcllib
.endif
WANTLIB-main= c m z freetype
LIB_DEPENDS-main= png::graphics/png \
art_lgpl_2::graphics/libart
RUN_DEPENDS-main=
CFLAGS+= -I${LOCALBASE}/include/libpng
WANTLIB-perl= m
LIB_DEPENDS-perl= rrd::net/rrdtool
RUN_DEPENDS-perl=
LIB_DEPENDS-python= rrd::net/rrdtool
RUN_DEPENDS-python= ${MODPY_RUN_DEPENDS}
.include <bsd.port.mk>

View File

@ -1,5 +1,5 @@
MD5 (rrdtool-1.0.49.tar.gz) = ++SS2/PWirsdhsIyLn7USg==
RMD160 (rrdtool-1.0.49.tar.gz) = llzzUrTT2mT99E4K9dHPlQcqKD4=
SHA1 (rrdtool-1.0.49.tar.gz) = JZqEReQp8PBLWbCpWdllzVoX6vs=
SHA256 (rrdtool-1.0.49.tar.gz) = IKywqjR/FinE1VKauK++SYb+ggVVBJrz+QVlMwDl6nQ=
SIZE (rrdtool-1.0.49.tar.gz) = 1466897
MD5 (rrdtool-1.2.23.tar.gz) = 2voWG8nGHldjamCFyHwf6A==
RMD160 (rrdtool-1.2.23.tar.gz) = DBFHJCrfR29ek/TVm1U+4+o3iyM=
SHA1 (rrdtool-1.2.23.tar.gz) = XaYQ4ci8AbgKvCGrnpjgBDY7Qpw=
SHA256 (rrdtool-1.2.23.tar.gz) = Sx3wCyOnShyBc03SdOcuANi7KbEeHz0pOP+HaR7OHw8=
SIZE (rrdtool-1.2.23.tar.gz) = 1061530

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-Makefile_am,v 1.1 2004/06/08 20:21:24 danh Exp $
--- Makefile.am.orig 2004-04-06 17:29:41.000000000 -0400
+++ Makefile.am 2004-06-08 13:45:41.000000000 -0400
@@ -16,7 +16,7 @@ SUBDIRS_2 = libpng-1.0.9
endif
# build the following subdirectories
-SUBDIRS = cgilib-0.4 gd1.3 $(SUBDIRS_1) $(SUBDIRS_2) \
+SUBDIRS = cgilib-0.4 $(SUBDIRS_1) $(SUBDIRS_2) \
src doc examples contrib tcl
# the following files are not mentioned in any other Makefile

View File

@ -1,37 +0,0 @@
$OpenBSD: patch-Makefile_in,v 1.12 2004/10/13 13:43:26 danh Exp $
--- Makefile.in.orig Sun Aug 8 06:40:15 2004
+++ Makefile.in Wed Oct 13 09:32:41 2004
@@ -171,7 +171,7 @@ RSYNC = rsync --rsh=ssh
@USE_INSTALLED_LIBPNG_TRUE@SUBDIRS_2 =
# build the following subdirectories
-SUBDIRS = cgilib-0.4 gd1.3 $(SUBDIRS_1) $(SUBDIRS_2) \
+SUBDIRS = cgilib-0.4 $(SUBDIRS_1) $(SUBDIRS_2) \
src doc examples contrib tcl
@@ -635,18 +635,12 @@ uninstall-info: uninstall-info-recursive
# mac os X has its perl module in bundles so it seems
install-data-local:
@if test "x$(PERL)" != "xno"; then \
- echo "$(top_srcdir)/config/mkinstalldirs $(DESTDIR)$(prefix)/lib/perl/auto/RRDs"; \
- $(top_srcdir)/config/mkinstalldirs $(DESTDIR)$(prefix)/lib/perl/auto/RRDs; \
- echo "$(INSTALL) -m 644 $(top_srcdir)/perl-piped/RRDp.pm $(DESTDIR)$(prefix)/lib/perl"; \
- $(INSTALL) -m 644 $(top_srcdir)/perl-piped/RRDp.pm $(DESTDIR)$(prefix)/lib/perl; \
- echo "$(INSTALL) -m 644 $(top_srcdir)/perl-shared/RRDs.pm $(DESTDIR)$(prefix)/lib/perl"; \
- $(INSTALL) -m 644 $(top_srcdir)/perl-shared/RRDs.pm $(DESTDIR)$(prefix)/lib/perl; \
- echo "$(INSTALL) -m 644 $(top_builddir)/perl-shared/blib/arch/auto/RRDs/RRDs.bs $(DESTDIR)$(prefix)/lib/perl/auto/RRDs"; \
- $(INSTALL) -m 644 $(top_builddir)/perl-shared/blib/arch/auto/RRDs/RRDs.bs $(DESTDIR)$(prefix)/lib/perl/auto/RRDs; \
- echo "test -f $(top_builddir)/perl-shared/blib/arch/auto/RRDs/RRDs.@SO_EXT@ && $(INSTALL) -m 755 $(top_builddir)/perl-shared/blib/arch/auto/RRDs/RRDs.@SO_EXT@ $(DESTDIR)$(prefix)/lib/perl/auto/RRDs || true"; \
- test -f $(top_builddir)/perl-shared/blib/arch/auto/RRDs/RRDs.@SO_EXT@ && $(INSTALL) -m 755 $(top_builddir)/perl-shared/blib/arch/auto/RRDs/RRDs.@SO_EXT@ $(DESTDIR)$(prefix)/lib/perl/auto/RRDs || true; \
- echo "test -f $(top_builddir)/perl-shared/blib/arch/auto/RRDs/RRDs.bundle && $(INSTALL) -m 755 $(top_builddir)/perl-shared/blib/arch/auto/RRDs/RRDs.bundle $(DESTDIR)$(prefix)/lib/perl/auto/RRDs|| true"; \
- test -f $(top_builddir)/perl-shared/blib/arch/auto/RRDs/RRDs.bundle && $(INSTALL) -m 755 $(top_builddir)/perl-shared/blib/arch/auto/RRDs/RRDs.bundle $(DESTDIR)$(prefix)/lib/perl/auto/RRDs|| true; \
+ $(top_srcdir)/config/mkinstalldirs $(DESTDIR)$(prefix)/libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/auto/RRDs; \
+ $(INSTALL) -m 644 $(top_srcdir)/perl-piped/RRDp.pm $(DESTDIR)$(prefix)/libdata/perl5/site_perl/; \
+ $(INSTALL) -m 644 $(top_srcdir)/perl-shared/RRDs.pm $(DESTDIR)$(prefix)/libdata/perl5/site_perl/; \
+ $(INSTALL) -m 644 $(top_builddir)/perl-shared/blib/arch/auto/RRDs/RRDs.bs $(DESTDIR)$(prefix)/libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/auto/RRDs; \
+ test -f $(top_builddir)/perl-shared/blib/arch/auto/RRDs/RRDs.@SO_EXT@ && $(INSTALL) -m 755 $(top_builddir)/perl-shared/blib/arch/auto/RRDs/RRDs.@SO_EXT@ $(DESTDIR)$(prefix)/libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/auto/RRDs || true; \
+ test -f $(top_builddir)/perl-shared/blib/arch/auto/RRDs/RRDs.bundle && $(INSTALL) -m 755 $(top_builddir)/perl-shared/blib/arch/auto/RRDs/RRDs.bundle $(DESTDIR)$(prefix)/libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/auto/RRDs|| true; \
fi
# rules for building the perl module

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-bindings_Makefile_in,v 1.1 2007/09/12 14:34:36 msf Exp $
--- bindings/Makefile.in.orig Wed May 2 19:06:59 2007
+++ bindings/Makefile.in Tue Sep 11 14:31:11 2007
@@ -550,7 +550,7 @@ ruby:
# rules for buildung the pyton module
python:
- cd python && env LIBDIR=../../src/.libs $(PYTHON) setup.py build
+ cd python && env LIBDIR=../../src/.libs INCDIR=../../src $(PYTHON) setup.py build
# rules for building the perl module
perl_piped: perl-piped/Makefile

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-cgilib-0_4_cgi_c,v 1.1 2004/06/08 20:21:24 danh Exp $
--- cgilib-0.4/cgi.c.orig 2002-02-26 05:21:17.000000000 -0500
+++ cgilib-0.4/cgi.c 2004-06-08 15:00:25.000000000 -0400
@@ -254,8 +254,11 @@ char *cgiGetValue(s_cgi **parms, const c
void cgiRedirect (const char *url)
{
+ unsigned long length;
+
+ length = 77 + (strlen(url) * 2);
if (url && strlen(url)) {
- printf ("Content-type: text/html\nContent-length: %d\n", 77+(strlen(url)*2));
+ printf ("Content-type: text/html\nContent-length: %lu\n", length);
printf ("Status: 302 Temporal Relocation\n");
printf ("Location: %s\n\n", url);
printf ("<html>\n<body>\nThe page has been moved to <a href=\"%s\">%s</a>\n</body>\n</html>\n", url, url);

View File

@ -1,30 +0,0 @@
$OpenBSD: patch-cgilib-0_4_cgi_h,v 1.1 2004/06/08 20:21:24 danh Exp $
--- cgilib-0.4/cgi.h.orig 2002-02-26 05:21:17.000000000 -0500
+++ cgilib-0.4/cgi.h 2004-06-08 12:23:43.000000000 -0400
@@ -29,7 +29,7 @@ typedef struct cgi_s {
*
* returns a valid CGI Header (Content-type...)
*/
-void cgiHeader ();
+void cgiHeader (void);
/* cgiDebug
*
@@ -41,7 +41,7 @@ void cgiDebug (int level, int where);
*
* Reads in variables set via POST or stdin
*/
-s_cgi **cgiInit ();
+s_cgi **cgiInit (void);
/* cgiGetValue
*
@@ -56,4 +56,8 @@ char *cgiGetValue(s_cgi **parms, const c
*/
void cgiRedirect (const char *url);
+/* cgiDecodeString
+ */
+char *cgiDecodeString (char *text);
+
#endif /* _CGI_H_ */

View File

@ -1,46 +0,0 @@
$OpenBSD: patch-configure,v 1.4 2004/06/08 20:21:24 danh Exp $
--- configure.orig 2004-04-06 17:30:38.000000000 -0400
+++ configure 2004-06-08 12:18:32.000000000 -0400
@@ -18840,7 +18840,7 @@ fi
if test x$local_libpng = xyes
then
- PNG_LINK=-lpng
+ PNG_LINK="-L${prefix}/lib -lpng"
else
PNG_LIB_DIR=libpng-1.0.9
@@ -24797,33 +24797,3 @@ echo $ECHO_N "checking in... $ECHO_C" >&
echo "$as_me:$LINENO: result: and out again" >&5
echo "${ECHO_T}and out again" >&6
-echo $ECHO_N "ordering CD from http://people.ee.ethz.ch/~oetiker/wish $ac_c" 1>&6
-sleep 1
-echo $ECHO_N ".$ac_c" 1>&6
-sleep 2
-echo $ECHO_N ".$ac_c" 1>&6
-sleep 1
-echo $ECHO_N ".$ac_c" 1>&6
-sleep 3
-echo $ECHO_N ".$ac_c" 1>&6
-echo $ECHO_N ".$ac_c" 1>&6
-echo $ECHO_N ".$ac_c" 1>&6
-sleep 2
-echo "$as_me:$LINENO: result: just kidding ;-)" >&5
-echo "${ECHO_T} just kidding ;-)" >&6
-echo
-echo "----------------------------------------------------------------"
-echo "Config is DONE!"
-echo
-echo "Type 'make' to compile the software and use 'make install' to "
-echo "install everything to: $prefix."
-echo
-echo "If you want to install the perl"
-echo "modules in site-perl, try 'make site-perl-install'."
-echo
-echo " ... that wishlist is NO JOKE. If you find RRDtool useful"
-echo "make me happy. Go to http://ee-staff.ethz.ch/~oetiker/wish and"
-echo "place an order."
-echo
-echo " -- Tobi Oetiker <tobi@oetiker.ch>"
-echo "----------------------------------------------------------------"

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-contrib_Makefile_in,v 1.6 2004/02/09 17:39:09 sturm Exp $
--- contrib/Makefile.in.orig 2004-01-04 13:40:51.000000000 +0100
+++ contrib/Makefile.in 2004-02-04 20:04:21.000000000 +0100
@@ -162,7 +162,7 @@ target_os = @target_os@
target_vendor = @target_vendor@
SUBDIRS = trytime
-contribdir = $(prefix)/contrib
+contribdir = $(prefix)/share/examples/rrdtool/contrib
contrib_DATA = README
EXTRA_DIST = rrdview log2rrd rrd-file-icon rrdproc rrdlastds add_ds killspike rrdfetchnames snmpstats rrdexplorer php3 php4
subdir = contrib

View File

@ -1,10 +0,0 @@
$OpenBSD: patch-contrib_trytime_Makefile_am,v 1.1 2004/06/08 20:21:24 danh Exp $
--- contrib/trytime/Makefile.am.orig 2003-11-30 17:00:24.000000000 -0500
+++ contrib/trytime/Makefile.am 2004-06-08 15:46:44.000000000 -0400
@@ -1,5 +1,5 @@
## Process this file with automake to produce Makefile.in
-AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/gd1.3
+AM_CPPFLAGS = -I$(top_srcdir)/src -I$(LOCALBASE)/include
EXTRA_DIST = trytime.c
contribdir = $(prefix)/contrib/trytime
contrib_DATA = README trytime.c

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-contrib_trytime_Makefile_in,v 1.7 2004/06/08 20:21:24 danh Exp $
--- contrib/trytime/Makefile.in.orig 2004-04-06 17:30:23.000000000 -0400
+++ contrib/trytime/Makefile.in 2004-06-08 15:47:00.000000000 -0400
@@ -160,9 +160,9 @@ target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
-AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/gd1.3
+AM_CPPFLAGS = -I$(top_srcdir)/src -I$(LOCALBASE)/include
EXTRA_DIST = trytime.c
-contribdir = $(prefix)/contrib/trytime
+contribdir = $(prefix)/share/examples/rrdtool/contrib/trytime
contrib_DATA = README trytime.c
bin_PROGRAMS = trytime
trytime_SOURCES = trytime.c

View File

@ -1,34 +0,0 @@
$OpenBSD: patch-contrib_trytime_trytime_c,v 1.1 2004/06/08 20:21:24 danh Exp $
--- contrib/trytime/trytime.c.orig 2003-11-29 11:51:13.000000000 -0500
+++ contrib/trytime/trytime.c 2004-06-08 11:19:33.000000000 -0400
@@ -83,22 +83,22 @@ int main ( int ac, char **av )
strftime(tim_b,100,"%c %Z",localtime(&start_tmp));
if( *soption )
printf( "Start time was specified as: '%s',\n"
- "for me this means: %s (or %ld sec since epoch)\n\n",
- soption, tim_b, start_tmp );
+ "for me this means: %s (or %.0f sec since epoch)\n\n",
+ soption, tim_b, difftime(start_tmp, 0) );
else
printf( "Start time was not specified, default value will be used (end-24h)\n"
- "for me this means: %s (or %ld sec since epoch)\n\n",
- tim_b, start_tmp );
+ "for me this means: %s (or %.0f sec since epoch)\n\n",
+ tim_b, difftime(start_tmp, 0) );
strftime(tim_b,100,"%c %Z",localtime(&end_tmp));
if( *eoption )
printf( "End time was specified as: '%s',\n"
- "for me this means: %s (or %ld sec since epoch)\n",
- eoption, tim_b, end_tmp );
+ "for me this means: %s (or %.0f sec since epoch)\n",
+ eoption, tim_b, difftime(end_tmp, 0) );
else
printf( "End time was not specified, default value will be used (now)\n"
- "for me this means: %s (or %ld sec since epoch)\n\n",
- tim_b, end_tmp );
+ "for me this means: %s (or %.0f sec since epoch)\n\n",
+ tim_b, difftime(end_tmp, 0) );
exit(0);
}

View File

@ -1,15 +1,12 @@
$OpenBSD: patch-doc_Makefile_in,v 1.5 2004/02/09 17:39:09 sturm Exp $
--- doc/Makefile.in.orig 2004-01-04 13:40:52.000000000 +0100
+++ doc/Makefile.in 2004-02-04 20:04:21.000000000 +0100
@@ -187,9 +187,9 @@ PDF = $(MAN:.1=.pdf)
EXTRA_DIST = $(POD) $(HTML) $(TXT)
# some install rules
-idocdir = $(prefix)/doc
+idocdir = $(prefix)/share/doc/rrdtool
idoc_DATA = $(POD) $(TXT)
-ihtmldir = $(prefix)/html
+ihtmldir = $(prefix)/share/doc/rrdtool/html
ihtml_DATA = $(HTML)
imandir = $(prefix)/man/man1
iman_DATA = $(MAN)
$OpenBSD: patch-doc_Makefile_in,v 1.6 2007/09/12 14:34:36 msf Exp $
--- doc/Makefile.in.orig Thu May 3 03:06:59 2007
+++ doc/Makefile.in Wed Jun 20 08:48:25 2007
@@ -147,7 +147,7 @@ PYTHON_PLATFORM = @PYTHON_PLATFORM@
PYTHON_PREFIX = @PYTHON_PREFIX@
PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
-RRDDOCDIR = @RRDDOCDIR@
+RRDDOCDIR = $(datadir)/doc/rrdtool
RRDGRAPH_YLEGEND_ANGLE = @RRDGRAPH_YLEGEND_ANGLE@
RRD_DEFAULT_FONT = @RRD_DEFAULT_FONT@
RUBY = @RUBY@

View File

@ -1,12 +1,12 @@
$OpenBSD: patch-examples_Makefile_in,v 1.5 2004/02/09 17:39:09 sturm Exp $
--- examples/Makefile.in.orig 2004-01-04 13:40:52.000000000 +0100
+++ examples/Makefile.in 2004-02-04 20:04:21.000000000 +0100
@@ -167,7 +167,7 @@ target_vendor = @target_vendor@
OpenBSD$
--- examples/Makefile.in.orig Thu May 3 03:07:00 2007
+++ examples/Makefile.in Wed Jun 20 08:48:25 2007
@@ -219,7 +219,7 @@ target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
EXTRA_DIST = cgi-demo.cgi.in
-examplesdir = $(pkgdatadir)/examples
+examplesdir = $(datadir)/examples/rrdtool
examples_SCRIPTS = cgi-demo.cgi piped-demo.pl shared-demo.pl \
stripes.pl bigtops.pl minmax.pl 4charts.pl perftest.pl
EXTRA_DIST = cgi-demo.cgi.in piped-demo.pl.in shared-demo.pl.in stripes.pl.in bigtops.pl.in minmax.pl.in
-examplesdir = $(prefix)/examples
+examplesdir = $(prefix)/share/examples/rrdtool
examples_SCRIPTS = cgi-demo.cgi piped-demo.pl shared-demo.pl stripes.pl bigtops.pl minmax.pl
subdir = examples
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4

View File

@ -1,21 +0,0 @@
$OpenBSD: patch-examples_cgi-demo_cgi_in,v 1.3 2004/06/08 20:21:24 danh Exp $
--- examples/cgi-demo.cgi.in.orig 2002-02-26 05:21:25.000000000 -0500
+++ examples/cgi-demo.cgi.in 2004-06-08 14:18:59.000000000 -0400
@@ -11,7 +11,7 @@ the <TT>shared-demo.pl</TT>.
<H1>This is NOT traffic</H1>
-<P><RRD::GRAPH cgi-demo1.gif
+<P><RRD::GRAPH cgi-demo1.png
--lower-limit 0
--start 'end-10h'
--title "Graph in Localtime <RRD::TIME::NOW %c>"
@@ -22,7 +22,7 @@ the <TT>shared-demo.pl</TT>.
</P>
<P><RRD::SETENV TZ UTC>
- <RRD::GRAPH cgi-demo2.gif
+ <RRD::GRAPH cgi-demo2.png
--lower-limit 0
--start 'end-10h'
--title "Graph in UTC"

View File

@ -1,54 +0,0 @@
$OpenBSD: patch-examples_piped-demo_pl_in,v 1.4 2007/04/04 22:59:39 david Exp $
--- examples/piped-demo.pl.in.orig 2002-02-26 05:21:25.000000000 -0500
+++ examples/piped-demo.pl.in 2004-06-08 14:21:03.000000000 -0400
@@ -16,7 +16,6 @@ $STEP = 300;
$RUNS = 12*24*30*6;
$GRUNS = 20;
$RRD = "piped-demo.rrd";
-$GIF = "piped-demo.gif";
$PNG = "piped-demo.png";
# some magic to find the correct rrdtol executable
@@ -67,42 +66,6 @@ printf "-- performance analysis Update t
print "\n";
# creating some graphs
-print "* Creating $GRUNS GIF graphs: $GIF\n\n";
-$now = time;
-for ($i=0;$i<$GRUNS;$i++) {
-RRDp::cmd "graph $GIF ", "--title 'Test GRAPH' ",
- "--height 150 --vertical-label 'Dummy Units' ".
- "--start now".(-$RUNS*$STEP),
- "--color ARROW#bfbfbf",
- "DEF:alpha=$RRD:in:AVERAGE",
- "DEF:beta=$RRD:out:AVERAGE",
- "CDEF:calc=alpha,beta,+,1.5,/",
- "AREA:alpha#0022e9:Alpha",
- "STACK:beta#00b871:Beta",
- "STACK:calc#ff0091:Calc\\j",
- "PRINT:alpha:AVERAGE:'Average Alpha\\: %1.2lf %S'",
- "PRINT:alpha:MIN:'Min Alpha\\: %1.2lf %S'",
- "PRINT:alpha:MAX:'Max Alpha\\: %1.2lf %S'",
- "GPRINT:calc:AVERAGE:'Average calc\\: %1.2lf %S\\r'",
- "GPRINT:calc:MIN:'Min calc\\: %1.2lf %S'",
- "GPRINT:calc:MAX:'Max calc\\: %1.2lf %S'",
- "VRULE:".($now-3600)."#008877:'60 Minutes ago'",
- "COMMENT:'\\s'",
- "COMMENT:'Graph created on: ".localtime(time())."\\c'";
-
-$answer = RRDp::read;
-}
-($user2,$sys2,$real2) = ($RRDp::user,$RRDp::sys,$RRDp::real);
-
-print "ANSWER:\n$$answer";
-
-printf "\n-- average Time for one Graph\n".
- " usr/grf: %1.5fs sys/grf: %1.5fs real/grf: %1.5fs graphs/sec: %1.2f\n",
- ($user2-$user1)/$GRUNS,
- ($sys2-$sys1)/$GRUNS,
- ($real2-$real1)/$GRUNS,
- $GRUNS/($real2-$real1);
-
print "\n\n* Creating $GRUNS PNG graphs: $PNG\n\n";
$now = time;

View File

@ -1,32 +0,0 @@
$OpenBSD: patch-examples_shared-demo_pl_in,v 1.3 2004/06/08 20:21:24 danh Exp $
--- examples/shared-demo.pl.in.orig 2004-01-02 06:39:14.000000000 -0500
+++ examples/shared-demo.pl.in 2004-06-08 14:19:50.000000000 -0400
@@ -36,8 +36,8 @@ my $RUNS = 500;
my $GRUNS = 4;
my $RRD1 = "shared-demo.rrd";
my $RRD2 = "shared-demob.rrd";
-my $GIF1 = "shared-demo1.gif";
-my $GIF2 = "shared-demo2.gif";
+my $GIF1 = "shared-demo1.png";
+my $GIF2 = "shared-demo2.png";
my $time = 30*int(time/30);
my $START = $time-$RUNS*$STEP;
@@ -120,7 +120,7 @@ for (my $i=0;$i<$GRUNS;$i++) {
'--base', '1024',
"--vertical-label", 'Dummy Units', "--start", (-$RUNS*$STEP),
"--end", $time,
- "--interlace", "--imgformat","GIF",
+ "--interlace", "--imgformat","PNG",
"DEF:alpha=$RRD:a:AVERAGE",
"DEF:beta=$RRD:b:AVERAGE",
"DEF:gamma=$RRD:c:AVERAGE",
@@ -147,7 +147,7 @@ for (my $i=0;$i<$GRUNS;$i++) {
if ($ERROR = RRDs::error) {
print "ERROR: $ERROR\n";
} else {
- print "GIF Size: ${xs}x${ys}\n";
+ print "PNG Size: ${xs}x${ys}\n";
print "Graph Return:\n",(join "\n", @$graphret),"\n\n";
}
}

View File

@ -1,17 +0,0 @@
$OpenBSD: patch-perl-shared_Makefile_PL_in,v 1.4 2005/10/24 05:11:01 fgsch Exp $
--- perl-shared/Makefile.PL.in.orig Wed Apr 7 17:04:53 2004
+++ perl-shared/Makefile.PL.in Wed Oct 13 09:24:47 2004
@@ -10,11 +10,11 @@ WriteMakefile(
'NAME' => 'RRDs',
'VERSION_FROM' => '@top_srcdir@/perl-shared/RRDs.pm', # finds $VERSION
'DEFINE' => "-DPERLPATCHLEVEL=$Config{PATCHLEVEL}",
- 'INC' => '-I@top_srcdir@ -I@top_srcdir@/src -I@top_srcdir@/gd1.3',
+ 'INC' => '-I@top_srcdir@ -I@top_srcdir@/src -I$(LOCALBASE)/include',
'CCFLAGS' => "$Config{ccflags} -DHAVE_CONFIG_H",
# where to look for the necessary libraries
# Perl will figure out which one is valid
'depend' => {'RRDs.c' => "@top_srcdir@/src/.libs/librrd_private.a"},
- 'dynamic_lib' => {'OTHERLDFLAGS' => "$librrd -lm"},
+ 'dynamic_lib' => {'OTHERLDFLAGS' => "$librrd -lgd -ljpeg -lz -lm"},
'realclean' => {FILES => 't/demo?.rrd t/demo?.gif' }
);

View File

@ -1,21 +0,0 @@
$OpenBSD: patch-src_Makefile_am,v 1.5 2004/06/08 20:21:24 danh Exp $
--- src/Makefile.am.orig 2004-04-04 17:50:09.000000000 -0400
+++ src/Makefile.am 2004-06-08 15:33:40.000000000 -0400
@@ -42,8 +42,6 @@ AM_CPPFLAGS = -I$(CGI_INC_DIR) -I$(GD_IN
RRD_C_FILES = \
gdpng.c \
- getopt.c \
- getopt1.c \
gifsize.c \
parsetime.c \
pngsize.c \
@@ -90,7 +88,7 @@ librrd_la_LDFLAGS = -version-inf
include_HEADERS = rrd.h
librrd_private_la_LIBADD = $(RRD_LIBS)
-librrd_private_la_LDFLAGS = -static
+librrd_private_la_LDFLAGS = -prefer-pic
bin_PROGRAMS = rrdcgi rrdtool rrdupdate

View File

@ -1,119 +0,0 @@
$OpenBSD: patch-src_Makefile_in,v 1.10 2005/10/24 05:11:01 fgsch Exp $
--- src/Makefile.in.orig 2004-04-06 17:30:25.000000000 -0400
+++ src/Makefile.in 2004-06-08 15:47:47.000000000 -0400
@@ -168,7 +168,7 @@ target_os = @target_os@
target_vendor = @target_vendor@
CGI_INC_DIR = $(top_srcdir)/@CGI_LIB_DIR@
-GD_INC_DIR = $(top_srcdir)/@GD_LIB_DIR@
+GD_INC_DIR = $(LOCALBASE)/include
@USE_INSTALLED_LIBPNG_FALSE@PNG_INC = -I$(top_srcdir)/@PNG_LIB_DIR@
# If not installed in /usr/local, this will fail.
@@ -189,10 +189,6 @@ AM_CPPFLAGS = -I$(CGI_INC_DIR) -I$(GD_IN
#LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(CFLAGS_EXTRA)
#LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(CFLAGS_EXTRA) $(LDFLAGS) -o $@
RRD_C_FILES = \
- gdpng.c \
- getopt.c \
- getopt1.c \
- gifsize.c \
parsetime.c \
pngsize.c \
rrd_create.c \
@@ -210,7 +206,7 @@ RRD_C_FILES = \
rrd_tune.c \
rrd_update.c \
rrd_xport.c \
- rrd_graph.h rrd_xport.h getopt.h ntconfig.h \
+ rrd_graph.h rrd_xport.h ntconfig.h \
parsetime.h rrd_format.h rrd_tool.h rrd.h config_aux.h
@@ -223,9 +219,9 @@ RRD_C_FILES = \
# files.
RRD_LIBS = \
$(CGI_LIB_DIR)/librrd_cgi.la \
- $(GD_LIB_DIR)/librrd_gd.la \
$(PNG_LIB) \
- $(ZLIB_LIB)
+ $(ZLIB_LIB) \
+ -lgd -ljpeg -liconv
lib_LTLIBRARIES = librrd.la
@@ -240,7 +236,7 @@ librrd_la_LDFLAGS = -version-info 0:0:0
include_HEADERS = rrd.h
librrd_private_la_LIBADD = $(RRD_LIBS)
-librrd_private_la_LDFLAGS = -static
+librrd_private_la_LDFLAGS = -prefer-pic
bin_PROGRAMS = rrdcgi rrdtool rrdupdate
@@ -263,21 +259,17 @@ LTLIBRARIES = $(lib_LTLIBRARIES) $(noins
@USE_INSTALLED_LIBPNG_FALSE@@USE_INSTALLED_ZLIB_TRUE@librrd_la_DEPENDENCIES = \
@USE_INSTALLED_LIBPNG_FALSE@@USE_INSTALLED_ZLIB_TRUE@ $(CGI_LIB_DIR)/librrd_cgi.la \
-@USE_INSTALLED_LIBPNG_FALSE@@USE_INSTALLED_ZLIB_TRUE@ $(GD_LIB_DIR)/librrd_gd.la \
@USE_INSTALLED_LIBPNG_FALSE@@USE_INSTALLED_ZLIB_TRUE@ $(top_builddir)/@PNG_LIB_DIR@/librrd_png.la
@USE_INSTALLED_LIBPNG_FALSE@@USE_INSTALLED_ZLIB_FALSE@librrd_la_DEPENDENCIES = \
@USE_INSTALLED_LIBPNG_FALSE@@USE_INSTALLED_ZLIB_FALSE@ $(CGI_LIB_DIR)/librrd_cgi.la \
-@USE_INSTALLED_LIBPNG_FALSE@@USE_INSTALLED_ZLIB_FALSE@ $(GD_LIB_DIR)/librrd_gd.la \
@USE_INSTALLED_LIBPNG_FALSE@@USE_INSTALLED_ZLIB_FALSE@ $(top_builddir)/@PNG_LIB_DIR@/librrd_png.la \
@USE_INSTALLED_LIBPNG_FALSE@@USE_INSTALLED_ZLIB_FALSE@ $(top_builddir)/@ZLIB_LIB_DIR@/librrd_z.la
@USE_INSTALLED_LIBPNG_TRUE@@USE_INSTALLED_ZLIB_TRUE@librrd_la_DEPENDENCIES = \
-@USE_INSTALLED_LIBPNG_TRUE@@USE_INSTALLED_ZLIB_TRUE@ $(CGI_LIB_DIR)/librrd_cgi.la \
-@USE_INSTALLED_LIBPNG_TRUE@@USE_INSTALLED_ZLIB_TRUE@ $(GD_LIB_DIR)/librrd_gd.la
+@USE_INSTALLED_LIBPNG_TRUE@@USE_INSTALLED_ZLIB_TRUE@ $(CGI_LIB_DIR)/librrd_cgi.la
@USE_INSTALLED_LIBPNG_TRUE@@USE_INSTALLED_ZLIB_FALSE@librrd_la_DEPENDENCIES = \
@USE_INSTALLED_LIBPNG_TRUE@@USE_INSTALLED_ZLIB_FALSE@ $(CGI_LIB_DIR)/librrd_cgi.la \
-@USE_INSTALLED_LIBPNG_TRUE@@USE_INSTALLED_ZLIB_FALSE@ $(GD_LIB_DIR)/librrd_gd.la \
@USE_INSTALLED_LIBPNG_TRUE@@USE_INSTALLED_ZLIB_FALSE@ $(top_builddir)/@ZLIB_LIB_DIR@/librrd_z.la
-am__objects_1 = gdpng.lo getopt.lo getopt1.lo gifsize.lo parsetime.lo \
+am__objects_1 = parsetime.lo \
pngsize.lo rrd_create.lo rrd_diff.lo rrd_dump.lo rrd_info.lo \
rrd_error.lo rrd_fetch.lo rrd_format.lo rrd_graph.lo \
rrd_last.lo rrd_open.lo rrd_resize.lo rrd_restore.lo \
@@ -286,19 +278,15 @@ am_librrd_la_OBJECTS = $(am__objects_1)
librrd_la_OBJECTS = $(am_librrd_la_OBJECTS)
@USE_INSTALLED_LIBPNG_FALSE@@USE_INSTALLED_ZLIB_TRUE@librrd_private_la_DEPENDENCIES = \
@USE_INSTALLED_LIBPNG_FALSE@@USE_INSTALLED_ZLIB_TRUE@ $(CGI_LIB_DIR)/librrd_cgi.la \
-@USE_INSTALLED_LIBPNG_FALSE@@USE_INSTALLED_ZLIB_TRUE@ $(GD_LIB_DIR)/librrd_gd.la \
@USE_INSTALLED_LIBPNG_FALSE@@USE_INSTALLED_ZLIB_TRUE@ $(top_builddir)/@PNG_LIB_DIR@/librrd_png.la
@USE_INSTALLED_LIBPNG_FALSE@@USE_INSTALLED_ZLIB_FALSE@librrd_private_la_DEPENDENCIES = \
@USE_INSTALLED_LIBPNG_FALSE@@USE_INSTALLED_ZLIB_FALSE@ $(CGI_LIB_DIR)/librrd_cgi.la \
-@USE_INSTALLED_LIBPNG_FALSE@@USE_INSTALLED_ZLIB_FALSE@ $(GD_LIB_DIR)/librrd_gd.la \
@USE_INSTALLED_LIBPNG_FALSE@@USE_INSTALLED_ZLIB_FALSE@ $(top_builddir)/@PNG_LIB_DIR@/librrd_png.la \
@USE_INSTALLED_LIBPNG_FALSE@@USE_INSTALLED_ZLIB_FALSE@ $(top_builddir)/@ZLIB_LIB_DIR@/librrd_z.la
@USE_INSTALLED_LIBPNG_TRUE@@USE_INSTALLED_ZLIB_TRUE@librrd_private_la_DEPENDENCIES = \
-@USE_INSTALLED_LIBPNG_TRUE@@USE_INSTALLED_ZLIB_TRUE@ $(CGI_LIB_DIR)/librrd_cgi.la \
-@USE_INSTALLED_LIBPNG_TRUE@@USE_INSTALLED_ZLIB_TRUE@ $(GD_LIB_DIR)/librrd_gd.la
+@USE_INSTALLED_LIBPNG_TRUE@@USE_INSTALLED_ZLIB_TRUE@ $(CGI_LIB_DIR)/librrd_cgi.la
@USE_INSTALLED_LIBPNG_TRUE@@USE_INSTALLED_ZLIB_FALSE@librrd_private_la_DEPENDENCIES = \
@USE_INSTALLED_LIBPNG_TRUE@@USE_INSTALLED_ZLIB_FALSE@ $(CGI_LIB_DIR)/librrd_cgi.la \
-@USE_INSTALLED_LIBPNG_TRUE@@USE_INSTALLED_ZLIB_FALSE@ $(GD_LIB_DIR)/librrd_gd.la \
@USE_INSTALLED_LIBPNG_TRUE@@USE_INSTALLED_ZLIB_FALSE@ $(top_builddir)/@ZLIB_LIB_DIR@/librrd_z.la
am_librrd_private_la_OBJECTS = $(am__objects_1)
librrd_private_la_OBJECTS = $(am_librrd_private_la_OBJECTS)
@@ -321,8 +309,7 @@ rrdupdate_LDFLAGS =
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles
-@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/gdpng.Plo ./$(DEPDIR)/getopt.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/getopt1.Plo ./$(DEPDIR)/gifsize.Plo \
+@AMDEP_TRUE@DEP_FILES = \
@AMDEP_TRUE@ ./$(DEPDIR)/parsetime.Plo ./$(DEPDIR)/pngsize.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/rrd_cgi.Po ./$(DEPDIR)/rrd_create.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/rrd_diff.Plo ./$(DEPDIR)/rrd_dump.Plo \
@@ -443,10 +430,6 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdpng.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gifsize.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parsetime.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngsize.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_cgi.Po@am__quote@

View File

@ -1,26 +0,0 @@
$OpenBSD: patch-src_parsetime_c,v 1.2 2004/06/08 20:21:24 danh Exp $
--- src/parsetime.c.orig 2004-04-06 17:38:11.000000000 -0400
+++ src/parsetime.c 2004-06-08 12:48:46.000000000 -0400
@@ -242,9 +242,11 @@ static int sc_tokid; /* scanner - token
static int need_to_free = 0; /* means that we need deallocating memory */
+void EnsureMemFree (void);
+
/* Local functions */
-void EnsureMemFree ()
+void EnsureMemFree (void)
{
if( need_to_free )
{
@@ -659,7 +661,8 @@ assign_date(struct rrd_time_value *ptv,
static char *
day(struct rrd_time_value *ptv)
{
- long mday=0, wday, mon, year = ptv->tm.tm_year;
+ long mday=0, wday, year = ptv->tm.tm_year;
+ time_t mon;
int tlen;
time_t montime;

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-src_pngsize_c,v 1.1 2004/06/08 20:21:24 danh Exp $
--- src/pngsize.c.orig 2004-04-06 17:38:12.000000000 -0400
+++ src/pngsize.c 2004-06-08 12:49:18.000000000 -0400
@@ -5,6 +5,7 @@
*****************************************************************************/
#include <png.h>
+#include "rrd_tool.h"
int
PngSize(FILE *fd, long *width, long *height)

View File

@ -1,17 +0,0 @@
$OpenBSD: patch-src_rrd_cgi_c,v 1.1 2004/06/08 20:21:24 danh Exp $
--- src/rrd_cgi.c.orig 2004-04-06 17:38:12.000000000 -0400
+++ src/rrd_cgi.c 2004-06-08 15:11:49.000000000 -0400
@@ -340,9 +340,11 @@ int main(int argc, char *argv[]) {
}
if (!filter) {
+ unsigned long buflen = strlen(buffer);
+
printf ("Content-Type: text/html\n"
- "Content-Length: %d\n",
- strlen(buffer));
+ "Content-Length: %lu\n",
+ buflen);
if (labs(goodfor) > 0) {
time_t now;

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-src_rrd_dump_c,v 1.1 2004/06/08 20:21:24 danh Exp $
--- src/rrd_dump.c.orig 2004-04-06 17:38:13.000000000 -0400
+++ src/rrd_dump.c 2004-06-08 11:32:17.000000000 -0400
@@ -39,8 +39,8 @@ rrd_dump(int argc, char **argv)
#else
# error "Need strftime"
#endif
- printf("\t<lastupdate> %ld </lastupdate> <!-- %s -->\n\n",
- rrd.live_head->last_up,somestring);
+ printf("\t<lastupdate> %.0f </lastupdate> <!-- %s -->\n\n",
+ difftime(rrd.live_head->last_up, 0),somestring);
for(i=0;i<rrd.stat_head->ds_cnt;i++){
printf("\t<ds>\n");
printf("\t\t<name> %s </name>\n",rrd.ds_def[i].ds_nam);

View File

@ -1,97 +0,0 @@
$OpenBSD: patch-src_rrd_graph_c,v 1.3 2004/06/08 20:21:24 danh Exp $
--- src/rrd_graph.c.orig 2004-04-06 17:38:14.000000000 -0400
+++ src/rrd_graph.c 2004-06-08 15:13:53.000000000 -0400
@@ -13,14 +13,8 @@
#include "rrd_graph.h"
#include <gd.h>
-
-#ifdef LATIN2_ENABLE
-#include <gdlucidan10l2.h>
-#include <gdlucidab12l2.h>
-#else
-#include <gdlucidan10.h>
-#include <gdlucidab12.h>
-#endif
+#include <gdfonts.h>
+#include <gdfontt.h>
#include <sys/stat.h>
#ifdef WIN32
@@ -36,13 +30,8 @@
#include <locale.h>
#endif
-#ifdef LATIN2_ENABLE
-#define SmallFont gdLucidaNormal10l2
-#define LargeFont gdLucidaBold12l2
-#else
-#define SmallFont gdLucidaNormal10
-#define LargeFont gdLucidaBold12
-#endif
+#define SmallFont gdFontTiny
+#define LargeFont gdFontSmall
xlab_t xlab[] = {
{0, TMT_SECOND,30, TMT_MINUTE,5, TMT_MINUTE,5, 0,"%H:%M"},
@@ -212,7 +201,6 @@ enum gf_en gf_conv(char *string){
enum if_en if_conv(char *string){
- conv_if(GIF,IF_GIF)
conv_if(PNG,IF_PNG)
conv_if(GD,IF_GD)
@@ -2478,9 +2466,6 @@ int lazy_check(image_desc_t *im){
if ((fd = fopen(im->graphfile,"rb")) == NULL)
return 0; /* the file does not exist */
switch (im->imgformat) {
- case IF_GIF:
- size = GifSize(fd,&(im->xgif),&(im->ygif));
- break;
case IF_PNG:
size = PngSize(fd,&(im->xgif),&(im->ygif));
break;
@@ -2778,9 +2763,6 @@ graph_paint(image_desc_t *im, char ***ca
}
}
switch (im->imgformat) {
- case IF_GIF:
- gdImageGif(gif, fo);
- break;
case IF_PNG:
gdImagePng(gif, fo);
break;
@@ -2915,7 +2897,7 @@ rrd_graph(int argc, char **argv, char **
im.prt_c = 0;
im.gdes_c = 0;
im.gdes = NULL;
- im.imgformat = IF_GIF; /* we default to GIF output */
+ im.imgformat = IF_PNG; /* we default to PNG output */
im.bkg_image = NULL; /* do not put anything to background per default */
im.ovl_image = NULL; /* do not use anything as overlay per default */
@@ -3207,6 +3189,7 @@ im.unit = 0; /* do not display unit if n
int argstart=0;
int strstart=0;
char varname[30],*rpnex;
+ unsigned tm_tmp=0;
gdes_alloc(&im);
if(sscanf(argv[i],"%10[A-Z0-9]:%n",symname,&argstart)==1){
if((im.gdes[im.gdes_c-1].gf=gf_conv(symname))==-1){
@@ -3286,12 +3269,13 @@ im.unit = 0; /* do not display unit if n
case GF_VRULE:
if(sscanf(
&argv[i][argstart],
- "%lu#%2x%2x%2x:%n",
- &im.gdes[im.gdes_c-1].xrule,
+ "%u#%2x%2x%2x:%n",
+ &tm_tmp,
&col_red,
&col_green,
&col_blue,
&strstart) >= 4){
+ im.gdes[im.gdes_c-1].xrule = tm_tmp,
im.gdes[im.gdes_c-1].col.red = col_red;
im.gdes[im.gdes_c-1].col.green = col_green;
im.gdes[im.gdes_c-1].col.blue = col_blue;

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-src_rrd_graph_h,v 1.1 2004/06/08 20:21:24 danh Exp $
--- src/rrd_graph.h.orig 2004-04-06 17:38:14.000000000 -0400
+++ src/rrd_graph.h 2004-06-08 14:02:11.000000000 -0400
@@ -31,7 +31,7 @@ enum op_en {OP_NUMBER=0,OP_VARIABLE,OP_I
OP_MIN,OP_MAX,OP_LIMIT, OP_FLOOR, OP_CEIL,
OP_UN,OP_END};
-enum if_en {IF_GIF=0,IF_PNG=1,IF_GD=2};
+enum if_en {IF_PNG=1,IF_GD=2};
typedef struct rpnp_t {
enum op_en op;

View File

@ -0,0 +1,52 @@
$OpenBSD: patch-src_rrd_graph_helper_c,v 1.1 2007/09/12 14:34:36 msf Exp $
--- src/rrd_graph_helper.c.orig Wed May 2 19:06:10 2007
+++ src/rrd_graph_helper.c Fri Jul 6 04:22:19 2007
@@ -296,7 +296,7 @@ rrd_parse_print(const char *const line, unsigned int *
int
rrd_parse_shift(const char *const line, unsigned int *const eaten, graph_desc_t *const gdp, image_desc_t *const im) {
int i;
-
+ long time_tmp = 0;
if ((gdp->vidx=rrd_parse_find_vname(line,eaten,gdp,im))<0) return 1;
switch (im->gdes[gdp->vidx].gf) {
@@ -327,7 +327,8 @@ rrd_parse_shift(const char *const line, unsigned int *
}
} else {
rrd_clear_error();
- i=0; sscanf(&line[*eaten],"%li%n",&gdp->shval,&i);
+ i=0; sscanf(&line[*eaten],"%li%n",&time_tmp,&i);
+ gdp->shval = time_tmp;
if (i!=(int)strlen(&line[*eaten])) {
rrd_set_error("Not a valid offset: %s in line %s",&line[*eaten],line);
return 1;
@@ -377,6 +378,7 @@ rrd_parse_PVHLAST(const char *const line, unsigned int
int i,j,k;
int colorfound=0;
char tmpstr[MAX_VNAME_LEN + 10]; /* vname#RRGGBBAA\0 */
+ long time_tmp = 0;
static int spacecnt = 0;
if (spacecnt == 0) {
@@ -443,7 +445,8 @@ rrd_parse_PVHLAST(const char *const line, unsigned int
dprintf("- it is not an existing vname\n");
switch (gdp->gf) {
case GF_VRULE:
- k=0;sscanf(tmpstr,"%li%n",&gdp->xrule,&k);
+ k=0;sscanf(tmpstr,"%li%n",&time_tmp,&k);
+ gdp->xrule = time_tmp;
if (((j!=0)&&(k==j))||((j==0)&&(k==i))) {
dprintf("- found time: %li\n",gdp->xrule);
} else {
@@ -454,9 +457,9 @@ rrd_parse_PVHLAST(const char *const line, unsigned int
default:
k=0;sscanf(tmpstr,"%lf%n",&gdp->yrule,&k);
if (((j!=0)&&(k==j))||((j==0)&&(k==i))) {
- dprintf("- found number: %f\n",gdp->yrule);
+ dprintf("- found number: %lf\n",gdp->yrule);
} else {
- dprintf("- is is not a valid number: %li\n",gdp->xrule);
+ dprintf("- is is not a valid number: %lf\n",gdp->yrule);
rrd_set_error("parameter '%s' does not represent a number in line %s\n",tmpstr,line);
return 1;
}

View File

@ -1,42 +0,0 @@
$OpenBSD: patch-src_rrd_tool_c,v 1.1 2004/06/08 20:21:24 danh Exp $
--- src/rrd_tool.c.orig 2004-04-06 17:38:15.000000000 -0400
+++ src/rrd_tool.c 2004-06-08 13:41:55.000000000 -0400
@@ -81,7 +81,7 @@ void PrintUsage(char *cmd)
"\t\t[--units-length value]\n"
"\t\t[--step seconds]\n"
"\t\t[-f|--imginfo printfstr]\n"
- "\t\t[-a|--imgformat GIF|PNG]\n"
+ "\t\t[-a|--imgformat PNG]\n"
"\t\t[-c|--color COLORTAG#rrggbb] [-t|--title string]\n"
"\t\t[DEF:vname=rrd:ds-name:CF]\n"
"\t\t[CDEF:vname=rpn-expression]\n"
@@ -328,7 +328,7 @@ int HandleInputLine(int argc, char **arg
else if (strcmp("resize", argv[1]) == 0)
rrd_resize(argc-1, &argv[1]);
else if (strcmp("last", argv[1]) == 0)
- printf("%ld\n",rrd_last(argc-1, &argv[1]));
+ printf("%.0f\n",difftime(rrd_last(argc-1, &argv[1]), 0));
else if (strcmp("update", argv[1]) == 0)
rrd_update(argc-1, &argv[1]);
else if (strcmp("fetch", argv[1]) == 0) {
@@ -366,9 +366,9 @@ int HandleInputLine(int argc, char **arg
printf("<?xml version=\"1.0\" encoding=\"%s\"?>\n\n", XML_ENCODING);
printf("<%s>\n", ROOT_TAG);
printf(" <%s>\n", META_TAG);
- printf(" <%s>%lu</%s>\n", META_START_TAG, start, META_START_TAG);
+ printf(" <%s>%.0f</%s>\n", META_START_TAG, difftime(start, 0), META_START_TAG);
printf(" <%s>%lu</%s>\n", META_STEP_TAG, step, META_STEP_TAG);
- printf(" <%s>%lu</%s>\n", META_END_TAG, end, META_END_TAG);
+ printf(" <%s>%.0f</%s>\n", META_END_TAG, difftime(end, 0), META_END_TAG);
printf(" <%s>%lu</%s>\n", META_ROWS_TAG, row_cnt, META_ROWS_TAG);
printf(" <%s>%lu</%s>\n", META_COLS_TAG, col_cnt, META_COLS_TAG);
printf(" <%s>\n", LEGEND_TAG);
@@ -384,7 +384,7 @@ int HandleInputLine(int argc, char **arg
printf(" <%s>\n", DATA_TAG);
for (i = start; i <= end; i += step) {
printf (" <%s>", DATA_ROW_TAG);
- printf ("<%s>%lu</%s>", COL_TIME_TAG, i, COL_TIME_TAG);
+ printf ("<%s>%.0f</%s>", COL_TIME_TAG, difftime(i, 0), COL_TIME_TAG);
for (j = 0; j < col_cnt; j++) {
rrd_value_t newval = DNAN;
newval = *(ptr++);

View File

@ -1,29 +0,0 @@
$OpenBSD: patch-src_rrd_tool_h,v 1.3 2004/06/08 20:21:24 danh Exp $
--- src/rrd_tool.h.orig 2004-04-06 17:38:15.000000000 -0400
+++ src/rrd_tool.h 2004-06-08 13:09:45.000000000 -0400
@@ -17,6 +17,8 @@ extern "C" {
#ifndef _RRD_TOOL_H
#define _RRD_TOOL_H
+#include <gd.h>
+
#ifdef WIN32
# include "ntconfig.h"
#else
@@ -90,7 +92,7 @@ int isnan(double value);
#endif
/* local include files -- need to be after the system ones */
-#include "getopt.h"
+#include <getopt.h>
#include "rrd_format.h"
#ifndef max
@@ -129,7 +131,6 @@ int GifSize(FILE *, long *, long *);
int PngSize(FILE *, long *, long *);
int PngSize(FILE *, long *, long *);
-#include <gd.h>
void gdImagePng(gdImagePtr im, FILE *out);
int rrd_create_fn(char *file_name, rrd_t *rrd);

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-src_rrd_xport_c,v 1.1 2004/06/08 20:21:24 danh Exp $
--- src/rrd_xport.c.orig 2004-04-06 17:38:15.000000000 -0400
+++ src/rrd_xport.c 2004-06-08 13:42:26.000000000 -0400
@@ -77,7 +77,7 @@ rrd_xport(int argc, char **argv, int *xs
im.prt_c = 0;
im.gdes_c = 0;
im.gdes = NULL;
- im.imgformat = IF_GIF; /* we default to GIF output */
+ im.imgformat = IF_PNG; /* we default to PNG output */
while (1){
static struct option long_options[] =

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-tcl_Makefile_in,v 1.7 2004/06/22 22:00:03 sturm Exp $
--- tcl/Makefile.in.orig 2004-04-06 17:30:25.000000000 -0400
+++ tcl/Makefile.in 2004-06-08 11:07:54.000000000 -0400
@@ -323,7 +323,7 @@ uninstall-am: uninstall-info-am
@COMP_TCL_TRUE@ $(TCL_SHLIB_LD) $(LIBDIRS) $< -o $@ @RRD_PRIVATE_LINK@ -lm $(TCL_LIB_SPEC)
@COMP_TCL_TRUE@tclrrd.o: tclrrd.c
-@COMP_TCL_TRUE@ $(CC) $(CFLAGS) $(TCL_SHLIB_CFLAGS) $(INCLUDES) $(AM_CPPFLAGS) -c $< -DVERSION=\"$(VERSION)\"
+@COMP_TCL_TRUE@ $(CC) $(CFLAGS) $(AM_CPPFLAGS) $(TCL_SHLIB_CFLAGS) $(INCLUDES) -c $< -DVERSION=\"$(VERSION)\"
@COMP_TCL_TRUE@all-local: $(TCL_LIB_FILE)

View File

@ -0,0 +1 @@
perl bindings to librrd

View File

@ -0,0 +1 @@
python bindings to librrd

View File

@ -1,7 +0,0 @@
Extra documentation has been installed in plain text, html, and pod
formats. It can be located in ${PREFIX}/share/doc/rrdtool.
Some examples and contributed programs have also been installed. One
particular program is log2rrd, which can convert MRTG log files to round
robin format for use by rrdtool. These can be found in
${PREFIX}/share/examples/rrdtool.

View File

@ -1,3 +0,0 @@
@comment $OpenBSD: PFRAG.shared,v 1.8 2006/01/03 15:15:43 steven Exp $
@lib lib/librrd.so.${LIBrrd_VERSION}
%%tcl%%

View File

@ -1,4 +0,0 @@
@comment $OpenBSD: PFRAG.tcl-shared,v 1.1 2004/09/15 21:37:10 espie Exp $
lib/tclrrd.${RRDVERSION}/
lib/tclrrd.${RRDVERSION}.so
lib/tclrrd.${RRDVERSION}/pkgIndex.tcl

View File

@ -1,112 +0,0 @@
@comment $OpenBSD: PLIST,v 1.11 2004/09/15 18:17:45 espie Exp $
bin/rrdcgi
bin/rrdtool
bin/rrdupdate
bin/trytime
include/rrd.h
lib/librrd.a
lib/librrd.la
libdata/perl5/site_perl/RRDp.pm
libdata/perl5/site_perl/RRDs.pm
libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/
libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/auto/
libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/auto/RRDs/
libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/auto/RRDs/RRDs.bs
libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/auto/RRDs/RRDs.so
@man man/man1/RRDp.1
@man man/man1/RRDs.1
@man man/man1/bin_dec_hex.1
@man man/man1/cdeftutorial.1
@man man/man1/rpntutorial.1
@man man/man1/rrd-beginners.1
@man man/man1/rrdcgi.1
@man man/man1/rrdcreate.1
@man man/man1/rrddump.1
@man man/man1/rrdfetch.1
@man man/man1/rrdgraph.1
@man man/man1/rrdinfo.1
@man man/man1/rrdlast.1
@man man/man1/rrdresize.1
@man man/man1/rrdrestore.1
@man man/man1/rrdtool.1
@man man/man1/rrdtune.1
@man man/man1/rrdtutorial.1
@man man/man1/rrdtutorial.es.1
@man man/man1/rrdupdate.1
@man man/man1/rrdxport.1
share/doc/rrdtool/
share/doc/rrdtool/RRDp.txt
share/doc/rrdtool/RRDs.txt
share/doc/rrdtool/bin_dec_hex.pod
share/doc/rrdtool/bin_dec_hex.txt
share/doc/rrdtool/cdeftutorial.pod
share/doc/rrdtool/cdeftutorial.txt
share/doc/rrdtool/html/
share/doc/rrdtool/html/RRDp.html
share/doc/rrdtool/html/RRDs.html
share/doc/rrdtool/html/bin_dec_hex.html
share/doc/rrdtool/html/cdeftutorial.html
share/doc/rrdtool/html/rpntutorial.html
share/doc/rrdtool/html/rrd-beginners.html
share/doc/rrdtool/html/rrdcgi.html
share/doc/rrdtool/html/rrdcreate.html
share/doc/rrdtool/html/rrddump.html
share/doc/rrdtool/html/rrdfetch.html
share/doc/rrdtool/html/rrdgraph.html
share/doc/rrdtool/html/rrdinfo.html
share/doc/rrdtool/html/rrdlast.html
share/doc/rrdtool/html/rrdresize.html
share/doc/rrdtool/html/rrdrestore.html
share/doc/rrdtool/html/rrdtool.html
share/doc/rrdtool/html/rrdtune.html
share/doc/rrdtool/html/rrdtutorial.es.html
share/doc/rrdtool/html/rrdtutorial.html
share/doc/rrdtool/html/rrdupdate.html
share/doc/rrdtool/html/rrdxport.html
share/doc/rrdtool/rpntutorial.pod
share/doc/rrdtool/rpntutorial.txt
share/doc/rrdtool/rrd-beginners.pod
share/doc/rrdtool/rrd-beginners.txt
share/doc/rrdtool/rrdcgi.pod
share/doc/rrdtool/rrdcgi.txt
share/doc/rrdtool/rrdcreate.pod
share/doc/rrdtool/rrdcreate.txt
share/doc/rrdtool/rrddump.pod
share/doc/rrdtool/rrddump.txt
share/doc/rrdtool/rrdfetch.pod
share/doc/rrdtool/rrdfetch.txt
share/doc/rrdtool/rrdgraph.pod
share/doc/rrdtool/rrdgraph.txt
share/doc/rrdtool/rrdinfo.pod
share/doc/rrdtool/rrdinfo.txt
share/doc/rrdtool/rrdlast.pod
share/doc/rrdtool/rrdlast.txt
share/doc/rrdtool/rrdresize.pod
share/doc/rrdtool/rrdresize.txt
share/doc/rrdtool/rrdrestore.pod
share/doc/rrdtool/rrdrestore.txt
share/doc/rrdtool/rrdtool.pod
share/doc/rrdtool/rrdtool.txt
share/doc/rrdtool/rrdtune.pod
share/doc/rrdtool/rrdtune.txt
share/doc/rrdtool/rrdtutorial.es.pod
share/doc/rrdtool/rrdtutorial.es.txt
share/doc/rrdtool/rrdtutorial.pod
share/doc/rrdtool/rrdtutorial.txt
share/doc/rrdtool/rrdupdate.pod
share/doc/rrdtool/rrdupdate.txt
share/doc/rrdtool/rrdxport.pod
share/doc/rrdtool/rrdxport.txt
share/examples/rrdtool/
share/examples/rrdtool/bigtops.pl
share/examples/rrdtool/cgi-demo.cgi
share/examples/rrdtool/contrib/
share/examples/rrdtool/contrib/README
share/examples/rrdtool/contrib/trytime/
share/examples/rrdtool/contrib/trytime/README
share/examples/rrdtool/contrib/trytime/trytime.c
share/examples/rrdtool/minmax.pl
share/examples/rrdtool/piped-demo.pl
share/examples/rrdtool/shared-demo.pl
share/examples/rrdtool/stripes.pl
%%SHARED%%

124
net/rrdtool/pkg/PLIST-main Normal file
View File

@ -0,0 +1,124 @@
@comment $OpenBSD: PLIST-main,v 1.1 2007/09/12 14:34:37 msf Exp $
bin/rrdcgi
bin/rrdtool
bin/rrdupdate
include/rrd.h
lib/librrd.a
lib/librrd.la
@lib lib/librrd.so.${LIBrrd_VERSION}
lib/librrd_th.a
lib/librrd_th.la
@lib lib/librrd_th.so.${LIBrrd_th_VERSION}
@man man/man1/bin_dec_hex.1
@man man/man1/cdeftutorial.1
@man man/man1/rpntutorial.1
@man man/man1/rrd-beginners.1
@man man/man1/rrdbuild.1
@man man/man1/rrdcgi.1
@man man/man1/rrdcreate.1
@man man/man1/rrddump.1
@man man/man1/rrdfetch.1
@man man/man1/rrdfirst.1
@man man/man1/rrdgraph.1
@man man/man1/rrdgraph_data.1
@man man/man1/rrdgraph_examples.1
@man man/man1/rrdgraph_graph.1
@man man/man1/rrdgraph_rpn.1
@man man/man1/rrdinfo.1
@man man/man1/rrdlast.1
@man man/man1/rrdlastupdate.1
@man man/man1/rrdresize.1
@man man/man1/rrdrestore.1
@man man/man1/rrdthreads.1
@man man/man1/rrdtool.1
@man man/man1/rrdtune.1
@man man/man1/rrdtutorial.1
@man man/man1/rrdupdate.1
@man man/man1/rrdxport.1
share/doc/rrdtool/
share/doc/rrdtool/html/
share/doc/rrdtool/html/bin_dec_hex.html
share/doc/rrdtool/html/cdeftutorial.html
share/doc/rrdtool/html/index.html
share/doc/rrdtool/html/rpntutorial.html
share/doc/rrdtool/html/rrd-beginners.html
share/doc/rrdtool/html/rrdbuild.html
share/doc/rrdtool/html/rrdcgi.html
share/doc/rrdtool/html/rrdcreate.html
share/doc/rrdtool/html/rrddump.html
share/doc/rrdtool/html/rrdfetch.html
share/doc/rrdtool/html/rrdfirst.html
share/doc/rrdtool/html/rrdgraph.html
share/doc/rrdtool/html/rrdgraph_data.html
share/doc/rrdtool/html/rrdgraph_examples.html
share/doc/rrdtool/html/rrdgraph_graph.html
share/doc/rrdtool/html/rrdgraph_rpn.html
share/doc/rrdtool/html/rrdinfo.html
share/doc/rrdtool/html/rrdlast.html
share/doc/rrdtool/html/rrdlastupdate.html
share/doc/rrdtool/html/rrdresize.html
share/doc/rrdtool/html/rrdrestore.html
share/doc/rrdtool/html/rrdthreads.html
share/doc/rrdtool/html/rrdtool.html
share/doc/rrdtool/html/rrdtune.html
share/doc/rrdtool/html/rrdtutorial.html
share/doc/rrdtool/html/rrdupdate.html
share/doc/rrdtool/html/rrdxport.html
share/doc/rrdtool/txt/
share/doc/rrdtool/txt/bin_dec_hex.pod
share/doc/rrdtool/txt/bin_dec_hex.txt
share/doc/rrdtool/txt/cdeftutorial.pod
share/doc/rrdtool/txt/cdeftutorial.txt
share/doc/rrdtool/txt/rpntutorial.pod
share/doc/rrdtool/txt/rpntutorial.txt
share/doc/rrdtool/txt/rrd-beginners.pod
share/doc/rrdtool/txt/rrd-beginners.txt
share/doc/rrdtool/txt/rrdbuild.pod
share/doc/rrdtool/txt/rrdbuild.txt
share/doc/rrdtool/txt/rrdcgi.pod
share/doc/rrdtool/txt/rrdcgi.txt
share/doc/rrdtool/txt/rrdcreate.pod
share/doc/rrdtool/txt/rrdcreate.txt
share/doc/rrdtool/txt/rrddump.pod
share/doc/rrdtool/txt/rrddump.txt
share/doc/rrdtool/txt/rrdfetch.pod
share/doc/rrdtool/txt/rrdfetch.txt
share/doc/rrdtool/txt/rrdfirst.pod
share/doc/rrdtool/txt/rrdfirst.txt
share/doc/rrdtool/txt/rrdgraph.pod
share/doc/rrdtool/txt/rrdgraph.txt
share/doc/rrdtool/txt/rrdgraph_data.pod
share/doc/rrdtool/txt/rrdgraph_data.txt
share/doc/rrdtool/txt/rrdgraph_examples.pod
share/doc/rrdtool/txt/rrdgraph_examples.txt
share/doc/rrdtool/txt/rrdgraph_graph.pod
share/doc/rrdtool/txt/rrdgraph_graph.txt
share/doc/rrdtool/txt/rrdgraph_rpn.pod
share/doc/rrdtool/txt/rrdgraph_rpn.txt
share/doc/rrdtool/txt/rrdinfo.pod
share/doc/rrdtool/txt/rrdinfo.txt
share/doc/rrdtool/txt/rrdlast.pod
share/doc/rrdtool/txt/rrdlast.txt
share/doc/rrdtool/txt/rrdlastupdate.pod
share/doc/rrdtool/txt/rrdlastupdate.txt
share/doc/rrdtool/txt/rrdresize.pod
share/doc/rrdtool/txt/rrdresize.txt
share/doc/rrdtool/txt/rrdrestore.pod
share/doc/rrdtool/txt/rrdrestore.txt
share/doc/rrdtool/txt/rrdthreads.pod
share/doc/rrdtool/txt/rrdthreads.txt
share/doc/rrdtool/txt/rrdtool.pod
share/doc/rrdtool/txt/rrdtool.txt
share/doc/rrdtool/txt/rrdtune.pod
share/doc/rrdtool/txt/rrdtune.txt
share/doc/rrdtool/txt/rrdtutorial.pod
share/doc/rrdtool/txt/rrdtutorial.txt
share/doc/rrdtool/txt/rrdupdate.pod
share/doc/rrdtool/txt/rrdupdate.txt
share/doc/rrdtool/txt/rrdxport.pod
share/doc/rrdtool/txt/rrdxport.txt
share/examples/rrdtool/
share/examples/rrdtool/cgi-demo.cgi
share/rrdtool/
share/rrdtool/fonts/
share/rrdtool/fonts/DejaVuSansMono-Roman.ttf

View File

@ -0,0 +1,20 @@
@comment $OpenBSD: PLIST-perl,v 1.1 2007/09/12 14:34:37 msf Exp $
libdata/perl5/site_perl/RRDp.pm
libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/
libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/RRDs.pm
libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/auto/
libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/auto/RRDs/
libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/auto/RRDs/RRDs.bs
libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/auto/RRDs/RRDs.so
libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/ntmake.pl
@man man/man3p/RRDp.3p
@man man/man3p/RRDs.3p
share/doc/rrdtool/html/RRDp.html
share/doc/rrdtool/html/RRDs.html
share/examples/rrdtool/4charts.pl
share/examples/rrdtool/bigtops.pl
share/examples/rrdtool/minmax.pl
share/examples/rrdtool/perftest.pl
share/examples/rrdtool/piped-demo.pl
share/examples/rrdtool/shared-demo.pl
share/examples/rrdtool/stripes.pl

View File

@ -0,0 +1,2 @@
@comment $OpenBSD: PLIST-python,v 1.1 2007/09/12 14:34:37 msf Exp $
lib/python${MODPY_VERSION}/site-packages/rrdtoolmodule.so