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