rrdtool/rrdtool.patch

changeset 368
603801a09393
parent 173
51607f58727f
child 490
615d51fb3fea
     1.1 --- a/rrdtool/rrdtool.patch	Tue Sep 20 14:29:37 2011 +0200
     1.2 +++ b/rrdtool/rrdtool.patch	Tue Sep 20 14:33:46 2011 +0200
     1.3 @@ -1,15 +1,13 @@
     1.4 -Index: RRDTool-OO-0.24/Makefile.PL
     1.5 ---- RRDTool-OO-0.24/Makefile.PL.orig	2008-01-24 04:29:54 +0100
     1.6 -+++ RRDTool-OO-0.24/Makefile.PL	2008-12-16 08:35:38 +0100
     1.7 -@@ -2,55 +2,12 @@
     1.8 - use ExtUtils::MakeMaker;
     1.9 - use File::Basename;
    1.10 +Index: RRDTool-OO-0.31/Makefile.PL
    1.11 +--- RRDTool-OO-0.31/Makefile.PL.orig	2010-01-09 00:50:31.000000000 +0100
    1.12 ++++ RRDTool-OO-0.31/Makefile.PL	2010-12-27 08:45:34.000000000 +0100
    1.13 +@@ -10,52 +10,12 @@
    1.14 +     }
    1.15 + };
    1.16   
    1.17  -# Check if RRDs is installed
    1.18 --my $v = rrdtool_version();
    1.19 --#print "v=$v\n";
    1.20  -
    1.21 --eval { require RRDs; };
    1.22 +-eval "use RRDs 1.2011";
    1.23  -
    1.24  -    # (1) libcgi is missing on most Linux/FreeBSD systems, and we
    1.25  -    #     don't need it anyway.
    1.26 @@ -20,7 +18,7 @@
    1.27  -my $DIST_URL = 
    1.28  -"http://oss.oetiker.ch/rrdtool/pub/rrdtool.tar.gz";
    1.29  -
    1.30 --if($@ or !$v or $v < 1.002011) {
    1.31 +-if($@) {
    1.32  -    print <<EOT;
    1.33  -This module requires rrdtool 1.2.x and the RRDs module to be 
    1.34  -installed. They are available in the rrdtool distribution:
    1.35 @@ -28,8 +26,7 @@
    1.36  -EOT
    1.37  -
    1.38  -    $| = 1;
    1.39 --    print "Do you want me to install it for you right now ([y]/n)?";
    1.40 --    my $in = <>;
    1.41 +-    my $in = prompt ("Do you want me to install it for you right now (y/n)?","n");
    1.42  -    chomp $in;
    1.43  -    if($in =~ /^\s*$/ or $in =~ /y/i) {
    1.44  -        if($> != 0) {
    1.45 @@ -56,19 +53,19 @@
    1.46  -                         Log::Log4perl => '0.40',
    1.47                            RRDs          => 0,
    1.48                            }, # e.g., Module::Name => 1.1
    1.49 -     ($] >= 5.005 ?     ## Add these new keywords supported since 5.005
    1.50 -Index: RRDTool-OO-0.24/lib/RRDTool/OO.pm
    1.51 ---- RRDTool-OO-0.24/lib/RRDTool/OO.pm.orig	2008-05-20 11:17:57 +0200
    1.52 -+++ RRDTool-OO-0.24/lib/RRDTool/OO.pm	2008-12-16 08:35:38 +0100
    1.53 +     $ExtUtils::MakeMaker::VERSION >= 6.50 ? (%$meta_merge) : (),
    1.54 +Index: RRDTool-OO-0.31/lib/RRDTool/OO.pm
    1.55 +--- RRDTool-OO-0.31/lib/RRDTool/OO.pm.orig	2010-05-26 02:26:34.000000000 +0200
    1.56 ++++ RRDTool-OO-0.31/lib/RRDTool/OO.pm	2010-12-27 08:45:34.000000000 +0100
    1.57  @@ -5,7 +5,6 @@
    1.58   use warnings;
    1.59   use Carp;
    1.60   use RRDs;
    1.61  -use Log::Log4perl qw(:easy);
    1.62   
    1.63 - our $VERSION = '0.22';
    1.64 + our $VERSION = '0.31';
    1.65   
    1.66 -@@ -183,7 +182,7 @@
    1.67 +@@ -189,7 +188,7 @@
    1.68           # Check if we got all mandatory parameters
    1.69       for(@{$ref->{mandatory}}) {
    1.70           if(! exists $options_hash{$_}) {
    1.71 @@ -77,7 +74,7 @@
    1.72                   "Mandatory parameter '$_' not set " .
    1.73                   "in $method() (@{[%mandatory]}) (@$options)");
    1.74           }
    1.75 -@@ -195,7 +194,7 @@
    1.76 +@@ -201,7 +200,7 @@
    1.77           for(keys %options_hash) {
    1.78               if(! exists $optional{$_} and
    1.79                  ! exists $mandatory{$_}) {
    1.80 @@ -87,8 +84,8 @@
    1.81               }
    1.82           }
    1.83  Index: bindings/perl-shared/Makefile.PL
    1.84 ---- bindings/perl-shared/Makefile.PL.orig	2008-12-05 16:39:55 +0100
    1.85 -+++ bindings/perl-shared/Makefile.PL	2008-12-16 08:37:40 +0100
    1.86 +--- bindings/perl-shared/Makefile.PL.orig	2010-12-17 17:10:20.000000000 +0100
    1.87 ++++ bindings/perl-shared/Makefile.PL	2010-12-27 08:47:23.000000000 +0100
    1.88  @@ -1,36 +1,7 @@
    1.89   use ExtUtils::MakeMaker;
    1.90   use Config;
    1.91 @@ -107,7 +104,7 @@
    1.92  -	        /hpux/    && do{ $R = "+b$rp"};
    1.93  -	        /solaris/ && do{ $R = "-R$rp"};
    1.94  -	        /bsd/     && do{ $R = "-R$rp"};
    1.95 --                /aix/     && do{ $R = "-Wl,-blibpath:$rp"};
    1.96 +-                /aix/     && do{ $R = "-blibpath:$rp"};
    1.97  -	}
    1.98  -}
    1.99  -
   1.100 @@ -128,8 +125,8 @@
   1.101   WriteMakefile(
   1.102       'NAME'         => 'RRDs',
   1.103  Index: bindings/python/setup.py
   1.104 ---- bindings/python/setup.py.orig	2008-03-15 11:39:48 +0100
   1.105 -+++ bindings/python/setup.py	2008-12-16 08:35:38 +0100
   1.106 +--- bindings/python/setup.py.orig	2008-03-15 11:39:48.000000000 +0100
   1.107 ++++ bindings/python/setup.py	2010-12-27 08:45:34.000000000 +0100
   1.108  @@ -47,7 +47,7 @@
   1.109             Extension(
   1.110               "rrdtoolmodule",
   1.111 @@ -140,45 +137,72 @@
   1.112               include_dirs=[include_dir],
   1.113             )
   1.114  Index: configure
   1.115 ---- configure.orig	2008-12-15 23:06:39 +0100
   1.116 -+++ configure	2008-12-16 08:35:38 +0100
   1.117 -@@ -30827,7 +30827,7 @@
   1.118 -   echo $ECHO_N "(cached) $ECHO_C" >&6
   1.119 +--- configure.orig	2010-12-26 20:51:06.000000000 +0100
   1.120 ++++ configure	2010-12-27 08:45:34.000000000 +0100
   1.121 +@@ -24785,13 +24785,13 @@
   1.122 +  if test "x""" != "x"; then
   1.123 +    CPPFLAGS="$CPPFLAGS -I"""
   1.124 +  fi
   1.125 +-  { $as_echo "$as_me:$LINENO: checking for glib_check_version in -lglib-2.0" >&5
   1.126 +-$as_echo_n "checking for glib_check_version in -lglib-2.0... " >&6; }
   1.127 ++  { $as_echo "$as_me:$LINENO: checking for glib_check_version in -lglib2" >&5
   1.128 ++$as_echo_n "checking for glib_check_version in -lglib2... " >&6; }
   1.129 + if test "${ac_cv_lib_glib_2_0_glib_check_version+set}" = set; then
   1.130 +   $as_echo_n "(cached) " >&6
   1.131   else
   1.132     ac_check_lib_save_LIBS=$LIBS
   1.133 --LIBS="-lpango-1.0  $LIBS"
   1.134 -+LIBS="-lpango $LIBS"
   1.135 +-LIBS="-lglib-2.0  $LIBS"
   1.136 ++LIBS="-lglib2  $LIBS"
   1.137   cat >conftest.$ac_ext <<_ACEOF
   1.138   /* confdefs.h.  */
   1.139   _ACEOF
   1.140 -@@ -31010,7 +31010,7 @@
   1.141 +@@ -24980,7 +24980,7 @@
   1.142   
   1.143   fi
   1.144 - if test $ac_cv_header_pango_pango_h = yes; then
   1.145 --  LIBS="-lpango-1.0 ${LIBS}";EX_CHECK_STATE=YES
   1.146 -+  LIBS="-lpango ${LIBS}";EX_CHECK_STATE=YES
   1.147 + if test "x$ac_cv_header_glib_h" = x""yes; then
   1.148 +-  LIBS="-lglib-2.0 ${LIBS}";EX_CHECK_STATE=YES
   1.149 ++  LIBS="-lglib2 ${LIBS}";EX_CHECK_STATE=YES
   1.150   fi
   1.151   
   1.152   
   1.153 -@@ -31066,14 +31066,14 @@
   1.154 -              LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-L pangocairo`
   1.155 -              LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-other pangocairo`
   1.156 -              LIBS=${LIBS}" "`$PKGCONFIG --libs-only-l pangocairo`
   1.157 --	         	     unset ac_cv_lib_`echo pango-1.0 | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`_pango_cairo_context_set_font_options
   1.158 -+	         	     unset ac_cv_lib_`echo pango | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`_pango_cairo_context_set_font_options
   1.159 -              { echo "$as_me:$LINENO: checking for pango_cairo_context_set_font_options in -lpango-1.0" >&5
   1.160 - echo $ECHO_N "checking for pango_cairo_context_set_font_options in -lpango-1.0... $ECHO_C" >&6; }
   1.161 - if test "${ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options+set}" = set; then
   1.162 -   echo $ECHO_N "(cached) $ECHO_C" >&6
   1.163 +@@ -25043,7 +25043,7 @@
   1.164 +   $as_echo_n "(cached) " >&6
   1.165   else
   1.166     ac_check_lib_save_LIBS=$LIBS
   1.167 --LIBS="-lpango-1.0  $LIBS"
   1.168 -+LIBS="-lpango $LIBS"
   1.169 +-LIBS="-lglib-2.0  $LIBS"
   1.170 ++LIBS="-lglib2  $LIBS"
   1.171   cat >conftest.$ac_ext <<_ACEOF
   1.172   /* confdefs.h.  */
   1.173   _ACEOF
   1.174 -@@ -32551,9 +32551,9 @@
   1.175 - echo $ECHO_N "checking for headers required to compile python extensions... $ECHO_C" >&6; }
   1.176 +@@ -25335,7 +25335,7 @@
   1.177 +   $as_echo_n "(cached) " >&6
   1.178 + else
   1.179 +   ac_check_lib_save_LIBS=$LIBS
   1.180 +-LIBS="-lpangocairo-1.0  $LIBS"
   1.181 ++LIBS="-lpangocairo  $LIBS"
   1.182 + cat >conftest.$ac_ext <<_ACEOF
   1.183 + /* confdefs.h.  */
   1.184 + _ACEOF
   1.185 +@@ -25524,7 +25524,7 @@
   1.186 + 
   1.187 + fi
   1.188 + if test "x$ac_cv_header_pango_pango_h" = x""yes; then
   1.189 +-  LIBS="-lpangocairo-1.0 ${LIBS}";EX_CHECK_STATE=YES
   1.190 ++  LIBS="-lpangocairo ${LIBS}";EX_CHECK_STATE=YES
   1.191 + fi
   1.192 + 
   1.193 + 
   1.194 +@@ -25587,7 +25587,7 @@
   1.195 +   $as_echo_n "(cached) " >&6
   1.196 + else
   1.197 +   ac_check_lib_save_LIBS=$LIBS
   1.198 +-LIBS="-lpangocairo-1.0  $LIBS"
   1.199 ++LIBS="-lpangocairo  $LIBS"
   1.200 + cat >conftest.$ac_ext <<_ACEOF
   1.201 + /* confdefs.h.  */
   1.202 + _ACEOF
   1.203 +@@ -28938,9 +28938,9 @@
   1.204 + $as_echo_n "checking for headers required to compile python extensions... " >&6; }
   1.205   py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
   1.206   py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
   1.207  -PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
   1.208 @@ -189,10 +213,22 @@
   1.209   fi
   1.210   
   1.211   save_CPPFLAGS="$CPPFLAGS"
   1.212 +Index: src/rrd_daemon.c
   1.213 +--- src/rrd_daemon.c.orig	2010-12-21 17:06:32.000000000 +0100
   1.214 ++++ src/rrd_daemon.c	2010-12-27 08:45:34.000000000 +0100
   1.215 +@@ -113,7 +113,7 @@
   1.216 + #include <tcpd.h>
   1.217 + #endif /* HAVE_LIBWRAP */
   1.218 + 
   1.219 +-#include <glib-2.0/glib.h>
   1.220 ++#include <glib2/glib.h>
   1.221 + /* }}} */
   1.222 + 
   1.223 + #define RRDD_LOG(severity, ...) \
   1.224  Index: src/rrd_open.c
   1.225 ---- src/rrd_open.c.orig	2008-12-15 23:06:22 +0100
   1.226 -+++ src/rrd_open.c	2008-12-16 08:35:38 +0100
   1.227 -@@ -218,7 +218,7 @@
   1.228 +--- src/rrd_open.c.orig	2010-12-26 20:24:48.000000000 +0100
   1.229 ++++ src/rrd_open.c	2010-12-27 08:45:34.000000000 +0100
   1.230 +@@ -265,7 +265,7 @@
   1.231   #endif
   1.232       if (rdwr & RRD_CREAT)
   1.233           goto out_done;
   1.234 @@ -200,8 +236,8 @@
   1.235  +#if defined(USE_MADVISE) && defined(MADV_WILLNEED) && defined(MADV_SEQUENTIAL) && defined(MADV_RANDOM)
   1.236       if (rdwr & RRD_COPY) {
   1.237           /* We will read everything in a moment (copying) */
   1.238 -         madvise(data, rrd_file->file_len, MADV_WILLNEED | MADV_SEQUENTIAL);
   1.239 -@@ -251,7 +251,7 @@
   1.240 +         madvise(data, rrd_file->file_len, MADV_WILLNEED );
   1.241 +@@ -300,7 +300,7 @@
   1.242                         rrd->stat_head->version);
   1.243           goto out_nullify_head;
   1.244       }
   1.245 @@ -210,7 +246,7 @@
   1.246       /* the ds_def will be needed soonish, so hint accordingly */
   1.247       madvise(data + PAGE_START(offset),
   1.248               sizeof(ds_def_t) * rrd->stat_head->ds_cnt, MADV_WILLNEED);
   1.249 -@@ -259,7 +259,7 @@
   1.250 +@@ -308,7 +308,7 @@
   1.251       __rrd_read(rrd->ds_def, ds_def_t,
   1.252                  rrd->stat_head->ds_cnt);
   1.253   
   1.254 @@ -219,7 +255,7 @@
   1.255       /* the rra_def will be needed soonish, so hint accordingly */
   1.256       madvise(data + PAGE_START(offset),
   1.257               sizeof(rra_def_t) * rrd->stat_head->rra_cnt, MADV_WILLNEED);
   1.258 -@@ -274,7 +274,7 @@
   1.259 +@@ -323,7 +323,7 @@
   1.260               rrd_set_error("live_head_t malloc");
   1.261               goto out_close;
   1.262           }
   1.263 @@ -228,7 +264,7 @@
   1.264           /* the live_head will be needed soonish, so hint accordingly */
   1.265           madvise(data + PAGE_START(offset), sizeof(time_t), MADV_WILLNEED);
   1.266   #endif
   1.267 -@@ -284,7 +284,7 @@
   1.268 +@@ -333,7 +333,7 @@
   1.269           rrd->live_head->last_up = *rrd->legacy_last_up;
   1.270           rrd->live_head->last_up_usec = 0;
   1.271       } else {
   1.272 @@ -237,21 +273,21 @@
   1.273           /* the live_head will be needed soonish, so hint accordingly */
   1.274           madvise(data + PAGE_START(offset),
   1.275                   sizeof(live_head_t), MADV_WILLNEED);
   1.276 -@@ -414,7 +414,7 @@
   1.277 +@@ -504,7 +504,7 @@
   1.278                          + rrd->rra_ptr[i].cur_row
   1.279                          * rrd->stat_head->ds_cnt * sizeof(rrd_value_t));
   1.280           if (active_block > dontneed_start) {
   1.281  -#ifdef USE_MADVISE
   1.282  +#if defined(USE_MADVISE) && defined(MADV_DONTNEED)
   1.283 -             madvise(rrd_file->file_start + dontneed_start,
   1.284 +             madvise(rrd_simple_file->file_start + dontneed_start,
   1.285                       active_block - dontneed_start - 1, MADV_DONTNEED);
   1.286   #endif
   1.287 -@@ -439,7 +439,7 @@
   1.288 +@@ -529,7 +529,7 @@
   1.289       }
   1.290   
   1.291       if (dontneed_start < rrd_file->file_len) {
   1.292  -#ifdef USE_MADVISE
   1.293  +#if defined(USE_MADVISE) && defined(MADV_DONTNEED)
   1.294 - 	    madvise(rrd_file->file_start + dontneed_start,
   1.295 + 	    madvise(rrd_simple_file->file_start + dontneed_start,
   1.296   		    rrd_file->file_len - dontneed_start, MADV_DONTNEED);
   1.297   #endif

mercurial