-From 2d789902ffb48251ec2ff632320d78ee088c2c5f Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Sat, 5 May 2018 22:18:37 +0200
-Subject: [PATCH] Fix build with recent Poppler (0.64) (fix #573)
-
----
- gdal/frmts/pdf/pdfobject.cpp | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/gdal/frmts/pdf/pdfobject.cpp b/gdal/frmts/pdf/pdfobject.cpp
-index ae734a74e4c..5eab5dd1546 100644
---- a/gdal/frmts/pdf/pdfobject.cpp
-+++ b/gdal/frmts/pdf/pdfobject.cpp
-@@ -1055,7 +1055,12 @@ const CPLString& GDALPDFObjectPoppler::GetString()
- {
- if (GetType() == PDFObjectType_String)
+--- gdal-2.4.0/frmts/pdf/pdfdataset.cpp.orig 2018-12-14 22:37:15.000000000 +0100
++++ gdal-2.4.0/frmts/pdf/pdfdataset.cpp 2018-12-27 05:35:39.755925135 +0100
+@@ -3459,7 +3459,7 @@
+ #endif
+ if( ocg != nullptr && ocg->getName() != nullptr )
+ {
+- const char* pszLayerName = (const char*)ocg->getName()->getCString();
++ const char* pszLayerName = (const char*)ocg->getName()->c_str();
+ AddLayer(pszLayerName);
+ oLayerOCGMapPoppler[pszLayerName] = ocg;
+ }
+@@ -4787,7 +4787,7 @@
+ GooString* poMetadata = poCatalogPoppler->readMetadata();
+ if (poMetadata)
{
-+#ifdef POPPLER_0_58_OR_LATER
-+ // At least available since poppler 0.41
-+ const GooString* gooString = m_po->getString();
-+#else
+- const char* pszContent = poMetadata->getCString();
++ const char* pszContent = poMetadata->c_str();
+ if (pszContent != nullptr &&
+ STARTS_WITH(pszContent, "<?xpacket begin="))
+ {
+--- gdal-2.4.0/frmts/pdf/pdfobject.cpp.orig 2018-12-14 22:37:15.000000000 +0100
++++ gdal-2.4.0/frmts/pdf/pdfobject.cpp 2018-12-27 16:31:17.472142636 +0100
+@@ -1061,7 +1061,7 @@
+ #else
GooString* gooString = m_po->getString();
-+#endif
- return (osStr = GDALPDFGetUTF8StringFromBytes(reinterpret_cast<const GByte*>(gooString->getCString()),
+ #endif
+- return (osStr = GDALPDFGetUTF8StringFromBytes(reinterpret_cast<const GByte*>(gooString->getCString()),
++ return (osStr = GDALPDFGetUTF8StringFromBytes(reinterpret_cast<const GByte*>(gooString->c_str()),
static_cast<int>(gooString->getLength())));
}
-From 69e07012533b8393edd8b9ec4da6d239d204858a Mon Sep 17 00:00:00 2001
-From: Even Rouault <even.rouault@spatialys.com>
-Date: Fri, 12 Oct 2018 19:02:40 +0200
-Subject: [PATCH] Add support for Poppler 0.69 (fixes #1004)
-
----
- gdal/GDALmake.opt.in | 1 +
- gdal/configure | 61 ++++++++++++++++++++++++++---------
- gdal/configure.ac | 56 +++++++++++++++++++++++---------
- gdal/frmts/pdf/GNUmakefile | 4 +++
- gdal/frmts/pdf/makefile.vc | 6 +++-
- gdal/frmts/pdf/pdfdataset.cpp | 12 +++++++
- gdal/nmake.opt | 2 ++
- 7 files changed, 111 insertions(+), 31 deletions(-)
-
-diff --git a/gdal/GDALmake.opt.in b/gdal/GDALmake.opt.in
-index c3b5b34f92b..eaf005e5a14 100644
---- a/gdal/GDALmake.opt.in
-+++ b/gdal/GDALmake.opt.in
-@@ -473,6 +473,7 @@ POPPLER_BASE_STREAM_HAS_TWO_ARGS = @POPPLER_BASE_STREAM_HAS_TWO_ARGS@
- POPPLER_0_20_OR_LATER = @POPPLER_0_20_OR_LATER@
- POPPLER_0_23_OR_LATER = @POPPLER_0_23_OR_LATER@
- POPPLER_0_58_OR_LATER = @POPPLER_0_58_OR_LATER@
-+POPPLER_0_69_OR_LATER = @POPPLER_0_69_OR_LATER@
- POPPLER_INC = @POPPLER_INC@
- POPPLER_PLUGIN_LIB = @POPPLER_PLUGIN_LIB@
-
-index 857f7fdb445..b6e59020c5b 100644
---- a/gdal/configure.ac
-+++ b/gdal/configure.ac
-@@ -4446,6 +4446,7 @@ POPPLER_BASE_STREAM_HAS_TWO_ARGS=no
- POPPLER_0_20_OR_LATER=no
- POPPLER_0_23_OR_LATER=no
- POPPLER_0_58_OR_LATER=no
-+POPPLER_0_69_OR_LATER=no
-
- AC_MSG_CHECKING([for poppler])
-
-@@ -4486,21 +4487,45 @@ if test "$with_poppler" != "no" -a "$with_poppler" != ""; then
-
- CHECK_OTHER_POPPLER_VERSION=yes
-
-- # And now we check if we have Poppler >= 0.58.0
-- AC_MSG_CHECKING([if Object does have new API (>= 0.58.0)])
-- rm -f testpoppler.*
-- echo '#include <poppler/Object.h>' > testpoppler.cpp
-- echo 'int main(int argc, char** argv) { Object o(objNull); return 0; }' >> testpoppler.cpp
-- if test -z "`${CXX} testpoppler.cpp -c ${POPPLER_INC} 2>&1`" ; then
-- POPPLER_0_58_OR_LATER=yes
-- POPPLER_0_23_OR_LATER=yes
-- POPPLER_0_20_OR_LATER=yes
-- POPPLER_BASE_STREAM_HAS_TWO_ARGS=yes
-- POPPLER_HAS_OPTCONTENT=yes
-- CHECK_OTHER_POPPLER_VERSION=no
-- AC_MSG_RESULT([yes])
-- else
-- AC_MSG_RESULT([no])
-+ if test "$CHECK_OTHER_POPPLER_VERSION" = "yes"; then
-+ AC_MSG_CHECKING([if OptionalContent has API >= 0.69.0])
-+ rm -f testpoppler.*
-+ echo '#include <poppler/OptionalContent.h>' > testpoppler.cpp
-+ echo 'int main(int argc, char** argv) {' >> testpoppler.cpp
-+ echo 'OCGs ocg(nullptr, nullptr);' >> testpoppler.cpp
-+ echo 'ocg.getOCGs().size();' >> testpoppler.cpp
-+ echo 'return 0; }' >> testpoppler.cpp
-+ if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testpoppler.cpp -c ${POPPLER_INC} 2>&1`" ; then
-+ POPPLER_0_69_OR_LATER=yes
-+ POPPLER_0_58_OR_LATER=yes
-+ POPPLER_0_23_OR_LATER=yes
-+ POPPLER_0_20_OR_LATER=yes
-+ POPPLER_BASE_STREAM_HAS_TWO_ARGS=yes
-+ POPPLER_HAS_OPTCONTENT=yes
-+ CHECK_OTHER_POPPLER_VERSION=no
-+ AC_MSG_RESULT([yes])
-+ else
-+ AC_MSG_RESULT([no])
-+ fi
-+ fi
-+
-+ if test "$CHECK_OTHER_POPPLER_VERSION" = "yes"; then
-+ # And now we check if we have Poppler >= 0.58.0
-+ AC_MSG_CHECKING([if Object does have new API (>= 0.58.0)])
-+ rm -f testpoppler.*
-+ echo '#include <poppler/Object.h>' > testpoppler.cpp
-+ echo 'int main(int argc, char** argv) { Object o(objNull); return 0; }' >> testpoppler.cpp
-+ if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testpoppler.cpp -c ${POPPLER_INC} 2>&1`" ; then
-+ POPPLER_0_58_OR_LATER=yes
-+ POPPLER_0_23_OR_LATER=yes
-+ POPPLER_0_20_OR_LATER=yes
-+ POPPLER_BASE_STREAM_HAS_TWO_ARGS=yes
-+ POPPLER_HAS_OPTCONTENT=yes
-+ CHECK_OTHER_POPPLER_VERSION=no
-+ AC_MSG_RESULT([yes])
-+ else
-+ AC_MSG_RESULT([no])
-+ fi
- fi
-
- if test "$CHECK_OTHER_POPPLER_VERSION" = "yes"; then
-@@ -4585,6 +4610,7 @@ AC_SUBST(POPPLER_BASE_STREAM_HAS_TWO_ARGS, $POPPLER_BASE_STREAM_HAS_TWO_ARGS)
- AC_SUBST(POPPLER_0_20_OR_LATER, $POPPLER_0_20_OR_LATER)
- AC_SUBST(POPPLER_0_23_OR_LATER, $POPPLER_0_23_OR_LATER)
- AC_SUBST(POPPLER_0_58_OR_LATER, $POPPLER_0_58_OR_LATER)
-+AC_SUBST(POPPLER_0_69_OR_LATER, $POPPLER_0_69_OR_LATER)
- AC_SUBST(POPPLER_INC, $POPPLER_INC)
- AC_SUBST(POPPLER_PLUGIN_LIB, $POPPLER_PLUGIN_LIB)
-
-diff --git a/gdal/frmts/pdf/GNUmakefile b/gdal/frmts/pdf/GNUmakefile
-index 2014070eac7..618072f05d3 100644
---- a/gdal/frmts/pdf/GNUmakefile
-+++ b/gdal/frmts/pdf/GNUmakefile
-@@ -35,6 +35,10 @@ ifeq ($(POPPLER_0_58_OR_LATER),yes)
- CPPFLAGS += -DPOPPLER_0_58_OR_LATER
- endif
-
-+ifeq ($(POPPLER_0_69_OR_LATER),yes)
-+CPPFLAGS += -DPOPPLER_0_69_OR_LATER
-+endif
-+
- ifeq ($(HAVE_PODOFO),yes)
- CPPFLAGS += -DHAVE_PODOFO
- endif
-diff --git a/gdal/frmts/pdf/makefile.vc b/gdal/frmts/pdf/makefile.vc
-index b4fa14d0a18..ad76d3de70c 100644
---- a/gdal/frmts/pdf/makefile.vc
-+++ b/gdal/frmts/pdf/makefile.vc
-@@ -14,7 +14,7 @@ OBJ = $(OBJ) ..\..\ogr\ogrsf_frmts\mem\ogrmemdatasource.obj ..\..\ogr\ogrsf_frmt
- EXTRAFLAGS = -I..\vrt -I..\mem -I..\..\ogr\ogrsf_frmts\mem $(POPPLER_EXTRAFLAGS) $(PODOFO_EXTRAFLAGS) $(PDFIUM_EXTRAFLAGS)
-
- !IFDEF POPPLER_ENABLED
--POPPLER_EXTRAFLAGS = $(POPPLER_CFLAGS) $(POPPLER_HAS_OPTCONTENT_FLAGS) $(POPPLER_BASE_STREAM_HAS_TWO_ARGS_FLAGS) $(POPPLER_0_20_OR_LATER_FLAGS) $(POPPLER_0_23_OR_LATER_FLAGS) $(POPPLER_0_58_OR_LATER_FLAGS) -DHAVE_POPPLER
-+POPPLER_EXTRAFLAGS = $(POPPLER_CFLAGS) $(POPPLER_HAS_OPTCONTENT_FLAGS) $(POPPLER_BASE_STREAM_HAS_TWO_ARGS_FLAGS) $(POPPLER_0_20_OR_LATER_FLAGS) $(POPPLER_0_23_OR_LATER_FLAGS) $(POPPLER_0_58_OR_LATER_FLAGS) $(POPPLER_0_69_OR_LATER_FLAGS) -DHAVE_POPPLER
-
- !IFDEF POPPLER_HAS_OPTCONTENT
- POPPLER_HAS_OPTCONTENT_FLAGS = -DPOPPLER_HAS_OPTCONTENT
-@@ -36,6 +36,10 @@ POPPLER_0_23_OR_LATER_FLAGS = -DPOPPLER_0_23_OR_LATER
- POPPLER_0_58_OR_LATER_FLAGS = -DPOPPLER_0_58_OR_LATER
- !ENDIF
-
-+!IFDEF POPPLER_0_69_OR_LATER
-+POPPLER_0_69_OR_LATER_FLAGS = -DPOPPLER_0_69_OR_LATER
-+!ENDIF
-+
- !ENDIF
-
- !IFDEF PODOFO_ENABLED
-diff --git a/gdal/frmts/pdf/pdfdataset.cpp b/gdal/frmts/pdf/pdfdataset.cpp
-index ee89fd07564..1a56f57ee06 100644
---- a/gdal/frmts/pdf/pdfdataset.cpp
-+++ b/gdal/frmts/pdf/pdfdataset.cpp
-@@ -3440,10 +3440,16 @@ void PDFDataset::FindLayersPoppler()
- }
else
- {
-+#ifdef POPPLER_0_69_OR_LATER
-+ for( const auto& refOCGPair: optContentConfig->getOCGs() )
-+ {
-+ auto ocg = refOCGPair.second.get();
-+#else
- GooList* ocgList = optContentConfig->getOCGs();
- for(int i=0;i<ocgList->getLength();i++)
- {
- OptionalContentGroup* ocg = (OptionalContentGroup*) ocgList->get(i);
-+#endif
- if( ocg != NULL && ocg->getName() != NULL )
- {
- const char* pszLayerName = (const char*)ocg->getName()->getCString();
-@@ -3472,10 +3478,16 @@ void PDFDataset::TurnLayersOnOffPoppler()
- {
- int i;
- int bAll = EQUAL(pszLayers, "ALL");
-+#ifdef POPPLER_0_69_OR_LATER
-+ for( const auto& refOCGPair: optContentConfig->getOCGs() )
-+ {
-+ auto ocg = refOCGPair.second.get();
-+#else
- GooList* ocgList = optContentConfig->getOCGs();
- for(i=0;i<ocgList->getLength();i++)
+@@ -1422,7 +1422,7 @@
+ char* pszContent = (char*) VSIMalloc(m_nLength + 1);
+ if (pszContent)
{
- OptionalContentGroup* ocg = (OptionalContentGroup*) ocgList->get(i);
-+#endif
- ocg->setState( (bAll) ? OptionalContentGroup::On : OptionalContentGroup::Off );
+- memcpy(pszContent, gstr->getCString(), m_nLength);
++ memcpy(pszContent, gstr->c_str(), m_nLength);
+ pszContent[m_nLength] = '\0';
}
-
-diff --git a/gdal/nmake.opt b/gdal/nmake.opt
-index a3b88583425..c9ca28d3cd9 100644
---- a/gdal/nmake.opt
-+++ b/gdal/nmake.opt
-@@ -632,6 +632,7 @@ OCI_INCLUDE = -I$(ORACLE_HOME)\oci\include
- # Uncomment POPPLER_0_20_OR_LATER = YES for Poppler >= 0.20.0
- # Uncomment POPPLER_0_23_OR_LATER = YES for Poppler >= 0.23.0
- # Uncomment POPPLER_0_58_OR_LATER = YES for Poppler >= 0.58.0
-+# Uncomment POPPLER_0_69_OR_LATER = YES for Poppler >= 0.69.0
- #POPPLER_ENABLED = YES
- #POPPLER_CFLAGS = -Ie:/kde/include -Ie:/kde/include/poppler
- #POPPLER_HAS_OPTCONTENT = YES
-@@ -639,6 +640,7 @@ OCI_INCLUDE = -I$(ORACLE_HOME)\oci\include
- #POPPLER_0_20_OR_LATER = YES
- #POPPLER_0_23_OR_LATER = YES
- #POPPLER_0_58_OR_LATER = YES
-+#POPPLER_0_69_OR_LATER = YES
- #POPPLER_LIBS = e:/kde/lib/poppler.lib e:/kde/lib/freetype.lib e:/kde/lib/liblcms-1.lib advapi32.lib gdi32.lib
-
- # Uncomment for PDF support
+ delete gstr;
# - be reasonable about devel dependencies - you do not need all of them to
# use gdal (probably a gdal module or driver shall not imply devel
# dependency)
+# - MongoCXX (mongo/client/dbclient.h, -lmongoclient -lboost_system -lboost_thread -lboost_regex)
+# - rasterlite2
+# - sfcgal >= 1.2.2
# - 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
# - ECW (http://www.erdas.com/products/ecw/ERDASECWJPEG2000SDK/Details.aspx)
# - Kakadu/JPEG2000 (http://www.kakadusoftware.com/)
# - MrSID (http://www.lizardtech.com/developer/)
+# - LuraTech JP2Lura
# - MSG/EUMETSAT (http://www.eumetsat.int/Home/Main/DataAccess/SupportSoftwareTools/index.htm)
# - Ingres (--with-ingres=/path)
# - Informix DB (--with-idb)
# - DWGdirect (members only? http://www.opendwg.org/)
# - ESRI SDE (http://www.esri.com/software/arcgis/arcsde/index.html)
+# - Teigha DWG/DGN (https://www.opendesign.com/products/drawings?)
#
# Conditional build:
%bcond_without armadillo # Armadillo support for faster TPS transform
%bcond_without spatialite # SpatiaLite support
%bcond_without xerces # Xerces support
%bcond_without java # Java and MDB support
-%bcond_with php # PHP binding [PHP 7 not supported by swig 3.0.x]
-%bcond_with ruby # Ruby binding [not available as of 2.0.2]
%if %{with podofo}
%undefine with_poppler
%endif
-%if 0%{!?php_name:1}
-%define php_name php55
-%endif
Summary: Geospatial Data Abstraction Library
Summary(pl.UTF-8): Biblioteka abstrakcji danych dotyczących powierzchni Ziemi
Name: gdal
-Version: 2.2.4
-Release: 9
+Version: 2.4.0
+Release: 1
License: BSD-like
Group: Libraries
Source0: http://download.osgeo.org/gdal/%{version}/%{name}-%{version}.tar.xz
-# Source0-md5: 51b1df61dbdf81473689fab3075e7a5e
+# Source0-md5: 794096364a50df4bc7c5b710d997b6b4
Patch0: %{name}-perl.patch
Patch1: %{name}-poppler.patch
-Patch2: %{name}-php.patch
-Patch3: %{name}-fpic.patch
+Patch2: %{name}-pc.patch
Patch9: %{name}-dds.patch
-Patch11: %{name}-armadillo.patch
Patch12: %{name}-rasdaman.patch
Patch13: %{name}-pluginsdir.patch
Patch15: libx32.patch
URL: http://www.gdal.org/
-%{?with_php:BuildRequires: %{php_name}-devel}
+# 1.x or 2.x supported
+BuildRequires: CharLS-devel
%{?with_opencl:BuildRequires: OpenCL-devel >= 1.0}
%{?with_armadillo:BuildRequires: armadillo-devel}
BuildRequires: autoconf >= 2.52
BuildRequires: automake
BuildRequires: cfitsio-devel
%{?with_crnlib:BuildRequires: crnlib-devel}
+BuildRequires: cryptopp-devel
BuildRequires: curl-devel
BuildRequires: doxygen >= 1.4.2
%{?with_epsilon:BuildRequires: epsilon-compressor-devel}
BuildRequires: geos-devel >= 3.1.0
BuildRequires: giflib-devel >= 4.0
%{?with_grass:BuildRequires: grass-devel >= 6.4}
-BuildRequires: hdf-devel >= 4.0
+BuildRequires: hdf-devel >= 4.2.5
BuildRequires: hdf5-devel
BuildRequires: jasper-devel
%{?with_java:BuildRequires: jdk}
BuildRequires: libuuid-devel
BuildRequires: libwebp-devel
BuildRequires: libxml2-devel >= 2
+#%{?with_mysql:BuildRequires: mysql-devel >= 4}
%{?with_mysql:BuildRequires: /usr/bin/mysql_config}
BuildRequires: netcdf-devel >= 4.1
BuildRequires: ogdi-devel >= 3.1
-%{?with_openjpeg:BuildRequires: openjpeg2-devel >= 2.0.0-2}
+%{?with_openjpeg:BuildRequires: openjpeg2-devel >= 2.1.0}
# 8.1.7 for DB support, 10.0.1 for georaster
%{?with_oci:BuildRequires: oracle-instantclient-devel >= 10.0.1}
#BuildRequires: pcidsk-devel > 0.3
+BuildRequires: pcre-devel
BuildRequires: perl-devel
+BuildRequires: pkgconfig >= 1:0.21
%{?with_podofo:BuildRequires: podofo-devel}
%{?with_poppler:BuildRequires: poppler-devel >= 0.24}
# ensure it's compiled with PQescapeStringConn support
BuildRequires: python-devel >= 1:2.5
BuildRequires: python-numpy-devel >= 1:1.0.0
BuildRequires: python-setuptools
+BuildRequires: qhull-devel >= 2012
%{?with_rasdaman:BuildRequires: rasdaman-devel}
BuildRequires: rpm-pythonprov
-%{?with_ruby:BuildRequires: rpm-rubyprov}
BuildRequires: rpmbuild(macros) >= 1.344
-%{?with_ruby:BuildRequires: ruby-devel}
BuildRequires: sed >= 4.0
BuildRequires: sqlite3-devel >= 3.0.0
BuildRequires: swig-perl
-BuildRequires: swig-php >= 2.0.12-2
BuildRequires: swig-python >= 1.3
-%{?with_ruby:BuildRequires: swig-ruby}
BuildRequires: texlive-dvips
BuildRequires: texlive-latex
%{?with_odbc:BuildRequires: unixODBC-devel >= 2.2.15}
-%{?with_xerces:BuildRequires: xerces-c-devel >= 2.7.0}
+%{?with_xerces:BuildRequires: xerces-c-devel >= 3.1.0}
BuildRequires: xz-devel
BuildRequires: zlib-devel >= 1.1.4
+# for ZSTD compression in TIFF
+BuildRequires: zstd-devel
Requires: freexl >= 1.0
Requires: geos >= 3.1.0
+Requires: hdf >= 4.2.5
Requires: libgeotiff >= 1.2.1
Requires: libpng >= 2:1.2.8
Requires: libtiff >= 4.0
+%{?with_openjpeg:Requires: openjpeg2 >= 2.1.0}
+Requires: qhull >= 2012
+%{?with_xerces:Requires: xerces-c >= 3.1.0}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Summary(pl.UTF-8): Pliki nagłówkowe biblioteki GDAL
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
+Requires: CharLS-devel
%{?with_opencl:Requires: OpenCL-devel >= 1.0}
%{?with_armadillo:Requires: armadillo-devel}
Requires: cfitsio-devel
%{?with_crnlib:Requires: crnlib-devel}
+Requires: cryptopp-devel
Requires: curl-devel
%{?with_epsilon:Requires: epsilon-compressor-devel}
%{?with_fyba:Requires: fyba-devel}
Requires: freexl-devel >= 1.0
Requires: geos-devel >= 3.1.0
Requires: giflib-devel >= 4.0
-Requires: hdf-devel >= 4.0
+Requires: hdf-devel >= 4.2.5
Requires: hdf5-devel
Requires: jasper-devel
Requires: json-c-devel >= 0.11
%{?with_mysql:Requires: /usr/bin/mysql_config}
Requires: netcdf-devel >= 4
Requires: ogdi-devel >= 3.1
-%{?with_openjpeg:Requires: openjpeg2-devel >= 2.0.0-2}
+%{?with_openjpeg:Requires: openjpeg2-devel >= 2.1.0}
#Requires: pcidsk-devel > 0.3
+Requires: pcre-devel
%{?with_podofo:Requires: podofo-devel}
%{?with_poppler:Requires: poppler-devel >= 0.24}
Requires: postgresql-devel
Requires: proj-devel >= 4
+Requires: qhull-devel >= 2012
%{?with_rasdaman:Requires: rasdaman-devel}
Requires: sqlite3-devel >= 3.0.0
%{?with_odbc:Requires: unixODBC-devel}
-%{?with_xerces:Requires: xerces-c-devel >= 2.7.0}
+%{?with_xerces:Requires: xerces-c-devel >= 3.1.0}
Requires: xz-devel
Requires: zlib-devel >= 1.1.4
+Requires: zstd-devel
%description devel
GDAL library header files.
%description -n perl-gdal -l pl.UTF-8
Wiązania Perla do pakietu GDAL - moduły Geo::GDAL, Geo::OGR, Geo::OSR.
-%package -n %{php_name}-gdal
-Summary: PHP bindings for GDAL library
-Summary(pl.UTF-8): Wiązania PHP do biblioteki GDAL
-Group: Development/Languages/PHP
-Requires: %{name} = %{version}-%{release}
-%{?requires_php_extension}
-
-%description -n %{php_name}-gdal
-PHP bindings for GDAL library
-
-%description -n %{php_name}-gdal -l pl.UTF-8
-Wiązania PHP do biblioteki GDAL.
-
%package -n python-gdal
Summary: GDAL Python module
Summary(pl.UTF-8): Moduł Pythona GDAL
%description -n python-gdal -l pl.UTF-8
Moduł Pythona GDAL.
-%package -n ruby-gdal
-Summary: Ruby bindings for GDAL
-Summary(pl.UTF-8): Wiązania języka Ruby do pakietu GDAL
-Group: Development/Languages
-Requires: %{name} = %{version}-%{release}
-
-%description -n ruby-gdal
-Ruby bindings for GDAL - gdal, gdalconst, ogr and osr modules.
-
-%description -n ruby-gdal -l pl.UTF-8
-Wiązania języka Ruby do pakietu GDAL - moduły gdal, gdalconst, ogr i
-osr.
-
%prep
%setup -q
%patch0 -p1
-%patch1 -p2
+%patch1 -p1
%patch2 -p1
-%patch3 -p1
%patch9 -p1
-%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch15 -p1
-# need to regenerate (old ones don't support perl 5.10 or php 5.5)
-%{__rm} swig/{perl,php}/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp}
-
-%{__sed} -i \
- -e 's/^CC=gcc/CC=%{__cc}/' \
- -e 's/^CXX=g++/CXX=%{__cxx}/' \
- -e 's/^CFLAGS=-fpic/CFLAGS=%{rpmcflags} -fPIC/' \
- -e 's/^LDFLAGS=-shared/LDFLAGS=%{rpmldflags} -shared/' \
- swig/php/GNUmakefile
-# Build with fPIC to allow Ruby bindings
-# Xcompiler should normally achieve that -- http://trac.osgeo.org/gdal/ticket/3978
-# http://trac.osgeo.org/gdal/ticket/1994
-sed -i 's|\$(CFLAGS)|$(CFLAGS) -fPIC|g' swig/ruby/RubyMakefile.mk
-# Install Ruby bindings to distribution specific directory
-sed -i 's|RUBY_EXTENSIONS_DIR :=.*|RUBY_EXTENSIONS_DIR := %{ruby_vendorarchdir}|' swig/ruby/RubyMakefile.mk
-
-# Install Ruby bindings into the proper place
-sed -i -e 's|^$(INSTALL_DIR):|$(DESTDIR)$(INSTALL_DIR):|' swig/ruby/RubyMakefile.mk
-sed -i -e 's|^install: $(INSTALL_DIR)|install: $(DESTDIR)$(INSTALL_DIR)|' swig/ruby/RubyMakefile.mk
+# 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}
# our man path
sed -i -e 's#^mandir=.*##g' configure.ac
%{?with_oci:--with-oci --with-oci-include=/usr/include/oracle/client --with-oci-lib=%{_libdir}} \
%{?with_opencl:--with-opencl} \
--with-perl \
- %{?with_php:--with-php} \
%{?with_podofo:--with-podofo} \
%{?with_poppler:--with-poppler} \
--with-python \
%{?with_rasdaman:--with-rasdaman=%{_libdir}/rasdaman} \
- %{?with_ruby:--with-ruby} \
%{?with_fyba:--with-sosi} \
%{?with_spatialite:--with-spatialite} \
--with-sqlite3 \
--with-webp \
%{?with_xerces:--with-xerces} \
- --with-xerces-inc=/usr/include/xercesc \
+ --with-xerces-inc=/usr/include \
--with-xerces-lib="-lxerces-c" \
--without-libgrass
# --with-pcidsk=/usr (needs > 0.3)
# regenerate where needed
%{__make} -j1 -C swig/perl generate
-%if %{with ruby}
-%{__make} -j1 -C swig/ruby generate
-%endif
%{__make} -j1 \
%{?with_grass:GRASS_INCLUDE="-I/usr/include/grass64"} \
%{__make} -j1 install install-man \
DESTDIR=$RPM_BUILD_ROOT
+# TODO: remove libgdal.la when gdal.pc gets maintained Requires.private/Libs.private list
+
rm -rf _html
cp -a html _html
-%if %{with php}
-# missing in make install
-install -d $RPM_BUILD_ROOT%{php_extensiondir}
-install -p swig/php/php_gdal.so $RPM_BUILD_ROOT%{php_extensiondir}/gdal.so
-install -p swig/php/php_gdalconst.so $RPM_BUILD_ROOT%{php_extensiondir}/gdalconst.so
-install -p swig/php/php_ogr.so $RPM_BUILD_ROOT%{php_extensiondir}/ogr.so
-install -p swig/php/php_osr.so $RPM_BUILD_ROOT%{php_extensiondir}/osr.so
-install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
-cat <<'EOF' >$RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/gdal.ini
-; Enable gdal extension modules
-extension=gdal.so
-extension=gdalconst.so
-extension=ogr.so
-extension=osr.so
-EOF
-%endif
-
%py_comp $RPM_BUILD_ROOT%{py_sitedir}
%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
%py_postclean
%{_mandir}/man3/Geo::GDAL.3pm*
%{perl_vendorarch}/Geo/GNM.pm
-%if %{with php}
-%files -n %{php_name}-gdal
-%defattr(644,root,root,755)
-%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/gdal.ini
-%attr(755,root,root) %{php_extensiondir}/gdal.so
-%attr(755,root,root) %{php_extensiondir}/gdalconst.so
-%attr(755,root,root) %{php_extensiondir}/ogr.so
-%attr(755,root,root) %{php_extensiondir}/osr.so
-%endif
-
%files -n python-gdal
%defattr(644,root,root,755)
%{py_sitedir}/gdal.py[co]
%{py_sitedir}/gdalconst.py[co]
%{py_sitedir}/gdalnumeric.py[co]
-%{py_sitedir}/gnm.py[co]
%{py_sitedir}/ogr.py[co]
%{py_sitedir}/osr.py[co]
%{py_sitedir}/GDAL-*.egg-info
%attr(755,root,root) %{py_sitedir}/osgeo/_ogr.so
%attr(755,root,root) %{py_sitedir}/osgeo/_osr.so
%{py_sitedir}/osgeo/*.py[co]
-
-%if %{with ruby}
-%files -n ruby-gdal
-%defattr(644,root,root,755)
-%dir %{ruby_vendorarchdir}/gdal
-%attr(755,root,root) %{ruby_vendorarchdir}/gdal/gdal.so
-%attr(755,root,root) %{ruby_vendorarchdir}/gdal/gdalconst.so
-%attr(755,root,root) %{ruby_vendorarchdir}/gdal/ogr.so
-%attr(755,root,root) %{ruby_vendorarchdir}/gdal/osr.so
-%endif