diff options
author | Ian Delaney <idella4@gentoo.org> | 2012-11-29 10:03:01 +0000 |
---|---|---|
committer | Ian Delaney <idella4@gentoo.org> | 2012-11-29 10:03:01 +0000 |
commit | 0dc64d5f9bc3723e47a1e19a1ae64b5e652b836c (patch) | |
tree | 3a61fd918a6483e18666c2925b82b2c4fecbb56e /dev-python/matplotlib | |
parent | Fix build failure with recent automake (bug #407683, thanks to Helmut Jarausc... (diff) | |
download | gentoo-2-0dc64d5f9bc3723e47a1e19a1ae64b5e652b836c.tar.gz gentoo-2-0dc64d5f9bc3723e47a1e19a1ae64b5e652b836c.tar.bz2 gentoo-2-0dc64d5f9bc3723e47a1e19a1ae64b5e652b836c.zip |
bump to 1.2.0, test phase upgraded, new ft-refcount.patch from upstream, python3 support but for USE doc requiring special treatment, ack to users Nicolas Bigaouette and Rafal Muzylo for patches in entered in Bug #443836
(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/ChangeLog | 11 | ||||
-rw-r--r-- | dev-python/matplotlib/files/matplotlib-1.2.0-ft-refcount.patch | 41 | ||||
-rw-r--r-- | dev-python/matplotlib/files/matplotlib-1.2.0-setup.patch | 25 | ||||
-rw-r--r-- | dev-python/matplotlib/matplotlib-1.2.0.ebuild | 172 |
4 files changed, 248 insertions, 1 deletions
diff --git a/dev-python/matplotlib/ChangeLog b/dev-python/matplotlib/ChangeLog index 15c6839d769e..57a80dab33a0 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.127 2012/11/26 06:21:01 idella4 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/ChangeLog,v 1.128 2012/11/29 10:03:01 idella4 Exp $ + +*matplotlib-1.2.0 (30 Nov 2012) + + 30 Nov 2012; Ian Delaney <idella4@gentoo.org> + +files/matplotlib-1.2.0-ft-refcount.patch, + +files/matplotlib-1.2.0-setup.patch, +matplotlib-1.2.0.ebuild: + bump to 1.2.0, test phase upgraded, new ft-refcount.patch from upstream, + python3 support but for USE doc requiring special treatment, ack to users + Nicolas Bigaouette and Rafal Muzylo for patches in entered in Bug #443836 26 Nov 2012; Ian Delaney <idella4@gentoo.org> files/matplotlib-1.1.1-ft-refcount.patch, matplotlib-1.1.1.ebuild: diff --git a/dev-python/matplotlib/files/matplotlib-1.2.0-ft-refcount.patch b/dev-python/matplotlib/files/matplotlib-1.2.0-ft-refcount.patch new file mode 100644 index 000000000000..822f3491427b --- /dev/null +++ b/dev-python/matplotlib/files/matplotlib-1.2.0-ft-refcount.patch @@ -0,0 +1,41 @@ +Issue 532; https://github.com/mdboom/matplotlib/commit/81068e9967387ea69133277242a9804d646ea4ef +diff -ur matplotlib-1.2.0.orig/src/ft2font.cpp matplotlib-1.2.0/src/ft2font.cpp +--- src/ft2font.cpp 2012-10-31 08:11:14.000000000 +0800 ++++ src/ft2font.cpp 2012-11-29 11:09:43.569808461 +0800 +@@ -852,28 +852,24 @@ + { + std::ostringstream s; + s << "Could not load facefile " << facefile << "; Unknown_File_Format" << std::endl; +- ob_refcnt--; + throw Py::RuntimeError(s.str()); + } + else if (error == FT_Err_Cannot_Open_Resource) + { + std::ostringstream s; + s << "Could not open facefile " << facefile << "; Cannot_Open_Resource" << std::endl; +- ob_refcnt--; + throw Py::RuntimeError(s.str()); + } + else if (error == FT_Err_Invalid_File_Format) + { + std::ostringstream s; + s << "Could not open facefile " << facefile << "; Invalid_File_Format" << std::endl; +- ob_refcnt--; + throw Py::RuntimeError(s.str()); + } + else if (error) + { + std::ostringstream s; + s << "Could not open facefile " << facefile << "; freetype error code " << error << std::endl; +- ob_refcnt--; + throw Py::RuntimeError(s.str()); + } + +@@ -891,7 +887,6 @@ + { + std::ostringstream s; + s << "Could not set the fontsize for facefile " << facefile << std::endl; +- ob_refcnt--; + throw Py::RuntimeError(s.str()); + } + diff --git a/dev-python/matplotlib/files/matplotlib-1.2.0-setup.patch b/dev-python/matplotlib/files/matplotlib-1.2.0-setup.patch new file mode 100644 index 000000000000..ba4b77ca0999 --- /dev/null +++ b/dev-python/matplotlib/files/matplotlib-1.2.0-setup.patch @@ -0,0 +1,25 @@ +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' + +-hasgtk = check_for_gtk() +-if options['build_gtk']: +- if hasgtk or (options['build_gtk'] is True): +- build_gdk(ext_modules, packages) +-if options['build_gtkagg']: +- if hasgtk or (options['build_gtkagg'] is True): +- options['build_agg'] = 1 +- build_gtkagg(ext_modules, packages) +- rc['backend'] = 'GTKAgg' ++hasgtk = False if sys.version_info[0] >= 3 else True ++if hasgtk and (options['build_gtk'] is True): ++ build_gdk(ext_modules, packages) ++ options['build_agg'] = 1 ++ build_gtkagg(ext_modules, packages) ++ rc['backend'] = 'GTKAgg' + + if options['build_macosx']: + if check_for_macosx() or (options['build_macosx'] is True): diff --git a/dev-python/matplotlib/matplotlib-1.2.0.ebuild b/dev-python/matplotlib/matplotlib-1.2.0.ebuild new file mode 100644 index 000000000000..41974d703512 --- /dev/null +++ b/dev-python/matplotlib/matplotlib-1.2.0.ebuild @@ -0,0 +1,172 @@ +# 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.ebuild,v 1.1 2012/11/29 10:03:01 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" +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 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 + media-libs/freetype:2 + media-libs/libpng + gtk? ( dev-python/pygtk + || ( >=dev-lang/python-3.2 dev-python/pygtk:3 ) ) + 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) + cat > setup.cfg <<-EOF + [provide_packages] + pytz = False + dateutil = False + six = False + [gui_support] + $(use_setup cairo) + $(use_setup fltk) + $(use_setup gtk) + $(use_setup qt4) + $(use_setup tk) + $(use_setup wxwidgets wx) + EOF + + # 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' ]]; then + eerror "" + eerror "Building of docs with python3 currently **FAILS**" + eerror "Docs can be built effectively with python2." + eerror "Prepend USE_PYTHON=2.7 and recommence emerge " + eerror "" + die + fi + } + python_execute_function DocCheck + distutils_src_prepare +} + +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 +} |