Accepting request 589927 from home:bruno_friedmann:branches:Application:Geo
- Update to new upstream bugfix release 2.2.4 See details https://trac.osgeo.org/gdal/wiki/Release/2.2.4-News - Remove merged patch gdal-json-c-0.13.patch - Maximize usage of pkgconfig OBS-URL: https://build.opensuse.org/request/show/589927 OBS-URL: https://build.opensuse.org/package/show/Application:Geo/gdal?expand=0&rev=56
This commit is contained in:
parent
e3158c0fc7
commit
551a33915c
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a328d63d476b3653f5a25b5f7971e87a15cdf8860ab0729d4b1157ba988b8d0b
|
||||
size 8248472
|
3
gdal-2.2.4.tar.xz
Normal file
3
gdal-2.2.4.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:441eb1d1acb35238ca43a1a0a649493fc91fdcbab231d0747e9d462eea192278
|
||||
size 8255840
|
@ -1,84 +0,0 @@
|
||||
Index: gdal/ogr/ogrsf_frmts/geojson/ogrgeojsonwriter.cpp
|
||||
===================================================================
|
||||
--- a/ogr/ogrsf_frmts/geojson/ogrgeojsonwriter.cpp (revision 41042)
|
||||
+++ b/ogr/ogrsf_frmts/geojson/ogrgeojsonwriter.cpp (revision 41043)
|
||||
@@ -28,4 +28,6 @@
|
||||
****************************************************************************/
|
||||
|
||||
+#define JSON_C_VER_013 (13 << 8)
|
||||
+
|
||||
#include "ogrgeojsonwriter.h"
|
||||
#include "ogrgeojsonutils.h"
|
||||
@@ -33,5 +35,9 @@
|
||||
#include "ogrgeojsonreader.h"
|
||||
#include <json.h> // JSON-C
|
||||
+
|
||||
+#if (!defined(JSON_C_VERSION_NUM)) || (JSON_C_VERSION_NUM < JSON_C_VER_013)
|
||||
#include <json_object_private.h>
|
||||
+#endif
|
||||
+
|
||||
#include <printbuf.h>
|
||||
#include <ogr_api.h>
|
||||
@@ -1382,11 +1388,15 @@
|
||||
// TODO(schwehr): Explain this casting.
|
||||
const int nPrecision =
|
||||
+#if (!defined(JSON_C_VERSION_NUM)) || (JSON_C_VERSION_NUM < JSON_C_VER_013)
|
||||
static_cast<int>(reinterpret_cast<GUIntptr_t>(jso->_userdata));
|
||||
+#else
|
||||
+ static_cast<int>(reinterpret_cast<GUIntptr_t>(json_object_get_userdata(jso)));
|
||||
+#endif
|
||||
char szBuffer[75] = {};
|
||||
- OGRFormatDouble( szBuffer, sizeof(szBuffer), jso->o.c_double, '.',
|
||||
+ OGRFormatDouble( szBuffer, sizeof(szBuffer), json_object_get_double(jso), '.',
|
||||
(nPrecision < 0) ? 15 : nPrecision );
|
||||
if( szBuffer[0] == 't' /*oobig */ )
|
||||
{
|
||||
- CPLsnprintf(szBuffer, sizeof(szBuffer), "%.18g", jso->o.c_double);
|
||||
+ CPLsnprintf(szBuffer, sizeof(szBuffer), "%.18g", json_object_get_double(jso));
|
||||
}
|
||||
return printbuf_memappend(pb, szBuffer, static_cast<int>(strlen(szBuffer)));
|
||||
@@ -1418,9 +1428,9 @@
|
||||
char szBuffer[75] = {};
|
||||
int nSize = 0;
|
||||
- if( CPLIsNan(jso->o.c_double))
|
||||
+ if( CPLIsNan(json_object_get_double(jso)))
|
||||
nSize = CPLsnprintf(szBuffer, sizeof(szBuffer), "NaN");
|
||||
- else if( CPLIsInf(jso->o.c_double) )
|
||||
- {
|
||||
- if( jso->o.c_double > 0 )
|
||||
+ else if( CPLIsInf(json_object_get_double(jso)) )
|
||||
+ {
|
||||
+ if( json_object_get_double(jso) > 0 )
|
||||
nSize = CPLsnprintf(szBuffer, sizeof(szBuffer), "Infinity");
|
||||
else
|
||||
@@ -1430,5 +1440,9 @@
|
||||
{
|
||||
char szFormatting[32] = {};
|
||||
+#if (!defined(JSON_C_VERSION_NUM)) || (JSON_C_VERSION_NUM < JSON_C_VER_013)
|
||||
const int nSignificantFigures = (int) (GUIntptr_t) jso->_userdata;
|
||||
+#else
|
||||
+ const int nSignificantFigures = (int) (GUIntptr_t) json_object_get_userdata(jso);
|
||||
+#endif
|
||||
const int nInitialSignificantFigures =
|
||||
nSignificantFigures >= 0 ? nSignificantFigures : 17;
|
||||
@@ -1436,5 +1450,5 @@
|
||||
"%%.%dg", nInitialSignificantFigures);
|
||||
nSize = CPLsnprintf(szBuffer, sizeof(szBuffer),
|
||||
- szFormatting, jso->o.c_double);
|
||||
+ szFormatting, json_object_get_double(jso));
|
||||
const char* pszDot = NULL;
|
||||
if( nSize+2 < static_cast<int>(sizeof(szBuffer)) &&
|
||||
@@ -1458,5 +1472,5 @@
|
||||
"%%.%dg", nInitialSignificantFigures- i);
|
||||
nSize = CPLsnprintf(szBuffer, sizeof(szBuffer),
|
||||
- szFormatting, jso->o.c_double);
|
||||
+ szFormatting, json_object_get_double(jso));
|
||||
pszDot = strchr(szBuffer, '.');
|
||||
if( pszDot != NULL &&
|
||||
@@ -1473,5 +1487,5 @@
|
||||
"%%.%dg", nInitialSignificantFigures);
|
||||
nSize = CPLsnprintf(szBuffer, sizeof(szBuffer),
|
||||
- szFormatting, jso->o.c_double);
|
||||
+ szFormatting, json_object_get_double(jso));
|
||||
if( nSize+2 < static_cast<int>(sizeof(szBuffer)) &&
|
||||
strchr(szBuffer, '.') == NULL )
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 22 06:15:25 UTC 2018 - bruno@ioda-net.ch
|
||||
|
||||
- Update to new upstream bugfix release 2.2.4
|
||||
See details https://trac.osgeo.org/gdal/wiki/Release/2.2.4-News
|
||||
- Remove merged patch gdal-json-c-0.13.patch
|
||||
- Maximize usage of pkgconfig
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 12 10:24:13 UTC 2018 - dimstar@opensuse.org
|
||||
|
||||
|
155
gdal.spec
155
gdal.spec
@ -16,19 +16,18 @@
|
||||
#
|
||||
|
||||
|
||||
%bcond_with ecw_support
|
||||
# Soname should be bumped on API/ABI break
|
||||
# http://trac.osgeo.org/gdal/ticket/4543
|
||||
%define soversion 20
|
||||
%define sourcename gdal
|
||||
|
||||
%bcond_with ecw_support
|
||||
Name: gdal
|
||||
Version: 2.2.3
|
||||
Version: 2.2.4
|
||||
Release: 0
|
||||
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
|
||||
Group: Development/Libraries/C and C++
|
||||
Url: http://www.gdal.org/
|
||||
URL: http://www.gdal.org/
|
||||
Source0: http://download.osgeo.org/%{name}/%{version}/%{sourcename}-%{version}.tar.xz
|
||||
Patch0: gdal-perl.patch
|
||||
# Fix occasional parallel build failure
|
||||
@ -36,8 +35,6 @@ Patch1: GDALmake.opt.in.patch
|
||||
# Fix hard coded name of libproj library
|
||||
# But libproj.so is valid if libproj-devel is installed ?
|
||||
Patch2: gdal-libproj.patch
|
||||
# PATCH-FIX-UPSTREAM gdal-json-c-0.13.patch dimstar@opensuse.org -- Fix build with json-c 0.13; copied from gentoo
|
||||
Patch3: gdal-json-c-0.13.patch
|
||||
BuildRequires: blas-devel
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: curl-devel
|
||||
@ -46,56 +43,61 @@ BuildRequires: doxygen >= 1.4.2
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: geos-devel >= 3
|
||||
BuildRequires: geotiff-devel >= 1.2.1
|
||||
BuildRequires: giflib-devel
|
||||
BuildRequires: lapack-devel
|
||||
BuildRequires: libexpat-devel >= 1.95.0
|
||||
# No more please we have openjpeg2
|
||||
# BuildRequires: libjasper-devel
|
||||
# Using jasper create build error on arm, powerpc, s390
|
||||
BuildRequires: libjpeg-devel
|
||||
BuildRequires: libpng-devel
|
||||
BuildRequires: libproj-devel
|
||||
BuildRequires: libspatialite-devel
|
||||
BuildRequires: libtiff-devel >= 3.6.0
|
||||
BuildRequires: libtool
|
||||
BuildRequires: libxerces-c-devel
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: mysql-devel
|
||||
BuildRequires: netcdf-devel
|
||||
BuildRequires: opencl-headers
|
||||
BuildRequires: openjpeg2-devel
|
||||
BuildRequires: perl-macros
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: postgresql-devel
|
||||
BuildRequires: python-numpy-devel
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: python3-numpy-devel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: sqlite-devel >= 3
|
||||
BuildRequires: swig
|
||||
BuildRequires: unixODBC-devel
|
||||
BuildRequires: xz-devel
|
||||
BuildRequires: zlib-devel >= 1.1.4
|
||||
BuildRequires: pkgconfig(expat) >= 1.95.0
|
||||
BuildRequires: pkgconfig(libgeotiff) >= 1.2.1
|
||||
BuildRequires: pkgconfig(libjpeg)
|
||||
BuildRequires: pkgconfig(liblzma)
|
||||
BuildRequires: pkgconfig(libopenjp2)
|
||||
BuildRequires: pkgconfig(libpng)
|
||||
BuildRequires: pkgconfig(libtiff-4) >= 3.6.0
|
||||
BuildRequires: pkgconfig(libxml-2.0)
|
||||
BuildRequires: pkgconfig(netcdf)
|
||||
BuildRequires: pkgconfig(poppler)
|
||||
BuildRequires: pkgconfig(proj)
|
||||
BuildRequires: pkgconfig(spatialite)
|
||||
BuildRequires: pkgconfig(sqlite3)
|
||||
BuildRequires: pkgconfig(xerces-c)
|
||||
BuildRequires: pkgconfig(zlib) >= 1.1.4
|
||||
%if %{with ecw_support}
|
||||
BuildRequires: libecwj2-devel
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1310
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: freexl-devel
|
||||
BuildRequires: hdf5-devel
|
||||
BuildRequires: libwebp-devel
|
||||
BuildRequires: pkgconfig(freexl)
|
||||
BuildRequires: pkgconfig(libwebp)
|
||||
BuildRequires: pkgconfig(libwebpdecoder)
|
||||
BuildRequires: pkgconfig(libwebpdemux)
|
||||
BuildRequires: pkgconfig(libwebpmux)
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1320
|
||||
BuildRequires: libjson-c-devel
|
||||
BuildRequires: ocl-icd-devel
|
||||
BuildRequires: opencl-headers
|
||||
BuildRequires: perl-ExtUtils-MakeMaker
|
||||
BuildRequires: pkgconfig(OpenCL)
|
||||
BuildRequires: pkgconfig(json)
|
||||
BuildRequires: pkgconfig(json-c)
|
||||
BuildRequires: pkgconfig(ocl-icd)
|
||||
%else
|
||||
BuildRequires: hdf-devel >= 4.0
|
||||
%endif
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
GDAL is a translator library for raster geospatial data formats that
|
||||
@ -142,7 +144,6 @@ Summary: GDAL Python module
|
||||
Group: Development/Languages/Python
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Provides: python2-%{name} = %{version}
|
||||
%py_requires
|
||||
|
||||
%description -n python-%{name}
|
||||
The GDAL python modules provide support to handle multiple GIS file formats.
|
||||
@ -160,7 +161,6 @@ The GDAL python modules provide support to handle multiple GIS file formats.
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
# Fix mandir
|
||||
sed -i "s|^mandir=.*|mandir='\${prefix}/share/man'|" configure
|
||||
@ -172,7 +172,7 @@ done
|
||||
|
||||
#Fix wrong /usr/bin/env phyton
|
||||
#Create the move to python3
|
||||
find . -iname "*.py" -exec sed -i 's,^#!/usr/bin/env python$,#!/usr/bin/python3,' {} \;
|
||||
find . -iname "*.py" -exec sed -i 's,^#!%{_bindir}/env python$,#!%{_bindir}/python3,' {} \;
|
||||
|
||||
%build
|
||||
# need to regenerate (old one does not accept CFLAGS)
|
||||
@ -299,7 +299,6 @@ rm -rf %{buildroot}%{_bindir}/*.dox
|
||||
sed -i 's,\(#define PACKAGE_.*\),/* \1 */,' %{buildroot}%{_includedir}/gdal/cpl_config.h
|
||||
|
||||
%post -n lib%{name}%{soversion} -p /sbin/ldconfig
|
||||
|
||||
%postun -n lib%{name}%{soversion} -p /sbin/ldconfig
|
||||
|
||||
%files -n lib%{name}%{soversion}
|
||||
@ -362,49 +361,49 @@ sed -i 's,\(#define PACKAGE_.*\),/* \1 */,' %{buildroot}%{_includedir}/gdal/cpl_
|
||||
%{_bindir}/testepsg
|
||||
%defattr(644,root,root,755)
|
||||
%{_datadir}/gdal
|
||||
%{_mandir}/man1/gdal2tiles.1*
|
||||
%{_mandir}/man1/gdal_calc.1*
|
||||
%{_mandir}/man1/gdal_contour.1*
|
||||
%{_mandir}/man1/gdal_edit.1*
|
||||
%{_mandir}/man1/gdal_fillnodata.1*
|
||||
%{_mandir}/man1/gdal_grid.1*
|
||||
%{_mandir}/man1/gdal_merge.1*
|
||||
%{_mandir}/man1/gdal_pansharpen.1*
|
||||
%{_mandir}/man1/gdal_polygonize.1*
|
||||
%{_mandir}/man1/gdal_proximity.1*
|
||||
%{_mandir}/man1/gdal_rasterize.1*
|
||||
%{_mandir}/man1/gdal_retile.1*
|
||||
%{_mandir}/man1/gdal_sieve.1*
|
||||
%{_mandir}/man1/gdal_translate.1*
|
||||
%{_mandir}/man1/gdal_utilities.1*
|
||||
%{_mandir}/man1/gdaladdo.1*
|
||||
%{_mandir}/man1/gdalbuildvrt.1*
|
||||
%{_mandir}/man1/gdalcompare.1*
|
||||
%{_mandir}/man1/gdaldem.1*
|
||||
%{_mandir}/man1/gdalinfo.1*
|
||||
%{_mandir}/man1/gdallocationinfo.1*
|
||||
%{_mandir}/man1/gdalmanage.1*
|
||||
%{_mandir}/man1/gdalmove.1*
|
||||
%{_mandir}/man1/gdalsrsinfo.1*
|
||||
%{_mandir}/man1/gdaltindex.1*
|
||||
%{_mandir}/man1/gdaltransform.1*
|
||||
%{_mandir}/man1/gdalwarp.1*
|
||||
%{_mandir}/man1/gnm_utilities.1*
|
||||
%{_mandir}/man1/gnmanalyse.1*
|
||||
%{_mandir}/man1/gnmmanage.1*
|
||||
%{_mandir}/man1/nearblack.1*
|
||||
%{_mandir}/man1/ogr2ogr.1*
|
||||
%{_mandir}/man1/ogr_utilities.1*
|
||||
%{_mandir}/man1/ogrinfo.1*
|
||||
%{_mandir}/man1/ogrlineref.1*
|
||||
%{_mandir}/man1/ogrmerge.1*
|
||||
%{_mandir}/man1/ogrtindex.1*
|
||||
%{_mandir}/man1/pct2rgb.1*
|
||||
%{_mandir}/man1/rgb2pct.1*
|
||||
%{_mandir}/man1/gdal2tiles.1%{?ext_man}
|
||||
%{_mandir}/man1/gdal_calc.1%{?ext_man}
|
||||
%{_mandir}/man1/gdal_contour.1%{?ext_man}
|
||||
%{_mandir}/man1/gdal_edit.1%{?ext_man}
|
||||
%{_mandir}/man1/gdal_fillnodata.1%{?ext_man}
|
||||
%{_mandir}/man1/gdal_grid.1%{?ext_man}
|
||||
%{_mandir}/man1/gdal_merge.1%{?ext_man}
|
||||
%{_mandir}/man1/gdal_pansharpen.1%{?ext_man}
|
||||
%{_mandir}/man1/gdal_polygonize.1%{?ext_man}
|
||||
%{_mandir}/man1/gdal_proximity.1%{?ext_man}
|
||||
%{_mandir}/man1/gdal_rasterize.1%{?ext_man}
|
||||
%{_mandir}/man1/gdal_retile.1%{?ext_man}
|
||||
%{_mandir}/man1/gdal_sieve.1%{?ext_man}
|
||||
%{_mandir}/man1/gdal_translate.1%{?ext_man}
|
||||
%{_mandir}/man1/gdal_utilities.1%{?ext_man}
|
||||
%{_mandir}/man1/gdaladdo.1%{?ext_man}
|
||||
%{_mandir}/man1/gdalbuildvrt.1%{?ext_man}
|
||||
%{_mandir}/man1/gdalcompare.1%{?ext_man}
|
||||
%{_mandir}/man1/gdaldem.1%{?ext_man}
|
||||
%{_mandir}/man1/gdalinfo.1%{?ext_man}
|
||||
%{_mandir}/man1/gdallocationinfo.1%{?ext_man}
|
||||
%{_mandir}/man1/gdalmanage.1%{?ext_man}
|
||||
%{_mandir}/man1/gdalmove.1%{?ext_man}
|
||||
%{_mandir}/man1/gdalsrsinfo.1%{?ext_man}
|
||||
%{_mandir}/man1/gdaltindex.1%{?ext_man}
|
||||
%{_mandir}/man1/gdaltransform.1%{?ext_man}
|
||||
%{_mandir}/man1/gdalwarp.1%{?ext_man}
|
||||
%{_mandir}/man1/gnm_utilities.1%{?ext_man}
|
||||
%{_mandir}/man1/gnmanalyse.1%{?ext_man}
|
||||
%{_mandir}/man1/gnmmanage.1%{?ext_man}
|
||||
%{_mandir}/man1/nearblack.1%{?ext_man}
|
||||
%{_mandir}/man1/ogr2ogr.1%{?ext_man}
|
||||
%{_mandir}/man1/ogr_utilities.1%{?ext_man}
|
||||
%{_mandir}/man1/ogrinfo.1%{?ext_man}
|
||||
%{_mandir}/man1/ogrlineref.1%{?ext_man}
|
||||
%{_mandir}/man1/ogrmerge.1%{?ext_man}
|
||||
%{_mandir}/man1/ogrtindex.1%{?ext_man}
|
||||
%{_mandir}/man1/pct2rgb.1%{?ext_man}
|
||||
%{_mandir}/man1/rgb2pct.1%{?ext_man}
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%doc NEWS PROVENANCE.TXT LICENSE.TXT
|
||||
%license LICENSE.TXT
|
||||
%doc NEWS PROVENANCE.TXT
|
||||
%defattr(644,root,root,755)
|
||||
%doc html
|
||||
%attr(755,root,root) %{_bindir}/gdal-config
|
||||
@ -412,11 +411,11 @@ sed -i 's,\(#define PACKAGE_.*\),/* \1 */,' %{buildroot}%{_includedir}/gdal/cpl_
|
||||
%{_libdir}/pkgconfig/gdal.pc
|
||||
%dir %{_includedir}/gdal
|
||||
%{_includedir}/gdal/*.h
|
||||
%{_mandir}/man1/gdal-config.1*
|
||||
%{_mandir}/man1/gdal-config.1%{?ext_man}
|
||||
|
||||
%files -n perl-%{name}
|
||||
%defattr(-,root,root)
|
||||
%doc NEWS PROVENANCE.TXT LICENSE.TXT
|
||||
%license LICENSE.TXT
|
||||
%doc NEWS PROVENANCE.TXT
|
||||
%{perl_vendorarch}/Geo/GDAL.pm
|
||||
%dir %{perl_vendorarch}/Geo/GDAL
|
||||
%{perl_vendorarch}/Geo/GDAL/Const.pm
|
||||
@ -435,16 +434,18 @@ sed -i 's,\(#define PACKAGE_.*\),/* \1 */,' %{buildroot}%{_includedir}/gdal/cpl_
|
||||
%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
|
||||
%{_mandir}/man3/Geo::GDAL.3*
|
||||
%{_mandir}/man3/Geo::GDAL.3pm%{?ext_man}
|
||||
|
||||
%files -n python-%{name}
|
||||
%defattr(644,root,root,755)
|
||||
%doc NEWS PROVENANCE.TXT LICENSE.TXT
|
||||
%license LICENSE.TXT
|
||||
%doc NEWS PROVENANCE.TXT
|
||||
%{python_sitearch}/*
|
||||
|
||||
%files -n python3-%{name}
|
||||
%defattr(644,root,root,755)
|
||||
%doc NEWS PROVENANCE.TXT LICENSE.TXT
|
||||
%license LICENSE.TXT
|
||||
%doc NEWS PROVENANCE.TXT
|
||||
%{python3_sitearch}/*
|
||||
|
||||
%changelog
|
||||
|
Loading…
x
Reference in New Issue
Block a user