SHA256
1
0
forked from pool/gdal

Accepting request 327728 from home:bruno_friedmann:branches:Application:Geo

Please find a new version of packaging fixing all build 
trouble since 20150827.
SLE_11_SP3 is totally broken don't know the stage of
build before.
openSUSE_42 should have its unresolvable state cleanup
automatically once the depot got the last build of
hd5 and libhdf4 published.

- packaging
  Redone exclusion for <= 1310 and 1315
  Cleanup empty perl bs files
- Build fixes
  * Fix python coding in swig3+ (backport of gdal20)
  with patch gdal-python-swig3-issue6045.patch
  * Fix gcc5 build upstream issue 6073
  gdal-gcc5-getaddrinfo-issue6073.patch

OBS-URL: https://build.opensuse.org/request/show/327728
OBS-URL: https://build.opensuse.org/package/show/Application:Geo/gdal?expand=0&rev=17
This commit is contained in:
Martin Pluskal 2015-08-28 11:12:11 +00:00 committed by Git OBS Bridge
parent 2d5cccc0eb
commit a7bf7af898
4 changed files with 111 additions and 9 deletions

View File

@ -0,0 +1,14 @@
Index: apps/gdalserver.c
===================================================================
--- a/apps/gdalserver.c
+++ b/apps/gdalserver.c
@@ -28,7 +28,6 @@
****************************************************************************/
-#if defined(__STDC_VERSION__)
-#define _XOPEN_SOURCE
-#endif
+// So that __USE_XOPEN2K is defined to have getaddrinfo
+#define _XOPEN_SOURCE 600
#include "cpl_port.h"

View File

