diff -r e13c1f2b445e -r 603801a09393 rrdtool/rrdtool.patch --- a/rrdtool/rrdtool.patch Tue Sep 20 14:29:37 2011 +0200 +++ b/rrdtool/rrdtool.patch Tue Sep 20 14:33:46 2011 +0200 @@ -1,15 +1,13 @@ -Index: RRDTool-OO-0.24/Makefile.PL ---- RRDTool-OO-0.24/Makefile.PL.orig 2008-01-24 04:29:54 +0100 -+++ RRDTool-OO-0.24/Makefile.PL 2008-12-16 08:35:38 +0100 -@@ -2,55 +2,12 @@ - use ExtUtils::MakeMaker; - use File::Basename; +Index: RRDTool-OO-0.31/Makefile.PL +--- RRDTool-OO-0.31/Makefile.PL.orig 2010-01-09 00:50:31.000000000 +0100 ++++ RRDTool-OO-0.31/Makefile.PL 2010-12-27 08:45:34.000000000 +0100 +@@ -10,52 +10,12 @@ + } + }; -# Check if RRDs is installed --my $v = rrdtool_version(); --#print "v=$v\n"; - --eval { require RRDs; }; +-eval "use RRDs 1.2011"; - - # (1) libcgi is missing on most Linux/FreeBSD systems, and we - # don't need it anyway. @@ -20,7 +18,7 @@ -my $DIST_URL = -"http://oss.oetiker.ch/rrdtool/pub/rrdtool.tar.gz"; - --if($@ or !$v or $v < 1.002011) { +-if($@) { - print <; +- my $in = prompt ("Do you want me to install it for you right now (y/n)?","n"); - chomp $in; - if($in =~ /^\s*$/ or $in =~ /y/i) { - if($> != 0) { @@ -56,19 +53,19 @@ - Log::Log4perl => '0.40', RRDs => 0, }, # e.g., Module::Name => 1.1 - ($] >= 5.005 ? ## Add these new keywords supported since 5.005 -Index: RRDTool-OO-0.24/lib/RRDTool/OO.pm ---- RRDTool-OO-0.24/lib/RRDTool/OO.pm.orig 2008-05-20 11:17:57 +0200 -+++ RRDTool-OO-0.24/lib/RRDTool/OO.pm 2008-12-16 08:35:38 +0100 + $ExtUtils::MakeMaker::VERSION >= 6.50 ? (%$meta_merge) : (), +Index: RRDTool-OO-0.31/lib/RRDTool/OO.pm +--- RRDTool-OO-0.31/lib/RRDTool/OO.pm.orig 2010-05-26 02:26:34.000000000 +0200 ++++ RRDTool-OO-0.31/lib/RRDTool/OO.pm 2010-12-27 08:45:34.000000000 +0100 @@ -5,7 +5,6 @@ use warnings; use Carp; use RRDs; -use Log::Log4perl qw(:easy); - our $VERSION = '0.22'; + our $VERSION = '0.31'; -@@ -183,7 +182,7 @@ +@@ -189,7 +188,7 @@ # Check if we got all mandatory parameters for(@{$ref->{mandatory}}) { if(! exists $options_hash{$_}) { @@ -77,7 +74,7 @@ "Mandatory parameter '$_' not set " . "in $method() (@{[%mandatory]}) (@$options)"); } -@@ -195,7 +194,7 @@ +@@ -201,7 +200,7 @@ for(keys %options_hash) { if(! exists $optional{$_} and ! exists $mandatory{$_}) { @@ -87,8 +84,8 @@ } } Index: bindings/perl-shared/Makefile.PL ---- bindings/perl-shared/Makefile.PL.orig 2008-12-05 16:39:55 +0100 -+++ bindings/perl-shared/Makefile.PL 2008-12-16 08:37:40 +0100 +--- bindings/perl-shared/Makefile.PL.orig 2010-12-17 17:10:20.000000000 +0100 ++++ bindings/perl-shared/Makefile.PL 2010-12-27 08:47:23.000000000 +0100 @@ -1,36 +1,7 @@ use ExtUtils::MakeMaker; use Config; @@ -107,7 +104,7 @@ - /hpux/ && do{ $R = "+b$rp"}; - /solaris/ && do{ $R = "-R$rp"}; - /bsd/ && do{ $R = "-R$rp"}; -- /aix/ && do{ $R = "-Wl,-blibpath:$rp"}; +- /aix/ && do{ $R = "-blibpath:$rp"}; - } -} - @@ -128,8 +125,8 @@ WriteMakefile( 'NAME' => 'RRDs', Index: bindings/python/setup.py ---- bindings/python/setup.py.orig 2008-03-15 11:39:48 +0100 -+++ bindings/python/setup.py 2008-12-16 08:35:38 +0100 +--- bindings/python/setup.py.orig 2008-03-15 11:39:48.000000000 +0100 ++++ bindings/python/setup.py 2010-12-27 08:45:34.000000000 +0100 @@ -47,7 +47,7 @@ Extension( "rrdtoolmodule", @@ -140,45 +137,72 @@ include_dirs=[include_dir], ) Index: configure ---- configure.orig 2008-12-15 23:06:39 +0100 -+++ configure 2008-12-16 08:35:38 +0100 -@@ -30827,7 +30827,7 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 +--- configure.orig 2010-12-26 20:51:06.000000000 +0100 ++++ configure 2010-12-27 08:45:34.000000000 +0100 +@@ -24785,13 +24785,13 @@ + if test "x""" != "x"; then + CPPFLAGS="$CPPFLAGS -I""" + fi +- { $as_echo "$as_me:$LINENO: checking for glib_check_version in -lglib-2.0" >&5 +-$as_echo_n "checking for glib_check_version in -lglib-2.0... " >&6; } ++ { $as_echo "$as_me:$LINENO: checking for glib_check_version in -lglib2" >&5 ++$as_echo_n "checking for glib_check_version in -lglib2... " >&6; } + if test "${ac_cv_lib_glib_2_0_glib_check_version+set}" = set; then + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS --LIBS="-lpango-1.0 $LIBS" -+LIBS="-lpango $LIBS" +-LIBS="-lglib-2.0 $LIBS" ++LIBS="-lglib2 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF -@@ -31010,7 +31010,7 @@ +@@ -24980,7 +24980,7 @@ fi - if test $ac_cv_header_pango_pango_h = yes; then -- LIBS="-lpango-1.0 ${LIBS}";EX_CHECK_STATE=YES -+ LIBS="-lpango ${LIBS}";EX_CHECK_STATE=YES + if test "x$ac_cv_header_glib_h" = x""yes; then +- LIBS="-lglib-2.0 ${LIBS}";EX_CHECK_STATE=YES ++ LIBS="-lglib2 ${LIBS}";EX_CHECK_STATE=YES fi -@@ -31066,14 +31066,14 @@ - LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-L pangocairo` - LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-other pangocairo` - LIBS=${LIBS}" "`$PKGCONFIG --libs-only-l pangocairo` -- unset ac_cv_lib_`echo pango-1.0 | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`_pango_cairo_context_set_font_options -+ unset ac_cv_lib_`echo pango | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`_pango_cairo_context_set_font_options - { echo "$as_me:$LINENO: checking for pango_cairo_context_set_font_options in -lpango-1.0" >&5 - echo $ECHO_N "checking for pango_cairo_context_set_font_options in -lpango-1.0... $ECHO_C" >&6; } - if test "${ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +@@ -25043,7 +25043,7 @@ + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS --LIBS="-lpango-1.0 $LIBS" -+LIBS="-lpango $LIBS" +-LIBS="-lglib-2.0 $LIBS" ++LIBS="-lglib2 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF -@@ -32551,9 +32551,9 @@ - echo $ECHO_N "checking for headers required to compile python extensions... $ECHO_C" >&6; } +@@ -25335,7 +25335,7 @@ + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lpangocairo-1.0 $LIBS" ++LIBS="-lpangocairo $LIBS" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -25524,7 +25524,7 @@ + + fi + if test "x$ac_cv_header_pango_pango_h" = x""yes; then +- LIBS="-lpangocairo-1.0 ${LIBS}";EX_CHECK_STATE=YES ++ LIBS="-lpangocairo ${LIBS}";EX_CHECK_STATE=YES + fi + + +@@ -25587,7 +25587,7 @@ + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lpangocairo-1.0 $LIBS" ++LIBS="-lpangocairo $LIBS" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -28938,9 +28938,9 @@ + $as_echo_n "checking for headers required to compile python extensions... " >&6; } py_prefix=`$PYTHON -c "import sys; print sys.prefix"` py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` -PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" @@ -189,10 +213,22 @@ fi save_CPPFLAGS="$CPPFLAGS" +Index: src/rrd_daemon.c +--- src/rrd_daemon.c.orig 2010-12-21 17:06:32.000000000 +0100 ++++ src/rrd_daemon.c 2010-12-27 08:45:34.000000000 +0100 +@@ -113,7 +113,7 @@ + #include + #endif /* HAVE_LIBWRAP */ + +-#include ++#include + /* }}} */ + + #define RRDD_LOG(severity, ...) \ Index: src/rrd_open.c ---- src/rrd_open.c.orig 2008-12-15 23:06:22 +0100 -+++ src/rrd_open.c 2008-12-16 08:35:38 +0100 -@@ -218,7 +218,7 @@ +--- src/rrd_open.c.orig 2010-12-26 20:24:48.000000000 +0100 ++++ src/rrd_open.c 2010-12-27 08:45:34.000000000 +0100 +@@ -265,7 +265,7 @@ #endif if (rdwr & RRD_CREAT) goto out_done; @@ -200,8 +236,8 @@ +#if defined(USE_MADVISE) && defined(MADV_WILLNEED) && defined(MADV_SEQUENTIAL) && defined(MADV_RANDOM) if (rdwr & RRD_COPY) { /* We will read everything in a moment (copying) */ - madvise(data, rrd_file->file_len, MADV_WILLNEED | MADV_SEQUENTIAL); -@@ -251,7 +251,7 @@ + madvise(data, rrd_file->file_len, MADV_WILLNEED ); +@@ -300,7 +300,7 @@ rrd->stat_head->version); goto out_nullify_head; } @@ -210,7 +246,7 @@ /* the ds_def will be needed soonish, so hint accordingly */ madvise(data + PAGE_START(offset), sizeof(ds_def_t) * rrd->stat_head->ds_cnt, MADV_WILLNEED); -@@ -259,7 +259,7 @@ +@@ -308,7 +308,7 @@ __rrd_read(rrd->ds_def, ds_def_t, rrd->stat_head->ds_cnt); @@ -219,7 +255,7 @@ /* the rra_def will be needed soonish, so hint accordingly */ madvise(data + PAGE_START(offset), sizeof(rra_def_t) * rrd->stat_head->rra_cnt, MADV_WILLNEED); -@@ -274,7 +274,7 @@ +@@ -323,7 +323,7 @@ rrd_set_error("live_head_t malloc"); goto out_close; } @@ -228,7 +264,7 @@ /* the live_head will be needed soonish, so hint accordingly */ madvise(data + PAGE_START(offset), sizeof(time_t), MADV_WILLNEED); #endif -@@ -284,7 +284,7 @@ +@@ -333,7 +333,7 @@ rrd->live_head->last_up = *rrd->legacy_last_up; rrd->live_head->last_up_usec = 0; } else { @@ -237,21 +273,21 @@ /* the live_head will be needed soonish, so hint accordingly */ madvise(data + PAGE_START(offset), sizeof(live_head_t), MADV_WILLNEED); -@@ -414,7 +414,7 @@ +@@ -504,7 +504,7 @@ + rrd->rra_ptr[i].cur_row * rrd->stat_head->ds_cnt * sizeof(rrd_value_t)); if (active_block > dontneed_start) { -#ifdef USE_MADVISE +#if defined(USE_MADVISE) && defined(MADV_DONTNEED) - madvise(rrd_file->file_start + dontneed_start, + madvise(rrd_simple_file->file_start + dontneed_start, active_block - dontneed_start - 1, MADV_DONTNEED); #endif -@@ -439,7 +439,7 @@ +@@ -529,7 +529,7 @@ } if (dontneed_start < rrd_file->file_len) { -#ifdef USE_MADVISE +#if defined(USE_MADVISE) && defined(MADV_DONTNEED) - madvise(rrd_file->file_start + dontneed_start, + madvise(rrd_simple_file->file_start + dontneed_start, rrd_file->file_len - dontneed_start, MADV_DONTNEED); #endif