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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Sun Nov 8 20:23:26 2009 UTC (4 years, 8 months ago) by arfrever
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +1 -1 lines
FILE REMOVED
Delete older ebuilds.

1 # Copyright 1999-2009 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.91.2.ebuild,v 1.8 2009/03/30 15:32:32 loki_val Exp $
4
5 NEED_PYTHON=2.3
6 WX_GTK_VER=2.8
7 EAPI=2
8 inherit eutils distutils wxwidgets
9
10 DOC_PV=${PV}svn
11
12 DESCRIPTION="Pure python plotting library with matlab like syntax"
13 HOMEPAGE="http://matplotlib.sourceforge.net/"
14 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
15 doc? ( http://matplotlib.sourceforge.net/users_guide_${DOC_PV}.pdf )"
16
17 IUSE="cairo doc examples fltk gtk latex qt3 qt4 tk wxwindows"
18 SLOT="0"
19 KEYWORDS="amd64 ppc x86"
20 LICENSE="PYTHON BSD stix bakoma"
21
22 DEPEND="dev-python/numpy
23 >=media-libs/freetype-2
24 media-libs/libpng
25 dev-python/pytz
26 dev-python/python-dateutil
27 gtk? ( dev-python/pygtk )
28 tk? ( dev-lang/python[tk] )
29 wxwindows? ( dev-python/wxpython:2.8 )"
30
31 RDEPEND="${DEPEND}
32 media-fonts/ttf-bitstream-vera
33 latex? ( virtual/latex-base
34 virtual/ghostscript
35 app-text/dvipng
36 virtual/poppler-utils )
37 cairo? ( dev-python/pycairo )
38 fltk? ( dev-python/pyfltk )
39 qt3? ( dev-python/PyQt )
40 qt4? ( dev-python/PyQt4 )"
41
42 DOCS="INTERACTIVE API_CHANGES"
43
44 use_setup() {
45 local uword="${2}"
46 [ -z "${2}" ] && uword="${1}"
47 if use ${1}; then
48 echo "${uword} = True"
49 echo "${uword}agg = True"
50 else
51 echo "${uword} = False"
52 echo "${uword}agg = False"
53 fi
54 }
55
56 src_prepare() {
57 epatch "${FILESDIR}"/${P}-gcc43.patch
58 # create setup.cfg (see setup.cfg.template for any changes)
59 cat > setup.cfg <<-EOF
60 [provide_packages]
61 pytz = False
62 dateutil = False
63 configobj = False
64 enthought.traits = False
65 [gui_support]
66 $(use_setup gtk)
67 $(use_setup tk)
68 $(use_setup wxwindows wx)
69 $(use_setup qt3 qt)
70 $(use_setup qt4)
71 $(use_setup fltk)
72 $(use_setup cairo)
73 EOF
74
75 # sed to avoid checks needing a X display
76 sed -i \
77 -e "s/check_for_gtk()/$(use gtk && echo True || echo False)/" \
78 -e "s/check_for_tk()/$(use tk && echo True || echo False)/" \
79 setup.py || die "sed setup.py failed"
80
81 # respect FHS: put mpl-data in /usr/share/matplotlib
82 # and config files in /etc/matplotlib
83 sed -i \
84 -e "/'mpl-data\/matplotlibrc',/d" \
85 -e "/'mpl-data\/matplotlib.conf',/d" \
86 -e "s:'lib/matplotlib/mpl-data/matplotlibrc':'matplotlibrc':" \
87 -e "s:'lib/matplotlib/mpl-data/matplotlib.conf':'matplotlib.conf':" \
88 setup.py \
89 || die "sed setup.py for FHS failed"
90
91 sed -i \
92 -e "s:path = get_data_path():path = '/etc/matplotlib':" \
93 -e "s:os.path.dirname(__file__):'/usr/share/${PN}':g" \
94 lib/matplotlib/{__init__,config/cutils}.py \
95 || die "sed init for FHS failed"
96
97 # remove vera fonts (they are now a dependency)
98 cd lib/matplotlib/mpl-data
99 rm -f ttf/Vera*.ttf ttf/*.TXT ttf/local.conf pdfcorefonts/readme.txt
100 }
101
102 src_install() {
103 distutils_src_install
104
105 # respect FHS
106 dodir /usr/share/${PN}
107 mv "${D}"/usr/*/*/site-packages/${PN}/{mpl-data,backends/Matplotlib.nib} "${D}"/usr/share/${PN}
108
109 insinto /etc/matplotlib
110 doins matplotlibrc matplotlib.conf \
111 || die "installing config files failed"
112
113 insinto /usr/share/doc/${PF}
114 use doc && newins "${DISTDIR}"/users_guide_${DOC_PV}.pdf ${P}-users-guide.pdf
115 use examples && doins -r examples
116 }

  ViewVC Help
Powered by ViewVC 1.1.20