Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 498028
Collapse All | Expand All

(-)/Library/Gentoo/usr/portage/dev-python/matplotlib/matplotlib-1.3.0.ebuild (-26 / +63 lines)
Lines 1-31 Link Here
1
# Copyright 1999-2014 Gentoo Foundation
1
# Copyright 1999-2014 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/matplotlib-1.3.0.ebuild,v 1.10 2014/04/26 08:20:26 pacho Exp $
3
# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/matplotlib-1.3.1.ebuild,v 1.5 2014/08/27 12:20:22 blueness Exp $
4
4
5
EAPI=5
5
EAPI=5
6
6
7
PYTHON_COMPAT=( python{2_7,3_2,3_3} )
7
PYTHON_COMPAT=( python{2_7,3_2,3_3,3_4} )
8
8
PYTHON_REQ_USE='tk?'
9
PYTHON_REQ_USE='tk?'
9
10
10
inherit distutils-r1 eutils flag-o-matic
11
VIRTUALX_REQUIRED="always"
12
13
inherit distutils-r1 eutils flag-o-matic virtualx
11
14
12
DESCRIPTION="Pure python plotting library with matlab like syntax"
15
DESCRIPTION="Pure python plotting library with matlab like syntax"
13
HOMEPAGE="http://matplotlib.org/"
16
HOMEPAGE="http://matplotlib.org/"
14
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
17
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
15
18
16
IUSE="cairo doc excel examples fltk gtk gtk3 latex qt4 test tk wxwidgets"
17
SLOT="0"
19
SLOT="0"
18
KEYWORDS="amd64 arm ~mips ~ppc ~ppc64 x86 ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
19
20
# Main license: matplotlib
20
# Main license: matplotlib
21
# Some modules: BSD
21
# Some modules: BSD
22
# matplotlib/backends/qt4_editor: MIT
22
# matplotlib/backends/qt4_editor: MIT
23
# Fonts: BitstreamVera, OFL-1.1
23
# Fonts: BitstreamVera, OFL-1.1
24
LICENSE="BitstreamVera BSD matplotlib MIT OFL-1.1"
24
LICENSE="BitstreamVera BSD matplotlib MIT OFL-1.1"
25
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
26
IUSE="cairo doc excel examples fltk gtk gtk3 latex pyside qt4 test tk wxwidgets"
25
27
26
# #456704 -- a lot of py2-only deps
28
# #456704 -- a lot of py2-only deps
27
PY2_USEDEP=$(python_gen_usedep 'python2*')
29
PY2_USEDEP=$(python_gen_usedep 'python2*')
28
PY32_USEDEP=$(python_gen_usedep python{3_2,3_3})
30
PY32_USEDEP=$(python_gen_usedep python3_2)
31
PY3_USEDEP=$(python_gen_usedep python{3_2,3_3})
29
COMMON_DEPEND="
32
COMMON_DEPEND="
30
	dev-python/numpy[${PYTHON_USEDEP}]
33
	dev-python/numpy[${PYTHON_USEDEP}]
31
	dev-python/python-dateutil:0[${PYTHON_USEDEP}]
34
	dev-python/python-dateutil:0[${PYTHON_USEDEP}]
Lines 35-41 Link Here
35
	media-libs/freetype:2
38
	media-libs/freetype:2
36
	media-libs/libpng:0
39
	media-libs/libpng:0
37
	gtk? ( dev-python/pygtk[${PY2_USEDEP}] )
40
	gtk? ( dev-python/pygtk[${PY2_USEDEP}] )
38
	wxwidgets? ( dev-python/wxpython[${PY2_USEDEP}] )"
41
	wxwidgets? ( >=dev-python/wxpython-2.8[${PY2_USEDEP}] )"
39
42
40
# internal copy of pycxx highly patched
43
# internal copy of pycxx highly patched
41
#	dev-python/pycxx
44
#	dev-python/pycxx
Lines 44-51 Link Here
44
	virtual/pkgconfig
47
	virtual/pkgconfig
