SHA256
1
0
forked from pool/gdal

Accepting request 746088 from Application:Geo

OBS-URL: https://build.opensuse.org/request/show/746088
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdal?expand=0&rev=45
This commit is contained in:
Dominique Leuenberger 2019-11-07 22:19:22 +00:00 committed by Git OBS Bridge
commit ec21261b5a
7 changed files with 42 additions and 17 deletions

View File

@ -1,6 +1,7 @@
From 10289fbed9db3f803571607e09ce93ee5e183e3d Mon Sep 17 00:00:00 2001 From 8f52960e1c6f2fde21fbc3cfe8064af84f90a09d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de> From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
Date: Thu, 5 Sep 2019 20:54:32 +0200 Date: Thu, 5 Sep 2019 20:05:53 +0200
Git-id: 8328ae3077aea7e54537d76a9a8193775ddc8b09
Subject: [PATCH] Replace SWIG Python obj0/swig_obj[0] with version agnostic Subject: [PATCH] Replace SWIG Python obj0/swig_obj[0] with version agnostic
$self $self
@ -8,39 +9,54 @@ Subject: [PATCH] Replace SWIG Python obj0/swig_obj[0] with version agnostic
with swig 3.0, see swig/swig@cd8fc0a. with swig 3.0, see swig/swig@cd8fc0a.
Use the correct "$self" notation, which is expanded to the correct Use the correct "$self" notation, which is expanded to the correct
code regardless of swig version and options. code regardless of swig version and options.
Acked-by: Libor Pechacek <lpechacek@gmx.com>
--- ---
gdal/swig/include/gdal_array.i | 6 +++--- swig/include/gdal_array.i | 12 +++---------
gdal/swig/include/python/typemaps_python.i | 2 +- swig/include/python/typemaps_python.i | 8 +-------
2 files changed, 4 insertions(+), 4 deletions(-) 2 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/swig/include/gdal_array.i b/swig/include/gdal_array.i diff --git a/swig/include/gdal_array.i b/swig/include/gdal_array.i
index ff7bcde6c7..5dd3679cb2 100644 index d86491d1d45e..6ee34b9abd99 100644
--- a/swig/include/gdal_array.i --- a/swig/include/gdal_array.i
+++ b/swig/include/gdal_array.i +++ b/swig/include/gdal_array.i
@@ -878,11 +878,11 @@ retStringAndCPLFree* GetArrayFilename(PyArrayObject *psArray) @@ -913,18 +913,12 @@ retStringAndCPLFree* GetArrayFilename(PyArrayObject *psArray)
}
/* Keep a reference to the VirtualMem object */ /* Keep a reference to the VirtualMem object */
-%#if SWIGVERSION >= 0x040000
-%#define obj0 swig_obj[0]
-%#endif
%#if NPY_API_VERSION >= 0x00000007 %#if NPY_API_VERSION >= 0x00000007
- PyArray_SetBaseObject(ar, obj0); - PyArray_SetBaseObject(ar, obj0);
+ PyArray_SetBaseObject(ar, $self); + PyArray_SetBaseObject(ar, $self);
%#else %#else
- PyArray_BASE(ar) = obj0; - PyArray_BASE(ar) = obj0;
-%#endif
- Py_INCREF(obj0);
-%#if SWIGVERSION >= 0x040000
-%#undef obj0
+ PyArray_BASE(ar) = $self; + PyArray_BASE(ar) = $self;
%#endif %#endif
- Py_INCREF(obj0);
+ Py_INCREF($self); + Py_INCREF($self);
Py_DECREF($result); Py_DECREF($result);
$result = (PyObject*) ar; $result = (PyObject*) ar;
} }
diff --git a/swig/include/python/typemaps_python.i b/swig/include/python/typemaps_python.i diff --git a/swig/include/python/typemaps_python.i b/swig/include/python/typemaps_python.i
index 104b214ac1..9517c72ebd 100644 index 85a25b5a3099..2af8b51c6368 100644
--- a/swig/include/python/typemaps_python.i --- a/swig/include/python/typemaps_python.i
+++ b/swig/include/python/typemaps_python.i +++ b/swig/include/python/typemaps_python.i
@@ -1911,7 +1911,7 @@ DecomposeSequenceOfCoordinates( PyObject *seq, int nCount, double *x, double *y, @@ -2067,13 +2067,7 @@ DecomposeSequenceOf4DCoordinates( PyObject *seq, int nCount, double *x, double *
%#if PY_VERSION_HEX >= 0x02070000
/* %typemap(argout) (void** pptr, size_t* pnsize, GDALDataType* pdatatype, int* preadonly)*/ /* %typemap(argout) (void** pptr, size_t* pnsize, GDALDataType* pdatatype, int* preadonly)*/
Py_buffer *buf=(Py_buffer*)malloc(sizeof(Py_buffer)); Py_buffer *buf=(Py_buffer*)malloc(sizeof(Py_buffer));
- if (PyBuffer_FillInfo(buf, obj0, *($1), *($2), *($4), PyBUF_ND)) {
- if (PyBuffer_FillInfo(buf,
-%#if SWIGVERSION >= 0x040000
- swig_obj[0],
-%#else
- obj0,
-%#endif
- *($1), *($2), *($4), PyBUF_ND)) {
+ if (PyBuffer_FillInfo(buf, $self, *($1), *($2), *($4), PyBUF_ND)) { + if (PyBuffer_FillInfo(buf, $self, *($1), *($2), *($4), PyBUF_ND)) {
// error, handle // error, handle
} }

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:45b4ae25dbd87282d589eca76481c426f72132d7a599556470d5c38263b09266
size 8670636

View File

@ -1 +0,0 @@
f3bcf494f8285861dedaa5b9aa6e9479 gdal-3.0.1.tar.xz

3
gdal-3.0.2.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c3765371ce391715c8f28bd6defbc70b57aa43341f6e94605f04fe3c92468983
size 8668052

1
gdal-3.0.2.tar.xz.md5 Normal file
View File

@ -0,0 +1 @@
0353d7e56efc79fcaaeb21d808cb9cac gdal-3.0.2.tar.xz

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed Nov 6 12:58:46 UTC 2019 - Libor Pechacek <lpechacek@gmx.com>
- update to 3.0.2
Full changelogs:
https://trac.osgeo.org/gdal/wiki/Release/3.0.2-News
- Refreshed patches:
0001-Replace-SWIG-Python-obj0-swig_obj-0-with-version-agn.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Oct 10 08:26:00 UTC 2019 - Martin Pluskal <mpluskal@suse.com> Thu Oct 10 08:26:00 UTC 2019 - Martin Pluskal <mpluskal@suse.com>

View File

@ -26,7 +26,7 @@
%bcond_with ecw5_support %bcond_with ecw5_support
%bcond_with fgdb_support %bcond_with fgdb_support
Name: gdal Name: gdal
Version: 3.0.1 Version: 3.0.2
Release: 0 Release: 0
Summary: GDAL/OGR - a translator library for raster and vector geospatial data formats Summary: GDAL/OGR - a translator library for raster and vector geospatial data formats
License: MIT AND BSD-3-Clause AND SUSE-Public-Domain License: MIT AND BSD-3-Clause AND SUSE-Public-Domain