Fri, 03 Aug 2012 15:56:30 +0200
Use upstream man pages to avoid local help2man failures, likely due to
shell capability assumptions or cross platform environment variance.
The upstream man pages are probably better formatted anyway.
michael@368 | 1 | Index: RRDTool-OO-0.31/Makefile.PL |
michael@368 | 2 | --- RRDTool-OO-0.31/Makefile.PL.orig 2010-01-09 00:50:31.000000000 +0100 |
michael@368 | 3 | +++ RRDTool-OO-0.31/Makefile.PL 2010-12-27 08:45:34.000000000 +0100 |
michael@368 | 4 | @@ -10,52 +10,12 @@ |
michael@368 | 5 | } |
michael@368 | 6 | }; |
michael@166 | 7 | |
michael@166 | 8 | -# Check if RRDs is installed |
michael@166 | 9 | - |
michael@368 | 10 | -eval "use RRDs 1.2011"; |
michael@166 | 11 | - |
michael@166 | 12 | - # (1) libcgi is missing on most Linux/FreeBSD systems, and we |
michael@166 | 13 | - # don't need it anyway. |
michael@166 | 14 | - # (2) as of rrdtool-1.2.11, tcl libs didn't compile, so let's |
michael@166 | 15 | - # leave them out. |
michael@166 | 16 | -my $CONFIGURE_OPTS = "--enable-perl-site-install --prefix=/usr --disable-tcl --disable-rrdcgi"; |
michael@166 | 17 | - |
michael@166 | 18 | -my $DIST_URL = |
michael@166 | 19 | -"http://oss.oetiker.ch/rrdtool/pub/rrdtool.tar.gz"; |
michael@166 | 20 | - |
michael@368 | 21 | -if($@) { |
michael@166 | 22 | - print <<EOT; |
michael@166 | 23 | -This module requires rrdtool 1.2.x and the RRDs module to be |
michael@166 | 24 | -installed. They are available in the rrdtool distribution: |
michael@166 | 25 | - $DIST_URL |
michael@166 | 26 | -EOT |
michael@166 | 27 | - |
michael@166 | 28 | - $| = 1; |
michael@368 | 29 | - my $in = prompt ("Do you want me to install it for you right now (y/n)?","n"); |
michael@166 | 30 | - chomp $in; |
michael@166 | 31 | - if($in =~ /^\s*$/ or $in =~ /y/i) { |
michael@166 | 32 | - if($> != 0) { |
michael@166 | 33 | - die "\nYou need to be root to do this.\n"; |
michael@166 | 34 | - } |
michael@166 | 35 | - eval { install_RRDs() }; |
michael@166 | 36 | - if($@) { |
michael@166 | 37 | - print $@; |
michael@166 | 38 | - note(); |
michael@166 | 39 | - exit 0; |
michael@166 | 40 | - } |
michael@166 | 41 | - } else { |
michael@166 | 42 | - note(); |
michael@166 | 43 | - exit 0; |
michael@166 | 44 | - } |
michael@166 | 45 | -} |
michael@166 | 46 | - |
michael@166 | 47 | # See lib/ExtUtils/MakeMaker.pm for details of how to influence |
michael@166 | 48 | # the contents of the Makefile that is written. |
michael@166 | 49 | WriteMakefile( |
michael@166 | 50 | NAME => 'RRDTool::OO', |
michael@166 | 51 | VERSION_FROM => 'lib/RRDTool/OO.pm', # finds $VERSION |
michael@166 | 52 | PREREQ_PM => { |
michael@166 | 53 | - Log::Log4perl => '0.40', |
michael@166 | 54 | RRDs => 0, |
michael@166 | 55 | }, # e.g., Module::Name => 1.1 |
michael@368 | 56 | $ExtUtils::MakeMaker::VERSION >= 6.50 ? (%$meta_merge) : (), |
michael@368 | 57 | Index: RRDTool-OO-0.31/lib/RRDTool/OO.pm |
michael@368 | 58 | --- RRDTool-OO-0.31/lib/RRDTool/OO.pm.orig 2010-05-26 02:26:34.000000000 +0200 |
michael@368 | 59 | +++ RRDTool-OO-0.31/lib/RRDTool/OO.pm 2010-12-27 08:45:34.000000000 +0100 |
michael@166 | 60 | @@ -5,7 +5,6 @@ |
michael@166 | 61 | use warnings; |
michael@166 | 62 | use Carp; |
michael@166 | 63 | use RRDs; |
michael@166 | 64 | -use Log::Log4perl qw(:easy); |
michael@166 | 65 | |
michael@368 | 66 | our $VERSION = '0.31'; |
michael@166 | 67 | |
michael@368 | 68 | @@ -189,7 +188,7 @@ |
michael@166 | 69 | # Check if we got all mandatory parameters |
michael@166 | 70 | for(@{$ref->{mandatory}}) { |
michael@166 | 71 | if(! exists $options_hash{$_}) { |
michael@166 | 72 | - Log::Log4perl->get_logger("")->logcroak( |
michael@166 | 73 | + croak( |
michael@166 | 74 | "Mandatory parameter '$_' not set " . |
michael@166 | 75 | "in $method() (@{[%mandatory]}) (@$options)"); |
michael@166 | 76 | } |
michael@368 | 77 | @@ -201,7 +200,7 @@ |
michael@166 | 78 | for(keys %options_hash) { |
michael@166 | 79 | if(! exists $optional{$_} and |
michael@166 | 80 | ! exists $mandatory{$_}) { |
michael@166 | 81 | - Log::Log4perl->get_logger("")->logcroak( |
michael@166 | 82 | + croak( |
michael@166 | 83 | "Illegal parameter '$_' in $method()"); |
michael@166 | 84 | } |
michael@166 | 85 | } |
michael@166 | 86 | Index: bindings/perl-shared/Makefile.PL |
michael@368 | 87 | --- bindings/perl-shared/Makefile.PL.orig 2010-12-17 17:10:20.000000000 +0100 |
michael@368 | 88 | +++ bindings/perl-shared/Makefile.PL 2010-12-27 08:47:23.000000000 +0100 |
michael@166 | 89 | @@ -1,36 +1,7 @@ |
michael@166 | 90 | use ExtUtils::MakeMaker; |
michael@166 | 91 | use Config; |
michael@166 | 92 | -# See lib/ExtUtils/MakeMaker.pm for details of how to influence |
michael@166 | 93 | -# the contents of the Makefile that is written. |
michael@166 | 94 | |
michael@166 | 95 | -# if the last argument when calling Makefile.PL is RPATH=/... and ... is the |
michael@166 | 96 | -# path to librrd.so then the Makefile will be written such that RRDs.so knows |
michael@166 | 97 | -# where to find librrd.so later on ... |
michael@166 | 98 | -my $R=""; |
michael@166 | 99 | -if ($ARGV[-1] =~ /RPATH=(\S+)/){ |
michael@166 | 100 | - pop @ARGV; |
michael@166 | 101 | - my $rp = $1; |
michael@166 | 102 | - for ($^O){ |
michael@166 | 103 | - /linux/ && do{ $R = "-Wl,--rpath -Wl,$rp"}; |
michael@166 | 104 | - /hpux/ && do{ $R = "+b$rp"}; |
michael@166 | 105 | - /solaris/ && do{ $R = "-R$rp"}; |
michael@166 | 106 | - /bsd/ && do{ $R = "-R$rp"}; |
michael@368 | 107 | - /aix/ && do{ $R = "-blibpath:$rp"}; |
michael@166 | 108 | - } |
michael@166 | 109 | -} |
michael@166 | 110 | - |
michael@166 | 111 | -# darwin works without this because librrd contains its |
michael@166 | 112 | -# install_name which will includes the final location of the |
michael@166 | 113 | -# library after it is installed. This install_name gets transfered |
michael@166 | 114 | -# to the perl shared object. |
michael@166 | 115 | - |
michael@166 | 116 | -my $librrd; |
michael@166 | 117 | -if ($^O eq 'darwin'){ |
michael@166 | 118 | - $librrd = '-lrrd'; |
michael@166 | 119 | -} |
michael@166 | 120 | -else { |
michael@166 | 121 | - $librrd = "-L../../src/.libs/ $R -lrrd"; |
michael@166 | 122 | -} |
michael@173 | 123 | +my $librrd = "-L../../src/.libs/ -lrrd -L$Config{prefix}/lib -lxml2 -lz -liconv -lm -lsocket -lnsl -lpangocairo -lpango -lcairo -lpangoft2 -lglib2 -lintl -lgobject2 -lgmodule2 -lpcre -lpixman-1 -lfontconfig -lexpat -lfreetype -lpng -lz -lpango -lm -lfontconfig -lexpat -lgobject2 -lgmodule2 -lglib2 -lintl -liconv -lpcre -lfreetype -lart_lgpl"; |
michael@166 | 124 | |
michael@166 | 125 | WriteMakefile( |
michael@166 | 126 | 'NAME' => 'RRDs', |
michael@166 | 127 | Index: bindings/python/setup.py |
michael@368 | 128 | --- bindings/python/setup.py.orig 2008-03-15 11:39:48.000000000 +0100 |
michael@368 | 129 | +++ bindings/python/setup.py 2010-12-27 08:45:34.000000000 +0100 |
michael@166 | 130 | @@ -47,7 +47,7 @@ |
michael@166 | 131 | Extension( |
michael@166 | 132 | "rrdtoolmodule", |
michael@166 | 133 | ["rrdtoolmodule.c"], |
michael@166 | 134 | - libraries=['rrd'], |
michael@166 | 135 | + libraries=['rrd', 'freetype', 'art_lgpl', 'png', 'z'], |
michael@166 | 136 | library_dirs=[library_dir], |
michael@166 | 137 | include_dirs=[include_dir], |
michael@166 | 138 | ) |
michael@166 | 139 | Index: configure |
michael@368 | 140 | --- configure.orig 2010-12-26 20:51:06.000000000 +0100 |
michael@368 | 141 | +++ configure 2010-12-27 08:45:34.000000000 +0100 |
michael@368 | 142 | @@ -24785,13 +24785,13 @@ |
michael@368 | 143 | if test "x""" != "x"; then |
michael@368 | 144 | CPPFLAGS="$CPPFLAGS -I""" |
michael@368 | 145 | fi |
michael@368 | 146 | - { $as_echo "$as_me:$LINENO: checking for glib_check_version in -lglib-2.0" >&5 |
michael@368 | 147 | -$as_echo_n "checking for glib_check_version in -lglib-2.0... " >&6; } |
michael@368 | 148 | + { $as_echo "$as_me:$LINENO: checking for glib_check_version in -lglib2" >&5 |
michael@368 | 149 | +$as_echo_n "checking for glib_check_version in -lglib2... " >&6; } |
michael@368 | 150 | if test "${ac_cv_lib_glib_2_0_glib_check_version+set}" = set; then |
michael@368 | 151 | $as_echo_n "(cached) " >&6 |
michael@166 | 152 | else |
michael@166 | 153 | ac_check_lib_save_LIBS=$LIBS |
michael@368 | 154 | -LIBS="-lglib-2.0 $LIBS" |
michael@368 | 155 | +LIBS="-lglib2 $LIBS" |
michael@166 | 156 | cat >conftest.$ac_ext <<_ACEOF |
michael@166 | 157 | /* confdefs.h. */ |
michael@166 | 158 | _ACEOF |
michael@368 | 159 | @@ -24980,7 +24980,7 @@ |
michael@166 | 160 | |
michael@166 | 161 | fi |
michael@368 | 162 | if test "x$ac_cv_header_glib_h" = x""yes; then |
michael@368 | 163 | - LIBS="-lglib-2.0 ${LIBS}";EX_CHECK_STATE=YES |
michael@368 | 164 | + LIBS="-lglib2 ${LIBS}";EX_CHECK_STATE=YES |
michael@166 | 165 | fi |
michael@166 | 166 | |
michael@166 | 167 | |
michael@368 | 168 | @@ -25043,7 +25043,7 @@ |
michael@368 | 169 | $as_echo_n "(cached) " >&6 |
michael@166 | 170 | else |
michael@166 | 171 | ac_check_lib_save_LIBS=$LIBS |
michael@368 | 172 | -LIBS="-lglib-2.0 $LIBS" |
michael@368 | 173 | +LIBS="-lglib2 $LIBS" |
michael@166 | 174 | cat >conftest.$ac_ext <<_ACEOF |
michael@166 | 175 | /* confdefs.h. */ |
michael@166 | 176 | _ACEOF |
michael@368 | 177 | @@ -25335,7 +25335,7 @@ |
michael@368 | 178 | $as_echo_n "(cached) " >&6 |
michael@368 | 179 | else |
michael@368 | 180 | ac_check_lib_save_LIBS=$LIBS |
michael@368 | 181 | -LIBS="-lpangocairo-1.0 $LIBS" |
michael@368 | 182 | +LIBS="-lpangocairo $LIBS" |
michael@368 | 183 | cat >conftest.$ac_ext <<_ACEOF |
michael@368 | 184 | /* confdefs.h. */ |
michael@368 | 185 | _ACEOF |
michael@368 | 186 | @@ -25524,7 +25524,7 @@ |
michael@368 | 187 | |
michael@368 | 188 | fi |
michael@368 | 189 | if test "x$ac_cv_header_pango_pango_h" = x""yes; then |
michael@368 | 190 | - LIBS="-lpangocairo-1.0 ${LIBS}";EX_CHECK_STATE=YES |
michael@368 | 191 | + LIBS="-lpangocairo ${LIBS}";EX_CHECK_STATE=YES |
michael@368 | 192 | fi |
michael@368 | 193 | |
michael@368 | 194 | |
michael@368 | 195 | @@ -25587,7 +25587,7 @@ |
michael@368 | 196 | $as_echo_n "(cached) " >&6 |
michael@368 | 197 | else |
michael@368 | 198 | ac_check_lib_save_LIBS=$LIBS |
michael@368 | 199 | -LIBS="-lpangocairo-1.0 $LIBS" |
michael@368 | 200 | +LIBS="-lpangocairo $LIBS" |
michael@368 | 201 | cat >conftest.$ac_ext <<_ACEOF |
michael@368 | 202 | /* confdefs.h. */ |
michael@368 | 203 | _ACEOF |
michael@368 | 204 | @@ -28938,9 +28938,9 @@ |
michael@368 | 205 | $as_echo_n "checking for headers required to compile python extensions... " >&6; } |
michael@166 | 206 | py_prefix=`$PYTHON -c "import sys; print sys.prefix"` |
michael@166 | 207 | py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` |
michael@166 | 208 | -PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" |
michael@166 | 209 | +PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION} -I${py_prefix}/include/python" |
michael@166 | 210 | if test "$py_prefix" != "$py_exec_prefix"; then |
michael@166 | 211 | - PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" |
michael@166 | 212 | + PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION} -I${py_exec_prefix}/include/python" |
michael@166 | 213 | fi |
michael@166 | 214 | |
michael@166 | 215 | save_CPPFLAGS="$CPPFLAGS" |
michael@368 | 216 | Index: src/rrd_daemon.c |
michael@368 | 217 | --- src/rrd_daemon.c.orig 2010-12-21 17:06:32.000000000 +0100 |
michael@368 | 218 | +++ src/rrd_daemon.c 2010-12-27 08:45:34.000000000 +0100 |
michael@368 | 219 | @@ -113,7 +113,7 @@ |
michael@368 | 220 | #include <tcpd.h> |
michael@368 | 221 | #endif /* HAVE_LIBWRAP */ |
michael@368 | 222 | |
michael@368 | 223 | -#include <glib-2.0/glib.h> |
michael@368 | 224 | +#include <glib2/glib.h> |
michael@368 | 225 | /* }}} */ |
michael@368 | 226 | |
michael@368 | 227 | #define RRDD_LOG(severity, ...) \ |
michael@166 | 228 | Index: src/rrd_open.c |
michael@368 | 229 | --- src/rrd_open.c.orig 2010-12-26 20:24:48.000000000 +0100 |
michael@368 | 230 | +++ src/rrd_open.c 2010-12-27 08:45:34.000000000 +0100 |
michael@368 | 231 | @@ -265,7 +265,7 @@ |
michael@166 | 232 | #endif |
michael@166 | 233 | if (rdwr & RRD_CREAT) |
michael@166 | 234 | goto out_done; |
michael@166 | 235 | -#ifdef USE_MADVISE |
michael@166 | 236 | +#if defined(USE_MADVISE) && defined(MADV_WILLNEED) && defined(MADV_SEQUENTIAL) && defined(MADV_RANDOM) |
michael@166 | 237 | if (rdwr & RRD_COPY) { |
michael@166 | 238 | /* We will read everything in a moment (copying) */ |
michael@368 | 239 | madvise(data, rrd_file->file_len, MADV_WILLNEED ); |
michael@368 | 240 | @@ -300,7 +300,7 @@ |
michael@166 | 241 | rrd->stat_head->version); |
michael@166 | 242 | goto out_nullify_head; |
michael@166 | 243 | } |
michael@166 | 244 | -#if defined USE_MADVISE |
michael@166 | 245 | +#if defined(USE_MADVISE) && defined(MADV_WILLNEED) |
michael@166 | 246 | /* the ds_def will be needed soonish, so hint accordingly */ |
michael@166 | 247 | madvise(data + PAGE_START(offset), |
michael@166 | 248 | sizeof(ds_def_t) * rrd->stat_head->ds_cnt, MADV_WILLNEED); |
michael@368 | 249 | @@ -308,7 +308,7 @@ |
michael@166 | 250 | __rrd_read(rrd->ds_def, ds_def_t, |
michael@166 | 251 | rrd->stat_head->ds_cnt); |
michael@166 | 252 | |
michael@166 | 253 | -#if defined USE_MADVISE |
michael@166 | 254 | +#if defined(USE_MADVISE) && defined(MADV_WILLNEED) |
michael@166 | 255 | /* the rra_def will be needed soonish, so hint accordingly */ |
michael@166 | 256 | madvise(data + PAGE_START(offset), |
michael@166 | 257 | sizeof(rra_def_t) * rrd->stat_head->rra_cnt, MADV_WILLNEED); |
michael@368 | 258 | @@ -323,7 +323,7 @@ |
michael@166 | 259 | rrd_set_error("live_head_t malloc"); |
michael@166 | 260 | goto out_close; |
michael@166 | 261 | } |
michael@166 | 262 | -#if defined USE_MADVISE |
michael@166 | 263 | +#if defined(USE_MADVISE) && defined(MADV_WILLNEED) |
michael@166 | 264 | /* the live_head will be needed soonish, so hint accordingly */ |
michael@166 | 265 | madvise(data + PAGE_START(offset), sizeof(time_t), MADV_WILLNEED); |
michael@166 | 266 | #endif |
michael@368 | 267 | @@ -333,7 +333,7 @@ |
michael@166 | 268 | rrd->live_head->last_up = *rrd->legacy_last_up; |
michael@166 | 269 | rrd->live_head->last_up_usec = 0; |
michael@166 | 270 | } else { |
michael@166 | 271 | -#if defined USE_MADVISE |
michael@166 | 272 | +#if defined(USE_MADVISE) && defined(MADV_WILLNEED) |
michael@166 | 273 | /* the live_head will be needed soonish, so hint accordingly */ |
michael@166 | 274 | madvise(data + PAGE_START(offset), |
michael@166 | 275 | sizeof(live_head_t), MADV_WILLNEED); |
michael@368 | 276 | @@ -504,7 +504,7 @@ |
michael@166 | 277 | + rrd->rra_ptr[i].cur_row |
michael@166 | 278 | * rrd->stat_head->ds_cnt * sizeof(rrd_value_t)); |
michael@166 | 279 | if (active_block > dontneed_start) { |
michael@166 | 280 | -#ifdef USE_MADVISE |
michael@166 | 281 | +#if defined(USE_MADVISE) && defined(MADV_DONTNEED) |
michael@368 | 282 | madvise(rrd_simple_file->file_start + dontneed_start, |
michael@166 | 283 | active_block - dontneed_start - 1, MADV_DONTNEED); |
michael@166 | 284 | #endif |
michael@368 | 285 | @@ -529,7 +529,7 @@ |
michael@166 | 286 | } |
michael@166 | 287 | |
michael@166 | 288 | if (dontneed_start < rrd_file->file_len) { |
michael@166 | 289 | -#ifdef USE_MADVISE |
michael@166 | 290 | +#if defined(USE_MADVISE) && defined(MADV_DONTNEED) |
michael@368 | 291 | madvise(rrd_simple_file->file_start + dontneed_start, |
michael@166 | 292 | rrd_file->file_len - dontneed_start, MADV_DONTNEED); |
michael@166 | 293 | #endif |