summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Delaney <idella4@gentoo.org>2012-12-07 17:57:27 +0000
committerIan Delaney <idella4@gentoo.org>2012-12-07 17:57:27 +0000
commita85b0340f14ab7029017119e7e940246380ca4c3 (patch)
tree1192b39742b42c31ff12e68a0b099d0c0d33f6ad /dev-python/matplotlib
parentStable for x86, wrt bug #441270 (diff)
downloadgentoo-2-a85b0340f14ab7029017119e7e940246380ca4c3.tar.gz
gentoo-2-a85b0340f14ab7029017119e7e940246380ca4c3.tar.bz2
gentoo-2-a85b0340f14ab7029017119e7e940246380ca4c3.zip
rev bump; use flag gtk3 added, conditional of gtk corrected, setup patch upgraded, deps added, use of separate source dirs var added, setting setup.cfg updraded, all of which address build with use gtk/gtk3 by corresponding python version
(Portage version: 2.1.11.30/cvs/Linux x86_64, signed Manifest commit with key 0xB8072B0D)
Diffstat (limited to 'dev-python/matplotlib')
-rw-r--r--dev-python/matplotlib/ChangeLog11
-rw-r--r--dev-python/matplotlib/files/matplotlib-1.2.0-setup.patch19
-rw-r--r--dev-python/matplotlib/matplotlib-1.2.0-r1.ebuild188
-rw-r--r--dev-python/matplotlib/metadata.xml6
4 files changed, 216 insertions, 8 deletions
diff --git a/dev-python/matplotlib/ChangeLog b/dev-python/matplotlib/ChangeLog
index 6676dd2d3a78..196e54195534 100644
--- a/dev-python/matplotlib/ChangeLog
+++ b/dev-python/matplotlib/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for dev-python/matplotlib
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/ChangeLog,v 1.130 2012/11/30 15:27:47 xarthisius Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/ChangeLog,v 1.131 2012/12/07 17:57:27 idella4 Exp $
+
+*matplotlib-1.2.0-r1 (08 Dec 2012)
+
+ 08 Dec 2012; Ian Delaney <idella4@gentoo.org> +matplotlib-1.2.0-r1.ebuild,
+ files/matplotlib-1.2.0-setup.patch, metadata.xml:
+ rev bump; use flag gtk3 added, conditional of gtk corrected, setup patch
+ upgraded, deps added, use of separate source dirs var added, setting setup.cfg
+ updraded, all of which address build with use gtk/gtk3 by corresponding python
+ version
30 Nov 2012; Ian Delaney <idella4@gentoo.org> matplotlib-1.2.0.ebuild:
Correction to DocCheck to doc check
diff --git a/dev-python/matplotlib/files/matplotlib-1.2.0-setup.patch b/dev-python/matplotlib/files/matplotlib-1.2.0-setup.patch
index ba4b77ca0999..ba0351840749 100644
--- a/dev-python/matplotlib/files/matplotlib-1.2.0-setup.patch
+++ b/dev-python/matplotlib/files/matplotlib-1.2.0-setup.patch
@@ -1,9 +1,17 @@
diff -ur matplotlib-1.2.0.orig/setup.py matplotlib-1.2.0/setup.py
--- setup.py 2012-11-08 10:24:12.000000000 +0800
+++ setup.py 2012-11-25 06:55:27.531042898 +0800
-@@ -176,15 +176,12 @@
- build_tkagg(ext_modules, packages)
- rc['backend'] = 'TkAgg'
+@@ -171,20 +171,19 @@
+ # regardless of the lack of dependencies. If auto, silently skip
+ # when dependencies are missing.
+ if options['build_tkagg']:
+- if check_for_tk() or (options['build_tkagg'] is True):
+- options['build_agg'] = 1
+- build_tkagg(ext_modules, packages)
+- rc['backend'] = 'TkAgg'
++ options['build_agg'] = 1
++ build_tkagg(ext_modules, packages)
++ rc['backend'] = 'TkAgg'
-hasgtk = check_for_gtk()
-if options['build_gtk']:
@@ -14,7 +22,10 @@ diff -ur matplotlib-1.2.0.orig/setup.py matplotlib-1.2.0/setup.py
- options['build_agg'] = 1
- build_gtkagg(ext_modules, packages)
- rc['backend'] = 'GTKAgg'
-+hasgtk = False if sys.version_info[0] >= 3 else True
++if sys.version_info[0] >= 3:
++ hasgtk = False
++else:
++ hasgtk = True
+if hasgtk and (options['build_gtk'] is True):
+ build_gdk(ext_modules, packages)
+ options['build_agg'] = 1
diff --git a/dev-python/matplotlib/matplotlib-1.2.0-r1.ebuild b/dev-python/matplotlib/matplotlib-1.2.0-r1.ebuild
new file mode 100644
index 000000000000..6e30bdfdfa80
--- /dev/null
+++ b/dev-python/matplotlib/matplotlib-1.2.0-r1.ebuild
@@ -0,0 +1,188 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/matplotlib-1.2.0-r1.ebuild,v 1.1 2012/12/07 17:57:27 idella4 Exp $
+
+EAPI="3"
+
+PYTHON_DEPEND="*:2.6"
+PYTHON_USE_WITH="tk"
+PYTHON_USE_WITH_OPT="tk"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="*-jython 2.7-pypy-*"
+PYTHON_TESTS_RESTRICTED_ABIS="2.[56] 3.1"
+DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES="1"
+PYTHON_CFLAGS=("2.* + -fno-strict-aliasing" "3.* + -fno-strict-aliasing")
+PYTHON_CXXFLAGS=("2.* + -fno-strict-aliasing" "3.* + -fno-strict-aliasing")
+PYTHON_MODNAME="matplotlib mpl_toolkits pylab.py"
+
+WX_GTK_VER="2.8"
+
+inherit distutils eutils
+
+DESCRIPTION="Pure python plotting library with matlab like syntax"
+HOMEPAGE="http://matplotlib.org/ http://pypi.python.org/pypi/matplotlib"
+SRC_URI="https://github.com/downloads/${PN}/${PN}/${P}.tar.gz"
+
+IUSE="cairo doc excel examples fltk gtk gtk3 latex qt4 test tk wxwidgets"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+# Main license: matplotlib
+# Some modules: BSD
+# matplotlib/backends/qt4_editor: MIT
+# Fonts: BitstreamVera, OFL-1.1
+LICENSE="BitstreamVera BSD matplotlib MIT OFL-1.1"
+
+CDEPEND="dev-python/numpy
+ dev-python/python-dateutil
+ dev-python/pytz
+ dev-python/six
+ media-fonts/stix-fonts
+ media-libs/freetype:2
+ media-libs/libpng
+ gtk? ( dev-python/pygtk )
+ gtk3? ( dev-python/pygobject:3
+ x11-libs/gtk+:3[introspection] )
+ wxwidgets? ( dev-python/wxpython:2.8 )"
+
+# internal copy of pycxx highly patched
+# dev-python/pycxx
+
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+ doc? (
+ app-text/dvipng
+ dev-python/imaging
+ dev-python/ipython
+ dev-python/xlwt
+ dev-python/sphinx
+ dev-texlive/texlive-latexextra
+ dev-texlive/texlive-fontsrecommended
+ dev-texlive/texlive-latexrecommended
+ media-gfx/graphviz[cairo]
+ )
+ test? ( dev-python/nose )"
+
+RDEPEND="${CDEPEND}
+ dev-python/pyparsing
+ cairo? ( dev-python/pycairo )
+ excel? ( dev-python/xlwt )
+ fltk? ( dev-python/pyfltk )
+ latex? (
+ virtual/latex-base
+ app-text/ghostscript-gpl
+ app-text/dvipng
+ app-text/poppler[utils]
+ dev-texlive/texlive-fontsrecommended
+ )
+ qt4? ( || ( dev-python/PyQt4[X] dev-python/pyside[X] ) )"
+
+RESTRICT="mirror"
+
+use_setup() {
+ local uword="${2:-${1}}"
+ if use ${1}; then
+ echo "${uword} = True"
+ echo "${uword}agg = True"
+ else
+ echo "${uword} = False"
+ echo "${uword}agg = False"
+ fi
+}
+
+src_prepare() {
+ # create setup.cfg (see setup.cfg.template for any changes), default to py2.
+ cat > setup.cfg <<-EOF
+ [provide_packages]
+ pytz = False
+ dateutil = False
+ [gui_support]
+ six = False
+ $(use_setup cairo)
+ $(use_setup fltk)
+ $(use_setup gtk)
+ $(use_setup qt4)
+ $(use_setup tk)
+ $(use_setup wxwidgets wx)
+ EOF
+ distutils_src_prepare
+
+ SetSetup() {
+ if [[ "$(python_get_version --major)" == '3' ]]; then
+ sed -e 's:^gtk = True:gtk = False:' \
+ -e 's:^gtkagg = True:gtkagg = False:' \
+ -e 's:^wx = True:wx = False:' \
+ -e 's:^wxagg = True:wxagg = False:' \
+ -e 's:^six = False:six = True:' \
+ -i setup.cfg || die "deaded"
+ fi
+ }
+ python_execute_function -q -s SetSetup
+
+ # avoid checks needing a X display
+ epatch "${FILESDIR}"/${P}-setup.patch
+
+ # Fix test, issue no. 1532
+ epatch "${FILESDIR}"/${P}-ft-refcount.patch
+
+ # remove internal copies of pyparsing
+ rm lib/matplotlib/pyparsing{_py2,_py3}.py || die
+ sed -i -e 's/matplotlib.pyparsing_py[23]/pyparsing/g' \
+ lib/matplotlib/{mathtext,fontconfig_pattern}.py \
+ || die "sed pyparsing failed"
+
+ DocCheck() {
+ if [[ "$(python_get_version --major)" == '3' ]] && use doc; then
+ eerror ""
+ eerror "Building of docs with python3 currently **FAILS**"
+ eerror "Docs can be built effectively with python2."
+ eerror "eselect python2 and recommence emerge "
+ eerror ""
+ die
+ fi
+ }
+ python_execute_function DocCheck
+}
+
+src_compile() {
+ unset DISPLAY # bug #278524
+ distutils_src_compile
+ if use doc; then
+ pushd doc > /dev/null
+ VARTEXFONTS="${T}"/fonts \
+ PYTHONPATH=$(ls -d "${S}"/build-$(PYTHON -f --ABI)/lib*) \
+ ./make.py --small all
+ [[ -e build/latex/Matplotlib.pdf ]] || die "doc generation failed"
+ popd > /dev/null
+ fi
+}
+
+src_test() {
+ # if doc was enabled, all examples were built and tested
+ use doc && return
+ testing() {
+ "$(PYTHON)" setup.py build -b "build-${PYTHON_ABI}" install \
+ --home="${S}/test-${PYTHON_ABI}" --no-compile \
+ || die "install test failed"
+ pushd "${S}/test-${PYTHON_ABI}/"lib* > /dev/null
+ PYTHONPATH=python \
+ "$(PYTHON)" -c "import matplotlib as m; m.test(verbosity=2)" \
+ 2>&1 | tee test.log
+ grep -Eq "^(ERROR|FAIL):" test.log && return 1
+ popd > /dev/null
+ rm -r test-${PYTHON_ABI}
+ }
+ python_execute_function testing
+}
+
+src_install() {
+ distutils_src_install
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ doins -r doc/build/latex/Matplotlib.pdf doc/build/html || die
+ fi
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples || die
+ fi
+}
diff --git a/dev-python/matplotlib/metadata.xml b/dev-python/matplotlib/metadata.xml
index 1415376dd63b..b6bcdd76c38b 100644
--- a/dev-python/matplotlib/metadata.xml
+++ b/dev-python/matplotlib/metadata.xml
@@ -8,9 +8,9 @@
variety of backends and hard copy formats for almost ready publication plots.
</longdescription>
<use>
- <flag name='excel'>Pull <pkg>dev-python/xlwt</pkg> for the
- exceltools toolkit</flag>
- <flag name='traits'>Pull <pkg>dev-python/traits</pkg> for the
+ <flag name='excel'>Pull <pkg>dev-python/xlwt</pkg> for the exceltools toolkit</flag>
+ <flag name='traits'>Pull <pkg>dev-python/traits</pkg> for the
experimental enthought traits support</flag>
+ <flag name='gtk3'>Use <pkg>x11-libs/gtk+:3</pkg> instead of <pkg>x11-libs/gtk+:2</pkg></flag>
</use>
</pkgmetadata>