sci-libs/gdal: Fix building with >=swig-3.0.6
authorSven Wegener <swegener@gentoo.org>
Tue, 28 Jun 2016 18:26:03 +0000 (18:26 +0000)
committerSven Wegener <swegener@gentoo.org>
Mon, 18 Jul 2016 20:39:24 +0000 (20:39 +0000)
Package-Manager: portage-2.2.28
Signed-off-by: Sven Wegener <swegener@gentoo.org>
sci-libs/gdal/files/gdal-1.11-swig-3.0.6.patch [new file with mode: 0644]
sci-libs/gdal/gdal-1.11.1-r3.ebuild
sci-libs/gdal/gdal-1.11.2.ebuild

diff --git a/sci-libs/gdal/files/gdal-1.11-swig-3.0.6.patch b/sci-libs/gdal/files/gdal-1.11-swig-3.0.6.patch
new file mode 100644 (file)
index 0000000..4f4e80b
--- /dev/null
@@ -0,0 +1,22 @@
+--- gdal/swig/include/python/ogr_python.i
++++ gdal/swig/include/python/ogr_python.i
+@@ -67,7 +67,7 @@
+     def __getitem__(self, value):
+         """Support dictionary, list, and slice -like access to the datasource.
+-ds[0] would return the first layer on the datasource.
+-ds['aname'] would return the layer named "aname".
+-ds[0:4] would return a list of the first four layers."""
++        ds[0] would return the first layer on the datasource.
++        ds['aname'] would return the layer named "aname".
++        ds[0:4] would return a list of the first four layers."""
+         if isinstance(value, slice):
+             output = []
+@@ -135,6 +135,6 @@
+     def __getitem__(self, value):
+         """Support list and slice -like access to the layer.
+-layer[0] would return the first feature on the layer.
+-layer[0:4] would return a list of the first four features."""
++        layer[0] would return the first feature on the layer.
++        layer[0:4] would return a list of the first four features."""
+         if isinstance(value, slice):
+             import sys
index e244d2713fc8df29250d5c96b5cd6722aeb960ad..8a55b2f89aaeb86339514f0c816dbef9388165a0 100644 (file)
@@ -59,7 +59,7 @@ RDEPEND="
        xls? ( dev-libs/freexl )
 "
 
-SWIG_DEP=">=dev-lang/swig-2.0.2 <=dev-lang/swig-3.0.4"
+SWIG_DEP=">=dev-lang/swig-2.0.2"
 DEPEND="${RDEPEND}
        doc? ( app-doc/doxygen )
        java? ( >=virtual/jdk-1.6 )
@@ -122,6 +122,9 @@ src_prepare() {
        # Fix swig-3.0.3 problem (bug #534168)
        epatch "${FILESDIR}"/${PN}-1.11.1-swig-3.0.3.patch
 
+       # Fix swig-3.0.6 problem, https://trac.osgeo.org/gdal/ticket/6045
+       epatch "${FILESDIR}"/${PN}-1.11-swig-3.0.6.patch
+
        # bug 540132
        epatch "${FILESDIR}"/${PN}-1.11.1-poppler-0.31.0-support.patch
 
index 3a3e22fbaab8ea109fc42b489663e58410086a7e..985f716e6f1dbbb478c4bc5fff22a19149cc962e 100644 (file)
@@ -59,7 +59,7 @@ RDEPEND="
        xls? ( dev-libs/freexl )
 "
 
-SWIG_DEP=">=dev-lang/swig-2.0.2 <=dev-lang/swig-3.0.4"
+SWIG_DEP=">=dev-lang/swig-2.0.2"
 DEPEND="${RDEPEND}
        doc? ( app-doc/doxygen )
        java? ( >=virtual/jdk-1.6 )
@@ -122,6 +122,9 @@ src_prepare() {
        # bug 540132
        epatch "${FILESDIR}"/${PN}-1.11.1-poppler-0.31.0-support.patch
 
+       # Fix swig-3.0.6 problem, https://trac.osgeo.org/gdal/ticket/6045
+       epatch "${FILESDIR}"/${PN}-1.11-swig-3.0.6.patch
+
        tc-export AR RANLIB
 
        eautoreconf