# HG changeset patch # User Michael Schloh von Bennewitz # Date 1344450553 -7200 # Node ID 615d51fb3fea02335bfff529a847f5a57f55287d # Parent 0348d09236d38a13473c05841f000993a38ea50c Blind commit of old corrections, which probably are in order and needed. diff -r 0348d09236d3 -r 615d51fb3fea rrdtool/rrdtool.patch --- a/rrdtool/rrdtool.patch Wed Aug 08 20:27:30 2012 +0200 +++ b/rrdtool/rrdtool.patch Wed Aug 08 20:29:13 2012 +0200 @@ -86,44 +86,66 @@ Index: bindings/perl-shared/Makefile.PL --- 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 @@ +@@ -1,52 +1,6 @@ use ExtUtils::MakeMaker; use Config; -# See lib/ExtUtils/MakeMaker.pm for details of how to influence -# the contents of the Makefile that is written. +- +-if (($Config{'osname'} eq 'MSWin32' && $ENV{'OSTYPE'} eq '')) { +- WriteMakefile( +- 'NAME' => 'RRDs', +- 'VERSION_FROM' => 'RRDs.pm', +- 'DEFINE' => "-DPERLPATCHLEVEL=$Config{PATCHLEVEL} -D_CRT_SECURE_NO_WARNINGS -DWIN32", +- 'INC' => '-I../../src/ "-IC:/Perl/lib/CORE" -I"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include" -I"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include"', +- 'LDDLFLAGS' => '-dll -nologo -opt:ref,icf -ltcg -libpath:"C:\Perl\lib\CORE" -machine:X86', +- 'LDFLAGS' => '-nologo -opt:ref,icf -ltcg -libpath:"C:\Perl\lib\CORE" -machine:X86', +- 'OPTIMIZE' => '-O2 -MD', +- 'LIBS' => '"..\..\win32\Release\rrdlib.lib" "..\..\win32\Release" "C:\Perl\lib\CORE\perl514.lib" -L../../contrib/lib -L"C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib" -L"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib" -L"C:\Perl\lib\CORE"', +- 'realclean' => {FILES => 't/demo?.rrd t/demo?.png' }, +- ($] ge '5.005') ? ( +- 'AUTHOR' => 'Tobias Oetiker (tobi@oetiker.ch)', +- 'ABSTRACT' => 'Round Robin Database Tool', +- ) : () +- ); +-}else{ +- # if the last argument when calling Makefile.PL is RPATH=/... and ... is the +- # path to librrd.so then the Makefile will be written such that RRDs.so knows +- # where to find librrd.so later on ... +- my $R=""; +- if ($ARGV[-1] =~ /RPATH=(\S+)/){ +- pop @ARGV; +- my $rp = $1; +- for ($^O){ +- /linux/ && do{ $R = "-Wl,--rpath -Wl,$rp"}; +- /hpux/ && do{ $R = "+b$rp"}; +- /solaris/ && do{ $R = "-R$rp"}; +- /bsd/ && do{ $R = "-R$rp"}; +- /aix/ && do{ $R = "-blibpath:$rp"}; +- } +- } +- +- # darwin works without this because librrd contains its +- # install_name which will includes the final location of the +- # library after it is installed. This install_name gets transfered +- # to the perl shared object. +- my $librrd; +- if ($^O eq 'darwin'){ +- $librrd = '-lrrd'; +- } else { +- $librrd = "-L../../src/.libs/ $R -lrrd"; +- } +- ++my $librrd = "-L../../src/.libs/ -lrrd -L$Config{prefix}/lib @l_pangocairo@"; + WriteMakefile( + 'NAME' => 'RRDs', + 'VERSION_FROM' => 'RRDs.pm', # finds $VERSION +@@ -59,5 +13,4 @@ + 'realclean' => {FILES => 't/demo?.rrd t/demo?.png' }, + ($^O eq 'darwin') ? ( 'LDDLFLAGS' => "-L../../src/.libs/ $Config{lddlflags}" ) : () + ); +-} --# if the last argument when calling Makefile.PL is RPATH=/... and ... is the --# path to librrd.so then the Makefile will be written such that RRDs.so knows --# where to find librrd.so later on ... --my $R=""; --if ($ARGV[-1] =~ /RPATH=(\S+)/){ -- pop @ARGV; -- my $rp = $1; -- for ($^O){ -- /linux/ && do{ $R = "-Wl,--rpath -Wl,$rp"}; -- /hpux/ && do{ $R = "+b$rp"}; -- /solaris/ && do{ $R = "-R$rp"}; -- /bsd/ && do{ $R = "-R$rp"}; -- /aix/ && do{ $R = "-blibpath:$rp"}; -- } --} -- --# darwin works without this because librrd contains its --# install_name which will includes the final location of the --# library after it is installed. This install_name gets transfered --# to the perl shared object. -- --my $librrd; --if ($^O eq 'darwin'){ -- $librrd = '-lrrd'; --} --else { -- $librrd = "-L../../src/.libs/ $R -lrrd"; --} -+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"; - - WriteMakefile( - 'NAME' => 'RRDs', Index: bindings/python/setup.py --- 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 @@ -132,14 +154,41 @@ "rrdtoolmodule", ["rrdtoolmodule.c"], - libraries=['rrd'], -+ libraries=['rrd', 'freetype', 'art_lgpl', 'png', 'z'], ++ libraries=['rrd', 'freetype', 'png', 'z'], library_dirs=[library_dir], include_dirs=[include_dir], ) Index: configure --- configure.orig 2010-12-26 20:51:06.000000000 +0100 +++ configure 2010-12-27 08:45:34.000000000 +0100 -@@ -24785,13 +24785,13 @@ +@@ -25560,7 +25560,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 +@@ -25749,7 +25749,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 + + +@@ -25812,7 +25812,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 +@@ -26100,13 +26100,13 @@ if test "x""" != "x"; then CPPFLAGS="$CPPFLAGS -I""" fi @@ -156,7 +205,7 @@ cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF -@@ -24980,7 +24980,7 @@ +@@ -26295,7 +26295,7 @@ fi if test "x$ac_cv_header_glib_h" = x""yes; then @@ -165,7 +214,7 @@ fi -@@ -25043,7 +25043,7 @@ +@@ -26358,7 +26358,7 @@ $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -174,34 +223,7 @@ cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF -@@ -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 @@ +@@ -29709,9 +29709,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"` @@ -216,7 +238,7 @@ 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 @@ +@@ -105,7 +105,7 @@ #include #endif /* HAVE_LIBWRAP */ @@ -228,7 +250,7 @@ Index: src/rrd_open.c --- 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 @@ +@@ -296,7 +296,7 @@ #endif if (rdwr & RRD_CREAT) goto out_done; @@ -237,7 +259,7 @@ if (rdwr & RRD_COPY) { /* We will read everything in a moment (copying) */ madvise(data, rrd_file->file_len, MADV_WILLNEED ); -@@ -300,7 +300,7 @@ +@@ -331,7 +331,7 @@ rrd->stat_head->version); goto out_nullify_head; } @@ -246,7 +268,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); -@@ -308,7 +308,7 @@ +@@ -339,7 +339,7 @@ __rrd_read(rrd->ds_def, ds_def_t, rrd->stat_head->ds_cnt); @@ -255,7 +277,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); -@@ -323,7 +323,7 @@ +@@ -354,7 +354,7 @@ rrd_set_error("live_head_t malloc"); goto out_close; } @@ -264,7 +286,7 @@ /* the live_head will be needed soonish, so hint accordingly */ madvise(data + PAGE_START(offset), sizeof(time_t), MADV_WILLNEED); #endif -@@ -333,7 +333,7 @@ +@@ -364,7 +364,7 @@ rrd->live_head->last_up = *rrd->legacy_last_up; rrd->live_head->last_up_usec = 0; } else { @@ -273,7 +295,7 @@ /* the live_head will be needed soonish, so hint accordingly */ madvise(data + PAGE_START(offset), sizeof(live_head_t), MADV_WILLNEED); -@@ -504,7 +504,7 @@ +@@ -535,7 +535,7 @@ + rrd->rra_ptr[i].cur_row * rrd->stat_head->ds_cnt * sizeof(rrd_value_t)); if (active_block > dontneed_start) { @@ -282,7 +304,7 @@ madvise(rrd_simple_file->file_start + dontneed_start, active_block - dontneed_start - 1, MADV_DONTNEED); #endif -@@ -529,7 +529,7 @@ +@@ -560,7 +560,7 @@ } if (dontneed_start < rrd_file->file_len) { diff -r 0348d09236d3 -r 615d51fb3fea rrdtool/rrdtool.spec --- a/rrdtool/rrdtool.spec Wed Aug 08 20:27:30 2012 +0200 +++ b/rrdtool/rrdtool.spec Wed Aug 08 20:29:13 2012 +0200 @@ -22,7 +22,7 @@ ## # package version -%define V_rrdtool 1.4.5 +%define V_rrdtool 1.4.7 %define V_rrdtool_oo 0.31 %define V_rrdtool_creator 1.0 %define V_rrd_simple 1.44 @@ -38,7 +38,7 @@ Group: Database License: LGPL Version: %{V_rrdtool} -Release: 20110915 +Release: 20120208 # package options %option with_perl no @@ -54,13 +54,13 @@ # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} -BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, make, pkgconfig, perl-openpkg >= 5.8.3-20040126, perl-module, intltool +BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, make, pkgconfig, perl-openpkg >= 5.8.3-20040126, perl-module PreReq: OpenPKG, openpkg >= 20040130 BuildPreReq: png, zlib, freetype, pango, cairo, libxml PreReq: png, zlib, freetype, pango, cairo, libxml %if "%{with_perl}" == "yes" -BuildPreReq: perl, perl-xml::with_libxml = yes, libart -PreReq: perl, perl-xml::with_libxml = yes, libart +BuildPreReq: perl +PreReq: perl %endif %if "%{with_python}" == "yes" BuildPreReq: python @@ -110,6 +110,9 @@ %{l_shtool} subst \ -e 's;\-std=c99 *;;g' \ configure + %{l_shtool} subst \ + -e 's;@l_pangocairo@;`pkg-config pangocairo --libs-only-l`;' \ + bindings/perl-shared/Makefile.PL rm -f bindings/perl-shared/ntmake.pl rm -rf RRDTool-Creator-*/_build @@ -122,7 +125,7 @@ CPPFLAGS="%{l_cppflags}" \ CFLAGS="%{l_cflags -O}" \ LDLAGS="%{l_ldflags}" \ - LIBS="`pkg-config pangocairo --libs`" \ + LIBS="`pkg-config pangocairo --libs-only-l`" \ ./configure \ --cache-file=./config.cache \ --prefix=%{l_prefix} \ @@ -135,8 +138,6 @@ --disable-tcl \ --disable-ruby \ --disable-shared \ - --enable-local-libpng \ - --enable-local-zlib \ --enable-rrdcgi # build package @@ -160,7 +161,7 @@ -e 's/^\(install-data-am:\).*/\1/' \ Makefile %{l_make} %{l_mflags} install \ - DESTDIR=$RPM_BUILD_ROOT AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" + DESTDIR=$RPM_BUILD_ROOT DESTDIR="$RPM_BUILD_ROOT" # install Perl part %if "%{with_perl}" == "yes"