Accepting request 692204 from home:bruno_friedmann:branches:Application:Geo
- Update to version 2.4.1 (52 bugfix release) Full changelog https://trac.osgeo.org/gdal/wiki/Release/2.4.1-News - Packaging: + Remove merged upstream patch add-support-for-poppler-0.72.0-and-0.73.0.patch Poppler-revision-version-management.patch + Add pkg-config-libpq.patch upstream issue#1412 pr#1418 wip use pkg-config for libpq + Secure libproj detection with tail -n1 + Remove trailing space in changes OBS-URL: https://build.opensuse.org/request/show/692204 OBS-URL: https://build.opensuse.org/package/show/Application:Geo/gdal?expand=0&rev=88
This commit is contained in:
parent
85a3d5155a
commit
512b36bea1
File diff suppressed because it is too large
Load Diff
@ -1,74 +0,0 @@
|
||||
From d295d0ebc3b41092ad072790c704c772098da210 Mon Sep 17 00:00:00 2001
|
||||
From: Even Rouault <even.rouault@spatialys.com>
|
||||
Date: Thu, 17 Jan 2019 22:52:36 +0100
|
||||
Subject: [PATCH] PDF: add support for 0.72.0 and 0.73.0 (fixes #1207, fixes
|
||||
#1208)
|
||||
|
||||
---
|
||||
gdal/frmts/pdf/pdfdataset.cpp | 8 ++++++++
|
||||
gdal/frmts/pdf/pdfobject.cpp | 5 +++++
|
||||
gdal/frmts/pdf/pdfsdk_headers.h | 4 ++++
|
||||
3 files changed, 17 insertions(+)
|
||||
|
||||
diff --git a/gdal/frmts/pdf/pdfdataset.cpp b/gdal/frmts/pdf/pdfdataset.cpp
|
||||
index 27c9b552431..2eff2189fad 100644
|
||||
--- a/gdal/frmts/pdf/pdfdataset.cpp
|
||||
+++ b/gdal/frmts/pdf/pdfdataset.cpp
|
||||
@@ -3416,7 +3416,11 @@ void PDFDataset::FindLayersPoppler()
|
||||
#endif
|
||||
if( ocg != nullptr && ocg->getName() != nullptr )
|
||||
{
|
||||
+#if (POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 72)
|
||||
+ const char* pszLayerName = (const char*)ocg->getName()->c_str();
|
||||
+#else
|
||||
const char* pszLayerName = (const char*)ocg->getName()->getCString();
|
||||
+#endif
|
||||
AddLayer(pszLayerName);
|
||||
oLayerOCGMapPoppler[pszLayerName] = ocg;
|
||||
}
|
||||
@@ -4740,7 +4744,11 @@ GDALDataset *PDFDataset::Open( GDALOpenInfo * poOpenInfo )
|
||||
GooString* poMetadata = poCatalogPoppler->readMetadata();
|
||||
if (poMetadata)
|
||||
{
|
||||
+#if (POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 72)
|
||||
+ const char* pszContent = poMetadata->c_str();
|
||||
+#else
|
||||
const char* pszContent = poMetadata->getCString();
|
||||
+#endif
|
||||
if (pszContent != nullptr &&
|
||||
STARTS_WITH(pszContent, "<?xpacket begin="))
|
||||
{
|
||||
diff --git a/gdal/frmts/pdf/pdfobject.cpp b/gdal/frmts/pdf/pdfobject.cpp
|
||||
index cc87a8ec258..bcd093e9310 100644
|
||||
--- a/gdal/frmts/pdf/pdfobject.cpp
|
||||
+++ b/gdal/frmts/pdf/pdfobject.cpp
|
||||
@@ -1061,8 +1061,13 @@ const CPLString& GDALPDFObjectPoppler::GetString()
|
||||
#else
|
||||
GooString* gooString = m_po->getString();
|
||||
#endif
|
||||
+#if (POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 72)
|
||||
+ return (osStr = GDALPDFGetUTF8StringFromBytes(reinterpret_cast<const GByte*>(gooString->c_str()),
|
||||
+ static_cast<int>(gooString->getLength())));
|
||||
+#else
|
||||
return (osStr = GDALPDFGetUTF8StringFromBytes(reinterpret_cast<const GByte*>(gooString->getCString()),
|
||||
static_cast<int>(gooString->getLength())));
|
||||
+#endif
|
||||
}
|
||||
else
|
||||
return (osStr = "");
|
||||
diff --git a/gdal/frmts/pdf/pdfsdk_headers.h b/gdal/frmts/pdf/pdfsdk_headers.h
|
||||
index 9150b0f4102..41e48ae91d6 100644
|
||||
--- a/gdal/frmts/pdf/pdfsdk_headers.h
|
||||
+++ b/gdal/frmts/pdf/pdfsdk_headers.h
|
||||
@@ -50,7 +50,11 @@
|
||||
#pragma warning( disable : 4244 ) /* conversion from 'const int' to 'Guchar', possible loss of data */
|
||||
#endif
|
||||
|
||||
+#if !(POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 73)
|
||||
#include <goo/gtypes.h>
|
||||
+#else
|
||||
+typedef unsigned char Guchar;
|
||||
+#endif
|
||||
#include <goo/GooList.h>
|
||||
|
||||
/* begin of poppler xpdf includes */
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c3791dcc6d37e59f6efa86e2df2a55a4485237b0a48e330ae08949f0cdf00f27
|
||||
size 8874628
|
@ -1 +0,0 @@
|
||||
794096364a50df4bc7c5b710d997b6b4 gdal-2.4.0.tar.xz
|
3
gdal-2.4.1.tar.xz
Normal file
3
gdal-2.4.1.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fd51b4900b2fc49b98d8714f55fc8a78ebfd07218357f93fb796791115a5a1ad
|
||||
size 8887164
|
1
gdal-2.4.1.tar.xz.md5
Normal file
1
gdal-2.4.1.tar.xz.md5
Normal file
@ -0,0 +1 @@
|
||||
ff98500aab063da563acade884518dfa gdal-2.4.1.tar.xz
|
13
gdal.changes
13
gdal.changes
@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 4 16:11:05 UTC 2019 - Bruno Friedmann <bruno@ioda-net.ch>
|
||||
|
||||
- Update to version 2.4.1 (52 bugfix release)
|
||||
Full changelog https://trac.osgeo.org/gdal/wiki/Release/2.4.1-News
|
||||
- Packaging:
|
||||
+ Remove merged upstream patch
|
||||
add-support-for-poppler-0.72.0-and-0.73.0.patch
|
||||
Poppler-revision-version-management.patch
|
||||
+ Add pkg-config-libpq.patch upstream issue#1412 pr#1418 wip
|
||||
use pkg-config for libpq
|
||||
+ Secure libproj detection with tail -n1
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 7 11:02:01 UTC 2019 - Bruno Friedmann <bruno@ioda-net.ch>
|
||||
|
||||
|
19
gdal.spec
19
gdal.spec
@ -26,7 +26,7 @@
|
||||
%bcond_with ecw5_support
|
||||
%bcond_with fgdb_support
|
||||
Name: gdal
|
||||
Version: 2.4.0
|
||||
Version: 2.4.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
|
||||
@ -37,10 +37,8 @@ Source1: http://download.osgeo.org/%{name}/%{version}/%{sourcename}-%{ver
|
||||
Patch0: gdal-perl.patch
|
||||
# Fix occasional parallel build failure
|
||||
Patch1: GDALmake.opt.in.patch
|
||||
# PATCH-FIX-UPSTREAM -- https://github.com/OSGeo/gdal/commit/d9ff536713c1bcaff00657f5fb9a94f36b92c0d8
|
||||
Patch2: Poppler-revision-version-management.patch
|
||||
# PATCH-FIX-UPSTREAM -- https://github.com/OSGeo/gdal/commit/d295d0ebc3b41092ad072790c704c772098da210
|
||||
Patch3: add-support-for-poppler-0.72.0-and-0.73.0.patch
|
||||
# Fix UPSTREAM Patch (pr#1418 in progress) upstream issue #1412
|
||||
Patch2: pkg-config-libpq.patch
|
||||
BuildRequires: KEALib-devel
|
||||
BuildRequires: blas-devel
|
||||
BuildRequires: chrpath
|
||||
@ -60,7 +58,6 @@ BuildRequires: mysql-devel
|
||||
BuildRequires: opencl-headers
|
||||
BuildRequires: perl-macros
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: postgresql-devel
|
||||
BuildRequires: python-numpy-devel
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: python3-numpy-devel
|
||||
@ -73,6 +70,7 @@ BuildRequires: pkgconfig(libjpeg)
|
||||
BuildRequires: pkgconfig(liblzma)
|
||||
BuildRequires: pkgconfig(libopenjp2)
|
||||
BuildRequires: pkgconfig(libpng)
|
||||
BuildRequires: pkgconfig(libpq)
|
||||
BuildRequires: pkgconfig(libtiff-4) >= 3.6.0
|
||||
BuildRequires: pkgconfig(libxml-2.0)
|
||||
BuildRequires: pkgconfig(netcdf)
|
||||
@ -179,13 +177,10 @@ The GDAL python modules provide support to handle multiple GIS file formats.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{sourcename}-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p2
|
||||
%patch3 -p2
|
||||
%autopatch -p1
|
||||
|
||||
# Set the right (build) libproj.so version
|
||||
PROJSOVER=$(ls -1 %_libdir/libproj.so.?? | awk -F '.' '{print $3}')
|
||||
# Set the right (build) libproj.so version, use the upper found version.
|
||||
PROJSOVER=$(ls -1 %_libdir/libproj.so.?? | tail -n1 | awk -F '.' '{print $3}')
|
||||
sed -i "s,# define LIBNAME \"libproj.so\",# define LIBNAME \"libproj.so.${PROJSOVER}\",g" ogr/ogrct.cpp
|
||||
|
||||
# Fix mandir
|
||||
|
65
pkg-config-libpq.patch
Normal file
65
pkg-config-libpq.patch
Normal file
@ -0,0 +1,65 @@
|
||||
diff -rup a/configure.ac b/configure.ac
|
||||
--- a/configure.ac 2019-03-15 13:30:02.000000000 +0100
|
||||
+++ b/configure.ac 2019-04-06 21:29:50.153490589 +0200
|
||||
@@ -1249,12 +1249,10 @@ PG_CONFIG=no
|
||||
|
||||
AC_ARG_WITH(pg,
|
||||
AS_HELP_STRING([--with-pg[=ARG]],
|
||||
- [Include PostgreSQL GDAL/OGR Support (ARG=path to pg_config)]),,)
|
||||
+ [Include PostgreSQL GDAL/OGR Support (ARG=yes,no)]),,)
|
||||
|
||||
if test "x$with_pg" = "xyes" -o "x$with_pg" = "x" ; then
|
||||
- AC_PATH_PROG(PG_CONFIG, pg_config, no)
|
||||
-else
|
||||
- PG_CONFIG=$with_pg
|
||||
+ PG_CONFIG=yes
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for PostgreSQL])
|
||||
@@ -1268,23 +1266,24 @@ if test "x$PG_CONFIG" = "xno" ; then
|
||||
AC_MSG_RESULT([no])
|
||||
|
||||
else
|
||||
- if test -d ${PG_CONFIG} ; then
|
||||
- AC_MSG_RESULT([no])
|
||||
- AC_MSG_ERROR([--with-pg argument is a directory. It should be the path to the pg_config script, often somewhere like /usr/local/pgsql/bin/pg_config.])
|
||||
- fi
|
||||
-
|
||||
- if test \! -x ${PG_CONFIG} ; then
|
||||
- AC_MSG_RESULT([no])
|
||||
- AC_MSG_ERROR([--with-pg argument is a not an executable file. It should be the path to the pg_config script, often somewhere like /usr/local/pgsql/bin/pg_config.])
|
||||
- fi
|
||||
-
|
||||
- AC_MSG_RESULT([yes])
|
||||
|
||||
- AC_CHECK_LIB(pq,PQconnectdb,HAVE_PG=yes,HAVE_PG=no,-L`$PG_CONFIG --libdir`)
|
||||
+ PKG_PROG_PKG_CONFIG([0.21])
|
||||
+ PKG_CHECK_MODULES([PQ],[libpq > 9.1], [HAVE_PG=yes], [HAVE_PG=no])
|
||||
|
||||
if test "${HAVE_PG}" = "yes" ; then
|
||||
- LIBS=-L`$PG_CONFIG --libdir`" -lpq $LIBS"
|
||||
- PG_INC=-I`$PG_CONFIG --includedir`" -I"`$PG_CONFIG --includedir-server`
|
||||
+ PG_LIB="${PQ_LIBS}"
|
||||
+ PG_INC="${PQ_CFLAGS}"
|
||||
+ SAVED_LIBS="${LIBS}"
|
||||
+ LIBS="${PG_LIBS}"
|
||||
+ AC_CHECK_LIB(pq,PQconnectdb,HAVE_PG=yes,HAVE_PG=no)
|
||||
+ LIBS="${SAVED_LIBS}"
|
||||
+ if test "${HAVE_PG}" = "yes" ; then
|
||||
+ LIBS="${PG_LIB} ${LIBS}"
|
||||
+ fi
|
||||
+ else
|
||||
+ if "x$with_pg" = "xyes"; then
|
||||
+ AC_MSG_ERROR([--with-pg was requested, but libpq is not available])
|
||||
+ fi
|
||||
fi
|
||||
|
||||
fi
|
||||
@@ -1293,6 +1292,7 @@ AC_SUBST(HAVE_PG,$HAVE_PG)
|
||||
AC_SUBST(PG_INC,$PG_INC)
|
||||
AC_SUBST(PG_LIB,$PG_LIB)
|
||||
|
||||
+
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Check if we should build with GRASS support.
|
||||
dnl ---------------------------------------------------------------------------
|
Loading…
x
Reference in New Issue
Block a user