Package: python-enable
Version: 4.5.1-2
Followup-For: Bug #804584
User: [email protected]
Usertags: origin-ubuntu xenial ubuntu-patch
In Ubuntu, the attached patch was applied to achieve the following:
* debian/patches/swig3.diff: Cherrypick from upstream Git to fix FTBFS with
SWIG 3.
Thanks for considering the patch.
-- System Information:
Debian Release: stretch/sid
APT prefers xenial-updates
APT policy: (500, 'xenial-updates'), (500, 'xenial-security'), (500,
'xenial'), (100, 'xenial-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.2.0-19-generic (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru python-enable-4.5.1/debian/patches/series python-enable-4.5.1/debian/patches/series
--- python-enable-4.5.1/debian/patches/series 2015-09-27 00:40:01.000000000 -0400
+++ python-enable-4.5.1/debian/patches/series 2015-12-09 01:06:01.000000000 -0500
@@ -4,3 +4,4 @@
gcc5.diff
setup.diff
no-opt.patch
+swig3.patch
diff -Nru python-enable-4.5.1/debian/patches/swig3.patch python-enable-4.5.1/debian/patches/swig3.patch
--- python-enable-4.5.1/debian/patches/swig3.patch 1969-12-31 19:00:00.000000000 -0500
+++ python-enable-4.5.1/debian/patches/swig3.patch 2015-12-09 01:10:22.000000000 -0500
@@ -0,0 +1,89 @@
+Description: fix FTBFS with SWIG 3
+Author: Jonathan Stickel <[email protected]>
+Origin: upstream
+Forwarded: not-needed
+Applied-Upstream: https://github.com/enthought/enable/commit/f0e399174c5f55eb3a72860c620fdd5193ad57da
+Last-Update: 2015-12-09
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+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;