SHA256
1
0
forked from pool/gdal

Accepting request 285062 from home:pluskalm

.

OBS-URL: https://build.opensuse.org/request/show/285062
OBS-URL: https://build.opensuse.org/package/show/Application:Geo/gdal?expand=0&rev=1
This commit is contained in:
Martin Pluskal 2015-02-10 10:05:38 +00:00 committed by Git OBS Bridge
commit 382f84c958
9 changed files with 859 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

11
GDALmake.opt.in.patch Normal file
View File

@ -0,0 +1,11 @@
--- GDALmake.opt.in.orig 2012-10-09 00:58:28.000000000 +0000
+++ GDALmake.opt.in
@@ -67,7 +67,7 @@ INST_DOCS = @exec_prefix@/doc
INST_MAN = @mandir@
INST_HTML = $(HOME)/www/gdal
-CPPFLAGS = @CPPFLAGS@ -I$(GDAL_ROOT)/port @EXTRA_INCLUDES@
+CPPFLAGS = @CPPFLAGS@ -I$(GDAL_ROOT)/port -I$(GDAL_ROOT)/gcore @EXTRA_INCLUDES@
CFLAGS = @CFLAGS@ @C_WFLAGS@ $(USER_DEFS)
CXXFLAGS = @CXXFLAGS@ @CXX_WFLAGS@ $(USER_DEFS)
LDFLAGS = @LDFLAGS@

3
gdal-1.11.1.tar.gz Normal file
View File

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

28
gdal-configure.patch Normal file
View File

@ -0,0 +1,28 @@
--- configure.in.orig 2014-10-09 17:42:26.749925309 +0200
+++ configure.in 2014-10-09 17:43:02.026926627 +0200
@@ -4042,11 +4042,7 @@
if test -d "$with_jvm_lib"; then
saved_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -L$with_jvm_lib"
- if test "x$mac_java_fw" != "x"; then
- AC_CHECK_FW_FUNC($mac_java_fw,JNI_CreateJavaVM,HAS_LIB_JVM=yes,HAS_LIB_JVM=no,)
- else
- AC_CHECK_LIB(jvm,JNI_CreateJavaVM,HAS_LIB_JVM=yes,HAS_LIB_JVM=no,)
- fi
+ AC_CHECK_LIB(jvm,JNI_CreateJavaVM,HAS_LIB_JVM=yes,HAS_LIB_JVM=no,)
LDFLAGS="$saved_LDFLAGS"
if test "$HAS_LIB_JVM" = "yes"; then
JVM_LIB="-L$with_jvm_lib -ljvm"
@@ -4085,11 +4081,7 @@
unset ac_cv_lib_jvm_JNI_CreateJavaVM
saved_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -L$TEST_DIR"
- if test "x$mac_java_fw" != "x"; then
- AC_CHECK_FW_FUNC($mac_java_fw,JNI_CreateJavaVM,HAS_LIB_JVM=yes,HAS_LIB_JVM=no,)
- else
- AC_CHECK_LIB(jvm,JNI_CreateJavaVM,HAS_LIB_JVM=yes,HAS_LIB_JVM=no,)
- fi
+ AC_CHECK_LIB(jvm,JNI_CreateJavaVM,HAS_LIB_JVM=yes,HAS_LIB_JVM=no,)
LDFLAGS="$saved_LDFLAGS"
if test "$HAS_LIB_JVM" = "yes"; then
JVM_LIB="-L$TEST_DIR -ljvm"

12
gdal-perl.patch Normal file
View File

@ -0,0 +1,12 @@
diff -ur gdal-1.8.0/swig/perl/GNUmakefile gdal-1.8.0_fix//swig/perl/GNUmakefile
--- gdal-1.8.0/swig/perl/GNUmakefile 2011-01-14 06:19:06.000000000 +0100
+++ gdal-1.8.0_fix//swig/perl/GNUmakefile 2011-02-04 13:37:06.000000000 +0100
@@ -26,7 +26,7 @@
gdal_wrap.cc: generate
Makefile_Geo__GDAL:
- perl Makefile.PL INSTALL_BASE=$(INST_PREFIX)
+ perl Makefile.PL INSTALLDIRS=vendor
test: build
$(MAKE) -f Makefile_Geo__GDAL test