45
	doc? (
48
	doc? (
46
		app-text/dvipng
49
		app-text/dvipng
47
		virtual/python-imaging[${PY2_USEDEP},${PY32_USEDEP}]
50
		virtual/python-imaging[${PYTHON_USEDEP}]
48
		dev-python/ipython
51
		dev-python/ipython[${PYTHON_USEDEP}]
49
		dev-python/numpydoc[${PY2_USEDEP}]
52
		dev-python/numpydoc[${PY2_USEDEP}]
50
		dev-python/xlwt[${PY2_USEDEP}]
53
		dev-python/xlwt[${PY2_USEDEP}]
51
		dev-python/sphinx[${PYTHON_USEDEP}]
54
		dev-python/sphinx[${PYTHON_USEDEP}]
Lines 61-67 Link Here
61
	cairo? ( dev-python/pycairo[${PYTHON_USEDEP}] )
64
	cairo? ( dev-python/pycairo[${PYTHON_USEDEP}] )
62
	excel? ( dev-python/xlwt[${PY2_USEDEP}] )
65
	excel? ( dev-python/xlwt[${PY2_USEDEP}] )
63
	fltk? ( dev-python/pyfltk[${PY2_USEDEP}] )
66
	fltk? ( dev-python/pyfltk[${PY2_USEDEP}] )
64
	gtk3? ( dev-python/pygobject:3[${PYTHON_USEDEP}]
67
	gtk3? (
68
		dev-python/pygobject:3[${PYTHON_USEDEP}]
65
		x11-libs/gtk+:3[introspection] )
69
		x11-libs/gtk+:3[introspection] )
66
	latex? (
70
	latex? (
67
		virtual/latex-base
71
		virtual/latex-base
Lines 69-83 Link Here
69
		app-text/dvipng
73
		app-text/dvipng
70
		app-text/poppler[utils]
74
		app-text/poppler[utils]
71
		dev-texlive/texlive-fontsrecommended
75
		dev-texlive/texlive-fontsrecommended
76
		dev-texlive/texlive-latexextra
77
		dev-texlive/texlive-xetex
72
	)
78
	)
73
	qt4? ( || ( dev-python/PyQt4[X,${PYTHON_USEDEP}] dev-python/pyside[X,${PYTHON_USEDEP}] ) )"
79
	pyside? ( dev-python/pyside[X,${PYTHON_USEDEP}] )
80
	qt4? ( dev-python/PyQt4[X,${PYTHON_USEDEP}] )"
74
81
75
PY2_FLAGS="|| ( $(python_gen_useflags python2*) )"
82
PY2_FLAGS="|| ( $(python_gen_useflags python2*) )"
76
REQUIRED_USE="doc? ( ${PY2_FLAGS} )
83
PY32_FLAGS="|| ( $(python_gen_useflags python3_2) )"
84
REQUIRED_USE="
85
	doc? ( ${PY2_FLAGS} )
77
	excel? ( ${PY2_FLAGS} )
86
	excel? ( ${PY2_FLAGS} )
78
	fltk? ( ${PY2_FLAGS} )
87
	fltk? ( ${PY2_FLAGS} )
79
	gtk? ( ${PY2_FLAGS} )
88
	gtk? ( ${PY2_FLAGS} )
80
	wxwidgets? ( ${PY2_FLAGS} )"
89
	wxwidgets? ( ${PY2_FLAGS} )
90
	test? (
91
		cairo fltk latex pyside qt4 tk wxwidgets
92
		|| ( gtk gtk3 )
93
		)"
81
94
82
RESTRICT="mirror"
95
RESTRICT="mirror"
83
96
Lines 97-110 Link Here
97
}
110
}
98
111
99
python_prepare_all() {
112
python_prepare_all() {
100
	sed -i -e 's/matplotlib.pyparsing_py[23]/pyparsing/g' \
113
# Generates test failures, but fedora does it
101
		lib/matplotlib/{mathtext,fontconfig_pattern}.py \
114
#	local PATCHES=(
115
#		"${FILESDIR}"/${P}-unbundle-pycxx.patch
116
#		"${FILESDIR}"/${P}-unbundle-agg.patch
117
#	)
118
#	rm -r agg24 CXX || die
119
#	rm -r agg24 || die
120
121
	sed \
122
		-e 's/matplotlib.pyparsing_py[23]/pyparsing/g' \
123
		-i lib/matplotlib/{mathtext,fontconfig_pattern}.py \
102
		|| die "sed pyparsing failed"
124
		|| die "sed pyparsing failed"
103
125
104
	local PATCHES=(
126
	# suggested by upstream
105
		# avoid checks needing a X display
127
	sed \
106
		"${FILESDIR}"/${P}-setup_without_X11.patch
128
		-e '/tol/s:32:35:g' \
107
	)
129
		-i lib/matplotlib/tests/test_mathtext.py || die
130
131
	if use gtk || use gtk3; then
132
		export XDG_RUNTIME_DIR="${T}/runtime-dir"
133
		mkdir "${XDG_RUNTIME_DIR}" || die
134
		chmod 0700 "${XDG_RUNTIME_DIR}" || die
135
	fi
108
136
109
	distutils-r1_python_prepare_all
137
	distutils-r1_python_prepare_all
110
}
138
}
Lines 126-137 Link Here
126
		pytz = False
