Gentoo Archives: gentoo-commits

From: "Sebastien Fabbro (bicatali)" <bicatali@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-python/matplotlib/files: matplotlib-1.0.1-sphinx.patch matplotlib-1.0.1-libpng15.patch
Date: Thu, 24 Feb 2011 04:49:29
Message-Id: 20110224044920.206DD20054@flycatcher.gentoo.org
1 bicatali 11/02/24 04:49:20
2
3 Added: matplotlib-1.0.1-sphinx.patch
4 matplotlib-1.0.1-libpng15.patch
5 Log:
6 Fixed for libpng-1.5, thanks Rafał Mużyło, bug #354551. Fixed missing fonts, bug #334429, thanks François Bissey. Tentative work to get the documentation building working. Added missing sample data.
7
8 (Portage version: 2.1.9.40/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.1 dev-python/matplotlib/files/matplotlib-1.0.1-sphinx.patch
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/files/matplotlib-1.0.1-sphinx.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/files/matplotlib-1.0.1-sphinx.patch?rev=1.1&content-type=text/plain
15
16 Index: matplotlib-1.0.1-sphinx.patch
17 ===================================================================
18 diff -Nur matplotlib-1.0.1.orig/doc/api/api_changes.rst matplotlib-1.0.1/doc/api/api_changes.rst
19 --- matplotlib-1.0.1.orig/doc/api/api_changes.rst 2011-02-23 23:41:55.000000000 +0000
20 +++ matplotlib-1.0.1/doc/api/api_changes.rst 2011-02-23 23:42:24.000000000 +0000
21 @@ -540,7 +540,7 @@
22
23 * :meth:`draw_markers(self, gc, marker_path, marker_trans, path,
24 trans, rgbFace)
25 - <matplotlib.backend_bases.RendererBase.draw_markers`
26 + <matplotlib.backend_bases.RendererBase.draw_markers>`
27
28 * :meth:`draw_path_collection(self, master_transform, cliprect,
29 clippath, clippath_trans, paths, all_transforms, offsets,
30 diff -Nur matplotlib-1.0.1.orig/lib/matplotlib/sphinxext/plot_directive.py matplotlib-1.0.1/lib/matplotlib/sphinxext/plot_directive.py
31 --- matplotlib-1.0.1.orig/lib/matplotlib/sphinxext/plot_directive.py 2011-02-23 23:41:55.000000000 +0000
32 +++ matplotlib-1.0.1/lib/matplotlib/sphinxext/plot_directive.py 2011-02-23 23:42:37.000000000 +0000
33 @@ -346,7 +346,7 @@
34 del options['nofigs']
35
36 formats = setup.config.plot_formats
37 - if type(formats) == str:
38 + if isinstance(formats, basestring):
39 formats = eval(formats)
40
41 fname = os.path.basename(plot_path)
42 diff -Nur matplotlib-1.0.1.orig/lib/mpl_toolkits/axes_grid1/axes_divider.py matplotlib-1.0.1/lib/mpl_toolkits/axes_grid1/axes_divider.py
43 --- matplotlib-1.0.1.orig/lib/mpl_toolkits/axes_grid1/axes_divider.py 2011-02-23 23:41:55.000000000 +0000
44 +++ matplotlib-1.0.1/lib/mpl_toolkits/axes_grid1/axes_divider.py 2011-02-23 23:42:31.000000000 +0000
45 @@ -172,12 +172,12 @@
46 def locate(self, nx, ny, nx1=None, ny1=None, renderer=None):
47 """
48
49 - :param nx, nx1: Integers specifying the column-position of the
50 + :param nx,nx1: Integers specifying the column-position of the
51 cell. When nx1 is None, a single nx-th column is
52 specified. Otherwise location of columns spanning between nx
53 to nx1 (but excluding nx1-th column) is specified.
54
55 - :param ny, ny1: same as nx and nx1, but for row positions.
56 + :param ny,ny1: same as nx and nx1, but for row positions.
57 """
58
59
60 @@ -222,12 +222,12 @@
61 (:class:`mpl_toolkits.axes_grid.axes_divider.AxesLocator`) for
62 specified cell.
63
64 - :param nx, nx1: Integers specifying the column-position of the
65 + :param nx,nx1: Integers specifying the column-position of the
66 cell. When nx1 is None, a single nx-th column is
67 specified. Otherwise location of columns spanning between nx
68 to nx1 (but excluding nx1-th column) is specified.
69
70 - :param ny, ny1: same as nx and nx1, but for row positions.
71 + :param ny,ny1: same as nx and nx1, but for row positions.
72 """
73 return AxesLocator(self, nx, ny, nx1, ny1)
74
75 @@ -242,12 +242,12 @@
76 """
77 :param axes_divider: An instance of AxesDivider class.
78
79 - :param nx, nx1: Integers specifying the column-position of the
80 + :param nx,nx1: Integers specifying the column-position of the
81 cell. When nx1 is None, a single nx-th column is
82 specified. Otherwise location of columns spanning between nx
83 to nx1 (but excluding nx1-th column) is is specified.
84
85 - :param ny, ny1: same as nx and nx1, but for row positions.
86 + :param ny,ny1: same as nx and nx1, but for row positions.
87 """
88 self._axes_divider = axes_divider
89
90
91
92
93 1.1 dev-python/matplotlib/files/matplotlib-1.0.1-libpng15.patch
94
95 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/files/matplotlib-1.0.1-libpng15.patch?rev=1.1&view=markup
96 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/files/matplotlib-1.0.1-libpng15.patch?rev=1.1&content-type=text/plain
97
98 Index: matplotlib-1.0.1-libpng15.patch
99 ===================================================================
100 --- src/_png.cpp.old 2010-10-12 18:14:42.000000000 +0200
101 +++ src/_png.cpp 2011-02-12 01:33:14.000000000 +0100
102 @@ -350,10 +350,10 @@
103 png_set_sig_bytes(png_ptr, 8);
104 png_read_info(png_ptr, info_ptr);
105
106 - png_uint_32 width = info_ptr->width;
107 - png_uint_32 height = info_ptr->height;
108 + png_uint_32 width, height;
109 + int bit_depth, color_type;
110
111 - int bit_depth = info_ptr->bit_depth;
112 + png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, NULL, NULL, NULL);
113
114 // Unpack 1, 2, and 4-bit images
115 if (bit_depth < 8)
116 @@ -361,7 +361,7 @@
117
118 // If sig bits are set, shift data
119 png_color_8p sig_bit;
120 - if ((info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) &&
121 + if ((color_type != PNG_COLOR_TYPE_PALETTE) &&
122 png_get_sBIT(png_ptr, info_ptr, &sig_bit))
123 {
124 png_set_shift(png_ptr, sig_bit);
125 @@ -374,19 +374,20 @@
126 }
127
128 // Convert palletes to full RGB
129 - if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
130 + if (color_type == PNG_COLOR_TYPE_PALETTE)
131 {
132 png_set_palette_to_rgb(png_ptr);
133 }
134
135 // If there's an alpha channel convert gray to RGB
136 - if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
137 + if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
138 {
139 png_set_gray_to_rgb(png_ptr);
140 }
141
142 png_set_interlace_handling(png_ptr);
143 png_read_update_info(png_ptr, info_ptr);
144 + color_type = png_get_color_type(png_ptr, info_ptr);
145
146 /* read file */
147 if (setjmp(png_jmpbuf(png_ptr)))
148 @@ -408,11 +409,11 @@
149 npy_intp dimensions[3];
150 dimensions[0] = height; //numrows
151 dimensions[1] = width; //numcols
152 - if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA)
153 + if (color_type & PNG_COLOR_MASK_ALPHA)
154 {
155 dimensions[2] = 4; //RGBA images
156 }
157 - else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR)
158 + else if (color_type & PNG_COLOR_MASK_COLOR)
159 {
160 dimensions[2] = 3; //RGB images
161 }
162 @@ -421,7 +422,7 @@
163 dimensions[2] = 1; //Greyscale images
164 }
165 //For gray, return an x by y array, not an x by y by 1
166 - int num_dims = (info_ptr->color_type & PNG_COLOR_MASK_COLOR) ? 3 : 2;
167 + int num_dims = (color_type & PNG_COLOR_MASK_COLOR) ? 3 : 2;
168
169 double max_value = (1 << ((bit_depth < 8) ? 8 : bit_depth)) - 1;
170 PyArrayObject *A = (PyArrayObject *) PyArray_SimpleNew(