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

Contents of /dev-python/matplotlib/matplotlib-0.98.5.2-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Mon Jun 15 05:32:10 2009 UTC (5 years, 8 months ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Version bumps with fixes for bug #266612 and bug #272147
(Portage version: 2.2_rc33/cvs/Linux x86_64)

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.98.5.2-r2.ebuild,v 1.3 2009/05/30 09:07:05 ulm Exp $
4
5 WX_GTK_VER=2.8
6 EAPI=2
7 inherit distutils wxwidgets
8
9 PDOC="users_guide_${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/Matplotlib.pdf -> ${PDOC}.pdf )"
15
16 IUSE="cairo doc excel examples fltk gtk latex qt3 qt4 traits tk wxwindows"
17 SLOT="0"
18 KEYWORDS="~amd64 ~x86"
19 LICENSE="PYTHON BSD"
20
21 CDEPEND=">=dev-python/numpy-1.1
22 dev-python/python-dateutil
23 dev-python/pytz
24 media-libs/freetype:2
25 media-libs/libpng
26 gtk? ( dev-python/pygtk )
27 tk? ( dev-lang/python[tk] )
28 wxwindows? ( dev-python/wxpython:2.8 )"
29
30 DEPEND="${CDEPEND}
31 dev-python/pycxx
32 dev-util/pkgconfig"
33
34 RDEPEND="${CDEPEND}
35 >=dev-python/pyparsing-1.5.1
36 || ( media-fonts/dejavu media-fonts/ttf-bitstream-vera )
37 cairo? ( dev-python/pycairo )
38 excel? ( dev-python/xlwt )
39 fltk? ( dev-python/pyfltk )
40 qt3? ( dev-python/PyQt )
41 qt4? ( dev-python/PyQt4 )
42 traits? ( dev-python/traits dev-python/configobj )
43 latex? (
44 virtual/latex-base
45 virtual/ghostscript
46 app-text/dvipng
47 virtual/poppler-utils
48 media-fonts/stix-fonts
49 || ( dev-texlive/texlive-fontsrecommended
50 app-text/ptex ) )"
51
52 DOCS="INTERACTIVE"
53
54 use_setup() {
55 local uword="${2}"
56 [ -z "${2}" ] && uword="${1}"
57 if use ${1}; then
58 echo "${uword} = True"
59 echo "${uword}agg = True"
60 else
61 echo "${uword} = False"
62 echo "${uword}agg = False"
63 fi
64 }
65
66 src_prepare() {
67 # create setup.cfg (see setup.cfg.template for any changes)
68 cat > setup.cfg <<-EOF
69 [provide_packages]
70 pytz = False
71 dateutil = False
72 configobj = False
73 enthought.traits = False
74 [gui_support]
75 $(use_setup gtk)
76 $(use_setup tk)
77 $(use_setup wxwindows wx)
78 $(use_setup qt3 qt)
79 $(use_setup qt4)
80 $(use_setup fltk)
81 $(use_setup cairo)
82 EOF
83
84 # avoid checks needing a X display
85 sed -i \
86 -e "s/check_for_gtk()/$(use gtk && echo True || echo False)/" \
87 -e "s/check_for_tk()/$(use tk && echo True || echo False)/" \
88 setup.py || die "sed setup.py failed"
89
90 # respect FHS:
91 # - mpl-data in /usr/share/matplotlib
92 # - config files in /etc/matplotlib
93 sed -i \
94 -e "/'mpl-data\/matplotlibrc',/d" \
95 -e "/'mpl-data\/matplotlib.conf',/d" \
96 -e "s:'lib/matplotlib/mpl-data/matplotlibrc':'matplotlibrc':" \
97 -e "s:'lib/matplotlib/mpl-data/matplotlib.conf':'matplotlib.conf':" \
98 setup.py \
99 || die "sed setup.py for FHS failed"
100
101 sed -i \
102 -e "s:path = get_data_path():path = '/etc/matplotlib':" \
103 -e "s:os.path.dirname(__file__):'/usr/share/${PN}':g" \
104 lib/matplotlib/{__init__,config/cutils}.py \
105 || die "sed init for FHS failed"
106
107 # remove internal copies of fonts, pycxx, pyparsing
108 rm -rf \
109 CXX \
110 lib/matplotlib/mpl-data/fonts \
111 lib/matplotlib/pyparsing.py \
112 || die "removed internal copies failed"
113 ln -s /usr/share/python*/CXX . || die
114 sed -i \
115 -e 's/matplotlib.pyparsing/pyparsing/g' \
116 lib/matplotlib/*.py || die "sed for pyparsing failed"
117 }
118
119 src_install() {
120 distutils_src_install
121
122 # respect FHS
123 dodir /usr/share/${PN}
124 mv "${D}"/usr/*/*/site-packages/${PN}/{mpl-data,backends/Matplotlib.nib} \
125 "${D}"/usr/share/${PN} || die "failed renaming"
126 insinto /etc/matplotlib
127 doins matplotlibrc matplotlib.conf \
128 || die "installing config files failed"
129
130 # doc and examples
131 insinto /usr/share/doc/${PF}
132 if use doc; then
133 doins "${DISTDIR}"/${PDOC}.pdf || die
134 fi
135 if use examples; then
136 doins -r examples || die
137 fi
138 }

  ViewVC Help
Powered by ViewVC 1.1.20