rrdtool/rrdtool.patch

changeset 490
615d51fb3fea
parent 368
603801a09393
child 491
ccaf26ae9b81
equal deleted inserted replaced
3:c93fa7cddfd1 4:347c73352636
84 } 84 }
85 } 85 }
86 Index: bindings/perl-shared/Makefile.PL 86 Index: bindings/perl-shared/Makefile.PL
87 --- bindings/perl-shared/Makefile.PL.orig 2010-12-17 17:10:20.000000000 +0100 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 88 +++ bindings/perl-shared/Makefile.PL 2010-12-27 08:47:23.000000000 +0100
89 @@ -1,36 +1,7 @@ 89 @@ -1,52 +1,6 @@
90 use ExtUtils::MakeMaker; 90 use ExtUtils::MakeMaker;
91 use Config; 91 use Config;
92 -# See lib/ExtUtils/MakeMaker.pm for details of how to influence 92 -# See lib/ExtUtils/MakeMaker.pm for details of how to influence
93 -# the contents of the Makefile that is written. 93 -# the contents of the Makefile that is written.
94 94 -
95 -# if the last argument when calling Makefile.PL is RPATH=/... and ... is the 95 -if (($Config{'osname'} eq 'MSWin32' && $ENV{'OSTYPE'} eq '')) {
96 -# path to librrd.so then the Makefile will be written such that RRDs.so knows 96 - WriteMakefile(
97 -# where to find librrd.so later on ... 97 - 'NAME' => 'RRDs',
98 -my $R=""; 98 - 'VERSION_FROM' => 'RRDs.pm',
99 -if ($ARGV[-1] =~ /RPATH=(\S+)/){ 99 - 'DEFINE' => "-DPERLPATCHLEVEL=$Config{PATCHLEVEL} -D_CRT_SECURE_NO_WARNINGS -DWIN32",
100 - pop @ARGV; 100 - '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"',
101 - my $rp = $1; 101 - 'LDDLFLAGS' => '-dll -nologo -opt:ref,icf -ltcg -libpath:"C:\Perl\lib\CORE" -machine:X86',
102 - for ($^O){ 102 - 'LDFLAGS' => '-nologo -opt:ref,icf -ltcg -libpath:"C:\Perl\lib\CORE" -machine:X86',
103 - /linux/ && do{ $R = "-Wl,--rpath -Wl,$rp"}; 103 - 'OPTIMIZE' => '-O2 -MD',
104 - /hpux/ && do{ $R = "+b$rp"}; 104 - '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"',
105 - /solaris/ && do{ $R = "-R$rp"}; 105 - 'realclean' => {FILES => 't/demo?.rrd t/demo?.png' },
106 - /bsd/ && do{ $R = "-R$rp"}; 106 - ($] ge '5.005') ? (
107 - /aix/ && do{ $R = "-blibpath:$rp"}; 107 - 'AUTHOR' => 'Tobias Oetiker (tobi@oetiker.ch)',
108 - 'ABSTRACT' => 'Round Robin Database Tool',
109 - ) : ()
110 - );
111 -}else{
112 - # if the last argument when calling Makefile.PL is RPATH=/... and ... is the
113 - # path to librrd.so then the Makefile will be written such that RRDs.so knows
114 - # where to find librrd.so later on ...
115 - my $R="";
116 - if ($ARGV[-1] =~ /RPATH=(\S+)/){
117 - pop @ARGV;
118 - my $rp = $1;
119 - for ($^O){
120 - /linux/ && do{ $R = "-Wl,--rpath -Wl,$rp"};
121 - /hpux/ && do{ $R = "+b$rp"};
122 - /solaris/ && do{ $R = "-R$rp"};
123 - /bsd/ && do{ $R = "-R$rp"};
124 - /aix/ && do{ $R = "-blibpath:$rp"};
125 - }
108 - } 126 - }
127 -
128 - # darwin works without this because librrd contains its
129 - # install_name which will includes the final location of the
130 - # library after it is installed. This install_name gets transfered
131 - # to the perl shared object.
132 - my $librrd;
133 - if ($^O eq 'darwin'){
134 - $librrd = '-lrrd';
135 - } else {
136 - $librrd = "-L../../src/.libs/ $R -lrrd";
137 - }
138 -
139 +my $librrd = "-L../../src/.libs/ -lrrd -L$Config{prefix}/lib @l_pangocairo@";
140 WriteMakefile(
141 'NAME' => 'RRDs',
142 'VERSION_FROM' => 'RRDs.pm', # finds $VERSION
143 @@ -59,5 +13,4 @@
144 'realclean' => {FILES => 't/demo?.rrd t/demo?.png' },
145 ($^O eq 'darwin') ? ( 'LDDLFLAGS' => "-L../../src/.libs/ $Config{lddlflags}" ) : ()
146 );
109 -} 147 -}
110 - 148
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";
124
125 WriteMakefile(
126 'NAME' => 'RRDs',
127 Index: bindings/python/setup.py 149 Index: bindings/python/setup.py
128 --- bindings/python/setup.py.orig 2008-03-15 11:39:48.000000000 +0100 150 --- 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 151 +++ bindings/python/setup.py 2010-12-27 08:45:34.000000000 +0100
130 @@ -47,7 +47,7 @@ 152 @@ -47,7 +47,7 @@
131 Extension( 153 Extension(
132 "rrdtoolmodule", 154 "rrdtoolmodule",
133 ["rrdtoolmodule.c"], 155 ["rrdtoolmodule.c"],
134 - libraries=['rrd'], 156 - libraries=['rrd'],
135 + libraries=['rrd', 'freetype', 'art_lgpl', 'png', 'z'], 157 + libraries=['rrd', 'freetype', 'png', 'z'],
136 library_dirs=[library_dir], 158 library_dirs=[library_dir],
137 include_dirs=[include_dir], 159 include_dirs=[include_dir],
138 ) 160 )
139 Index: configure 161 Index: configure
140 --- configure.orig 2010-12-26 20:51:06.000000000 +0100 162 --- configure.orig 2010-12-26 20:51:06.000000000 +0100
141 +++ configure 2010-12-27 08:45:34.000000000 +0100 163 +++ configure 2010-12-27 08:45:34.000000000 +0100
142 @@ -24785,13 +24785,13 @@ 164 @@ -25560,7 +25560,7 @@
165 $as_echo_n "(cached) " >&6
166 else
167 ac_check_lib_save_LIBS=$LIBS
168 -LIBS="-lpangocairo-1.0 $LIBS"
169 +LIBS="-lpangocairo $LIBS"
170 cat >conftest.$ac_ext <<_ACEOF
171 /* confdefs.h. */
172 _ACEOF
173 @@ -25749,7 +25749,7 @@
174
175 fi
176 if test "x$ac_cv_header_pango_pango_h" = x""yes; then
177 - LIBS="-lpangocairo-1.0 ${LIBS}";EX_CHECK_STATE=YES
178 + LIBS="-lpangocairo ${LIBS}";EX_CHECK_STATE=YES
179 fi
180
181
182 @@ -25812,7 +25812,7 @@
183 $as_echo_n "(cached) " >&6
184 else
185 ac_check_lib_save_LIBS=$LIBS
186 -LIBS="-lpangocairo-1.0 $LIBS"
187 +LIBS="-lpangocairo $LIBS"
188 cat >conftest.$ac_ext <<_ACEOF
189 /* confdefs.h. */
190 _ACEOF
191 @@ -26100,13 +26100,13 @@
143 if test "x""" != "x"; then 192 if test "x""" != "x"; then
144 CPPFLAGS="$CPPFLAGS -I""" 193 CPPFLAGS="$CPPFLAGS -I"""
145 fi 194 fi
146 - { $as_echo "$as_me:$LINENO: checking for glib_check_version in -lglib-2.0" >&5 195 - { $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; } 196 -$as_echo_n "checking for glib_check_version in -lglib-2.0... " >&6; }
154 -LIBS="-lglib-2.0 $LIBS" 203 -LIBS="-lglib-2.0 $LIBS"
155 +LIBS="-lglib2 $LIBS" 204 +LIBS="-lglib2 $LIBS"
156 cat >conftest.$ac_ext <<_ACEOF 205 cat >conftest.$ac_ext <<_ACEOF
157 /* confdefs.h. */ 206 /* confdefs.h. */
158 _ACEOF 207 _ACEOF
159 @@ -24980,7 +24980,7 @@ 208 @@ -26295,7 +26295,7 @@
160 209
161 fi 210 fi
162 if test "x$ac_cv_header_glib_h" = x""yes; then 211 if test "x$ac_cv_header_glib_h" = x""yes; then
163 - LIBS="-lglib-2.0 ${LIBS}";EX_CHECK_STATE=YES 212 - LIBS="-lglib-2.0 ${LIBS}";EX_CHECK_STATE=YES
164 + LIBS="-lglib2 ${LIBS}";EX_CHECK_STATE=YES 213 + LIBS="-lglib2 ${LIBS}";EX_CHECK_STATE=YES
165 fi 214 fi
166 215
167 216
168 @@ -25043,7 +25043,7 @@ 217 @@ -26358,7 +26358,7 @@
169 $as_echo_n "(cached) " >&6 218 $as_echo_n "(cached) " >&6
170 else 219 else
171 ac_check_lib_save_LIBS=$LIBS 220 ac_check_lib_save_LIBS=$LIBS
172 -LIBS="-lglib-2.0 $LIBS" 221 -LIBS="-lglib-2.0 $LIBS"
173 +LIBS="-lglib2 $LIBS" 222 +LIBS="-lglib2 $LIBS"
174 cat >conftest.$ac_ext <<_ACEOF 223 cat >conftest.$ac_ext <<_ACEOF
175 /* confdefs.h. */ 224 /* confdefs.h. */
176 _ACEOF 225 _ACEOF
177 @@ -25335,7 +25335,7 @@ 226 @@ -29709,9 +29709,9 @@
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 @@
187
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
193
194
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; } 227 $as_echo_n "checking for headers required to compile python extensions... " >&6; }
206 py_prefix=`$PYTHON -c "import sys; print sys.prefix"` 228 py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
207 py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` 229 py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
208 -PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" 230 -PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
209 +PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION} -I${py_prefix}/include/python" 231 +PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION} -I${py_prefix}/include/python"
214 236
215 save_CPPFLAGS="$CPPFLAGS" 237 save_CPPFLAGS="$CPPFLAGS"
216 Index: src/rrd_daemon.c 238 Index: src/rrd_daemon.c
217 --- src/rrd_daemon.c.orig 2010-12-21 17:06:32.000000000 +0100 239 --- 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 240 +++ src/rrd_daemon.c 2010-12-27 08:45:34.000000000 +0100
219 @@ -113,7 +113,7 @@ 241 @@ -105,7 +105,7 @@
220 #include <tcpd.h> 242 #include <tcpd.h>
221 #endif /* HAVE_LIBWRAP */ 243 #endif /* HAVE_LIBWRAP */
222 244
223 -#include <glib-2.0/glib.h> 245 -#include <glib-2.0/glib.h>
224 +#include <glib2/glib.h> 246 +#include <glib2/glib.h>
226 248
227 #define RRDD_LOG(severity, ...) \ 249 #define RRDD_LOG(severity, ...) \
228 Index: src/rrd_open.c 250 Index: src/rrd_open.c
229 --- src/rrd_open.c.orig 2010-12-26 20:24:48.000000000 +0100 251 --- 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 252 +++ src/rrd_open.c 2010-12-27 08:45:34.000000000 +0100
231 @@ -265,7 +265,7 @@ 253 @@ -296,7 +296,7 @@
232 #endif 254 #endif
233 if (rdwr & RRD_CREAT) 255 if (rdwr & RRD_CREAT)
234 goto out_done; 256 goto out_done;
235 -#ifdef USE_MADVISE 257 -#ifdef USE_MADVISE
236 +#if defined(USE_MADVISE) && defined(MADV_WILLNEED) && defined(MADV_SEQUENTIAL) && defined(MADV_RANDOM) 258 +#if defined(USE_MADVISE) && defined(MADV_WILLNEED) && defined(MADV_SEQUENTIAL) && defined(MADV_RANDOM)
237 if (rdwr & RRD_COPY) { 259 if (rdwr & RRD_COPY) {
238 /* We will read everything in a moment (copying) */ 260 /* We will read everything in a moment (copying) */
239 madvise(data, rrd_file->file_len, MADV_WILLNEED ); 261 madvise(data, rrd_file->file_len, MADV_WILLNEED );
240 @@ -300,7 +300,7 @@ 262 @@ -331,7 +331,7 @@
241 rrd->stat_head->version); 263 rrd->stat_head->version);
242 goto out_nullify_head; 264 goto out_nullify_head;
243 } 265 }
244 -#if defined USE_MADVISE 266 -#if defined USE_MADVISE
245 +#if defined(USE_MADVISE) && defined(MADV_WILLNEED) 267 +#if defined(USE_MADVISE) && defined(MADV_WILLNEED)
246 /* the ds_def will be needed soonish, so hint accordingly */ 268 /* the ds_def will be needed soonish, so hint accordingly */
247 madvise(data + PAGE_START(offset), 269 madvise(data + PAGE_START(offset),
248 sizeof(ds_def_t) * rrd->stat_head->ds_cnt, MADV_WILLNEED); 270 sizeof(ds_def_t) * rrd->stat_head->ds_cnt, MADV_WILLNEED);
249 @@ -308,7 +308,7 @@ 271 @@ -339,7 +339,7 @@
250 __rrd_read(rrd->ds_def, ds_def_t, 272 __rrd_read(rrd->ds_def, ds_def_t,
251 rrd->stat_head->ds_cnt); 273 rrd->stat_head->ds_cnt);
252 274
253 -#if defined USE_MADVISE 275 -#if defined USE_MADVISE
254 +#if defined(USE_MADVISE) && defined(MADV_WILLNEED) 276 +#if defined(USE_MADVISE) && defined(MADV_WILLNEED)
255 /* the rra_def will be needed soonish, so hint accordingly */ 277 /* the rra_def will be needed soonish, so hint accordingly */
256 madvise(data + PAGE_START(offset), 278 madvise(data + PAGE_START(offset),
257 sizeof(rra_def_t) * rrd->stat_head->rra_cnt, MADV_WILLNEED); 279 sizeof(rra_def_t) * rrd->stat_head->rra_cnt, MADV_WILLNEED);
258 @@ -323,7 +323,7 @@ 280 @@ -354,7 +354,7 @@
259 rrd_set_error("live_head_t malloc"); 281 rrd_set_error("live_head_t malloc");
260 goto out_close; 282 goto out_close;
261 } 283 }
262 -#if defined USE_MADVISE 284 -#if defined USE_MADVISE
263 +#if defined(USE_MADVISE) && defined(MADV_WILLNEED) 285 +#if defined(USE_MADVISE) && defined(MADV_WILLNEED)
264 /* the live_head will be needed soonish, so hint accordingly */ 286 /* the live_head will be needed soonish, so hint accordingly */
265 madvise(data + PAGE_START(offset), sizeof(time_t), MADV_WILLNEED); 287 madvise(data + PAGE_START(offset), sizeof(time_t), MADV_WILLNEED);
266 #endif 288 #endif
267 @@ -333,7 +333,7 @@ 289 @@ -364,7 +364,7 @@
268 rrd->live_head->last_up = *rrd->legacy_last_up; 290 rrd->live_head->last_up = *rrd->legacy_last_up;
269 rrd->live_head->last_up_usec = 0; 291 rrd->live_head->last_up_usec = 0;
270 } else { 292 } else {
271 -#if defined USE_MADVISE 293 -#if defined USE_MADVISE
272 +#if defined(USE_MADVISE) && defined(MADV_WILLNEED) 294 +#if defined(USE_MADVISE) && defined(MADV_WILLNEED)
273 /* the live_head will be needed soonish, so hint accordingly */ 295 /* the live_head will be needed soonish, so hint accordingly */
274 madvise(data + PAGE_START(offset), 296 madvise(data + PAGE_START(offset),
275 sizeof(live_head_t), MADV_WILLNEED); 297 sizeof(live_head_t), MADV_WILLNEED);
276 @@ -504,7 +504,7 @@ 298 @@ -535,7 +535,7 @@
277 + rrd->rra_ptr[i].cur_row 299 + rrd->rra_ptr[i].cur_row
278 * rrd->stat_head->ds_cnt * sizeof(rrd_value_t)); 300 * rrd->stat_head->ds_cnt * sizeof(rrd_value_t));
279 if (active_block > dontneed_start) { 301 if (active_block > dontneed_start) {
280 -#ifdef USE_MADVISE 302 -#ifdef USE_MADVISE
281 +#if defined(USE_MADVISE) && defined(MADV_DONTNEED) 303 +#if defined(USE_MADVISE) && defined(MADV_DONTNEED)
282 madvise(rrd_simple_file->file_start + dontneed_start, 304 madvise(rrd_simple_file->file_start + dontneed_start,
283 active_block - dontneed_start - 1, MADV_DONTNEED); 305 active_block - dontneed_start - 1, MADV_DONTNEED);
284 #endif 306 #endif
285 @@ -529,7 +529,7 @@ 307 @@ -560,7 +560,7 @@
286 } 308 }
287 309
288 if (dontneed_start < rrd_file->file_len) { 310 if (dontneed_start < rrd_file->file_len) {
289 -#ifdef USE_MADVISE 311 -#ifdef USE_MADVISE
290 +#if defined(USE_MADVISE) && defined(MADV_DONTNEED) 312 +#if defined(USE_MADVISE) && defined(MADV_DONTNEED)

mercurial