16
gdal-python_install.patch Normal file
View File

@ -0,0 +1,16 @@
--- gdal-1.5.4/swig/python/GNUmakefile.bak 2008-07-26 21:04:24.000000000 +0200
+++ gdal-1.5.4/swig/python/GNUmakefile 2009-05-18 20:14:35.000000000 +0200
@@ -66,12 +66,7 @@
$(PYTHON) setup.py bdist_egg
install:
-
-ifeq ($(PY_HAVE_SETUPTOOLS),1)
- $(PYTHON) setup.py install
-else
- $(PYTHON) setup.py install --prefix=$(DESTDIR)$(prefix)
-endif
+ $(PYTHON) setup.py install --prefix=$(prefix) --root=$(DESTDIR)
for f in $(SCRIPTS) ; do $(INSTALL) ./scripts/$$f $(DESTDIR)$(INST_BIN) ; done

428
gdal.changes Normal file
View File

@ -0,0 +1,428 @@
-------------------------------------------------------------------
Mon Feb 9 16:46:37 UTC 2015 - mpluskal@suse.com
- Add GDALmake.opt.in.patch to fix random failures of parallel
builds
-------------------------------------------------------------------
Mon Feb 9 15:15:10 UTC 2015 - mpluskal@suse.com
- Build with hdf5 on suse recent suse releases.
- Correct license and bundle license with packages.
- Misc spec file cleanups.
- Build with webp support if possible.
- Use autoreconf when possible to avoid issues with improper
cflags used and parallel builds.
- Rename package to match upstream name (gdal) - library is
provided as libgdal1 which matches shared libraries policy.
-------------------------------------------------------------------
Tue Dec 16 10:23:44 UTC 2014 - guillaume@opensuse.org
- Add optional support to ECW JPEG lib support (disabled by default)
-------------------------------------------------------------------
Sat Oct 11 08:35:27 UTC 2014 - behrisch@users.sourceforge.net
- fixing build with older autotools (SLE11SP3, CentOS6)
- removing obsolete patch
-------------------------------------------------------------------
Thu Oct 2 10:06:59 UTC 2014 - ecsos@schirra.net
Upgrade to version 1.11.1
- Build
* Fix compilation errors with json-c 0.12 (#5449)
* configure: fix for cpl_recode_iconv.cpp compilation error
on freebsd 10 (#5452)
* Fix compilation error in alg/gdalgrid.cpp when AVX is available,
but not SSE (#5566)
* Fix wrong include order in ingr and nitf subdirs w.r.t internal
libtiff (#5644)
* Add CPL_UNUSED for gcc >= 4 (#5414)
- Port
* CPLSpawn() on Windows: quote arguments with spaces
in them (#5469)
* /vsigzip/: avoid infinite loop when reading broken
.gml.gz file (#5486)
* /vsizip/: fix bug that caused premature end of file condition
with some read patterns (#5530)
* /vsizip/: on >4GB zips: accept .zip declare 0 disks (#5615)
* Fix stack corruption upon thread termination with
CPLSetThreadLocalConfigOption on Windows 32 bit (#5590,
reported by cleo)
* cpl_http.cpp: truly set CURLOPT_NOSIGNAL if available (#5568)
- GDAL Core
* EXIF reader: add missing validation for some data types (#3078)
* Fix segfault in GDALPamRasterBand::SerializeToXML() when
saving an empty RAT (#5451)
* Windows plugin: complementary fix to #5211 to avoid error
dialog box when there are dependency problems (#5525)
* RPC transformer with DEM: fix near interpolation
(patch by liminlu0314, #5553)
* OpenCL warper: remove unused variable in bilinear resampling
that can cause compilation error (#5518)
* GDALCreateTPSTransformer(): fix crash if the forward or backward
transform cannot be computed (#5588)
* Overview: ignore alpha=0 values when compute an average overview
of an alpha band; and also avoid memory errors when calling
GetMaskBand?()/GetMaskFlags() after overview computation if
GetMaskXXX() has been called before (#5640)
- Utilities
* gdal2tiles.py: fix inverted long/lat in BoundingBox? and
Origin elements of tilemapresource.xml (#5336)
* pct2rgb.py: make it work (again) with color tables with
less than 256 entries (#5555)
Previous upgrades from version 1.11.0
- New GDAL drivers:
* KRO: read/write support for KRO KOKOR Raw format
- New OGR drivers:
* CartoDB : read/write support
* GME (Google Map Engine) : read/write support
* GPKG (GeoPackage): read-write support (vector part of the spec.)
* OpenFileGDB: read-only support (no external dependency)
* SXF: read-only support
* WALK : read-only support
* WAsP .map : read-write support
- Significantly improved drivers: GML, LIBKML
- RFC 40: enhanced RAT support (#5129)
- RFC 41: multiple geometry fields support
- RFC 42: OGR Layer laundered field lookup
- RFC 43: add GDALMajorObject::GetMetadataDomainList?() (#5275)
- RFC 45: GDAL datasets and raster bands as virtual memory mapping
- Upgrade to EPSG 8.2 database
-------------------------------------------------------------------
Thu Oct 3 17:24:58 UTC 2013 - Angelos Tzotsos <tzotsos@opensuse.org>
Upgrade to version 1.10.1:
- Compilation fixes for iOS (#5197, #5198)
- Fix VSISubFileHandle::Eof() behaviour to be POSIX compliant, so that the shapefile reader can read the last feature when using /vsitar (#5093)
- vsicache: fix for 32bit binaries when file size is over 2GB (#5170)
- warper: Fix warping when input pixel size is too close to 0 (#5190)
- GDALFillNodata(): Fix use of uninitialized memory and integer overflows (#4010, #5203)
- Fix ref-counting of callable passed to gdal.PushErrorHandler?() (#5186)
-------------------------------------------------------------------
Mon Jun 3 17:14:40 UTC 2013 - dvaleev@suse.com
- install man to the %{_mandir}
-------------------------------------------------------------------
Sat May 25 19:39:26 UTC 2013 - behrisch@users.sourceforge.net
- removing dox from RHEL and derivatives
-------------------------------------------------------------------
Thu May 23 06:10:28 UTC 2013 - behrisch@users.sourceforge.net
- added dependency to libltdl for the devel package
-------------------------------------------------------------------
Wed May 8 06:25:13 UTC 2013 - behrisch@users.sourceforge.net
- Added openjpeg2 to the devel requirements
-------------------------------------------------------------------
Mon Apr 29 19:48:32 UTC 2013 - Angelos Tzotsos <tzotsos@opensuse.org>
Upgrade to version 1.10 final:
* New GDAL drivers:
- ARG: read/write suuport for ARG datasets (#4591)
- CTable2: read/write support for CTable2 datum grid shift format
- DDS: write-only support for DirectDraw? Surface format (#5017)
- IRIS: read support for products generated by the IRIS weather radar software (#4854)
- MAP: read OziExplorer? .map files (#3380)
- MBTiles: read-only support for MBTiles rasters (needs libsqlite3)
* New OGR drivers:
- ElasticSearch?: write-only support to write into ElasticSearch? databases (needs libcurl)
- ODS : read/write support for OpenOffice? .ods (Open Document Spreadsheets) (needs libexpat)
- OSM : read-only support for .osm / .pbf OpenStreetMap? files
- PDF: read/write support for vector/structured PDF files
- XLSX: read/write support for MS Excel 2007 and later Open Office XML .xlsx spreadsheets (needs libexpat)
* RFC 39: OGR Layer algebra methods : http://trac.osgeo.org/gdal/wiki/rfc39_ogr_layer_algebra
* Add a SQL SQLite dialect : http://gdal.org/ogr/ogr_sql_sqlite.html
* Make GDAL loadable as a SQLite3 extension (named VirtualOGR) (#4782)
* /vsicurl_streaming/: new virtual file system handler designed to read in streaming mode dynamically generated files
* GDAL API_PROXY mechanism to run GDAL drivers in a separate process: http://gdal.org/gdal_api_proxy.html
* Significantly improved drivers : PDF, SQLite, JP2OpenJPEG
* Add a geocoding client : http://gdal.org/ogr/ogr__geocoding_8h.html
* Upgrade to EPSG 8.0 database
-------------------------------------------------------------------
Thu Apr 18 20:30:51 UTC 2013 - Angelos Tzotsos <tzotsos@opensuse.org>
- Upgraded to version 1.10RC3
-------------------------------------------------------------------
Sun Apr 14 21:17:14 UTC 2013 - Angelos Tzotsos <tzotsos@opensuse.org>
- Upgraded to version 1.10RC2
-------------------------------------------------------------------
Sun Apr 14 14:25:33 UTC 2013 - Angelos Tzotsos <tzotsos@opensuse.org>
- Upgraded to version 1.10RC1
-------------------------------------------------------------------
Mon Apr 8 21:23:44 UTC 2013 - Angelos Tzotsos <tzotsos@opensuse.org>
- Restored OpenJPEG2000 dependency
- Upgraded to version 1.10beta2
-------------------------------------------------------------------
Tue Dec 4 16:49:11 UTC 2012 - Angelos Tzotsos <tzotsos@opensuse.org>
- Removed hardcoded Requires
-------------------------------------------------------------------
Sun Nov 25 20:33:28 UTC 2012 - Angelos Tzotsos <tzotsos@opensuse.org>
- Disabled OpenJPEG support until we have a patch for OpenJPEG 2.0 final
-------------------------------------------------------------------
Sun Oct 14 20:00:15 UTC 2012 - schwab@linux-m68k.org
- gdal-postgisraster-array-overflow.patch
PostGISRaster: fix array overflow
-------------------------------------------------------------------
Fri Oct 12 16:52:14 UTC 2012 - Angelos Tzotsos <tzotsos@opensuse.org>
- Update to new release 1.9.2:
Fix infinite GDALOpen recursion with some VRTs (#4835)
Avoid destroying existing overviews (.aux/.rrd) (#4831)
Support recognising NaN better in !CPLStrtod() (#4799)
Fix windows declaration for !CPLGetErrorHandlerUserData() (#4755)
Fix compilation with Gentoo modified zlib 1.2.6 (#4723)
Look for libgeotiff headers in /usr/include/libgeotiff too (#4706)
Improve warning handling in !CPLClearRecodeStubWarningFlags() (#4650)
Fix Solaris compilation bug (#4705)
!MorphFromESRI(): compare SPHEROID/PRIMEM parms, not names (#4673)
-------------------------------------------------------------------
Thu Sep 27 18:14:55 UTC 2012 - behrisch@users.sourceforge.net
- fixing sles dependencies
-------------------------------------------------------------------
Wed Sep 26 18:28:50 UTC 2012 - behrisch@users.sourceforge.net
- fixing sles 10 build by not regenerating swig files
-------------------------------------------------------------------
Wed Sep 19 10:58:59 UTC 2012 - behrisch@users.sourceforge.net
- fixed ScientificLinux dependencies
-------------------------------------------------------------------
Fri Sep 14 18:30:43 UTC 2012 - behrisch@users.sourceforge.net
- Fixed CentOS 6 and ScientificLinux 6 build
- Fixed SLE build
-------------------------------------------------------------------
Fri Jun 29 00:05:57 UTC 2012 - Angelos Tzotsos <tzotsos@opensuse.org>
- added new parameters to avoid issue:
https://bugs.archlinux.org/task/30471
http://www.mail-archive.com/ubuntu@lists.osgeo.org/msg00330.html
-------------------------------------------------------------------
Fri Jun 15 21:57:40 UTC 2012 - Angelos Tzotsos <tzotsos@opensuse.org>
- Fixed Factory build
- Added poppler patch from branch 1.9
- Added libgeotiff include path patch (now upstream too)
-------------------------------------------------------------------
Fri Jun 1 11:18:37 CEST 2012 - kukuk@suse.de
- remove obsolete doxygen patch
-------------------------------------------------------------------
Thu May 31 11:37:12 CEST 2012 - kukuk@suse.de
- Fix libXerces-c dependency for SLES
-------------------------------------------------------------------
Wed May 23 07:32:21 UTC 2012 - tzotsos@opensuse.org
- Update to new release 1.9.1
*fix crash with VSICachedFile::Read() for large reads (#4646)
*Unix VSI*L: correctly set current offset after a failed read (#4583)
*Improve OpenJDK finding logic in configure. (#4643)
*Fix iconv configure problem on FreeBSD (#4525)
*Fix MinGW build when pthread is also available (#4430)
*makegdalXX.vcproj : update 71,80 and 90 version. Drop 10 version --> open the 90 version and VS2010 should convert it (#4415)
*reverseWindingOrder(): don't force coordinate dimension to 3 (#4621)
*Fix incorrect rounding in OGRFormatDouble (#4614)
*Fix segfault when running 'ogr2ogr target src -select AFIELD -where FID=xxx' when the source layer has more than 5 fields (#4500)
- gdal-sqlite.patch moved upstream http://trac.osgeo.org/gdal/ticket/4515
-------------------------------------------------------------------
Sat May 12 19:28:16 UTC 2012 - behrisch@users.sourceforge.net
- fixed scientific linux build
- moved to external libgeotiff which works better with QLandkarteGT
-------------------------------------------------------------------
Wed Apr 4 22:09:37 UTC 2012 - behrisch@users.sf.net
- fixed RHEL6 (and derivatives) build
-------------------------------------------------------------------
Wed Feb 15 07:48:41 UTC 2012 - dassau@gbd-consult.de
- added gdal-sqlite.patch to fix http://trac.osgeo.org/gdal/ticket/4515
-------------------------------------------------------------------
Tue Jan 10 08:22:22 UTC 2012 - dassau@gbd-consult.de
- Update to new release 1.9.0
* New GDAL drivers: ACE2, CTG, E00GRID, ECRGTOC, GRASSASCIIGrid,
GTA, NGSGEOID, SNODAS, WebP, ZMap
* New OGR drivers: ARCGEN, CouchDB, DWG, EDIGEO, ESRI FileGDB, Geomedia,
Google Fusion Tables, IDRISI, MDB, SEGUKOOA, SEGY, SVG, XLS
* Significantly improved drivers: NetCDF
* Encoding support for shapefile/dbf (#882)
* RFC 35: Delete, reorder and alter field definitions of OGR layers
* RFC 37: Add mechanism to provide user data to CPLErrorHandler (#4295)
* gdalsrsinfo: new supported utility to report SRS in various form
(supercedes testepsg)
-------------------------------------------------------------------
Thu Jul 21 20:19:34 UTC 2011 - dassau@gbd-consult.de
- Update to new release 1.8.1
-------------------------------------------------------------------
Wed Apr 27 10:59:34 UTC 2011 - dassau@gbd-consult.de
- Added curl as dependency to support (wms/wcs/...)
-------------------------------------------------------------------
Sun Apr 24 12:59:34 UTC 2011 - toddrme2178@gmail.com
- Switched to valid groups (fix for RPMLINT warning)
-------------------------------------------------------------------
Thu Apr 14 00:00:00 UTC 2011 - behrisch@users.sourceforge.net
- fix CentOS and SLE10 build
-------------------------------------------------------------------
Sat Apr 9 00:00:00 UTC 2011 - hpj@urpla.net
- fix python dependencies and build, clean up spec
-------------------------------------------------------------------
Mon Jan 24 00:00:00 UTC 2011 - dassau@gbd-consult.de
- update to new version
-------------------------------------------------------------------
Sat Nov 13 00:00:00 UTC 2010 - Otto Dassau 1.7.3
- update to new version with many small fixes and changes
-------------------------------------------------------------------
Thu Jun 24 00:00:00 UTC 2010 - Otto Dassau 1.7.1
- added soname patch for building without libtool
-------------------------------------------------------------------
Wed Apr 14 00:00:00 UTC 2010 - Otto Dassau 1.7.1
- added perl and python packages with help from fedora spec by Balint Cristian
-------------------------------------------------------------------
Thu Feb 11 00:00:00 UTC 2010 - Otto Dassau 1.7.1
- update to new version
-------------------------------------------------------------------
Mon Nov 30 00:00:00 UTC 2009 - Otto Dassau 1.6.3
- update to new version
-------------------------------------------------------------------
Tue Nov 24 00:00:00 UTC 2009 - Otto Dassau 1.6.2
- update to new version
-------------------------------------------------------------------
Mon May 18 00:00:00 UTC 2009 - Otto Dassau 1.6.1
- update to new version
-------------------------------------------------------------------
Wed Feb 18 00:00:00 UTC 2009 - Otto Dassau 1.6.0
- update to new version
- adapted hdf4 patch
- removed ogpython and enabled current python bindings
-------------------------------------------------------------------
Thu Dec 4 00:00:00 UTC 2008 - Otto Dassau 1.5.3
- new patch to prevent getting upside-down images with NetCDF (ticket 2654)
-------------------------------------------------------------------
Tue Oct 21 00:00:00 UTC 2008 - Otto Dassau 1.5.3
- update to new version
-------------------------------------------------------------------
Thu Jun 12 00:00:00 UTC 2008 - Otto Dassau 1.5.2
- update to new bugfix version and added hdf4 support
-------------------------------------------------------------------
Sun Mar 23 00:00:00 UTC 2008 - Otto Dassau 1.5.1
- update to new version
-------------------------------------------------------------------
Mon Dec 31 00:00:00 UTC 2007 - Otto Dassau 1.5.0
- added with-ogpython
- BuildRequires: +unixODBC-devel, +libgeos-devel
- added more tools
-------------------------------------------------------------------
Thu Dec 20 00:00:00 UTC 2007 - Otto Dassau 1.4.4
- update to 1.4.4 and added mysql support
-------------------------------------------------------------------
Mon Aug 13 00:00:00 UTC 2007 - Dirk Stoecker 1.4.2
- adapted for openSUSE BuildService
-------------------------------------------------------------------
Mon Jul 16 00:00:00 UTC 2007 - Otto Dassau 1.4.2
- first built
-------------------------------------------------------------------
Mon Jun 11 00:00:00 UTC 2007 - Otto Dassau 1.4.1
- first built
-------------------------------------------------------------------
Tue Dec 19 00:00:00 UTC 2006 - Otto Dassau 1.3.2
- built on SuSE 10.2
-------------------------------------------------------------------
Mon Jun 19 00:00:00 UTC 2006 - Markus Neteler 1.3.2
- added DB support; gdal_rasterize
-------------------------------------------------------------------
Wed Jan 25 00:00:00 UTC 2006 - Otto Dassau 1.3.1
- adapted to SuSE 10.0

337
gdal.spec Normal file
View File

@ -0,0 +1,337 @@
#
# spec file for package gdal
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%bcond_with ecw_support
Name: gdal
Version: 1.11.1
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
Group: Development/Libraries/C and C++
Url: http://www.gdal.org/
Source0: http://download.osgeo.org/%{name}/%{version}/%{name}-%{version}.tar.gz
Patch0: gdal-python_install.patch
Patch1: gdal-configure.patch
Patch2: gdal-perl.patch
# Fix occasional paralle build failure
Patch3: GDALmake.opt.in.patch
BuildRequires: blas-devel
BuildRequires: curl-devel
BuildRequires: doxygen >= 1.4.2
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: geos-devel >= 3
BuildRequires: giflib-devel
BuildRequires: lapack-devel
BuildRequires: libexpat-devel >= 1.95.0
BuildRequires: libgeotiff-devel >= 1.2.1
BuildRequires: libjasper-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libproj-devel
BuildRequires: libspatialite-devel
BuildRequires: libtiff-devel >= 3.6.0
BuildRequires: libtool
BuildRequires: netcdf-devel
BuildRequires: openjpeg2-devel
BuildRequires: poppler-devel
BuildRequires: postgresql-devel
BuildRequires: python-numpy-devel
BuildRequires: python-setuptools
BuildRequires: sqlite-devel >= 3
BuildRequires: swig
BuildRequires: unixODBC-devel
BuildRequires: zlib-devel >= 1.1.4
BuildRequires: chrpath
BuildRequires: libxerces-c-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{with ecw_support}
BuildRequires: libecwj2-devel
%endif
%if 0%{?suse_version} >= 1310
BuildRequires: hdf5-devel
BuildRequires: autoconf
BuildRequires: automake
%endif
%if 0%{?suse_version} > 1310 && 0%{?suse_version} != 1315
BuildRequires: perl-ExtUtils-MakeMaker
BuildRequires: libwebp-devel
%else
BuildRequires: hdf-devel >= 4.0
%endif
%description
GDAL is a translator library for raster geospatial data formats that
is released under an Open Source license. As a library, it presents a
single abstract data model to the calling application for all
supported formats. The related OGR library (which lives within the
GDAL source tree) provides a similar capability for simple features
vector data.
%package devel
Summary: GDAL library header files
Group: Development/Languages/C and C++
Requires: lib%{name}1 = %{version}
Provides: lib%{name}-devel
%description devel
Development Libraries for the GDAL file format library
%package -n lib%{name}1
Summary: GDAL static libraries
Group: System/Libraries
%description -n lib%{name}1
GDAL and OGR are translator libraries for raster and vector geospatial data
formats. As a library, it presents a single abstract data model to the calling
application for all supported formats.
%package -n perl-gdal
Summary: Perl bindings for GDAL
Group: Development/Languages/Perl
Requires: %{name} = %{version}-%{release}
Requires: perl = %{perl_version}
Requires: perl-base
%description -n perl-gdal
Perl bindings for GDAL - Geo::GDAL, Geo::OGR and Geo::OSR modules.
%package -n python-gdal
Summary: GDAL Python module
Group: Development/Languages/Python
Requires: %{name} = %{version}-%{release}
%py_requires
%description -n python-gdal
The GDAL python modules provide support to handle multiple GIS file formats.
%prep
%setup -q -n gdal-%{version}
%patch0 -p1
%patch1
%patch2 -p1
%patch3 -p0
# 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}
rm -r man
%build
# need to regenerate (old one does not accpet CFLAGS)
%if 0%{?suse_version} >= 1310
autoreconf -fi
%endif
%configure \
--prefix=%{_prefix} \
--includedir=%{_includedir}/gdal \
--datadir=%{_datadir}/gdal \
--with-threads \
--disable-static \
--with-geotiff \
--with-libtiff \
--with-rename-internal-libtiff-symbols=yes \
--with-rename-internal-libgeotiff-symbols=yes \
--with-libz \
--with-cfitsio=no \
--with-netcdf \
--with-openjpeg \
--with-curl \
--with-pg \
--with-ogdi \
--without-pcraster \
--with-jpeg12=no \
--without-libgrass \
--without-grass \
--enable-shared \
--with-geos \
--with-expat \
--with-jasper \
--with-png \
--with-gif \
--with-jpeg \
--with-spatialite \
--with-poppler \
--with-python \
--with-perl \
--with-xerces=yes \
--with-xerces-lib="-lxerces-c" \
--with-xerces-inc=%{_includedir}/xercesc \
%if %{with ecw_support}
--with-ecw \
%endif
%if 0%{?suse_version} > 1310
--without-hdf4 \
--with-hdf5 \
--with-webp \
%else
--with-hdf4 \
%endif
--disable-rpath
# regenerate where needed
make %{?_smp_mflags} -C swig/perl generate
make %{?_smp_mflags} all docs man
%install
make %{?_smp_mflags} install install-man \
DESTDIR=%{buildroot} INST_MAN=%{_mandir}
cp -a ogr/html html/ogr
%fdupes -s %{buildroot}
# chrpath must be removed here
chmod 644 %{buildroot}%{perl_vendorarch}/auto/Geo/GDAL/Const/Const.so
chmod 644 %{buildroot}%{perl_vendorarch}/auto/Geo/GDAL/GDAL.so
chmod 644 %{buildroot}%{perl_vendorarch}/auto/Geo/OGR/OGR.so
chmod 644 %{buildroot}%{perl_vendorarch}/auto/Geo/OSR/OSR.so
chrpath --delete %{buildroot}%{perl_vendorarch}/auto/Geo/GDAL/Const/Const.so
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
# do not ship these
rm -rf %{buildroot}%{_mandir}/man1/_*
rm -rf %{buildroot}%{_libdir}/libgdal.la
rm -rf %{buildroot}%{perl_archlib}/perllocal.pod
rm -rf %{buildroot}%{perl_vendorarch}/auto/Geo/*/.packlist
rm -rf %{buildroot}%{perl_vendorarch}/auto/Geo/GDAL/Const/.packlist
rm -rf %{buildroot}%{_bindir}/*.dox
%post -n lib%{name}1 -p /sbin/ldconfig
%postun -n lib%{name}1 -p /sbin/ldconfig
%files -n lib%{name}1
%defattr(644,root,root,755)
%{_libdir}/*.so.1.*
%{_libdir}/*.so.1
%files
%defattr(644,root,root,755)
%doc NEWS PROVENANCE.TXT
%attr(755,root,root) %{_bindir}/*.py
%defattr(755,root,root,755)
%{_bindir}/gdal_contour
%{_bindir}/gdallocationinfo
%{_bindir}/gdal_grid
%{_bindir}/gdal_rasterize
%{_bindir}/gdal_translate
%{_bindir}/gdaladdo
%{_bindir}/gdalbuildvrt
%{_bindir}/gdaldem
%{_bindir}/gdalenhance
%{_bindir}/gdalinfo
%{_bindir}/gdalmanage
%{_bindir}/gdalsrsinfo
%{_bindir}/gdaltindex
%{_bindir}/gdaltransform
%{_bindir}/gdalwarp
%{_bindir}/gdalserver
%{_bindir}/nearblack
%{_bindir}/ogr2ogr
%{_bindir}/ogrinfo
%{_bindir}/ogrtindex
%{_bindir}/testepsg
%{_bindir}/ogrlineref
%defattr(644,root,root,755)
%{_datadir}/gdal
%{_mandir}/man1/gdalmanage.1*
%{_mandir}/man1/gdal_edit.1*
%{_mandir}/man1/gdal_polygonize.1*
%{_mandir}/man1/gdal_proximity.1*
%{_mandir}/man1/gdalbuildvrt.1*
%{_mandir}/man1/gdalmove.1*
%{_mandir}/man1/gdal2tiles.1*
%{_mandir}/man1/gdal_contour.1*
%{_mandir}/man1/gdal_fillnodata.1*
%{_mandir}/man1/gdal_grid.1*
%{_mandir}/man1/gdal_merge.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/gdallocationinfo.1*
%{_mandir}/man1/gdaladdo.1*
%{_mandir}/man1/gdaldem.1*
%{_mandir}/man1/gdalinfo.1*
%{_mandir}/man1/gdaltindex.1*
%{_mandir}/man1/gdaltransform.1*
%{_mandir}/man1/gdalwarp.1*
%{_mandir}/man1/nearblack.1*
%{_mandir}/man1/ogr2ogr.1*
%{_mandir}/man1/ogr_utilities.1*
%{_mandir}/man1/ogrinfo.1*
%{_mandir}/man1/ogrtindex.1*
%{_mandir}/man1/pct2rgb.1*
%{_mandir}/man1/rgb2pct.1*
%{_mandir}/man1/gdal_calc.1*
%{_mandir}/man1/gdalcompare.1*
%{_mandir}/man1/ogrlineref.1*
%files devel
%defattr(-,root,root)
%doc NEWS PROVENANCE.TXT LICENSE.TXT
%defattr(644,root,root,755)
%doc html
%attr(755,root,root) %{_bindir}/gdal-config
%{_libdir}/libgdal.so
%{_libdir}/pkgconfig/gdal.pc
%dir %{_includedir}/gdal
%{_includedir}/gdal/*.h
%{_mandir}/man1/gdal-config.1*
%{_mandir}/man1/gdalsrsinfo.1.gz
%files -n perl-%{name}
%defattr(-,root,root)
%doc NEWS PROVENANCE.TXT LICENSE.TXT
%{perl_vendorarch}/Geo/GDAL.pm
%dir %{perl_vendorarch}/Geo/GDAL
%{perl_vendorarch}/Geo/GDAL/Const.pm
%{perl_vendorarch}/Geo/OGR.pm
%{perl_vendorarch}/Geo/OSR.pm
%dir %{perl_vendorarch}/Geo
%dir %{perl_vendorarch}/auto/Geo
%dir %{perl_vendorarch}/auto/Geo/GDAL
%attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/GDAL.so
%dir %{perl_vendorarch}/auto/Geo/GDAL/Const
%attr(755,root,root) %{perl_vendorarch}/auto/Geo/GDAL/Const/Const.so
%dir %{perl_vendorarch}/auto/Geo/OGR
%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}/*
%changelog