/[gentoo-x86]/dev-python/matplotlib/matplotlib-0.90.1.ebuild
Gentoo

Contents of /dev-python/matplotlib/matplotlib-0.90.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations) (download)
Thu May 22 21:58:12 2008 UTC (6 years, 2 months ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
Changes since 1.10: +1 -1 lines
FILE REMOVED
Removed old versions which where depending on obsoleted numarray/numeric
(Portage version: 2.1.5.2)

1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/matplotlib-0.90.1.ebuild,v 1.10 2007/12/16 10:28:58 drac Exp $
4
5 NEED_PYTHON=2.3
6
7 inherit distutils
8
9 DOC_PV=0.90.0
10
11 DESCRIPTION="Pure python plotting library with matlab like syntax"
12 HOMEPAGE="http://matplotlib.sourceforge.net/"
13 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
14 doc? ( http://matplotlib.sourceforge.net/users_guide_${DOC_PV}.pdf )"
15
16 IUSE="doc examples gtk latex tk"
17 SLOT="0"
18 KEYWORDS="amd64 ppc x86"
19 LICENSE="PYTHON"
20
21 DEPEND="|| (
22 >=dev-python/numpy-1.0
23 dev-python/numarray
24 >=dev-python/numeric-23
25 )
26 >=media-libs/freetype-2.1.7
27 media-libs/libpng
28 sys-libs/zlib
29 gtk? ( >=dev-python/pygtk-2.2 )
30 dev-python/pytz
31 dev-python/python-dateutil"
32
33 RDEPEND="${DEPEND}
34 latex? ( virtual/latex-base
35 virtual/ghostscript
36 app-text/dvipng )
37 media-fonts/ttf-bitstream-vera"
38
39 DOCS="INTERACTIVE API_CHANGES NUMARRAY_ISSUES"
40
41 pkg_setup() {
42 use tk && distutils_python_tkinter
43 }
44
45 src_unpack() {
46 unpack ${A}
47
48 cd "${S}"
49
50 # disable autodetection (use flags) and install data files
51 epatch "${FILESDIR}"/${P}-setup.patch
52 sed -i \
53 -e "/^BUILD_GTK/s/'auto'/$(use gtk && echo 1 || echo 0)/g" \
54 -e "/^BUILD_WX/s/'auto'/0/g" \
55 -e "/^BUILD_TK/s/'auto'/$(use tk && echo 1 || echo 0)/g" \
56 setup.py || die "sed autodetection failed"
57
58 # default matplotlibrc in /etc
59 sed -i \
60 -e '/mpl-data\/matplotlibrc/d' \
61 setup.py || die "sed matplotlibrc failed"
62 sed -i \
63 -e "s:path = get_data_path():path = '/etc':" \
64 lib/matplotlib/__init__.py || die "sed init failed"
65
66 # cleaning and remove vera fonts (they are now a dependency)
67 find -name .cvsignore -exec rm -rf {} \;
68 rm -f lib/matplotlib/mpl-data/fonts/ttf/Vera*.ttf
69
70 }
71
72 src_install() {
73 distutils_src_install
74
75 # default to gtk backend if both gtk and tk are selected
76 if use gtk && use tk; then
77 sed -i \
78 -e '/^backend/s/TkAgg/GTKAgg/' \
79 lib/matplotlib/mpl-data/matplotlibrc || die "sed backend failed"
80 fi
81 insinto /etc
82 doins lib/matplotlib/mpl-data/matplotlibrc || die "installing matplotlibrc failed"
83
84 insinto /usr/share/doc/${PF}
85 use doc && doins "${DISTDIR}"/users_guide_${DOC_PV}.pdf
86 use examples && doins -r examples
87 }

  ViewVC Help
Powered by ViewVC 1.1.20