dev-python/enable: Version Bump and fix for newer swig
authorJustin Lecher <jlec@gentoo.org>
Tue, 29 Sep 2015 07:25:44 +0000 (09:25 +0200)
committerJustin Lecher <jlec@gentoo.org>
Tue, 29 Sep 2015 07:28:18 +0000 (09:28 +0200)
backport fix for newer swig

Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=561752

Package-Manager: portage-2.2.22
Signed-off-by: Justin Lecher <jlec@gentoo.org>
dev-python/enable/Manifest
dev-python/enable/enable-4.4.1.ebuild
dev-python/enable/enable-4.5.1.ebuild [new file with mode: 0644]
dev-python/enable/files/enable-4.4.1-swig.patch [new file with mode: 0644]

index 8be035dcb02f3f8ffa268c3c3107eef5bbe3b6c7..4fc9823e16dc34e8155aef4db9fa805f3722a04c 100644 (file)
@@ -1 +1,2 @@
 DIST enable-4.4.1.tar.gz 2507048 SHA256 6bdba2754410b89d6c0531482a20b930c2a3965d843f374eda7e1e1902a03bdb SHA512 72c879f19e26a4311b900cb4665969b9f806ce47b23c214a25e3ec308cc5300b6d71084a793215b05302fbeba09e13a4561e661c3bddb700d529bd31cfeb4dff WHIRLPOOL be172d97a979270b3a355436a323f72e00eb1fe1544cfd73091f6d56eded44b463198c48bbb8dbabc06e9a417cf24fdd898eecae316376cd1b9845cd4af03d02
+DIST enable-4.5.1.tar.gz 2571975 SHA256 9a7e7c82872969bf11eed5347c735ba7703b6af01274ad4bd3a7c8d89b0da164 SHA512 1095a4490f4918756dd33864aaba2636c294c3b177d3f500d98a355ec86ef86ab211d33cdec95c2d37e7e1df41622acf2c8ecf524a1d93cc39797804c49e6971 WHIRLPOOL 3bda72d5228adb106ec654aacdb34c91285afa40ff676c520119415a6517c1c2b595cbdea6122f70e07365fca18d4bfcd0696cc4dbf1c815165a41418d1b9d71
index ae98e27977f0c7e2b53c18a71bc7093fd8b353ef..e34d454e13b19e6d484b212b0927f0e2ee30a51e 100644 (file)
@@ -3,21 +3,22 @@
 # $Id$
 
 EAPI=5
+
 PYTHON_COMPAT=( python2_7 )
 
 inherit distutils-r1 virtualx flag-o-matic
 
 DESCRIPTION="Enthought Tool Suite: Drawing and interaction packages"
-HOMEPAGE="http://code.enthought.com/projects/enable/ https://pypi.python.org/pypi/enable"
-SRC_URI="https://github.com/enthought/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+HOMEPAGE="http://code.enthought.com/projects/enable/ https://pypi.python.org/pypi/enable https://github.com/enthought/enable"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
 
 LICENSE="BSD"
 SLOT="0"
 KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
 IUSE="doc examples test"
-DISTUTILS_IN_SOURCE_BUILD=1
 
-RDEPEND="dev-python/numpy[${PYTHON_USEDEP}]
+RDEPEND="
+       dev-python/numpy[${PYTHON_USEDEP}]
        dev-python/reportlab[${PYTHON_USEDEP}]
        >=dev-python/traitsui-4[${PYTHON_USEDEP}]
        >=media-libs/freetype-2
@@ -35,6 +36,10 @@ DEPEND="${RDEPEND}
                media-fonts/font-misc-misc
        )"
 
