- Fix problem with cairo_save/cairo_restore (#444827)
- Fix python bindings rrdtool info implementation (#435468)
This commit is contained in:
parent
5a1e582510
commit
d91dc13ba2
65
rrdtool-1.3beta4-fix-cairo.patch
Normal file
65
rrdtool-1.3beta4-fix-cairo.patch
Normal file
@ -0,0 +1,65 @@
|
||||
diff -Naurp rrdtool-1.2.99908020600/src/rrd_graph.c rrdtool-1.2.99908020600.fix/src/rrd_graph.c
|
||||
--- rrdtool-1.2.99908020600/src/rrd_graph.c 2008-02-05 19:14:25.000000000 -0500
|
||||
+++ rrdtool-1.2.99908020600.fix/src/rrd_graph.c 2008-04-30 21:12:13.000000000 -0400
|
||||
@@ -3345,34 +3345,36 @@ int graph_paint(
|
||||
switch (im->gdes[i].gf) {
|
||||
case GF_HRULE:
|
||||
if (im->gdes[i].yrule >= im->minval
|
||||
- && im->gdes[i].yrule <= im->maxval)
|
||||
- cairo_save(im->cr);
|
||||
- if (im->gdes[i].dash) {
|
||||
- cairo_set_dash(im->cr, im->gdes[i].p_dashes,
|
||||
- im->gdes[i].ndash, im->gdes[i].offset);
|
||||
- }
|
||||
- gfx_line(im,
|
||||
- im->xorigin, ytr(im, im->gdes[i].yrule),
|
||||
- im->xorigin + im->xsize, ytr(im,
|
||||
- im->gdes[i].yrule),
|
||||
- 1.0, im->gdes[i].col);
|
||||
- cairo_stroke(im->cr);
|
||||
- cairo_restore(im->cr);
|
||||
+ && im->gdes[i].yrule <= im->maxval) {
|
||||
+ cairo_save(im->cr);
|
||||
+ if (im->gdes[i].dash) {
|
||||
+ cairo_set_dash(im->cr, im->gdes[i].p_dashes,
|
||||
+ im->gdes[i].ndash, im->gdes[i].offset);
|
||||
+ }
|
||||
+ gfx_line(im,
|
||||
+ im->xorigin, ytr(im, im->gdes[i].yrule),
|
||||
+ im->xorigin + im->xsize, ytr(im,
|
||||
+ im->gdes[i].yrule),
|
||||
+ 1.0, im->gdes[i].col);
|
||||
+ cairo_stroke(im->cr);
|
||||
+ cairo_restore(im->cr);
|
||||
+ }
|
||||
break;
|
||||
case GF_VRULE:
|
||||
if (im->gdes[i].xrule >= im->start
|
||||
- && im->gdes[i].xrule <= im->end)
|
||||
- cairo_save(im->cr);
|
||||
- if (im->gdes[i].dash) {
|
||||
- cairo_set_dash(im->cr, im->gdes[i].p_dashes,
|
||||
- im->gdes[i].ndash, im->gdes[i].offset);
|
||||
- }
|
||||
- gfx_line(im,
|
||||
- xtr(im, im->gdes[i].xrule), im->yorigin,
|
||||
- xtr(im, im->gdes[i].xrule),
|
||||
- im->yorigin - im->ysize, 1.0, im->gdes[i].col);
|
||||
- cairo_stroke(im->cr);
|
||||
- cairo_restore(im->cr);
|
||||
+ && im->gdes[i].xrule <= im->end) {
|
||||
+ cairo_save(im->cr);
|
||||
+ if (im->gdes[i].dash) {
|
||||
+ cairo_set_dash(im->cr, im->gdes[i].p_dashes,
|
||||
+ im->gdes[i].ndash, im->gdes[i].offset);
|
||||
+ }
|
||||
+ gfx_line(im,
|
||||
+ xtr(im, im->gdes[i].xrule), im->yorigin,
|
||||
+ xtr(im, im->gdes[i].xrule),
|
||||
+ im->yorigin - im->ysize, 1.0, im->gdes[i].col);
|
||||
+ cairo_stroke(im->cr);
|
||||
+ cairo_restore(im->cr);
|
||||
+ }
|
||||
break;
|
||||
default:
|
||||
break;
|
36
rrdtool-1.3beta4-fix-python-bindings-rrdtool-info.patch
Normal file
36
rrdtool-1.3beta4-fix-python-bindings-rrdtool-info.patch
Normal file
@ -0,0 +1,36 @@
|
||||
Index: rrdtool/bindings/python/rrd_extra.h
|
||||
===================================================================
|
||||
--- rrdtool/bindings/python/rrd_extra.h (revision 1306)
|
||||
+++ rrdtool/bindings/python/rrd_extra.h (revision 1332)
|
||||
@@ -54,5 +54,4 @@
|
||||
int rrd_open(
|
||||
char *file_name,
|
||||
- FILE ** in_file,
|
||||
rrd_t *rrd,
|
||||
int rdwr);
|
||||
Index: rrdtool/bindings/python/rrdtoolmodule.c
|
||||
===================================================================
|
||||
--- rrdtool/bindings/python/rrdtoolmodule.c (revision 1306)
|
||||
+++ rrdtool/bindings/python/rrdtoolmodule.c (revision 1332)
|
||||
@@ -412,5 +412,4 @@
|
||||
PyObject *r, *t, *ds;
|
||||
rrd_t rrd;
|
||||
- FILE *in_file;
|
||||
char *filename;
|
||||
unsigned long i, j;
|
||||
@@ -419,10 +418,9 @@
|
||||
return NULL;
|
||||
|
||||
- if (rrd_open(filename, &in_file, &rrd, RRD_READONLY) == -1) {
|
||||
- PyErr_SetString(ErrorObject, rrd_get_error());
|
||||
- rrd_clear_error();
|
||||
- return NULL;
|
||||
- }
|
||||
- fclose(in_file);
|
||||
+ if (!rrd_open(filename, &rrd, RRD_READONLY) == -1) {
|
||||
+ PyErr_SetString(ErrorObject, rrd_get_error());
|
||||
+ rrd_clear_error();
|
||||
+ return NULL;
|
||||
+ }
|
||||
|
||||
#define DICTSET_STR(dict, name, value) \
|
12
rrdtool.spec
12
rrdtool.spec
@ -10,7 +10,7 @@
|
||||
Summary: Round Robin Database Tool to store and display time-series data
|
||||
Name: rrdtool
|
||||
Version: 1.3
|
||||
Release: 0.11.%{betaver}%{?dist}
|
||||
Release: 0.13.%{betaver}%{?dist}
|
||||
License: GPLv2+ with exceptions
|
||||
Group: Applications/Databases
|
||||
URL: http://oss.oetiker.ch/rrdtool/
|
||||
@ -18,6 +18,8 @@ URL: http://oss.oetiker.ch/rrdtool/
|
||||
Source0: http://oss.oetiker.ch/rrdtool/pub/beta/%{name}-%{version}%{betaver}.tar.gz
|
||||
Source1: php4-%{svnrev}.tar.gz
|
||||
Patch1: rrdtool-1.3.0-beta4-fix-rrd_update-in-php-bindings.patch
|
||||
Patch2: rrdtool-1.3beta4-fix-python-bindings-rrdtool-info.patch
|
||||
Patch3: rrdtool-1.3beta4-fix-cairo.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Requires: dejavu-lgc-fonts
|
||||
BuildRequires: gcc-c++, openssl-devel, freetype-devel
|
||||
@ -144,6 +146,8 @@ The %{name}-ruby package includes RRDtool bindings for Ruby.
|
||||
%if %{with_php}
|
||||
%patch1 -p1
|
||||
%endif
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
# Fix to find correct python dir on lib64
|
||||
%{__perl} -pi -e 's|get_python_lib\(0,0,prefix|get_python_lib\(1,0,prefix|g' \
|
||||
@ -324,6 +328,12 @@ find examples/ -type f -exec chmod 0644 {} \;
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Apr 30 2008 Jarod Wilson <jwilson@redhat.com> 1.3.0-0.13.beta4
|
||||
- Fix problem with cairo_save/cairo_restore (#444827)
|
||||
|
||||
* Wed Apr 23 2008 Jarod Wilson <jwilson@redhat.com> 1.3.0-0.12.beta4
|
||||
- Fix python bindings rrdtool info implementation (#435468)
|
||||
|
||||
* Tue Apr 08 2008 Jarod Wilson <jwilson@redhat.com> 1.3.0-0.11.beta4
|
||||
- Work around apparent version string length issue w/perl 5.10 (#441359)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user