1 |
bicatali 10/05/31 20:23:16 |
2 |
|
3 |
Modified: matplotlib-0.99.1.1-libpng14.patch |
4 |
Added: matplotlib-0.99.1.1-eintr.patch |
5 |
matplotlib-0.99.1.1-docs.patch |
6 |
matplotlib-0.99.1.1-gtk-tooltip.patch |
7 |
Log: |
8 |
Added a few useful patches from upstream. Now use default config before documentation generation (fix bug #307881). Cleaning some dependencies, and allow png-1.4 patch to work with previous versions too |
9 |
(Portage version: 2.2_rc67/cvs/Linux x86_64) |
10 |
|
11 |
Revision Changes Path |
12 |
1.2 dev-python/matplotlib/files/matplotlib-0.99.1.1-libpng14.patch |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/files/matplotlib-0.99.1.1-libpng14.patch?rev=1.2&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/files/matplotlib-0.99.1.1-libpng14.patch?rev=1.2&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/files/matplotlib-0.99.1.1-libpng14.patch?r1=1.1&r2=1.2 |
17 |
|
18 |
Index: matplotlib-0.99.1.1-libpng14.patch |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/dev-python/matplotlib/files/matplotlib-0.99.1.1-libpng14.patch,v |
21 |
retrieving revision 1.1 |
22 |
retrieving revision 1.2 |
23 |
diff -u -r1.1 -r1.2 |
24 |
--- matplotlib-0.99.1.1-libpng14.patch 8 Mar 2010 17:54:03 -0000 1.1 |
25 |
+++ matplotlib-0.99.1.1-libpng14.patch 31 May 2010 20:23:16 -0000 1.2 |
26 |
@@ -2,12 +2,14 @@ |
27 |
|
28 |
--- src/_png.cpp |
29 |
+++ src/_png.cpp |
30 |
-@@ -290,7 +290,7 @@ |
31 |
+@@ -290,7 +290,9 @@ |
32 |
|
33 |
//free the png memory |
34 |
png_read_end(png_ptr, info_ptr); |
35 |
- png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL); |
36 |
++#ifndef png_infopp_NULL |
37 |
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL); |
38 |
++#endif |
39 |
fclose(fp); |
40 |
for (row = 0; row < height; row++) |
41 |
delete [] row_pointers[row]; |
42 |
|
43 |
|
44 |
|
45 |
1.1 dev-python/matplotlib/files/matplotlib-0.99.1.1-eintr.patch |
46 |
|
47 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/files/matplotlib-0.99.1.1-eintr.patch?rev=1.1&view=markup |
48 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/files/matplotlib-0.99.1.1-eintr.patch?rev=1.1&content-type=text/plain |
49 |
|
50 |
Index: matplotlib-0.99.1.1-eintr.patch |
51 |
=================================================================== |
52 |
--- lib/matplotlib/font_manager.py 2009/11/12 17:27:34 7952 |
53 |
+++ lib/matplotlib/font_manager.py 2009/11/12 17:28:22 7953 |
54 |
@@ -42,7 +42,7 @@ |
55 |
see license/LICENSE_TTFQUERY. |
56 |
""" |
57 |
|
58 |
-import os, sys, glob |
59 |
+import os, sys, glob, subprocess |
60 |
try: |
61 |
set |
62 |
except NameError: |
63 |
@@ -292,16 +292,12 @@ |
64 |
grab all of the fonts the user wants to be made available to |
65 |
applications, without needing knowing where all of them reside. |
66 |
""" |
67 |
- try: |
68 |
- import commands |
69 |
- except ImportError: |
70 |
- return {} |
71 |
- |
72 |
fontext = get_fontext_synonyms(fontext) |
73 |
|
74 |
fontfiles = {} |
75 |
- status, output = commands.getstatusoutput("fc-list file") |
76 |
- if status == 0: |
77 |
+ pipe = subprocess.Popen(['fc-list', '', 'file'], stdout=subprocess.PIPE) |
78 |
+ output = pipe.communicate()[0] |
79 |
+ if pipe.returncode == 0: |
80 |
for line in output.split('\n'): |
81 |
fname = line.split(':')[0] |
82 |
if (os.path.splitext(fname)[1][1:] in fontext and |
83 |
@@ -1244,11 +1240,11 @@ |
84 |
import re |
85 |
|
86 |
def fc_match(pattern, fontext): |
87 |
- import commands |
88 |
fontexts = get_fontext_synonyms(fontext) |
89 |
ext = "." + fontext |
90 |
- status, output = commands.getstatusoutput('fc-match -sv "%s"' % pattern) |
91 |
- if status == 0: |
92 |
+ pipe = subprocess.Popen(['fc-match', '-sv', pattern], stdout=subprocess.PIPE) |
93 |
+ output = pipe.communicate()[0] |
94 |
+ if pipe.returncode == 0: |
95 |
for match in _fc_match_regex.finditer(output): |
96 |
file = match.group(1) |
97 |
if os.path.splitext(file)[1][1:] in fontexts: |
98 |
|
99 |
|
100 |
|
101 |
1.1 dev-python/matplotlib/files/matplotlib-0.99.1.1-docs.patch |
102 |
|
103 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/files/matplotlib-0.99.1.1-docs.patch?rev=1.1&view=markup |
104 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/files/matplotlib-0.99.1.1-docs.patch?rev=1.1&content-type=text/plain |
105 |
|
106 |
Index: matplotlib-0.99.1.1-docs.patch |
107 |
=================================================================== |
108 |
Description: Pass DPI, along with format, in plot format configuration |
109 |
Forwarded: yes |
110 |
Author: Sandro Tosi <morph@××××××.org> |
111 |
|
112 |
diff -urNad matplotlib~/doc/make.py matplotlib/doc/make.py |
113 |
--- matplotlib~/doc/make.py 2009-08-01 21:14:12.000000000 +0200 |
114 |
+++ matplotlib/doc/make.py 2009-10-09 08:56:04.000000000 +0200 |
115 |
@@ -30,7 +30,7 @@ |
116 |
check_build() |
117 |
shutil.copy('../lib/matplotlib/mpl-data/matplotlibrc', '_static/matplotlibrc') |
118 |
if small_docs: |
119 |
- options = "-D plot_formats=\"['png']\"" |
120 |
+ options = "-D plot_formats=\"[('png', 80)]\"" |
121 |
else: |
122 |
options = '' |
123 |
if os.system('sphinx-build %s -P -b html -d build/doctrees . build/html' % options): |
124 |
|
125 |
|
126 |
|
127 |
1.1 dev-python/matplotlib/files/matplotlib-0.99.1.1-gtk-tooltip.patch |
128 |
|
129 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/files/matplotlib-0.99.1.1-gtk-tooltip.patch?rev=1.1&view=markup |
130 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/files/matplotlib-0.99.1.1-gtk-tooltip.patch?rev=1.1&content-type=text/plain |
131 |
|
132 |
Index: matplotlib-0.99.1.1-gtk-tooltip.patch |
133 |
=================================================================== |
134 |
--- lib/matplotlib/backends/backend_gtk.py 2010/02/18 14:54:30 8141 |
135 |
+++ lib/matplotlib/backends/backend_gtk.py 2010/03/20 22:49:25 8203 |
136 |
@@ -17,6 +17,8 @@ |
137 |
% (gtk.pygtk_version + pygtk_version_required)) |
138 |
del pygtk_version_required |
139 |
|
140 |
+_new_tooltip_api = (gtk.pygtk_version[1] >= 12) |
141 |
+ |
142 |
import matplotlib |
143 |
from matplotlib import verbose |
144 |
from matplotlib._pylab_helpers import Gcf |
145 |
@@ -448,7 +450,7 @@ |
146 |
# diong a blanket catch here, but an not sure what a |
147 |
# better way is - JDH |
148 |
verbose.report('Could not load matplotlib icon: %s' % sys.exc_info()[1]) |
149 |
- |
150 |
+ |
151 |
self.vbox = gtk.VBox() |
152 |
self.window.add(self.vbox) |
153 |
self.vbox.show() |
154 |
@@ -618,7 +620,8 @@ |
155 |
|
156 |
def _init_toolbar2_4(self): |
157 |
basedir = os.path.join(matplotlib.rcParams['datapath'],'images') |
158 |
- self.tooltips = gtk.Tooltips() |
159 |
+ if not _new_tooltip_api: |
160 |
+ self.tooltips = gtk.Tooltips() |
161 |
|
162 |
for text, tooltip_text, image_file, callback in self.toolitems: |
163 |
if text is None: |
164 |
@@ -630,7 +633,10 @@ |
165 |
tbutton = gtk.ToolButton(image, text) |
166 |
self.insert(tbutton, -1) |
167 |
tbutton.connect('clicked', getattr(self, callback)) |
168 |
- tbutton.set_tooltip(self.tooltips, tooltip_text, 'Private') |
169 |
+ if _new_tooltip_api: |
170 |
+ tbutton.set_tooltip_text(tooltip_text) |
171 |
+ else: |
172 |
+ tbutton.set_tooltip(self.tooltips, tooltip_text, 'Private') |
173 |
|
174 |
toolitem = gtk.SeparatorToolItem() |
175 |
self.insert(toolitem, -1) |
176 |
@@ -760,7 +766,8 @@ |
177 |
def _create_toolitems_2_4(self): |
178 |
# use the GTK+ 2.4 GtkToolbar API |
179 |
iconSize = gtk.ICON_SIZE_SMALL_TOOLBAR |
180 |
- self.tooltips = gtk.Tooltips() |
181 |
+ if not _new_tooltip_api: |
182 |
+ self.tooltips = gtk.Tooltips() |
183 |
|
184 |
for text, tooltip_text, image_num, callback, callback_arg, scroll \ |
185 |
in self.toolitems: |
186 |
@@ -778,15 +785,22 @@ |
187 |
tbutton.connect('clicked', getattr(self, callback)) |
188 |
if scroll: |
189 |
tbutton.connect('scroll_event', getattr(self, callback)) |
190 |
- tbutton.set_tooltip(self.tooltips, tooltip_text, 'Private') |
191 |
+ if _new_tooltip_api: |
192 |
+ tbutton.set_tooltip_text(tooltip_text) |
193 |
+ else: |
194 |
+ tbutton.set_tooltip(self.tooltips, tooltip_text, 'Private') |
195 |
|
196 |
# Axes toolitem, is empty at start, update() adds a menu if >=2 axes |
197 |
self.axes_toolitem = gtk.ToolItem() |
198 |
self.insert(self.axes_toolitem, 0) |
199 |
- self.axes_toolitem.set_tooltip ( |
200 |
- self.tooltips, |
201 |
- tip_text='Select axes that controls affect', |
202 |
- tip_private = 'Private') |
203 |
+ if _new_tooltip_api: |
204 |
+ self.axes_toolitem.set_tooltip_text( |
205 |
+ 'Select axes that controls affect') |
206 |
+ else: |
207 |
+ self.axes_toolitem.set_tooltip ( |
208 |
+ self.tooltips, |
209 |
+ tip_text='Select axes that controls affect', |
210 |
+ tip_private = 'Private') |
211 |
|
212 |
align = gtk.Alignment (xalign=0.5, yalign=0.5, xscale=0.0, yscale=0.0) |
213 |
self.axes_toolitem.add(align) |