Blind commit of old corrections, which probably are in order and needed.

Wed, 08 Aug 2012 20:29:13 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 08 Aug 2012 20:29:13 +0200
changeset 490
615d51fb3fea
parent 489
0348d09236d3
child 491
ccaf26ae9b81

Blind commit of old corrections, which probably are in order and needed.

rrdtool/rrdtool.patch file | annotate | diff | comparison | revisions
rrdtool/rrdtool.spec file | annotate | diff | comparison | revisions
     1.1 --- a/rrdtool/rrdtool.patch	Wed Aug 08 20:27:30 2012 +0200
     1.2 +++ b/rrdtool/rrdtool.patch	Wed Aug 08 20:29:13 2012 +0200
     1.3 @@ -86,44 +86,66 @@
     1.4  Index: bindings/perl-shared/Makefile.PL
     1.5  --- bindings/perl-shared/Makefile.PL.orig	2010-12-17 17:10:20.000000000 +0100
     1.6  +++ bindings/perl-shared/Makefile.PL	2010-12-27 08:47:23.000000000 +0100
     1.7 -@@ -1,36 +1,7 @@
     1.8 +@@ -1,52 +1,6 @@
     1.9   use ExtUtils::MakeMaker;
    1.10   use Config;
    1.11  -# See lib/ExtUtils/MakeMaker.pm for details of how to influence
    1.12  -# the contents of the Makefile that is written.
    1.13 +-
    1.14 +-if (($Config{'osname'} eq 'MSWin32' && $ENV{'OSTYPE'} eq '')) {
    1.15 +-	WriteMakefile(
    1.16 +-		'NAME'         => 'RRDs',
    1.17 +-		'VERSION_FROM' => 'RRDs.pm',
    1.18 +-		'DEFINE'       => "-DPERLPATCHLEVEL=$Config{PATCHLEVEL} -D_CRT_SECURE_NO_WARNINGS -DWIN32",
    1.19 +-		'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"',
    1.20 +-		'LDDLFLAGS'    => '-dll -nologo -opt:ref,icf -ltcg -libpath:"C:\Perl\lib\CORE" -machine:X86',
    1.21 +-		'LDFLAGS'      => '-nologo -opt:ref,icf -ltcg -libpath:"C:\Perl\lib\CORE" -machine:X86',
    1.22 +-		'OPTIMIZE'     => '-O2 -MD',
    1.23 +-		'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"',
    1.24 +-		'realclean'    => {FILES => 't/demo?.rrd t/demo?.png' },
    1.25 +-		($] ge '5.005') ? (
    1.26 +-			'AUTHOR'   => 'Tobias Oetiker (tobi@oetiker.ch)',
    1.27 +-			'ABSTRACT' => 'Round Robin Database Tool',
    1.28 +-		) : ()
    1.29 +-	);
    1.30 +-}else{
    1.31 +-	# if the last argument when calling Makefile.PL is RPATH=/... and ... is the
    1.32 +-	# path to librrd.so then the Makefile will be written such that RRDs.so knows
    1.33 +-	# where to find librrd.so later on ... 
    1.34 +-	my $R="";
    1.35 +-	if ($ARGV[-1] =~ /RPATH=(\S+)/){
    1.36 +-		pop @ARGV;
    1.37 +-		my $rp = $1;
    1.38 +-		for ($^O){
    1.39 +-			/linux/   && do{ $R = "-Wl,--rpath -Wl,$rp"};
    1.40 +-			/hpux/    && do{ $R = "+b$rp"};
    1.41 +-			/solaris/ && do{ $R = "-R$rp"};
    1.42 +-			/bsd/     && do{ $R = "-R$rp"};
    1.43 +-			/aix/     && do{ $R = "-blibpath:$rp"};
    1.44 +-		}
    1.45 +-	}
    1.46 +-
    1.47 +-	# darwin works without this because librrd contains its
    1.48 +-	# install_name which will includes the final location of the
    1.49 +-	# library after it is installed. This install_name gets transfered
    1.50 +-	# to the perl shared object.
    1.51 +-	my $librrd;
    1.52 +-	if ($^O eq 'darwin'){
    1.53 +-        $librrd = '-lrrd';
    1.54 +-	} else {
    1.55 +-		$librrd = "-L../../src/.libs/ $R -lrrd";
    1.56 +-	}
    1.57 +-
    1.58 ++my $librrd = "-L../../src/.libs/ -lrrd -L$Config{prefix}/lib @l_pangocairo@";
    1.59 + 	WriteMakefile(
    1.60 + 		'NAME'         => 'RRDs',
    1.61 + 		'VERSION_FROM' => 'RRDs.pm', # finds $VERSION
    1.62 +@@ -59,5 +13,4 @@
    1.63 + 		'realclean'    => {FILES => 't/demo?.rrd t/demo?.png' },
    1.64 + 		($^O eq 'darwin') ? ( 'LDDLFLAGS'    => "-L../../src/.libs/ $Config{lddlflags}" ) : ()
    1.65 + 	);
    1.66 +-}
    1.67   
    1.68 --# if the last argument when calling Makefile.PL is RPATH=/... and ... is the
    1.69 --# path to librrd.so then the Makefile will be written such that RRDs.so knows
    1.70 --# where to find librrd.so later on ... 
    1.71 --my $R="";
    1.72 --if ($ARGV[-1] =~ /RPATH=(\S+)/){
    1.73 --	pop @ARGV;
    1.74 --	my $rp = $1;
    1.75 --	for ($^O){
    1.76 --	        /linux/   && do{ $R = "-Wl,--rpath -Wl,$rp"};
    1.77 --	        /hpux/    && do{ $R = "+b$rp"};
    1.78 --	        /solaris/ && do{ $R = "-R$rp"};
    1.79 --	        /bsd/     && do{ $R = "-R$rp"};
    1.80 --                /aix/     && do{ $R = "-blibpath:$rp"};
    1.81 --	}
    1.82 --}
    1.83 --
    1.84 --# darwin works without this because librrd contains its
    1.85 --# install_name which will includes the final location of the
    1.86 --# library after it is installed. This install_name gets transfered
    1.87 --# to the perl shared object.
    1.88 --
    1.89 --my $librrd;
    1.90 --if ($^O eq 'darwin'){
    1.91 --        $librrd = '-lrrd';
    1.92 --}
    1.93 --else {
    1.94 --        $librrd = "-L../../src/.libs/ $R -lrrd";
    1.95 --}
    1.96 -+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";
    1.97 - 
    1.98 - WriteMakefile(
    1.99 -     'NAME'         => 'RRDs',
   1.100  Index: bindings/python/setup.py
   1.101  --- bindings/python/setup.py.orig	2008-03-15 11:39:48.000000000 +0100
   1.102  +++ bindings/python/setup.py	2010-12-27 08:45:34.000000000 +0100
   1.103 @@ -132,14 +154,41 @@
   1.104               "rrdtoolmodule",
   1.105               ["rrdtoolmodule.c"],
   1.106  -            libraries=['rrd'],
   1.107 -+            libraries=['rrd', 'freetype', 'art_lgpl', 'png', 'z'],
   1.108 ++            libraries=['rrd', 'freetype', 'png', 'z'],
   1.109               library_dirs=[library_dir],
   1.110               include_dirs=[include_dir],
   1.111             )
   1.112  Index: configure
   1.113  --- configure.orig	2010-12-26 20:51:06.000000000 +0100
   1.114  +++ configure	2010-12-27 08:45:34.000000000 +0100
   1.115 -@@ -24785,13 +24785,13 @@
   1.116 +@@ -25560,7 +25560,7 @@
   1.117 +   $as_echo_n "(cached) " >&6
   1.118 + else
   1.119 +   ac_check_lib_save_LIBS=$LIBS
   1.120 +-LIBS="-lpangocairo-1.0  $LIBS"
   1.121 ++LIBS="-lpangocairo  $LIBS"
   1.122 + cat >conftest.$ac_ext <<_ACEOF
   1.123 + /* confdefs.h.  */
   1.124 + _ACEOF
   1.125 +@@ -25749,7 +25749,7 @@
   1.126 + 
   1.127 + fi
   1.128 + if test "x$ac_cv_header_pango_pango_h" = x""yes; then
   1.129 +-  LIBS="-lpangocairo-1.0 ${LIBS}";EX_CHECK_STATE=YES
   1.130 ++  LIBS="-lpangocairo ${LIBS}";EX_CHECK_STATE=YES
   1.131 + fi
   1.132 + 
   1.133 + 
   1.134 +@@ -25812,7 +25812,7 @@
   1.135 +   $as_echo_n "(cached) " >&6
   1.136 + else
   1.137 +   ac_check_lib_save_LIBS=$LIBS
   1.138 +-LIBS="-lpangocairo-1.0  $LIBS"
   1.139 ++LIBS="-lpangocairo  $LIBS"
   1.140 + cat >conftest.$ac_ext <<_ACEOF
   1.141 + /* confdefs.h.  */
   1.142 + _ACEOF
   1.143 +@@ -26100,13 +26100,13 @@
   1.144    if test "x""" != "x"; then
   1.145      CPPFLAGS="$CPPFLAGS -I"""
   1.146    fi
   1.147 @@ -156,7 +205,7 @@
   1.148   cat >conftest.$ac_ext <<_ACEOF
   1.149   /* confdefs.h.  */
   1.150   _ACEOF
   1.151 -@@ -24980,7 +24980,7 @@
   1.152 +@@ -26295,7 +26295,7 @@
   1.153   
   1.154   fi
   1.155   if test "x$ac_cv_header_glib_h" = x""yes; then
   1.156 @@ -165,7 +214,7 @@
   1.157   fi
   1.158   
   1.159   
   1.160 -@@ -25043,7 +25043,7 @@
   1.161 +@@ -26358,7 +26358,7 @@
   1.162     $as_echo_n "(cached) " >&6
   1.163   else
   1.164     ac_check_lib_save_LIBS=$LIBS
   1.165 @@ -174,34 +223,7 @@
   1.166   cat >conftest.$ac_ext <<_ACEOF
   1.167   /* confdefs.h.  */
   1.168   _ACEOF
   1.169 -@@ -25335,7 +25335,7 @@
   1.170 -   $as_echo_n "(cached) " >&6
   1.171 - else
   1.172 -   ac_check_lib_save_LIBS=$LIBS
   1.173 --LIBS="-lpangocairo-1.0  $LIBS"
   1.174 -+LIBS="-lpangocairo  $LIBS"
   1.175 - cat >conftest.$ac_ext <<_ACEOF
   1.176 - /* confdefs.h.  */
   1.177 - _ACEOF
   1.178 -@@ -25524,7 +25524,7 @@
   1.179 - 
   1.180 - fi
   1.181 - if test "x$ac_cv_header_pango_pango_h" = x""yes; then
   1.182 --  LIBS="-lpangocairo-1.0 ${LIBS}";EX_CHECK_STATE=YES
   1.183 -+  LIBS="-lpangocairo ${LIBS}";EX_CHECK_STATE=YES
   1.184 - fi
   1.185 - 
   1.186 - 
   1.187 -@@ -25587,7 +25587,7 @@
   1.188 -   $as_echo_n "(cached) " >&6
   1.189 - else
   1.190 -   ac_check_lib_save_LIBS=$LIBS
   1.191 --LIBS="-lpangocairo-1.0  $LIBS"
   1.192 -+LIBS="-lpangocairo  $LIBS"
   1.193 - cat >conftest.$ac_ext <<_ACEOF
   1.194 - /* confdefs.h.  */
   1.195 - _ACEOF
   1.196 -@@ -28938,9 +28938,9 @@
   1.197 +@@ -29709,9 +29709,9 @@
   1.198   $as_echo_n "checking for headers required to compile python extensions... " >&6; }
   1.199   py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
   1.200   py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
   1.201 @@ -216,7 +238,7 @@
   1.202  Index: src/rrd_daemon.c
   1.203  --- src/rrd_daemon.c.orig	2010-12-21 17:06:32.000000000 +0100
   1.204  +++ src/rrd_daemon.c	2010-12-27 08:45:34.000000000 +0100
   1.205 -@@ -113,7 +113,7 @@
   1.206 +@@ -105,7 +105,7 @@
   1.207   #include <tcpd.h>
   1.208   #endif /* HAVE_LIBWRAP */
   1.209   
   1.210 @@ -228,7 +250,7 @@
   1.211  Index: src/rrd_open.c
   1.212  --- src/rrd_open.c.orig	2010-12-26 20:24:48.000000000 +0100
   1.213  +++ src/rrd_open.c	2010-12-27 08:45:34.000000000 +0100
   1.214 -@@ -265,7 +265,7 @@
   1.215 +@@ -296,7 +296,7 @@
   1.216   #endif
   1.217       if (rdwr & RRD_CREAT)
   1.218           goto out_done;
   1.219 @@ -237,7 +259,7 @@
   1.220       if (rdwr & RRD_COPY) {
   1.221           /* We will read everything in a moment (copying) */
   1.222           madvise(data, rrd_file->file_len, MADV_WILLNEED );
   1.223 -@@ -300,7 +300,7 @@
   1.224 +@@ -331,7 +331,7 @@
   1.225                         rrd->stat_head->version);
   1.226           goto out_nullify_head;
   1.227       }
   1.228 @@ -246,7 +268,7 @@
   1.229       /* the ds_def will be needed soonish, so hint accordingly */
   1.230       madvise(data + PAGE_START(offset),
   1.231               sizeof(ds_def_t) * rrd->stat_head->ds_cnt, MADV_WILLNEED);
   1.232 -@@ -308,7 +308,7 @@
   1.233 +@@ -339,7 +339,7 @@
   1.234       __rrd_read(rrd->ds_def, ds_def_t,
   1.235                  rrd->stat_head->ds_cnt);
   1.236   
   1.237 @@ -255,7 +277,7 @@
   1.238       /* the rra_def will be needed soonish, so hint accordingly */
   1.239       madvise(data + PAGE_START(offset),
   1.240               sizeof(rra_def_t) * rrd->stat_head->rra_cnt, MADV_WILLNEED);
   1.241 -@@ -323,7 +323,7 @@
   1.242 +@@ -354,7 +354,7 @@
   1.243               rrd_set_error("live_head_t malloc");
   1.244               goto out_close;
   1.245           }
   1.246 @@ -264,7 +286,7 @@
   1.247           /* the live_head will be needed soonish, so hint accordingly */
   1.248           madvise(data + PAGE_START(offset), sizeof(time_t), MADV_WILLNEED);
   1.249   #endif
   1.250 -@@ -333,7 +333,7 @@
   1.251 +@@ -364,7 +364,7 @@
   1.252           rrd->live_head->last_up = *rrd->legacy_last_up;
   1.253           rrd->live_head->last_up_usec = 0;
   1.254       } else {
   1.255 @@ -273,7 +295,7 @@
   1.256           /* the live_head will be needed soonish, so hint accordingly */
   1.257           madvise(data + PAGE_START(offset),
   1.258                   sizeof(live_head_t), MADV_WILLNEED);
   1.259 -@@ -504,7 +504,7 @@
   1.260 +@@ -535,7 +535,7 @@
   1.261                          + rrd->rra_ptr[i].cur_row
   1.262                          * rrd->stat_head->ds_cnt * sizeof(rrd_value_t));
   1.263           if (active_block > dontneed_start) {
   1.264 @@ -282,7 +304,7 @@
   1.265               madvise(rrd_simple_file->file_start + dontneed_start,
   1.266                       active_block - dontneed_start - 1, MADV_DONTNEED);
   1.267   #endif
   1.268 -@@ -529,7 +529,7 @@
   1.269 +@@ -560,7 +560,7 @@
   1.270       }
   1.271   
   1.272       if (dontneed_start < rrd_file->file_len) {
     2.1 --- a/rrdtool/rrdtool.spec	Wed Aug 08 20:27:30 2012 +0200
     2.2 +++ b/rrdtool/rrdtool.spec	Wed Aug 08 20:29:13 2012 +0200
     2.3 @@ -22,7 +22,7 @@
     2.4  ##
     2.5  
     2.6  #   package version
     2.7 -%define       V_rrdtool          1.4.5
     2.8 +%define       V_rrdtool          1.4.7
     2.9  %define       V_rrdtool_oo       0.31
    2.10  %define       V_rrdtool_creator  1.0
    2.11  %define       V_rrd_simple       1.44
    2.12 @@ -38,7 +38,7 @@
    2.13  Group:        Database
    2.14  License:      LGPL
    2.15  Version:      %{V_rrdtool}
    2.16 -Release:      20110915
    2.17 +Release:      20120208
    2.18  
    2.19  #   package options
    2.20  %option       with_perl        no
    2.21 @@ -54,13 +54,13 @@
    2.22  #   build information
    2.23  Prefix:       %{l_prefix}
    2.24  BuildRoot:    %{l_buildroot}
    2.25 -BuildPreReq:  OpenPKG, openpkg >= 20040130, gcc, make, pkgconfig, perl-openpkg >= 5.8.3-20040126, perl-module, intltool
    2.26 +BuildPreReq:  OpenPKG, openpkg >= 20040130, gcc, make, pkgconfig, perl-openpkg >= 5.8.3-20040126, perl-module
    2.27  PreReq:       OpenPKG, openpkg >= 20040130
    2.28  BuildPreReq:  png, zlib, freetype, pango, cairo, libxml
    2.29  PreReq:       png, zlib, freetype, pango, cairo, libxml
    2.30  %if "%{with_perl}" == "yes"
    2.31 -BuildPreReq:  perl, perl-xml::with_libxml = yes, libart
    2.32 -PreReq:       perl, perl-xml::with_libxml = yes, libart
    2.33 +BuildPreReq:  perl
    2.34 +PreReq:       perl
    2.35  %endif
    2.36  %if "%{with_python}" == "yes"
    2.37  BuildPreReq:  python
    2.38 @@ -110,6 +110,9 @@
    2.39      %{l_shtool} subst \
    2.40          -e 's;\-std=c99 *;;g' \
    2.41          configure
    2.42 +    %{l_shtool} subst \
    2.43 +        -e 's;@l_pangocairo@;`pkg-config pangocairo --libs-only-l`;' \
    2.44 +        bindings/perl-shared/Makefile.PL
    2.45      rm -f bindings/perl-shared/ntmake.pl
    2.46      rm -rf RRDTool-Creator-*/_build
    2.47  
    2.48 @@ -122,7 +125,7 @@
    2.49      CPPFLAGS="%{l_cppflags}" \
    2.50      CFLAGS="%{l_cflags -O}" \
    2.51      LDLAGS="%{l_ldflags}" \
    2.52 -    LIBS="`pkg-config pangocairo --libs`" \
    2.53 +    LIBS="`pkg-config pangocairo --libs-only-l`" \
    2.54      ./configure \
    2.55          --cache-file=./config.cache \
    2.56          --prefix=%{l_prefix} \
    2.57 @@ -135,8 +138,6 @@
    2.58          --disable-tcl \
    2.59          --disable-ruby \
    2.60          --disable-shared \
    2.61 -        --enable-local-libpng \
    2.62 -        --enable-local-zlib \
    2.63          --enable-rrdcgi
    2.64  
    2.65      #   build package
    2.66 @@ -160,7 +161,7 @@
    2.67          -e 's/^\(install-data-am:\).*/\1/' \
    2.68          Makefile
    2.69      %{l_make} %{l_mflags} install \
    2.70 -        DESTDIR=$RPM_BUILD_ROOT AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
    2.71 +        DESTDIR=$RPM_BUILD_ROOT DESTDIR="$RPM_BUILD_ROOT"
    2.72  
    2.73      #   install Perl part
    2.74  %if "%{with_perl}" == "yes"

mercurial