michael@491: Index: RRDTool-OO-0.32/Makefile.PL michael@491: --- RRDTool-OO-0.32/Makefile.PL.orig 2010-06-26 05:32:42.000000000 +0200 michael@491: +++ RRDTool-OO-0.32/Makefile.PL 2012-03-08 10:57:56.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@491: Index: RRDTool-OO-0.32/lib/RRDTool/OO.pm michael@491: --- RRDTool-OO-0.32/lib/RRDTool/OO.pm.orig 2012-03-07 17:29:01.000000000 +0100 michael@491: +++ RRDTool-OO-0.32/lib/RRDTool/OO.pm 2012-03-08 21:30:51.000000000 +0100 michael@491: @@ -6,7 +6,6 @@ michael@166: use Carp; michael@166: use RRDs; michael@491: use Data::Dumper; michael@166: -use Log::Log4perl qw(:easy); michael@166: michael@491: our $VERSION = '0.32'; michael@166: michael@491: @@ -203,7 +202,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@491: @@ -215,7 +214,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@491: --- bindings/perl-shared/Makefile.PL.orig 2011-12-15 17:07:05.000000000 +0100 michael@491: +++ bindings/perl-shared/Makefile.PL 2012-03-08 10:57:56.000000000 +0100 michael@491: @@ -20,32 +20,7 @@ michael@491: ) : () michael@491: ); michael@491: }else{ michael@490: - # if the last argument when calling Makefile.PL is RPATH=/... and ... is the michael@490: - # path to librrd.so then the Makefile will be written such that RRDs.so knows michael@490: - # where to find librrd.so later on ... michael@490: - my $R=""; michael@490: - if ($ARGV[-1] =~ /RPATH=(\S+)/){ michael@490: - pop @ARGV; michael@490: - my $rp = $1; michael@490: - for ($^O){ michael@490: - /linux/ && do{ $R = "-Wl,--rpath -Wl,$rp"}; michael@490: - /hpux/ && do{ $R = "+b$rp"}; michael@490: - /solaris/ && do{ $R = "-R$rp"}; michael@490: - /bsd/ && do{ $R = "-R$rp"}; michael@490: - /aix/ && do{ $R = "-blibpath:$rp"}; michael@490: - } michael@490: - } michael@490: - michael@490: - # darwin works without this because librrd contains its michael@490: - # install_name which will includes the final location of the michael@490: - # library after it is installed. This install_name gets transfered michael@490: - # to the perl shared object. michael@490: - my $librrd; michael@490: - if ($^O eq 'darwin'){ michael@490: - $librrd = '-lrrd'; michael@490: - } else { michael@490: - $librrd = "-L../../src/.libs/ $R -lrrd"; michael@490: - } michael@710: + my $librrd = "-L../../src/.libs/ -lrrd -L$Config{prefix}/lib -lcairo -lpangocairo -lpixman-1 -lpango -lpangoft2 -lfreetype -lpng -lgobject -lgio -lgmodule -lglib -lfontconfig -lfreetype -lxml2 -lexpat -lpcre -lz -liconv -lintl -lffi"; michael@491: michael@490: WriteMakefile( michael@490: '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@491: +++ bindings/python/setup.py 2012-03-08 10:57:56.000000000 +0100 michael@166: @@ -47,7 +47,7 @@ michael@166: Extension( michael@166: "rrdtoolmodule", michael@166: ["rrdtoolmodule.c"], michael@166: - libraries=['rrd'], michael@491: + 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@491: --- configure.orig 2012-01-24 11:09:06.000000000 +0100 michael@491: +++ configure 2012-03-08 10:57:56.000000000 +0100 michael@490: @@ -25560,7 +25560,7 @@ michael@490: $as_echo_n "(cached) " >&6 michael@490: else michael@490: ac_check_lib_save_LIBS=$LIBS michael@490: -LIBS="-lpangocairo-1.0 $LIBS" michael@490: +LIBS="-lpangocairo $LIBS" michael@490: cat >conftest.$ac_ext <<_ACEOF michael@490: /* confdefs.h. */ michael@490: _ACEOF michael@490: @@ -25749,7 +25749,7 @@ michael@490: michael@490: fi michael@490: if test "x$ac_cv_header_pango_pango_h" = x""yes; then michael@490: - LIBS="-lpangocairo-1.0 ${LIBS}";EX_CHECK_STATE=YES michael@490: + LIBS="-lpangocairo ${LIBS}";EX_CHECK_STATE=YES michael@490: fi michael@490: michael@490: michael@490: @@ -25812,7 +25812,7 @@ michael@490: $as_echo_n "(cached) " >&6 michael@490: else michael@490: ac_check_lib_save_LIBS=$LIBS michael@490: -LIBS="-lpangocairo-1.0 $LIBS" michael@490: +LIBS="-lpangocairo $LIBS" michael@490: cat >conftest.$ac_ext <<_ACEOF michael@490: /* confdefs.h. */ michael@490: _ACEOF michael@490: @@ -26100,13 +26100,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@490: @@ -26295,7 +26295,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@490: @@ -26358,7 +26358,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@490: @@ -29709,9 +29709,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@491: --- src/rrd_daemon.c.orig 2011-12-16 08:29:44.000000000 +0100 michael@491: +++ src/rrd_daemon.c 2012-03-08 10:57:56.000000000 +0100 michael@490: @@ -105,7 +105,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@491: --- src/rrd_open.c.orig 2012-01-24 11:08:48.000000000 +0100 michael@491: +++ src/rrd_open.c 2012-03-08 10:57:56.000000000 +0100 michael@490: @@ -296,7 +296,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@490: @@ -331,7 +331,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@490: @@ -339,7 +339,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@490: @@ -354,7 +354,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@490: @@ -364,7 +364,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@490: @@ -535,7 +535,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@490: @@ -560,7 +560,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