+DISTUTILS_IN_SOURCE_BUILD=1
+
+PATCHES=( "${FILESDIR}"/${P}-swig.patch )
+
 python_prepare_all() {
        append-cflags -fno-strict-aliasing
 
diff --git a/dev-python/enable/enable-4.5.1.ebuild b/dev-python/enable/enable-4.5.1.ebuild
new file mode 100644 (file)
index 0000000..31a0a80
--- /dev/null
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 virtualx flag-o-matic
+
+DESCRIPTION="Enthought Tool Suite: Drawing and interaction packages"
+HOMEPAGE="http://code.enthought.com/projects/enable/ https://pypi.python.org/pypi/enable https://github.com/enthought/enable"
+#SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+SRC_URI="https://github.com/enthought/enable/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples test"
+
+RDEPEND="
+       dev-python/apptools[${PYTHON_USEDEP}]
+       dev-python/kiwisolver[${PYTHON_USEDEP}]
+       dev-python/numpy[${PYTHON_USEDEP}]
+       dev-python/reportlab[${PYTHON_USEDEP}]
+       >=dev-python/traitsui-4[${PYTHON_USEDEP}]
+       >=media-libs/freetype-2
+       virtual/opengl
+       virtual/glu
+       x11-libs/libX11"
+DEPEND="${RDEPEND}
+       dev-python/setuptools[${PYTHON_USEDEP}]
+       dev-lang/swig:0
+       dev-python/cython[${PYTHON_USEDEP}]
+       doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+       test? (
+               dev-python/nose[${PYTHON_USEDEP}]
+               media-fonts/font-cursor-misc
+               media-fonts/font-misc-misc
+       )"
+
+DISTUTILS_IN_SOURCE_BUILD=1
+
+PATCHES=( "${FILESDIR}"/${PN}-4.4.1-swig.patch )
+
+python_prepare_all() {
+       append-cflags -fno-strict-aliasing
+
+       sed -e 's:html_favicon = "et.ico":html_favicon = "_static/et.ico":' \
+               -i docs/source/conf.py || die
+
+       distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+       use doc && emake -C docs html
+}
+
+python_test() {
+       pushd "${BUILD_DIR}"/lib > /dev/null
+       # https://github.com/enthought/enable/issues/158
+       PYTHONPATH=.:kiva \
+               VIRTUALX_COMMAND="nosetests" virtualmake --verbose
+       popd > /dev/null
+}
+
+python_install_all() {
+       use doc && local HTML_DOCS=( docs/build/html/. )
+
+       use examples && local EXAMPLES=( examples/. )
+       distutils-r1_python_install_all
+}
diff --git a/dev-python/enable/files/enable-4.4.1-swig.patch b/dev-python/enable/files/enable-4.4.1-swig.patch
new file mode 100644 (file)
index 0000000..a82f3af
--- /dev/null
@@ -0,0 +1,93 @@
+From f0e399174c5f55eb3a72860c620fdd5193ad57da Mon Sep 17 00:00:00 2001
+From: Jonathan Stickel <jjstickel@gmail.com>
+Date: Wed, 25 Mar 2015 14:05:01 -0600
+Subject: [PATCH] fixes for recent swig
+
+---
+ kiva/agg/src/affine_matrix.i | 4 ++--
+ kiva/agg/src/constants.i     | 4 ++--
+ kiva/agg/src/hit_test.i      | 4 ++--
+ kiva/agg/src/rgba.i          | 4 ++--
+ 4 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/kiva/agg/src/affine_matrix.i b/kiva/agg/src/affine_matrix.i
+index 2f30e51..7c05a6a 100644
+--- a/kiva/agg/src/affine_matrix.i
++++ b/kiva/agg/src/affine_matrix.i
+@@ -157,7 +157,7 @@ namespace agg24
+     };
+ };
+-%pythoncode {
++%pythoncode %{
+ def is_sequence(arg):
+     try:
+         len(arg)
+@@ -184,7 +184,7 @@ class AffineMatrix(_AffineMatrix):
+         """
+         self.multiply(other)
+         return self
+-}
++%}
+ %extend agg24::trans_affine
+ {
+diff --git a/kiva/agg/src/constants.i b/kiva/agg/src/constants.i
+index b680cae..78f9d0c 100644
+--- a/kiva/agg/src/constants.i
++++ b/kiva/agg/src/constants.i
+@@ -44,7 +44,7 @@
+ unsigned path_cmd(unsigned c);
+ unsigned path_flags(unsigned c);
+-%pythoncode {
++%pythoncode %{
+ #----------------------------------------------------------------------------
+ #
+@@ -141,4 +141,4 @@ interp_enum_map = {}
+ for key,value in interp_string_map.items():
+     interp_enum_map[value] = key
+-}
++%}
+diff --git a/kiva/agg/src/hit_test.i b/kiva/agg/src/hit_test.i
+index 76de0c9..2cfb1cf 100644
+--- a/kiva/agg/src/hit_test.i
++++ b/kiva/agg/src/hit_test.i
+@@ -22,7 +22,7 @@ namespace kiva
+ }
+ %pythoncode
+-{
++%{
+ from numpy import shape, transpose, zeros, rank, reshape, int32
+ def points_in_polygon(pts, poly_pts, use_winding=False):
+@@ -92,4 +92,4 @@ def points_in_polygon(pts, poly_pts, use_winding=False):
+     else:
+         _agg.points_in_polygon(pts, poly_pts, results)
+     return results    
+-}
++%}
+diff --git a/kiva/agg/src/rgba.i b/kiva/agg/src/rgba.i
+index f7624b8..183014f 100644
+--- a/kiva/agg/src/rgba.i
++++ b/kiva/agg/src/rgba.i
+@@ -74,7 +74,7 @@ namespace agg24
+ }
+-%pythoncode {
++%pythoncode %{
+ def is_sequence(arg):
+     try:
+         len(arg)
+@@ -90,6 +90,6 @@ class Rgba(_Rgba):
+             if len(args) not in [3,4]:
+                 raise ValueError, "array argument must be 1x3 or 1x4"
+         _Rgba.__init__(self,*args)
+-}
++%}
+ %clear double r, double g, double b, double a;