1 |
bicatali 11/02/24 04:49:20 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: matplotlib-1.0.1-r1.ebuild |
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.101 dev-python/matplotlib/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/ChangeLog?rev=1.101&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/ChangeLog?rev=1.101&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/ChangeLog?r1=1.100&r2=1.101 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/dev-python/matplotlib/ChangeLog,v |
20 |
retrieving revision 1.100 |
21 |
retrieving revision 1.101 |
22 |
diff -u -r1.100 -r1.101 |
23 |
--- ChangeLog 11 Feb 2011 19:37:00 -0000 1.100 |
24 |
+++ ChangeLog 24 Feb 2011 04:49:20 -0000 1.101 |
25 |
@@ -1,6 +1,15 @@ |
26 |
# ChangeLog for dev-python/matplotlib |
27 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/ChangeLog,v 1.100 2011/02/11 19:37:00 hwoarang Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/ChangeLog,v 1.101 2011/02/24 04:49:20 bicatali Exp $ |
30 |
+ |
31 |
+*matplotlib-1.0.1-r1 (24 Feb 2011) |
32 |
+ |
33 |
+ 24 Feb 2011; Sébastien Fabbro <bicatali@g.o> |
34 |
+ +matplotlib-1.0.1-r1.ebuild, +files/matplotlib-1.0.1-libpng15.patch, |
35 |
+ +files/matplotlib-1.0.1-sphinx.patch: |
36 |
+ Fixed for libpng-1.5, thanks Rafał Mużyło, bug #354551. Fixed missing |
37 |
+ fonts, bug #334429, thanks François Bissey. Tentative work to get the |
38 |
+ documentation building working. Added missing sample data. |
39 |
|
40 |
11 Feb 2011; Markos Chandras <hwoarang@g.o> matplotlib-1.0.1.ebuild: |
41 |
Stable on amd64 wrt bug #353856 |
42 |
|
43 |
|
44 |
|
45 |
1.1 dev-python/matplotlib/matplotlib-1.0.1-r1.ebuild |
46 |
|
47 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/matplotlib-1.0.1-r1.ebuild?rev=1.1&view=markup |
48 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/matplotlib-1.0.1-r1.ebuild?rev=1.1&content-type=text/plain |
49 |
|
50 |
Index: matplotlib-1.0.1-r1.ebuild |
51 |
=================================================================== |
52 |
# Copyright 1999-2011 Gentoo Foundation |
53 |
# Distributed under the terms of the GNU General Public License v2 |
54 |
# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/matplotlib-1.0.1-r1.ebuild,v 1.1 2011/02/24 04:49:20 bicatali Exp $ |
55 |
|
56 |
EAPI="3" |
57 |
PYTHON_DEPEND="2" |
58 |
PYTHON_USE_WITH="tk" |
59 |
PYTHON_USE_WITH_OPT="tk" |
60 |
SUPPORT_PYTHON_ABIS="1" |
61 |
RESTRICT_PYTHON_ABIS="3.* *-jython" |
62 |
WX_GTK_VER="2.8" |
63 |
|
64 |
inherit distutils eutils |
65 |
|
66 |
DESCRIPTION="Pure python plotting library with matlab like syntax" |
67 |
HOMEPAGE="http://matplotlib.sourceforge.net/ http://pypi.python.org/pypi/matplotlib" |
68 |
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz |
69 |
doc? ( mirror://gentoo/${PN}-sampledata.tar.bz2 ) |
70 |
examples? ( mirror://gentoo/${PN}-sampledata.tar.bz2 )" |
71 |
|
72 |
IUSE="cairo doc excel examples fltk gtk latex qt4 traits tk wxwidgets" |
73 |
SLOT="0" |
74 |
KEYWORDS="~amd64 ~ppc ~x86 ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
75 |
LICENSE="PYTHON BSD" |
76 |
|
77 |
CDEPEND="dev-python/numpy |
78 |
dev-python/python-dateutil |
79 |
dev-python/pytz |
80 |
media-libs/freetype:2 |
81 |
media-libs/libpng |
82 |
gtk? ( dev-python/pygtk ) |
83 |
wxwidgets? ( dev-python/wxpython:2.8 )" |
84 |
|
85 |
DEPEND="${CDEPEND} |
86 |
dev-python/pycxx |
87 |
dev-util/pkgconfig |
88 |
doc? ( |
89 |
app-text/dvipng |
90 |
dev-python/imaging |
91 |
dev-python/ipython |
92 |
dev-python/xlwt |
93 |
dev-python/sphinx |
94 |
media-gfx/graphviz[cairo] |
95 |
|| ( |
96 |
( |
97 |
dev-texlive/texlive-latexextra |
98 |
dev-texlive/texlive-fontsrecommended |
99 |
dev-texlive/texlive-latexrecommended |
100 |
) |
101 |
( |
102 |
app-text/ptex |
103 |
dev-tex/latex-unicode |
104 |
) |
105 |
) |
106 |
)" |
107 |
|
108 |
RDEPEND="${CDEPEND} |
109 |
virtual/ttf-fonts |
110 |
media-fonts/stix-fonts |
111 |
media-fonts/texcm-ttf |
112 |
dev-python/pyparsing |
113 |
cairo? ( dev-python/pycairo ) |
114 |
excel? ( dev-python/xlwt ) |
115 |
fltk? ( dev-python/pyfltk ) |
116 |
qt4? ( dev-python/PyQt4[X] ) |
117 |
traits? ( dev-python/traits dev-python/configobj ) |
118 |
latex? ( |
119 |
virtual/latex-base |
120 |
app-text/ghostscript-gpl |
121 |
app-text/dvipng |
122 |
app-text/poppler[utils] |
123 |
|| ( |
124 |
dev-texlive/texlive-fontsrecommended |
125 |
app-text/ptex |
126 |
) |
127 |
)" |
128 |
|
129 |
PYTHON_CFLAGS=("2.* + -fno-strict-aliasing") |
130 |
PYTHON_CXXFLAGS=("2.* + -fno-strict-aliasing") |
131 |
|
132 |
DOCS="INTERACTIVE" |
133 |
PYTHON_MODNAME="matplotlib mpl_toolkits pylab.py" |
134 |
|
135 |
use_setup() { |
136 |
local uword="${2}" |
137 |
[[ -z "${2}" ]] && uword="${1}" |
138 |
if use ${1}; then |
139 |
echo "${uword} = True" |
140 |
echo "${uword}agg = True" |
141 |
else |
142 |
echo "${uword} = False" |
143 |
echo "${uword}agg = False" |
144 |
fi |
145 |
} |
146 |
|
147 |
src_prepare() { |
148 |
# create setup.cfg (see setup.cfg.template for any changes) |
149 |
cat > setup.cfg <<-EOF |
150 |
[provide_packages] |
151 |
pytz = False |
152 |
dateutil = False |
153 |
configobj = False |
154 |
enthought.traits = False |
155 |
[gui_support] |
156 |
$(use_setup gtk) |
157 |
$(use_setup tk) |
158 |
$(use_setup wxwidgets wx) |
159 |
$(use_setup qt4) |
160 |
$(use_setup fltk) |
161 |
$(use_setup cairo) |
162 |
EOF |
163 |
|
164 |
# avoid checks needing a X display |
165 |
sed -i \ |
166 |
-e "s/check_for_gtk()/$(use gtk && echo True || echo False)/" \ |
167 |
-e "s/check_for_tk()/$(use tk && echo True || echo False)/" \ |
168 |
setup.py || die "sed setup.py failed" |
169 |
|
170 |
# respect FHS: |
171 |
# - mpl-data in /usr/share/matplotlib |
172 |
# - config files in /etc/matplotlib |
173 |
sed -i \ |
174 |
-e "/'mpl-data\/matplotlibrc',/d" \ |
175 |
-e "/'mpl-data\/matplotlib.conf',/d" \ |
176 |
-e "s:'lib/matplotlib/mpl-data/matplotlibrc':'matplotlibrc':" \ |
177 |
-e "s:'lib/matplotlib/mpl-data/matplotlib.conf':'matplotlib.conf':" \ |
178 |
setup.py \ |
179 |
|| die "sed setup.py for FHS failed" |
180 |
|
181 |
# remove internal copies of pycxx, pyparsing |
182 |
rm -rf CXX lib/matplotlib/pyparsing.py \ |
183 |
|| die "removed internal copies failed" |
184 |
|
185 |
# bug #334429 - also see https://developer.mozilla.org/en/Mozilla_MathML_Project/Fonts |
186 |
# which advise against bakoma fonts |
187 |
sed -i \ |
188 |
-e '/fontset/s/cm/stix/' \ |
189 |
lib/matplotlib/mpl-data/matplotlib.conf || die |
190 |
|
191 |
sed -i \ |
192 |
-e 's/matplotlib.pyparsing/pyparsing/g' \ |
193 |
lib/matplotlib/{mathtext,fontconfig_pattern}.py \ |
194 |
|| die "sed pyparsing failed" |
195 |
|
196 |
# some fixes to avoid fetching data while compiling examples in tests |
197 |
mv "${WORKDIR}"/sample_data examples/ |
198 |
echo "examples.download : False" >> doc/matplotlibrc |
199 |
echo "examples.directory : ${S}/examples/sample_data" >> doc/matplotlibrc |
200 |
echo "examples.download : False" >> matplotlibrc.template |
201 |
echo "examples.directory : ${EPREFIX}/usr/share/${PF}/examples/sample_data" >> matplotlibrc.template |
202 |
|
203 |
epatch "${FILESDIR}"/${P}-libpng15.patch |
204 |
epatch "${FILESDIR}"/${P}-sphinx.patch |
205 |
} |
206 |
|
207 |
src_compile() { |
208 |
unset DISPLAY # bug #278524 |
209 |
distutils_src_compile_pre_hook() { |
210 |
ln -fs "${EPREFIX}/usr/share/python$(python_get_version)/CXX" . |
211 |
} |
212 |
distutils_src_compile |
213 |
|
214 |
if use doc; then |
215 |
cd "${S}/doc" |
216 |
export VARTEXFONTS="${T}"/fonts |
217 |
MATPLOTLIBDATA="${S}/lib/matplotlib/mpl-data" \ |
218 |
PYTHONPATH=$(ls -d "${S}"/build-$(PYTHON -f --ABI)/lib*) \ |
219 |
"$(PYTHON -f)" make.py --small all |
220 |
[[ -e build/latex/Matplotlib.pdf ]] || die "doc generation failed" |
221 |
fi |
222 |
} |
223 |
|
224 |
src_test() { |
225 |
# if doc were enabled, all examples were built and tested |
226 |
use doc && return |
227 |
einfo "Tests are quite long, be patient" |
228 |
cd "${S}/examples/tests" |
229 |
testing() { |
230 |
PYTHONPATH=$(ls -d "${S}"/build-${PYTHON_ABI}/lib*) "$(PYTHON)" backend_driver.py agg || return 1 |
231 |
PYTHONPATH=$(ls -d "${S}"/build-${PYTHON_ABI}/lib*) "$(PYTHON)" backend_driver.py --clean |
232 |
} |
233 |
python_execute_function testing |
234 |
} |
235 |
|
236 |
src_install() { |
237 |
# remove fonts bundles except some computer modern ones |
238 |
rm lib/matplotlib/mpl-data/fonts/ttf/cm{ex,mi,r,sy}10.ttf |
239 |
rm lib/matplotlib/mpl-data/fonts/ttf/{Vera*,*.TXT} |
240 |
rm lib/matplotlib/mpl-data/fonts/{afm,pdfcorefonts} |
241 |
|
242 |
# sed only after doc building, to allow using default configs |
243 |
sed -i \ |
244 |
-e "s:path = get_data_path():path = '${EPREFIX}/etc/matplotlib':" \ |
245 |
-e "s:os.path.dirname(__file__):'${EPREFIX}/usr/share/${PN}':g" \ |
246 |
build-*/lib*/matplotlib/__init__.py \ |
247 |
|| die "sed init for FHS failed" |
248 |
distutils_src_install |
249 |
|
250 |
# Respect FHS |
251 |
dodir /usr/share/${PN} |
252 |
mv "${ED}$(python_get_sitedir -f)/${PN}/"{mpl-data,backends/Matplotlib.nib} \ |
253 |
"${ED}usr/share/${PN}" || die "Renaming failed" |
254 |
rm -fr "${ED}"usr/lib*/python*/site-packages/${PN}/{mpl-data,backends/Matplotlib.nib} |
255 |
|
256 |
insinto /etc/matplotlib |
257 |
doins matplotlibrc matplotlib.conf || die "installing config files failed" |
258 |
|
259 |
# doc and examples |
260 |
insinto /usr/share/doc/${PF} |
261 |
if use doc; then |
262 |
doins doc/build/latex/Matplotlib.pdf || die |
263 |
doins -r doc/build/html || die |
264 |
fi |
265 |
if use examples; then |
266 |
doins -r examples || die |
267 |
fi |
268 |
} |