diff options
author | Kacper Kowalik <xarthisius@gentoo.org> | 2013-09-25 12:34:22 +0000 |
---|---|---|
committer | Kacper Kowalik <xarthisius@gentoo.org> | 2013-09-25 12:34:22 +0000 |
commit | bf802b2e1bb08a353acdc94a1fabed5a71433eb9 (patch) | |
tree | 05f30b8f9bd059aee3c6f58e9195a0eff894b103 /dev-python/matplotlib | |
parent | sys-cluster/maui: Add compatibility patch for torque-4, #479288 thanks Palmer... (diff) | |
download | gentoo-2-bf802b2e1bb08a353acdc94a1fabed5a71433eb9.tar.gz gentoo-2-bf802b2e1bb08a353acdc94a1fabed5a71433eb9.tar.bz2 gentoo-2-bf802b2e1bb08a353acdc94a1fabed5a71433eb9.zip |
Backport upstream changes that allows to build matplotlib when X11 is not available. Fixes #481564 by Ian Delaney <idella4@gentoo.org>. Thanks to MarisN <maris.gis@gmail.com> and Bodo Graumann <mail@bodograumann.de> for finding and testing the patch respectively
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x5D21B852895192F9)
Diffstat (limited to 'dev-python/matplotlib')
-rw-r--r-- | dev-python/matplotlib/ChangeLog | 9 | ||||
-rw-r--r-- | dev-python/matplotlib/files/matplotlib-1.3.0-setup_without_X11.patch | 42 | ||||
-rw-r--r-- | dev-python/matplotlib/matplotlib-1.3.0.ebuild | 7 |
3 files changed, 56 insertions, 2 deletions
diff --git a/dev-python/matplotlib/ChangeLog b/dev-python/matplotlib/ChangeLog index ffd13170f0a8..7fd1a8c048c3 100644 --- a/dev-python/matplotlib/ChangeLog +++ b/dev-python/matplotlib/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-python/matplotlib # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/ChangeLog,v 1.157 2013/09/22 01:50:30 heroxbd Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/ChangeLog,v 1.158 2013/09/25 12:34:22 xarthisius Exp $ + + 25 Sep 2013; Kacper Kowalik <xarthisius@gentoo.org> + +files/matplotlib-1.3.0-setup_without_X11.patch, matplotlib-1.3.0.ebuild: + Backport upstream changes that allows to build matplotlib when X11 is not + available. Fixes #481564 by Ian Delaney <idella4@gentoo.org>. Thanks to MarisN + <maris.gis@gmail.com> and Bodo Graumann <mail@bodograumann.de> for finding and + testing the patch respectively 22 Sep 2013; Benda Xu <heroxbd@gentoo.org> matplotlib-1.3.0.ebuild: set basedir into Prefix for headers and libraries, bug 481684. Credits to diff --git a/dev-python/matplotlib/files/matplotlib-1.3.0-setup_without_X11.patch b/dev-python/matplotlib/files/matplotlib-1.3.0-setup_without_X11.patch new file mode 100644 index 000000000000..2835ae547096 --- /dev/null +++ b/dev-python/matplotlib/files/matplotlib-1.3.0-setup_without_X11.patch @@ -0,0 +1,42 @@ +https://bugs.gentoo.org/show_bug.cgi?id=481564 +https://github.com/matplotlib/matplotlib/commit/1b3106c1bcd6017455232e8c974f1af8383a010c + +--- a/setupext.py ++++ b/setupext.py +@@ -1463,7 +1463,7 @@ def backend_gtk3agg_internal_check(x): + + try: + from gi.repository import Gtk, Gdk, GObject +- except ImportError: ++ except (ImportError, RuntimeError): + return (False, "Requires pygobject to be installed.") + + return (True, "version %s.%s.%s" % ( +@@ -1489,9 +1489,14 @@ def check(self): + p = multiprocessing.Pool() + except: + return "unknown (can not use multiprocessing to determine)" +- success, msg = p.map(backend_gtk3agg_internal_check, [0])[0] +- p.close() +- p.join() ++ try: ++ success, msg = p.map(backend_gtk3agg_internal_check, [0])[0] ++ except: ++ success = False ++ msg = "Could not determine" ++ finally: ++ p.close() ++ p.join() + if success: + BackendAgg.force = True + +@@ -1521,7 +1526,7 @@ def backend_gtk3cairo_internal_check(x): + + try: + from gi.repository import Gtk, Gdk, GObject +- except ImportError: ++ except (RuntimeError, ImportError): + return (False, "Requires pygobject to be installed.") + + return (True, "version %s.%s.%s" % ( + diff --git a/dev-python/matplotlib/matplotlib-1.3.0.ebuild b/dev-python/matplotlib/matplotlib-1.3.0.ebuild index 525481da249e..b856d1f68d3b 100644 --- a/dev-python/matplotlib/matplotlib-1.3.0.ebuild +++ b/dev-python/matplotlib/matplotlib-1.3.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/matplotlib-1.3.0.ebuild,v 1.4 2013/09/22 01:50:30 heroxbd Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/matplotlib-1.3.0.ebuild,v 1.5 2013/09/25 12:34:22 xarthisius Exp $ EAPI=5 @@ -101,6 +101,11 @@ python_prepare_all() { lib/matplotlib/{mathtext,fontconfig_pattern}.py \ || die "sed pyparsing failed" + local PATCHES=( + # avoid checks needing a X display + "${FILESDIR}"/${P}-setup_without_X11.patch + ) + distutils-r1_python_prepare_all } |