Accepting request 327729 from Application:Geo
1 OBS-URL: https://build.opensuse.org/request/show/327729 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdal?expand=0&rev=7
This commit is contained in:
commit
5e7d264765
14
gdal-gcc5-getaddrinfo-issue6073.patch
Normal file
14
gdal-gcc5-getaddrinfo-issue6073.patch
Normal 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"
|
63
gdal-python-swig3-issue6045.patch
Normal file
63
gdal-python-swig3-issue6045.patch
Normal 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 = []
|
20
gdal.changes
20
gdal.changes
@ -1,3 +1,23 @@
|
||||
-------------------------------------------------------------------
|
||||
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
|
||||
|
||||
- Adding python3 support
|
||||
- move fdupes from buildroot (mix python scripts otherwise)
|
||||
fdupes is run against source html directory
|
||||
- dos2unix Fix EOL warnings
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jul 4 11:32:00 UTC 2015 - Angelos Tzotsos <tzotsos@opensuse.org>
|
||||
|
||||
|
96
gdal.spec
96
gdal.spec
@ -34,9 +34,14 @@ Patch3: GDALmake.opt.in.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.
|
||||
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: chrpath
|
||||
BuildRequires: curl-devel
|
||||
BuildRequires: dos2unix
|
||||
BuildRequires: doxygen >= 1.4.2
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
@ -59,11 +64,12 @@ BuildRequires: poppler-devel
|
||||
BuildRequires: postgresql-devel
|
||||
BuildRequires: python-numpy-devel
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-numpy-devel
|
||||
BuildRequires: sqlite-devel >= 3
|
||||
BuildRequires: swig
|
||||
BuildRequires: unixODBC-devel
|
||||
BuildRequires: zlib-devel >= 1.1.4
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with ecw_support}
|
||||
BuildRequires: libecwj2-devel
|
||||
%endif
|
||||
@ -78,6 +84,7 @@ BuildRequires: perl-ExtUtils-MakeMaker
|
||||
%else
|
||||
BuildRequires: hdf-devel >= 4.0
|
||||
%endif
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
GDAL is a translator library for raster geospatial data formats that
|
||||
@ -127,6 +134,14 @@ Requires: %{name} = %{version}-%{release}
|
||||
%description -n python-gdal
|
||||
The GDAL python modules provide support to handle multiple GIS file formats.
|
||||
|
||||
%package -n python3-gdal
|
||||
Summary: GDAL Python3 module
|
||||
Group: Development/Languages/Python
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description -n python3-gdal
|
||||
The GDAL python3 modules provide support to handle multiple GIS file formats.
|
||||
|
||||
%prep
|
||||
%setup -q -n gdal-%{version}
|
||||
%patch0 -p1
|
||||
@ -135,10 +150,18 @@ The GDAL python modules provide support to handle multiple GIS file formats.
|
||||
%patch3 -p0
|
||||
%patch4 -p0
|
||||
%patch5 -p0
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
|
||||
# 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;
|
||||
do
|
||||
# dos2unix -v is not supported on archaic SLE version
|
||||
find . -name "${F}" -exec dos2unix {} \;
|
||||
done
|
||||
|
||||
# need to regenerate (old ones don't support perl 5.10)
|
||||
rm swig/perl/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp}
|
||||
rm swig/php/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp}
|
||||
#See below the veryclean & generate usage.
|
||||
|
||||
rm -r man
|
||||
|
||||
@ -156,12 +179,12 @@ autoreconf -fi
|
||||
--disable-static \
|
||||
--with-geotiff \
|
||||
--with-libtiff \
|
||||
--with-rename-internal-libtiff-symbols=yes \
|
||||
--with-rename-internal-libgeotiff-symbols=yes \
|
||||
--with-rename-internal-libtiff-symbols=yes \
|
||||
--with-rename-internal-libgeotiff-symbols=yes \
|
||||
--with-libz \
|
||||
--with-cfitsio=no \
|
||||
--with-netcdf \
|
||||
--with-openjpeg \
|
||||
--with-openjpeg \
|
||||
--with-curl \
|
||||
--with-pg \
|
||||
--with-ogdi \
|
||||
@ -176,7 +199,7 @@ autoreconf -fi
|
||||
--with-png \
|
||||
--with-gif \
|
||||
--with-jpeg \
|
||||
--with-spatialite \
|
||||
--with-spatialite \
|
||||
--with-poppler \
|
||||
--with-python \
|
||||
--with-perl \
|
||||
@ -184,31 +207,51 @@ autoreconf -fi
|
||||
--with-xerces-lib="-lxerces-c" \
|
||||
--with-xerces-inc=%{_includedir}/xercesc \
|
||||
%if %{with ecw_support}
|
||||
--with-ecw \
|
||||
CFLAGS="$CFLAGS -pthread" \
|
||||
--with-ecw \
|
||||
CFLAGS="$CFLAGS -pthread" \
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1310
|
||||
--without-hdf4 \
|
||||
--with-hdf5 \
|
||||
--with-webp \
|
||||
--without-hdf4 \
|
||||
--with-hdf5 \
|
||||
--with-webp \
|
||||
%else
|
||||
--with-hdf4 \
|
||||
--with-hdf4 \
|
||||
%endif
|
||||
--disable-rpath
|
||||
--disable-rpath
|
||||
|
||||
# regenerate where needed
|
||||
make %{?_smp_mflags} -C swig/perl generate
|
||||
for M in perl python;
|
||||
do
|
||||
make %{?_smp_mflags} -C swig/${M} veryclean
|
||||
make %{?_smp_mflags} -C swig/${M} generate
|
||||
done
|
||||
|
||||
make %{?_smp_mflags} all docs man
|
||||
|
||||
# Make Python 3 module
|
||||
pushd swig/python
|
||||
python3 setup.py build
|
||||
popd
|
||||
|
||||
%install
|
||||
|
||||
# Install Python 3 module
|
||||
# Must be done first so executables are env python
|
||||
pushd swig/python
|
||||
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
popd
|
||||
|
||||
make %{?_smp_mflags} install install-man \
|
||||
DESTDIR=%{buildroot} INST_MAN=%{_mandir}
|
||||
|
||||
cp -a ogr/html html/ogr
|
||||
|
||||
%fdupes -s %{buildroot}
|
||||
# Not on buildroot : broke everything with python3
|
||||
# If done got python3 needing python2 package heretic ..
|
||||
# Futhermore duplicates are only existing in src html dir
|
||||
%fdupes -s html
|
||||
# Empty file
|
||||
rm -f html/do-not-remove
|
||||
|
||||
# chrpath must be removed here
|
||||
chmod 644 %{buildroot}%{perl_vendorarch}/auto/Geo/GDAL/Const/Const.so
|
||||
@ -221,6 +264,16 @@ 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/OSR/OSR.so
|
||||
|
||||
%if 0%{?suse_version} <= 1315
|
||||
# perl bs 0 length files cleanup
|
||||
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
|
||||
rm -rf %{buildroot}%{_mandir}/man1/_*
|
||||
rm -rf %{buildroot}%{_libdir}/libgdal.la
|
||||
@ -332,16 +385,15 @@ rm -rf %{buildroot}%{_bindir}/*.dox
|
||||
%attr(755,root,root) %{perl_vendorarch}/auto/Geo/OGR/OGR.so
|
||||
%dir %{perl_vendorarch}/auto/Geo/OSR
|
||||
%attr(755,root,root) %{perl_vendorarch}/auto/Geo/OSR/OSR.so
|
||||
%if 0%{?suse_version} <= 1315
|
||||
%{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
|
||||
|
||||
%files -n python-%{name}
|
||||
%defattr(644,root,root,755)
|
||||
%doc NEWS PROVENANCE.TXT LICENSE.TXT
|
||||
%{python_sitearch}/*
|
||||
|
||||
%files -n python3-%{name}
|
||||
%defattr(644,root,root,755)
|
||||
%doc NEWS PROVENANCE.TXT LICENSE.TXT
|
||||
%{python3_sitearch}/*
|
||||
|
||||
%changelog
|
||||
|
Loading…
x
Reference in New Issue
Block a user