1 |
bicatali 10/05/31 20:23:17 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: matplotlib-0.99.1.1-r2.ebuild |
5 |
Log: |
6 |
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 |
7 |
(Portage version: 2.2_rc67/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.87 dev-python/matplotlib/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/ChangeLog?rev=1.87&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/ChangeLog?rev=1.87&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/ChangeLog?r1=1.86&r2=1.87 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/dev-python/matplotlib/ChangeLog,v |
19 |
retrieving revision 1.86 |
20 |
retrieving revision 1.87 |
21 |
diff -u -r1.86 -r1.87 |
22 |
--- ChangeLog 30 May 2010 16:32:31 -0000 1.86 |
23 |
+++ ChangeLog 31 May 2010 20:23:16 -0000 1.87 |
24 |
@@ -1,6 +1,17 @@ |
25 |
# ChangeLog for dev-python/matplotlib |
26 |
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/ChangeLog,v 1.86 2010/05/30 16:32:31 phajdan.jr Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/ChangeLog,v 1.87 2010/05/31 20:23:16 bicatali Exp $ |
29 |
+ |
30 |
+*matplotlib-0.99.1.1-r2 (31 May 2010) |
31 |
+ |
32 |
+ 31 May 2010; Sébastien Fabbro <bicatali@g.o> |
33 |
+ +matplotlib-0.99.1.1-r2.ebuild, +files/matplotlib-0.99.1.1-docs.patch, |
34 |
+ +files/matplotlib-0.99.1.1-eintr.patch, |
35 |
+ +files/matplotlib-0.99.1.1-gtk-tooltip.patch, |
36 |
+ files/matplotlib-0.99.1.1-libpng14.patch: |
37 |
+ Added a few useful patches from upstream. Now use default config before |
38 |
+ documentation generation (fix bug #307881). Cleaning some dependencies, |
39 |
+ and allow png-1.4 patch to work with previous versions too |
40 |
|
41 |
30 May 2010; Pawel Hajdan jr <phajdan.jr@g.o> |
42 |
matplotlib-0.99.1.1-r1.ebuild: |
43 |
|
44 |
|
45 |
|
46 |
1.1 dev-python/matplotlib/matplotlib-0.99.1.1-r2.ebuild |
47 |
|
48 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/matplotlib-0.99.1.1-r2.ebuild?rev=1.1&view=markup |
49 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/matplotlib/matplotlib-0.99.1.1-r2.ebuild?rev=1.1&content-type=text/plain |
50 |
|
51 |
Index: matplotlib-0.99.1.1-r2.ebuild |
52 |
=================================================================== |
53 |
# Copyright 1999-2010 Gentoo Foundation |
54 |
# Distributed under the terms of the GNU General Public License v2 |
55 |
# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/matplotlib-0.99.1.1-r2.ebuild,v 1.1 2010/05/31 20:23:16 bicatali Exp $ |
56 |
|
57 |
EAPI="2" |
58 |
PYTHON_DEPEND="2" |
59 |
SUPPORT_PYTHON_ABIS="1" |
60 |
WX_GTK_VER="2.8" |
61 |
|
62 |
inherit eutils distutils wxwidgets |
63 |
|
64 |
PDOC="users_guide_${PV}" |
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 |
|
70 |
IUSE="cairo doc excel examples fltk gtk latex qt4 traits tk wxwidgets" |
71 |
SLOT="0" |
72 |
KEYWORDS="~amd64 ~ppc ~x86 ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
73 |
LICENSE="PYTHON BSD" |
74 |
|
75 |
CDEPEND="dev-python/numpy |
76 |
dev-python/python-dateutil |
77 |
dev-python/pytz |
78 |
media-libs/freetype:2 |
79 |
media-libs/libpng |
80 |
gtk? ( dev-python/pygtk ) |
81 |
tk? ( dev-lang/python[tk] ) |
82 |
wxwidgets? ( dev-python/wxpython:2.8 )" |
83 |
|
84 |
DEPEND="${CDEPEND} |
85 |
dev-python/pycxx |
86 |
dev-util/pkgconfig |
87 |
doc? ( |
88 |
dev-python/sphinx |
89 |
media-gfx/graphviz[cairo] |
90 |
|| ( ( dev-texlive/texlive-latexextra |
91 |
dev-texlive/texlive-fontsrecommended |
92 |
dev-texlive/texlive-latexrecommended ) |
93 |
( app-text/ptex dev-tex/latex-unicode ) ) |
94 |
app-text/dvipng |
95 |
dev-python/imaging |
96 |
dev-python/ipython |
97 |
excel? ( dev-python/xlwt ) )" |
98 |
|
99 |
RDEPEND="${CDEPEND} |
100 |
virtual/ttf-fonts |
101 |
media-fonts/texcm-ttf |
102 |
dev-python/pyparsing |
103 |
cairo? ( dev-python/pycairo ) |
104 |
excel? ( dev-python/xlwt ) |
105 |
fltk? ( dev-python/pyfltk ) |
106 |
qt4? ( dev-python/PyQt4[X] ) |
107 |
traits? ( dev-python/traits dev-python/configobj ) |
108 |
latex? ( |
109 |
virtual/latex-base |
110 |
app-text/ghostscript-gpl |
111 |
app-text/dvipng |
112 |
app-text/poppler[utils] |
113 |
|| ( dev-texlive/texlive-fontsrecommended |
114 |
app-text/ptex ) )" |
115 |
RESTRICT_PYTHON_ABIS="3.*" |
116 |
|
117 |
DOCS="INTERACTIVE" |
118 |
|
119 |
use_setup() { |
120 |
local uword="${2}" |
121 |
[ -z "${2}" ] && uword="${1}" |
122 |
if use ${1}; then |
123 |
echo "${uword} = True" |
124 |
echo "${uword}agg = True" |
125 |
else |
126 |
echo "${uword} = False" |
127 |
echo "${uword}agg = False" |
128 |
fi |
129 |
} |
130 |
|
131 |
src_prepare() { |
132 |
# avoid to launch xv while building examples docs |
133 |
epatch "${FILESDIR}"/${PN}-0.98.5.2-no-xv.patch |
134 |
|
135 |
# removes hardcoded lib paths, should not break non-Prefix, more |
136 |
# likely to fix it in case of multilib |
137 |
epatch "${FILESDIR}"/${P}-prefix.patch |
138 |
epatch "${FILESDIR}"/${PN}-0.99.0-freebsd7+.patch |
139 |
|
140 |
# support libpng-1.4 (from upstream svn) |
141 |
epatch "${FILESDIR}"/${P}-libpng14.patch |
142 |
# allow better small docs (from upstream svn) |
143 |
epatch "${FILESDIR}"/${P}-docs.patch |
144 |
# allow compatibility with pygtk-2.12 tooltop (from upstream svn) |
145 |
epatch "${FILESDIR}"/${P}-gtk-tooltip.patch |
146 |
# some font stuff (from upstream svn) |
147 |
epatch "${FILESDIR}"/${P}-eintr.patch |
148 |
|
149 |
# create setup.cfg (see setup.cfg.template for any changes) |
150 |
cat > setup.cfg <<-EOF |
151 |
[provide_packages] |
152 |
pytz = False |
153 |
dateutil = False |
154 |
configobj = False |
155 |
enthought.traits = False |
156 |
[gui_support] |
157 |
$(use_setup gtk) |
158 |
$(use_setup tk) |
159 |
$(use_setup wxwidgets wx) |
160 |
$(use_setup qt4) |
161 |
$(use_setup fltk) |
162 |
$(use_setup cairo) |
163 |
EOF |
164 |
|
165 |
# avoid checks needing a X display |
166 |
sed -i \ |
167 |
-e "s/check_for_gtk()/$(use gtk && echo True || echo False)/" \ |
168 |
-e "s/check_for_tk()/$(use tk && echo True || echo False)/" \ |
169 |
setup.py || die "sed setup.py failed" |
170 |
|
171 |
# respect FHS: |
172 |
# - mpl-data in /usr/share/matplotlib |
173 |
# - config files in /etc/matplotlib |
174 |
sed -i \ |
175 |
-e "/'mpl-data\/matplotlibrc',/d" \ |
176 |
-e "/'mpl-data\/matplotlib.conf',/d" \ |
177 |
-e "s:'lib/matplotlib/mpl-data/matplotlibrc':'matplotlibrc':" \ |
178 |
-e "s:'lib/matplotlib/mpl-data/matplotlib.conf':'matplotlib.conf':" \ |
179 |
setup.py \ |
180 |
|| die "sed setup.py for FHS failed" |
181 |
|
182 |
# remove internal copies of fonts, pycxx, pyparsing |
183 |
rm -rf \ |
184 |
CXX \ |
185 |
lib/matplotlib/mpl-data/fonts/{afm,pdfcorefonts} \ |
186 |
lib/matplotlib/mpl-data/fonts/ttf/{Vera*,cm*,*.TXT} \ |
187 |
lib/matplotlib/pyparsing.py \ |
188 |
|| die "removed internal copies failed" |
189 |
|
190 |
sed -i \ |
191 |
-e 's/matplotlib.pyparsing/pyparsing/g' \ |
192 |
lib/matplotlib/{mathtext,fontconfig_pattern}.py \ |
193 |
|| die "sed pyparsing failed" |
194 |
} |
195 |
|
196 |
src_compile() { |
197 |
unset DISPLAY # bug #278524 |
198 |
|
199 |
distutils_src_compile_pre_hook() { |
200 |
ln -fs "${EPREFIX}/usr/share/python$(python_get_version)/CXX" . |
201 |
} |
202 |
distutils_src_compile |
203 |
|
204 |
if use doc; then |
205 |
cd "${S}/doc" |
206 |
export VARTEXFONTS="${T}"/fonts |
207 |
MATPLOTLIBDATA="${S}/lib/matplotlib/mpl-data" \ |
208 |
PYTHONPATH=$(ls -d "${S}"/build-$(PYTHON -f --ABI)/lib*) \ |
209 |
"$(PYTHON -f)" make.py --small all |
210 |
MATPLOTLIBDATA="${S}/lib/matplotlib/mpl-data" \ |
211 |
PYTHONPATH=$(ls -d "${S}"/build-$(PYTHON -f --ABI)/lib*) \ |
212 |
"$(PYTHON -f)" make.py --small all |
213 |
[[ -e build/latex/Matplotlib.pdf ]] && die "doc generation failed" |
214 |
fi |
215 |
} |
216 |
|
217 |
src_test() { |
218 |
# if doc were enabled, all examples were built and tested |
219 |
use doc && return |
220 |
einfo "Tests are quite long, be patient" |
221 |
cd "${S}/examples/tests" |
222 |
testing() { |
223 |
PYTHONPATH=$(ls -d "${S}"/build-${PYTHON_ABI}/lib*) "$(PYTHON)" backend_driver.py agg || return 1 |
224 |
PYTHONPATH=$(ls -d "${S}"/build-${PYTHON_ABI}/lib*) "$(PYTHON)" backend_driver.py --clean |
225 |
} |
226 |
python_execute_function testing |
227 |
} |
228 |
|
229 |
src_install() { |
230 |
# sed only after doc building, to allow using default configs |
231 |
sed -i \ |
232 |
-e "s:path = get_data_path():path = '${EPREFIX}/etc/matplotlib':" \ |
233 |
-e "s:os.path.dirname(__file__):'${EPREFIX}/usr/share/${PN}':g" \ |
234 |
build-*/lib*/matplotlib/__init__.py \ |
235 |
|| die "sed init for FHS failed" |
236 |
[[ -z ${ED} ]] && local ED="${D}" |
237 |
distutils_src_install |
238 |
|
239 |
# Respect FHS |
240 |
dodir /usr/share/${PN} |
241 |
mv "${ED}$(python_get_sitedir -f)/${PN}/"{mpl-data,backends/Matplotlib.nib} "${ED}usr/share/${PN}" || die "Renaming failed" |
242 |
rm -fr "${ED}"usr/lib*/python*/site-packages/${PN}/{mpl-data,backends/Matplotlib.nib} |
243 |
|
244 |
insinto /etc/matplotlib |
245 |
doins matplotlibrc matplotlib.conf || die "installing config files failed" |
246 |
|
247 |
# doc and examples |
248 |
insinto /usr/share/doc/${PF} |
249 |
if use doc; then |
250 |
doins doc/build/latex/Matplotlib.pdf || die |
251 |
doins -r doc/build/html || die |
252 |
fi |
253 |
if use examples; then |
254 |
doins -r examples || die |
255 |
fi |
256 |
} |