# use gdal (probably a gdal module or driver shall not imply devel
# dependency)
# - rasdaman (--with-rasdaman; http://rasdaman.eecs.jacobs-university.de/trac/rasdaman/wiki/Download)
-# - openjpeg (unreleased post-1.5 or 2? needs opj_decode_tile_data symbol, not available in 1.3-1.5)
# - libjpeg12 (needs patching to use system one, --with-jpeg12 is not sufficient as of 1.9.2)
# - libkml (1.3.0 needed, not released yet)
# - wait for newer pcidsk, switch to external again
%bcond_without mysql # MySQL DB support
%bcond_without odbc # ODBC DB support
%bcond_without opencl # OpenCL (GPU) support
+%bcond_without openjpeg # OpenJPEG 2 (JPEG2000) support
%bcond_with podofo # PDF support via podofo instead of poppler
%bcond_without poppler # PDF support via poppler
%bcond_without spatialite # SpatiaLite support
Summary(pl.UTF-8): Biblioteka abstrakcji danych dotyczÄ…cych powierzchni Ziemi
Name: gdal
Version: 1.9.2
-Release: 6
+Release: 7
License: BSD-like
Group: Libraries
Source0: ftp://ftp.remotesensing.org/gdal/%{name}-%{version}.tar.gz
Patch2: %{name}-php.patch
Patch3: %{name}-fpic.patch
Patch4: %{name}-format-security.patch
+Patch5: %{name}-openjpeg2.patch
+Patch6: %{name}-hdf4-eos.patch
URL: http://www.gdal.org/
%{?with_opencl:BuildRequires: OpenCL-devel >= 1.0}
%{?with_armadillo:BuildRequires: armadillo-devel}
%{?with_mysql:BuildRequires: mysql-devel}
BuildRequires: netcdf-devel >= 4.1
BuildRequires: ogdi-devel >= 3.1
+%{?with_openjpeg:BuildRequires: openjpeg2-devel >= 2.0.0-2}
#BuildRequires: pcidsk-devel > 0.3
BuildRequires: perl-devel
%{?with_php:BuildRequires: php-devel}
%{?with_mysql:Requires: mysql-devel}
Requires: netcdf-devel >= 4
Requires: ogdi-devel >= 3.1
+%{?with_openjpeg:Requires: openjpeg2-devel >= 2.0.0-2}
#Requires: pcidsk-devel > 0.3
%{?with_podofo:Requires: podofo-devel}
%{?with_poppler:Requires: poppler-devel}
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
# 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}
%{__make} -j1 -C swig/perl generate
%if %{with ruby}
%{__make} -j1 -C swig/ruby generate
-%patch4 -p1
%endif
%{__make} -j1