diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2012-08-01 19:17:40 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2012-08-01 19:17:40 +0000 |
commit | 16a3c2bf75e66b9bcda898320aeae30e5542ada8 (patch) | |
tree | aebf76a5776706711c0a0c27ba4a0ad38b377827 /dev-python/matplotlib | |
parent | Add ~amd64-fbsd keyword, with permission from ryao. (diff) | |
download | gentoo-2-16a3c2bf75e66b9bcda898320aeae30e5542ada8.tar.gz gentoo-2-16a3c2bf75e66b9bcda898320aeae30e5542ada8.tar.bz2 gentoo-2-16a3c2bf75e66b9bcda898320aeae30e5542ada8.zip |
Version bump. Keep bundling of pycxx because it is patched, and some fonts to ease maintenance and portability
(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/matplotlib')
-rw-r--r-- | dev-python/matplotlib/ChangeLog | 10 | ||||
-rw-r--r-- | dev-python/matplotlib/files/matplotlib-1.1.1-ft-refcount.patch | 35 | ||||
-rw-r--r-- | dev-python/matplotlib/matplotlib-1.1.1.ebuild | 158 |
3 files changed, 201 insertions, 2 deletions
diff --git a/dev-python/matplotlib/ChangeLog b/dev-python/matplotlib/ChangeLog index 4e737d50cfaa..eff3c4dd4628 100644 --- a/dev-python/matplotlib/ChangeLog +++ b/dev-python/matplotlib/ChangeLog @@ -1,6 +1,13 @@ # 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.123 2012/05/04 15:12:16 patrick Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/ChangeLog,v 1.124 2012/08/01 19:17:40 bicatali Exp $ + +*matplotlib-1.1.1 (01 Aug 2012) + + 01 Aug 2012; Sébastien Fabbro <bicatali@gentoo.org> + +files/matplotlib-1.1.1-ft-refcount.patch, +matplotlib-1.1.1.ebuild: + Version bump. Keep bundling of pycxx because it is patched, and some fonts to + ease maintenance and portability 04 May 2012; Patrick Lauer <patrick@gentoo.org> matplotlib-1.0.1-r1.ebuild, matplotlib-1.1.0.ebuild: @@ -612,4 +619,3 @@ 05 Dec 2004; Bryan Østergaard <kloeri@gentoo.org> : Initial import, ebuild by Fernando A. Serboncini <fserb@terra.com.br> in bug 32895. - diff --git a/dev-python/matplotlib/files/matplotlib-1.1.1-ft-refcount.patch b/dev-python/matplotlib/files/matplotlib-1.1.1-ft-refcount.patch new file mode 100644 index 000000000000..810037777621 --- /dev/null +++ b/dev-python/matplotlib/files/matplotlib-1.1.1-ft-refcount.patch @@ -0,0 +1,35 @@ +Restoring a fix to an old reference counting bug which was re-included in a recent commit. It fails stix_fonts_demo.py +https://github.com/matplotlib/matplotlib/commit/85af0c02bf9a8ecdd0fd18eab8c9662c6b9f4302#src/ft2font.cpp + +bicatali@gentoo.org 08/2012 +--- src/ft2font.cpp.orig 2012-08-01 17:30:33.000000000 +0100 ++++ src/ft2font.cpp 2012-08-01 17:30:42.000000000 +0100 +@@ -870,24 +870,28 @@ + { + 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()); + } + diff --git a/dev-python/matplotlib/matplotlib-1.1.1.ebuild b/dev-python/matplotlib/matplotlib-1.1.1.ebuild new file mode 100644 index 000000000000..21dc3d81f1e7 --- /dev/null +++ b/dev-python/matplotlib/matplotlib-1.1.1.ebuild @@ -0,0 +1,158 @@ +# 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.1.1.ebuild,v 1.1 2012/08/01 19:17:40 bicatali Exp $ + +EAPI="3" + +# python eclass bloat +PYTHON_DEPEND="2" +PYTHON_USE_WITH="tk" +PYTHON_USE_WITH_OPT="tk" +SUPPORT_PYTHON_ABIS="1" +RESTRICT_PYTHON_ABIS="3* *-jython 2.7-pypy-*" +PYTHON_CFLAGS=("2.* + -fno-strict-aliasing") +PYTHON_CXXFLAGS=("2.* + -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.sourceforge.net/ http://pypi.python.org/pypi/matplotlib" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +IUSE="cairo doc excel examples fltk gtk latex qt4 test tk wxwidgets" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-freebsd ~x86-linux ~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 ) + 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] ) )" + + +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() { + epatch "${FILESDIR}"/${P}-ft-refcount.patch + # create setup.cfg (see setup.cfg.template for any changes) + cat > setup.cfg <<-EOF + [provide_packages] + pytz = False + dateutil = 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 + sed -i \ + -e "s/check_for_gtk()/$(use gtk && echo True || echo False)/" \ + -e "s/check_for_tk()/$(use tk && echo True || echo False)/" \ + setup.py || die "sed setup.py failed" + + # remove internal copies of pyparsing + rm lib/matplotlib/pyparsing.py || die + sed -i \ + -e 's/matplotlib.pyparsing/pyparsing/g' \ + lib/matplotlib/{mathtext,fontconfig_pattern}.py \ + || die "sed pyparsing failed" + distutils_src_prepare +} + +src_compile() { + unset DISPLAY # bug #278524 + distutils_src_compile + if use doc; then + cd "${S}/doc" + 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" + 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 +} |