@ -0,0 +1,63 @@
diff -rup a/swig/include/python/ogr_python.i b/swig/include/python/ogr_python.i
--- a/swig/include/python/ogr_python.i 2015-02-10 13:12:08.000000000 +0100
+++ b/swig/include/python/ogr_python.i 2015-08-28 11:51:02.955567700 +0200
@@ -66,9 +66,9 @@
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 = []
for i in xrange(value.start,value.stop,value.step):
@@ -134,8 +134,8 @@ ds[0:4] would return a list of the first
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
output = []
@@ -400,7 +400,7 @@ layer[0:4] would return a list of the fi
def __reduce__(self):
return (self.__class__, (), self.ExportToWkb())
-
+
def __setstate__(self, state):
result = CreateGeometryFromWkb(state)
self.this = result.this
diff -rup a/swig/python/osgeo/ogr.py b/swig/python/osgeo/ogr.py
--- a/swig/python/osgeo/ogr.py 2015-02-10 13:12:08.000000000 +0100
+++ b/swig/python/osgeo/ogr.py 2015-08-28 11:54:46.775552596 +0200
@@ -815,9 +815,9 @@ class DataSource(_object):
def __getitem__(self, value):
"""Support dictionary, list, and slice -like access to the datasource.
- ] would return the first layer on the datasource.
- aname'] would return the layer named "aname".
- :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 = []
for i in xrange(value.start,value.stop,value.step):
@@ -2035,8 +2035,8 @@ class Layer(_object):
def __getitem__(self, value):
"""Support list and slice -like access to the layer.
- r[0] would return the first feature on the layer.
- r[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
output = []

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Fri Aug 28 10:26:28 UTC 2015 - bruno@ioda-net.ch
- packaging
Redone exclusion for <= 1310 and 1315
Cleanup empty perl bs files
- Build fixes
* Fix python coding in swig3+ (backport of gdal20)
with patch gdal-python-swig3-issue6045.patch
* Fix gcc5 build upstream issue 6073
gdal-gcc5-getaddrinfo-issue6073.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Aug 26 09:58:30 UTC 2015 - bruno@ioda-net.ch Wed Aug 26 09:58:30 UTC 2015 - bruno@ioda-net.ch

View File

@ -34,6 +34,10 @@ Patch3: GDALmake.opt.in.patch
Patch4: gdal-libproj.patch Patch4: gdal-libproj.patch
# PATCH-FIX-UPSTREAM gdal-poppler-0.31.patch dimstar@opensuse.org -- Fix build with poppler 0.31+, taken from upstream svn. # PATCH-FIX-UPSTREAM gdal-poppler-0.31.patch dimstar@opensuse.org -- Fix build with poppler 0.31+, taken from upstream svn.
Patch5: gdal-poppler-0.31.patch Patch5: gdal-poppler-0.31.patch
# Fix python coding in swig3+ (backport of gdal20)
Patch6: gdal-python-swig3-issue6045.patch
# Fix gcc5 build upstream issue 6073
Patch7: gdal-gcc5-getaddrinfo-issue6073.patch
BuildRequires: blas-devel BuildRequires: blas-devel
BuildRequires: chrpath BuildRequires: chrpath
BuildRequires: curl-devel BuildRequires: curl-devel
@ -73,10 +77,10 @@ BuildRequires: libecwj2-devel
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: hdf5-devel BuildRequires: hdf5-devel
%if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315 %endif
%if 0%{?suse_version} > 1310 && 0%{?suse_version} != 1315
BuildRequires: libwebp-devel BuildRequires: libwebp-devel
BuildRequires: perl-ExtUtils-MakeMaker BuildRequires: perl-ExtUtils-MakeMaker
%endif
%else %else
BuildRequires: hdf-devel >= 4.0 BuildRequires: hdf-devel >= 4.0
%endif %endif
@ -146,6 +150,8 @@ The GDAL python3 modules provide support to handle multiple GIS file formats.
%patch3 -p0 %patch3 -p0
%patch4 -p0 %patch4 -p0
%patch5 -p0 %patch5 -p0
%patch6 -p1
%patch7 -p1
# Fix wrong encoding EOL # Fix wrong encoding EOL
for F in frmt_twms_srtm.xml frmt_wms_bluemarble_s3_tms.xml frmt_wms_virtualearth.xml frmt_twms_Clementine.xml; for F in frmt_twms_srtm.xml frmt_wms_bluemarble_s3_tms.xml frmt_wms_virtualearth.xml frmt_twms_Clementine.xml;
@ -159,8 +165,6 @@ done
rm -r man rm -r man
echo "********* 0%{suse_version} *******************************************"
%build %build
# need to regenerate (old one does not accpet CFLAGS) # need to regenerate (old one does not accpet CFLAGS)
%if 0%{?suse_version} >= 1310 %if 0%{?suse_version} >= 1310
@ -206,7 +210,7 @@ autoreconf -fi
--with-ecw \ --with-ecw \
CFLAGS="$CFLAGS -pthread" \ CFLAGS="$CFLAGS -pthread" \
%endif %endif
%if 0%{?suse_version} >= 1310 %if 0%{?suse_version} > 1310
--without-hdf4 \ --without-hdf4 \
--with-hdf5 \ --with-hdf5 \
--with-webp \ --with-webp \
@ -246,6 +250,8 @@ cp -a ogr/html html/ogr
# If done got python3 needing python2 package heretic .. # If done got python3 needing python2 package heretic ..
# Futhermore duplicates are only existing in src html dir # Futhermore duplicates are only existing in src html dir
%fdupes -s html %fdupes -s html
# Empty file
rm -f html/do-not-remove
# chrpath must be removed here # chrpath must be removed here
chmod 644 %{buildroot}%{perl_vendorarch}/auto/Geo/GDAL/Const/Const.so chmod 644 %{buildroot}%{perl_vendorarch}/auto/Geo/GDAL/Const/Const.so
@ -258,8 +264,15 @@ chrpath --delete %{buildroot}%{perl_vendorarch}/auto/Geo/GDAL/GDAL.so
chrpath --delete %{buildroot}%{perl_vendorarch}/auto/Geo/OGR/OGR.so chrpath --delete %{buildroot}%{perl_vendorarch}/auto/Geo/OGR/OGR.so
chrpath --delete %{buildroot}%{perl_vendorarch}/auto/Geo/OSR/OSR.so chrpath --delete %{buildroot}%{perl_vendorarch}/auto/Geo/OSR/OSR.so
#perl bs 0 length files cleanup %if 0%{?suse_version} <= 1315
# perl bs 0 length files cleanup
find %{buildroot}%{perl_vendorarch} -name "*.bs" -exec rm -fv {} \; find %{buildroot}%{perl_vendorarch} -name "*.bs" -exec rm -fv {} \;
#Those are deleted.
#%%{perl_vendorarch}/auto/Geo/OSR/OSR.bs
#%%{perl_vendorarch}/auto/Geo/OGR/OGR.bs
#%%{perl_vendorarch}/auto/Geo/GDAL/GDAL.bs
#%%{perl_vendorarch}/auto/Geo/GDAL/Const/Const.bs
%endif
# do not ship these # do not ship these
rm -rf %{buildroot}%{_mandir}/man1/_* rm -rf %{buildroot}%{_mandir}/man1/_*