michael@368: Index: RRDTool-OO-0.31/Makefile.PL michael@368: --- RRDTool-OO-0.31/Makefile.PL.orig 2010-01-09 00:50:31.000000000 +0100 michael@368: +++ RRDTool-OO-0.31/Makefile.PL 2010-12-27 08:45:34.000000000 +0100 michael@368: @@ -10,52 +10,12 @@ michael@368: } michael@368: }; michael@166: michael@166: -# Check if RRDs is installed michael@166: - michael@368: -eval "use RRDs 1.2011"; michael@166: - michael@166: - # (1) libcgi is missing on most Linux/FreeBSD systems, and we michael@166: - # don't need it anyway. michael@166: - # (2) as of rrdtool-1.2.11, tcl libs didn't compile, so let's michael@166: - # leave them out. michael@166: -my $CONFIGURE_OPTS = "--enable-perl-site-install --prefix=/usr --disable-tcl --disable-rrdcgi"; michael@166: - michael@166: -my $DIST_URL = michael@166: -"http://oss.oetiker.ch/rrdtool/pub/rrdtool.tar.gz"; michael@166: - michael@368: -if($@) { michael@166: - print < != 0) { michael@166: - die "\nYou need to be root to do this.\n"; michael@166: - } michael@166: - eval { install_RRDs() }; michael@166: - if($@) { michael@166: - print $@; michael@166: - note(); michael@166: - exit 0; michael@166: - } michael@166: - } else { michael@166: - note(); michael@166: - exit 0; michael@166: - } michael@166: -} michael@166: - michael@166: # See lib/ExtUtils/MakeMaker.pm for details of how to influence michael@166: # the contents of the Makefile that is written. michael@166: WriteMakefile( michael@166: NAME => 'RRDTool::OO', michael@166: VERSION_FROM => 'lib/RRDTool/OO.pm', # finds $VERSION michael@166: PREREQ_PM => { michael@166: - Log::Log4perl => '0.40', michael@166: RRDs => 0, michael@166: }, # e.g., Module::Name => 1.1 michael@368: $ExtUtils::MakeMaker::VERSION >= 6.50 ? (%$meta_merge) : (), michael@368: Index: RRDTool-OO-0.31/lib/RRDTool/OO.pm michael@368: --- RRDTool-OO-0.31/lib/RRDTool/OO.pm.orig 2010-05-26 02:26:34.000000000 +0200 michael@368: +++ RRDTool-OO-0.31/lib/RRDTool/OO.pm 2010-12-27 08:45:34.000000000 +0100 michael@166: @@ -5,7 +5,6 @@ michael@166: use warnings; michael@166: use Carp; michael@166: use RRDs; michael@166: -use Log::Log4perl qw(:easy); michael@166: michael@368: our $VERSION = '0.31'; michael@166: michael@368: @@ -189,7 +188,7 @@ michael@166: # Check if we got all mandatory parameters michael@166: for(@{$ref->{mandatory}}) { michael@166: if(! exists $options_hash{$_}) { michael@166: - Log::Log4perl->get_logger("")->logcroak( michael@166: + croak( michael@166: "Mandatory parameter '$_' not set " . michael@166: "in $method() (@{[%mandatory]}) (@$options)"); michael@166: } michael@368: @@ -201,7 +200,7 @@ michael@166: for(keys %options_hash) { michael@166: if(! exists $optional{$_} and michael@166: ! exists $mandatory{$_}) { michael@166: - Log::Log4perl->get_logger("")->logcroak( michael@166: + croak( michael@166: "Illegal parameter '$_' in $method()"); michael@166: } michael@166: } michael@166: Index: bindings/perl-shared/Makefile.PL michael@368: --- bindings/perl-shared/Makefile.PL.orig 2010-12-17 17:10:20.000000000 +0100 michael@368: +++ bindings/perl-shared/Makefile.PL 2010-12-27 08:47:23.000000000 +0100 michael@166: @@ -1,36 +1,7 @@ michael@166: use ExtUtils::MakeMaker; michael@166: use Config; michael@166: -# See lib/ExtUtils/MakeMaker.pm for details of how to influence michael@166: -# the contents of the Makefile that is written. michael@166: michael@166: -# if the last argument when calling Makefile.PL is RPATH=/... and ... is the michael@166: -# path to librrd.so then the Makefile will be written such that RRDs.so knows michael@166: -# where to find librrd.so later on ... michael@166: -my $R=""; michael@166: -if ($ARGV[-1] =~ /RPATH=(\S+)/){ michael@166: - pop @ARGV; michael@166: - my $rp = $1; michael@166: - for ($^O){ michael@166: - /linux/ && do{ $R = "-Wl,--rpath -Wl,$rp"}; michael@166: - /hpux/ && do{ $R = "+b$rp"}; michael@166: - /solaris/ && do{ $R = "-R$rp"}; michael@166: - /bsd/ && do{ $R = "-R$rp"}; michael@368: - /aix/ && do{ $R = "-blibpath:$rp"}; michael@166: - } michael@166: -} michael@166: - michael@166: -# darwin works without this because librrd contains its michael@166: -# install_name which will includes the final location of the michael@166: -# library after it is installed. This install_name gets transfered michael@166: -# to the perl shared object. michael@166: - michael@166: -my $librrd; michael@166: -if ($^O eq 'darwin'){ michael@166: - $librrd = '-lrrd'; michael@166: -} michael@166: -else { michael@166: - $librrd = "-L../../src/.libs/ $R -lrrd"; michael@166: -} michael@173: +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: michael@166: WriteMakefile( michael@166: 'NAME' => 'RRDs', michael@166: Index: bindings/python/setup.py michael@368: --- bindings/python/setup.py.orig 2008-03-15 11:39:48.000000000 +0100 michael@368: +++ bindings/python/setup.py 2010-12-27 08:45:34.000000000 +0100 michael@166: @@ -47,7 +47,7 @@ michael@166: Extension( michael@166: "rrdtoolmodule", michael@166: ["rrdtoolmodule.c"], michael@166: - libraries=['rrd'], michael@166: + libraries=['rrd', 'freetype', 'art_lgpl', 'png', 'z'], michael@166: library_dirs=[library_dir], michael@166: include_dirs=[include_dir], michael@166: ) michael@166: Index: configure michael@368: --- configure.orig 2010-12-26 20:51:06.000000000 +0100 michael@368: +++ configure 2010-12-27 08:45:34.000000000 +0100 michael@368: @@ -24785,13 +24785,13 @@ michael@368: if test "x""" != "x"; then michael@368: CPPFLAGS="$CPPFLAGS -I""" michael@368: fi michael@368: - { $as_echo "$as_me:$LINENO: checking for glib_check_version in -lglib-2.0" >&5 michael@368: -$as_echo_n "checking for glib_check_version in -lglib-2.0... " >&6; } michael@368: + { $as_echo "$as_me:$LINENO: checking for glib_check_version in -lglib2" >&5 michael@368: +$as_echo_n "checking for glib_check_version in -lglib2... " >&6; } michael@368: if test "${ac_cv_lib_glib_2_0_glib_check_version+set}" = set; then michael@368: $as_echo_n "(cached) " >&6 michael@166: else michael@166: ac_check_lib_save_LIBS=$LIBS michael@368: -LIBS="-lglib-2.0 $LIBS" michael@368: +LIBS="-lglib2 $LIBS" michael@166: cat >conftest.$ac_ext <<_ACEOF michael@166: /* confdefs.h. */ michael@166: _ACEOF michael@368: @@ -24980,7 +24980,7 @@ michael@166: michael@166: fi michael@368: if test "x$ac_cv_header_glib_h" = x""yes; then michael@368: - LIBS="-lglib-2.0 ${LIBS}";EX_CHECK_STATE=YES michael@368: + LIBS="-lglib2 ${LIBS}";EX_CHECK_STATE=YES michael@166: fi michael@166: michael@166: michael@368: @@ -25043,7 +25043,7 @@ michael@368: $as_echo_n "(cached) " >&6 michael@166: else michael@166: ac_check_lib_save_LIBS=$LIBS michael@368: -LIBS="-lglib-2.0 $LIBS" michael@368: +LIBS="-lglib2 $LIBS" michael@166: cat >conftest.$ac_ext <<_ACEOF michael@166: /* confdefs.h. */ michael@166: _ACEOF michael@368: @@ -25335,7 +25335,7 @@ michael@368: $as_echo_n "(cached) " >&6 michael@368: else michael@368: ac_check_lib_save_LIBS=$LIBS michael@368: -LIBS="-lpangocairo-1.0 $LIBS" michael@368: +LIBS="-lpangocairo $LIBS" michael@368: cat >conftest.$ac_ext <<_ACEOF michael@368: /* confdefs.h. */ michael@368: _ACEOF michael@368: @@ -25524,7 +25524,7 @@ michael@368: michael@368: fi michael@368: if test "x$ac_cv_header_pango_pango_h" = x""yes; then michael@368: - LIBS="-lpangocairo-1.0 ${LIBS}";EX_CHECK_STATE=YES michael@368: + LIBS="-lpangocairo ${LIBS}";EX_CHECK_STATE=YES michael@368: fi michael@368: michael@368: michael@368: @@ -25587,7 +25587,7 @@ michael@368: $as_echo_n "(cached) " >&6 michael@368: else michael@368: ac_check_lib_save_LIBS=$LIBS michael@368: -LIBS="-lpangocairo-1.0 $LIBS" michael@368: +LIBS="-lpangocairo $LIBS" michael@368: cat >conftest.$ac_ext <<_ACEOF michael@368: /* confdefs.h. */ michael@368: _ACEOF michael@368: @@ -28938,9 +28938,9 @@ michael@368: $as_echo_n "checking for headers required to compile python extensions... " >&6; } michael@166: py_prefix=`$PYTHON -c "import sys; print sys.prefix"` michael@166: py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` michael@166: -PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" michael@166: +PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION} -I${py_prefix}/include/python" michael@166: if test "$py_prefix" != "$py_exec_prefix"; then michael@166: - PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" michael@166: + PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION} -I${py_exec_prefix}/include/python" michael@166: fi michael@166: michael@166: save_CPPFLAGS="$CPPFLAGS" michael@368: Index: src/rrd_daemon.c michael@368: --- src/rrd_daemon.c.orig 2010-12-21 17:06:32.000000000 +0100 michael@368: +++ src/rrd_daemon.c 2010-12-27 08:45:34.000000000 +0100 michael@368: @@ -113,7 +113,7 @@ michael@368: #include michael@368: #endif /* HAVE_LIBWRAP */ michael@368: michael@368: -#include michael@368: +#include michael@368: /* }}} */ michael@368: michael@368: #define RRDD_LOG(severity, ...) \ michael@166: Index: src/rrd_open.c michael@368: --- src/rrd_open.c.orig 2010-12-26 20:24:48.000000000 +0100 michael@368: +++ src/rrd_open.c 2010-12-27 08:45:34.000000000 +0100 michael@368: @@ -265,7 +265,7 @@ michael@166: #endif michael@166: if (rdwr & RRD_CREAT) michael@166: goto out_done; michael@166: -#ifdef USE_MADVISE michael@166: +#if defined(USE_MADVISE) && defined(MADV_WILLNEED) && defined(MADV_SEQUENTIAL) && defined(MADV_RANDOM) michael@166: if (rdwr & RRD_COPY) { michael@166: /* We will read everything in a moment (copying) */ michael@368: madvise(data, rrd_file->file_len, MADV_WILLNEED ); michael@368: @@ -300,7 +300,7 @@ michael@166: rrd->stat_head->version); michael@166: goto out_nullify_head; michael@166: } michael@166: -#if defined USE_MADVISE michael@166: +#if defined(USE_MADVISE) && defined(MADV_WILLNEED) michael@166: /* the ds_def will be needed soonish, so hint accordingly */ michael@166: madvise(data + PAGE_START(offset), michael@166: sizeof(ds_def_t) * rrd->stat_head->ds_cnt, MADV_WILLNEED); michael@368: @@ -308,7 +308,7 @@ michael@166: __rrd_read(rrd->ds_def, ds_def_t, michael@166: rrd->stat_head->ds_cnt); michael@166: michael@166: -#if defined USE_MADVISE michael@166: +#if defined(USE_MADVISE) && defined(MADV_WILLNEED) michael@166: /* the rra_def will be needed soonish, so hint accordingly */ michael@166: madvise(data + PAGE_START(offset), michael@166: sizeof(rra_def_t) * rrd->stat_head->rra_cnt, MADV_WILLNEED); michael@368: @@ -323,7 +323,7 @@ michael@166: rrd_set_error("live_head_t malloc"); michael@166: goto out_close; michael@166: } michael@166: -#if defined USE_MADVISE michael@166: +#if defined(USE_MADVISE) && defined(MADV_WILLNEED) michael@166: /* the live_head will be needed soonish, so hint accordingly */ michael@166: madvise(data + PAGE_START(offset), sizeof(time_t), MADV_WILLNEED); michael@166: #endif michael@368: @@ -333,7 +333,7 @@ michael@166: rrd->live_head->last_up = *rrd->legacy_last_up; michael@166: rrd->live_head->last_up_usec = 0; michael@166: } else { michael@166: -#if defined USE_MADVISE michael@166: +#if defined(USE_MADVISE) && defined(MADV_WILLNEED) michael@166: /* the live_head will be needed soonish, so hint accordingly */ michael@166: madvise(data + PAGE_START(offset), michael@166: sizeof(live_head_t), MADV_WILLNEED); michael@368: @@ -504,7 +504,7 @@ michael@166: + rrd->rra_ptr[i].cur_row michael@166: * rrd->stat_head->ds_cnt * sizeof(rrd_value_t)); michael@166: if (active_block > dontneed_start) { michael@166: -#ifdef USE_MADVISE michael@166: +#if defined(USE_MADVISE) && defined(MADV_DONTNEED) michael@368: madvise(rrd_simple_file->file_start + dontneed_start, michael@166: active_block - dontneed_start - 1, MADV_DONTNEED); michael@166: #endif michael@368: @@ -529,7 +529,7 @@ michael@166: } michael@166: michael@166: if (dontneed_start < rrd_file->file_len) { michael@166: -#ifdef USE_MADVISE michael@166: +#if defined(USE_MADVISE) && defined(MADV_DONTNEED) michael@368: madvise(rrd_simple_file->file_start + dontneed_start, michael@166: rrd_file->file_len - dontneed_start, MADV_DONTNEED); michael@166: #endif