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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu May 22 21:58:12 2008 UTC (6 years, 7 months ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +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.91.1.ebuild,v 1.1 2007/12/07 11:29:28 bicatali Exp $
4
5 NEED_PYTHON=2.3
6
7 inherit distutils
8
9 DOC_PV=${PV}
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="cairo doc examples fltk gtk latex qt3 qt4 tk wxwindows"
17 SLOT="0"
18 KEYWORDS="~amd64 ~x86"
19 LICENSE="PYTHON BSD stix bakoma"
20
21 DEPEND="dev-python/numpy
22 >=media-libs/freetype-2
23 media-libs/libpng
24 dev-python/pytz
25 dev-python/python-dateutil
26 gtk? ( dev-python/pygtk )
27 wxwindows? ( dev-python/wxpython )"
28
29 RDEPEND="${DEPEND}
30 media-fonts/ttf-bitstream-vera
31 latex? ( virtual/latex-base
32 virtual/ghostscript
33 app-text/dvipng
34 app-text/poppler )
35 cairo? ( dev-python/pycairo )
36 fltk? ( dev-python/pyfltk )
37 qt3? ( dev-python/PyQt )
38 qt4? ( dev-python/PyQt4 )"
39
40 DOCS="INTERACTIVE API_CHANGES"
41
42 pkg_setup() {
43 use tk && distutils_python_tkinter
44 }
45
46 use_setup() {
47 local uword="${2}"
48 [ -z "${2}" ] && uword="${1}"
49 if use ${1}; then
50 echo "${uword} = True"
51 echo "${uword}agg = True"
52 else
53 echo "${uword} = False"
54 echo "${uword}agg = False"
55 fi
56 }
57
58 src_unpack() {
59 unpack ${A}
60 cd "${S}"
61
62 # create setup.cfg (see setup.cfg.template for any changes)
63 {
64 echo "[provide_packages]"
65 echo "pytz = False"
66 echo "dateutil = False"
67 echo "configobj = False"
68 echo "enthought.traits = False"
69 echo "[gui_support]"
70 use_setup gtk
71 use_setup tk
72 use_setup wxwindows wx
73 use_setup qt3 qt
74 use_setup qt4
75 use_setup fltk
76 use_setup cairo
77 } > setup.cfg
78
79 # sed to avoid checks needing a X display
80 sed -i \
81 -e "s/check_for_gtk()/$(use gtk && echo True || echo False)/" \
82 -e "s/check_for_tk()/$(use tk && echo True || echo False)/" \
83 setup.py || die "sed setup.py failed"
84
85 # respect FHS: put mpl-data in /usr/share/matplotlib
86 # and config files in /etc/matplotlib
87 sed -i \
88 -e "/'mpl-data\/matplotlibrc',/d" \
89 -e "/'mpl-data\/matplotlib.conf',/d" \
90 -e "s:'lib/matplotlib/mpl-data/matplotlibrc':'matplotlibrc':" \
91 -e "s:'lib/matplotlib/mpl-data/matplotlib.conf':'matplotlib.conf':" \
92 setup.py \
93 || die "sed setup.py for FHS failed"
94
95 sed -i \
96 -e "s:path = get_data_path():path = '/etc/matplotlib':" \
97 -e "s:os.path.dirname(__file__):'/usr/share/${PN}':g" \
98 lib/matplotlib/{__init__,config/cutils}.py \
99 || die "sed init for FHS failed"
100
101 # cleaning and remove vera fonts (they are now a dependency)
102 find -name .cvsignore -exec rm -rf {} \;
103 cd lib/matplotlib/mpl-data
104 rm -f ttf/Vera*.ttf ttf/*.TXT ttf/local.conf pdfcorefonts/readme.txt
105 }
106
107 src_install() {
108 distutils_src_install
109
110 # respect FHS
111 dodir /usr/share/${PN}
112 mv "${D}"/usr/*/*/site-packages/${PN}/{mpl-data,backends/Matplotlib.nib} "${D}"/usr/share/${PN}
113
114 insinto /etc/matplotlib
115 doins matplotlibrc matplotlib.conf \
116 || die "installing config files failed"
117
118 insinto /usr/share/doc/${PF}
119 use doc && doins "${DISTDIR}"/users_guide_${DOC_PV}.pdf
120 use examples && doins -r examples
121 }

  ViewVC Help
Powered by ViewVC 1.1.20