154
		pytz = False
127
		dateutil = False
155
		dateutil = False
128
		[gui_support]
156
		[gui_support]
157
		agg = True
129
		$(use_setup cairo)
158
		$(use_setup cairo)
159
		$(use_setup pyside)
130
		$(use_setup qt4)
160
		$(use_setup qt4)
131
		$(use_setup tk)
161
		$(use_setup tk)
132
	EOF
162
	EOF
133
163
134
	if [[ ${EPYTHON} == python3* ]]; then
164
	if use gtk3 && use cairo; then
165
		echo "gtk3cairo = True" >> "${BUILD_DIR}"/setup.cfg || die
166
	else
167
		echo "gtk3cairo = False" >> "${BUILD_DIR}"/setup.cfg || die
168
	fi
169
170
	if $(python_is_python3); then
135
		cat >> "${BUILD_DIR}"/setup.cfg <<-EOF
171
		cat >> "${BUILD_DIR}"/setup.cfg <<-EOF
136
			six = True
172
			six = True
137
			fltk = False
173
			fltk = False
Lines 146-151 Link Here
146
			six = False
182
			six = False
147
			$(use_setup fltk)
183
			$(use_setup fltk)
148
			$(use_setup gtk)
184
			$(use_setup gtk)
185
			$(use_setup gtk3)
149
			$(use_setup wxwidgets wx)
186
			$(use_setup wxwidgets wx)
150
		EOF
187
		EOF
151
	fi
188
	fi
Lines 160-166 Link Here
160
}
197
}
161
198
162
python_compile() {
199
python_compile() {
163
	wrap_setup distutils-r1_python_compile
200
	VIRTUALX_COMMAND="wrap_setup distutils-r1_python_compile"
201
	virtualmake
164
}
202
}
165
203
166
python_compile_all() {
204
python_compile_all() {
Lines 180-189 Link Here
180
	wrap_setup distutils_install_for_testing
218
	wrap_setup distutils_install_for_testing
181
219
182
	cd "${TMPDIR}" || die
220
	cd "${TMPDIR}" || die
183
	"${PYTHON}" -c "
221
	VIRTUALX_COMMAND="${PYTHON}"
184
import sys, matplotlib as m
222
	virtualmake -c "import sys, matplotlib as m; sys.exit(0 if m.test(verbosity=2) else 1)" || \
185
sys.exit(0 if m.test(verbosity=2) else 1)
223
		die "Tests fail with ${EPYTHON}"
186
" || die "Tests fail with ${EPYTHON}"
187
}
224
}
188
225
189
python_install() {
226
python_install() {

Return to bug 498028