summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Grozin <grozin@gentoo.org>2015-01-12 23:49:19 +0000
committerAndrey Grozin <grozin@gentoo.org>2015-01-12 23:49:19 +0000
commit64c0639155f5abf2eccc64ec4830825c076cc09a (patch)
tree4684e001f929efbc6330492262872c61d5d669aa /sci-libs/gdal
parentRemove fetch restriction, bug #536382. (diff)
downloadgentoo-2-64c0639155f5abf2eccc64ec4830825c076cc09a.tar.gz
gentoo-2-64c0639155f5abf2eccc64ec4830825c076cc09a.tar.bz2
gentoo-2-64c0639155f5abf2eccc64ec4830825c076cc09a.zip
Fix #534168
(Portage version: 2.2.15/cvs/Linux i686, signed Manifest commit with key 0x3AFFCE974D34BD8C!)
Diffstat (limited to 'sci-libs/gdal')
-rw-r--r--sci-libs/gdal/ChangeLog6
-rw-r--r--sci-libs/gdal/files/gdal-1.11.1-swig-3.0.3.patch161
-rw-r--r--sci-libs/gdal/gdal-1.11.1-r1.ebuild5
3 files changed, 170 insertions, 2 deletions
diff --git a/sci-libs/gdal/ChangeLog b/sci-libs/gdal/ChangeLog
index 0de62ef1bc7a..4786f632a457 100644
--- a/sci-libs/gdal/ChangeLog
+++ b/sci-libs/gdal/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sci-libs/gdal
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/gdal/ChangeLog,v 1.158 2015/01/05 16:30:43 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/gdal/ChangeLog,v 1.159 2015/01/12 23:49:19 grozin Exp $
+
+ 12 Jan 2015; Andrey Grozin <grozin@gentoo.org> gdal-1.11.1-r1.ebuild,
+ +files/gdal-1.11.1-swig-3.0.3.patch:
+ Fix #534168
05 Jan 2015; Alexis Ballier <aballier@gentoo.org> gdal-1.11.1-r1.ebuild:
keyword ~arm
diff --git a/sci-libs/gdal/files/gdal-1.11.1-swig-3.0.3.patch b/sci-libs/gdal/files/gdal-1.11.1-swig-3.0.3.patch
new file mode 100644
index 000000000000..c6b8240b8ebf
--- /dev/null
+++ b/sci-libs/gdal/files/gdal-1.11.1-swig-3.0.3.patch
@@ -0,0 +1,161 @@
+svn diff -c 28298 https://svn.osgeo.org/gdal/branches/1.11
+r28298 | rouault | 2015-01-06 10:03:37 +0100 (Di, 06 Jan 2015) | 1 line
+Python bindings: fix processing error of ogr_python.i with SWIG 3 (#5795)
+http://trac.osgeo.org/gdal/ticket/5795#comment:3
+https://bugs.gentoo.org/534168
+
+Index: gdal/swig/python/osgeo/ogr.py
+===================================================================
+--- gdal/swig/python/osgeo/ogr.py (revision 28297)
++++ gdal/swig/python/osgeo/ogr.py (revision 28298)
+@@ -2025,12 +2025,12 @@
+ """Returns the number of features in the layer"""
+ return self.GetFeatureCount()
+
+-
+-
++ # To avoid __len__ being called when testing boolean value
++ # which can have side effects (#4758)
+ def __nonzero__(self):
+ return True
+
+-
++ # For Python 3 compat
+ __bool__ = __nonzero__
+
+ def __getitem__(self, value):
+@@ -2041,9 +2041,9 @@
+ import sys
+ output = []
+ if value.stop == sys.maxint:
+-
+-
+-
++ #for an unending slice, sys.maxint is used
++ #We need to stop before that or GDAL will write an
++ ##error to stdout
+ stop = len(self) - 1
+ else:
+ stop = value.stop
+@@ -2944,8 +2944,8 @@
+ def __copy__(self):
+ return self.Clone()
+
+-
+-
++ # This makes it possible to fetch fields in the form "feature.area".
++ # This has some risk of name collisions.
+ def __getattr__(self, key):
+ """Returns the values of fields by the given name"""
+ if key == 'this':
+@@ -2961,8 +2961,8 @@
+ else:
+ return self.GetField(idx)
+
+-
+-
++ # This makes it possible to set fields in the form "feature.area".
++ # This has some risk of name collisions.
+ def __setattr__(self, key, value):
+ """Set the values of fields by the given name"""
+ if key == 'this' or key == 'thisown':
+@@ -2978,7 +2978,7 @@
+ else:
+ self.__dict__[key] = value
+
+-
++ # This makes it possible to fetch fields in the form "feature['area']".
+ def __getitem__(self, key):
+ """Returns the values of fields by the given name / field_index"""
+ if isinstance(key, str):
+@@ -2993,7 +2993,7 @@
+ else:
+ return self.GetField(fld_index)
+
+-
++ # This makes it possible to set fields in the form "feature['area'] = 123".
+ def __setitem__(self, key, value):
+ """Returns the value of a field by field name / index"""
+ if isinstance(key, str):
+@@ -3026,9 +3026,9 @@
+ return self.GetFieldAsIntegerList(fld_index)
+ if fld_type == OFTRealList:
+ return self.GetFieldAsDoubleList(fld_index)
+-
+-
+-
++ ## if fld_type == OFTDateTime or fld_type == OFTDate or fld_type == OFTTime:
++ # return self.GetFieldAsDate(fld_index)
++ # default to returning as a string. Should we add more types?
+ return self.GetFieldAsString(fld_index)
+
+ def SetField2(self, fld_index, value):
+Index: gdal/swig/include/python/ogr_python.i
+===================================================================
+--- gdal/swig/include/python/ogr_python.i (revision 28297)
++++ gdal/swig/include/python/ogr_python.i (revision 28298)
+@@ -111,7 +111,7 @@
+ }
+
+ %extend OGRLayerShadow {
+- %pythoncode {
++ %pythoncode %{
+ def Reference(self):
+ "For backwards compatibility only."
+ pass
+@@ -183,12 +183,12 @@
+ return output
+ schema = property(schema)
+
+- }
++ %}
+
+ }
+
+ %extend OGRFeatureShadow {
+- %pythoncode {
++ %pythoncode %{
+ def Reference(self):
+ pass
+
+@@ -383,12 +383,12 @@
+ return output
+
+
+-}
++%}
+
+ }
+
+ %extend OGRGeometryShadow {
+-%pythoncode {
++%pythoncode %{
+ def Destroy(self):
+ self.__swig_destroy__(self)
+ self.__del__()
+@@ -416,8 +416,8 @@
+ return subgeom
+ else:
+ raise StopIteration
++%}
+ }
+-}
+
+
+ %extend OGRFieldDefnShadow {
+@@ -449,13 +449,13 @@
+ }
+
+ %extend OGRFieldDefnShadow {
+-%pythoncode {
++%pythoncode %{
+ def Destroy(self):
+ "Once called, self has effectively been destroyed. Do not access. For backwards compatiblity only"
+ _ogr.delete_FieldDefn( self )
+ self.thisown = 0
++%}
+ }
+-}
+
+ %import typemaps_python.i
+
diff --git a/sci-libs/gdal/gdal-1.11.1-r1.ebuild b/sci-libs/gdal/gdal-1.11.1-r1.ebuild
index b2cf8f51da0e..9fff0a2bcfe1 100644
--- a/sci-libs/gdal/gdal-1.11.1-r1.ebuild
+++ b/sci-libs/gdal/gdal-1.11.1-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/gdal/gdal-1.11.1-r1.ebuild,v 1.7 2015/01/05 16:30:43 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/gdal/gdal-1.11.1-r1.ebuild,v 1.8 2015/01/12 23:49:19 grozin Exp $
EAPI=5
@@ -119,6 +119,9 @@ src_prepare() {
-e 's:^ar:$(AR):g' \
-i ogr/ogrsf_frmts/sdts/install-libs.sh || die
+ # Fix swig-3.0.3 problem (bug #534168)
+ epatch "${FILESDIR}"/${PN}-1.11.1-swig-3.0.3.patch
+
tc-export AR RANLIB
eautoreconf