From 512b36bea19d4bec180de96be5c15c4b1a47804ba66ad9ac4e993660e49f6e41 Mon Sep 17 00:00:00 2001 From: Dirk Stoecker Date: Mon, 8 Apr 2019 14:08:57 +0000 Subject: [PATCH] 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 --- Poppler-revision-version-management.patch | 1144 ----------------- ...upport-for-poppler-0.72.0-and-0.73.0.patch | 74 -- gdal-2.4.0.tar.xz | 3 - gdal-2.4.0.tar.xz.md5 | 1 - gdal-2.4.1.tar.xz | 3 + gdal-2.4.1.tar.xz.md5 | 1 + gdal.changes | 325 ++--- gdal.spec | 19 +- pkg-config-libpq.patch | 65 + 9 files changed, 245 insertions(+), 1390 deletions(-) delete mode 100644 Poppler-revision-version-management.patch delete mode 100644 add-support-for-poppler-0.72.0-and-0.73.0.patch delete mode 100644 gdal-2.4.0.tar.xz delete mode 100644 gdal-2.4.0.tar.xz.md5 create mode 100644 gdal-2.4.1.tar.xz create mode 100644 gdal-2.4.1.tar.xz.md5 create mode 100644 pkg-config-libpq.patch diff --git a/Poppler-revision-version-management.patch b/Poppler-revision-version-management.patch deleted file mode 100644 index 14f60d2..0000000 --- a/Poppler-revision-version-management.patch +++ /dev/null @@ -1,1144 +0,0 @@ -From d9ff536713c1bcaff00657f5fb9a94f36b92c0d8 Mon Sep 17 00:00:00 2001 -From: Even Rouault -Date: Thu, 17 Jan 2019 22:36:09 +0100 -Subject: [PATCH] Poppler: revision version management. Drop support for - ancient versions older than 0.23.0 (preparation for support of newer version: - refs #1207, #1208) - ---- - appveyor.yml | 6 +- - gdal/GDALmake.opt.in | 10 +- - gdal/configure | 374 ++++++++++++++++++---------------- - gdal/configure.ac | 177 ++-------------- - gdal/frmts/pdf/GNUmakefile | 26 +-- - gdal/frmts/pdf/makefile.vc | 30 +-- - gdal/frmts/pdf/pdfdataset.cpp | 69 +------ - gdal/frmts/pdf/pdfio.cpp | 20 +- - gdal/frmts/pdf/pdfio.h | 22 +- - gdal/frmts/pdf/pdfobject.cpp | 8 +- - gdal/nmake.opt | 15 +- - 11 files changed, 257 insertions(+), 500 deletions(-) - -diff --git a/gdal/GDALmake.opt.in b/gdal/GDALmake.opt.in -index ea54dc2ff3c..770ad859799 100644 ---- a/gdal/GDALmake.opt.in -+++ b/gdal/GDALmake.opt.in -@@ -483,13 +483,9 @@ PDF_PLUGIN = @PDF_PLUGIN@ - # - - HAVE_POPPLER = @HAVE_POPPLER@ --POPPLER_HAS_OPTCONTENT = @POPPLER_HAS_OPTCONTENT@ --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_MAJOR_VERSION = @POPPLER_MAJOR_VERSION@ -+POPPLER_MINOR_VERSION = @POPPLER_MINOR_VERSION@ -+POPPLER_INC = @POPPLER_CFLAGS@ - POPPLER_PLUGIN_LIB = @POPPLER_PLUGIN_LIB@ - - # -diff --git a/gdal/configure b/gdal/configure -index 6f7f76b48f2..c0fe46c8f68 100755 ---- a/gdal/configure -+++ b/gdal/configure -@@ -668,14 +668,11 @@ PODOFO_PLUGIN_LIB - PODOFO_INC - HAVE_PODOFO - POPPLER_PLUGIN_LIB --POPPLER_INC --POPPLER_0_69_OR_LATER --POPPLER_0_58_OR_LATER --POPPLER_0_23_OR_LATER --POPPLER_0_20_OR_LATER --POPPLER_BASE_STREAM_HAS_TWO_ARGS --POPPLER_HAS_OPTCONTENT -+POPPLER_MINOR_VERSION -+POPPLER_MAJOR_VERSION - HAVE_POPPLER -+POPPLER_LIBS -+POPPLER_CFLAGS - PDF_PLUGIN - PAM_SETTING - JSON_INCLUDE -@@ -1117,7 +1114,9 @@ HDF5_LIBS - OPENJPEG_CFLAGS - OPENJPEG_LIBS - LIBKML_CFLAGS --LIBKML_LIBS' -+LIBKML_LIBS -+POPPLER_CFLAGS -+POPPLER_LIBS' - - - # Initialize some variables set by options. -@@ -1927,6 +1926,10 @@ Some influential environment variables: - LIBKML_CFLAGS - C compiler flags for LIBKML, overriding pkg-config - LIBKML_LIBS linker flags for LIBKML, overriding pkg-config -+ POPPLER_CFLAGS -+ C compiler flags for POPPLER, overriding pkg-config -+ POPPLER_LIBS -+ linker flags for POPPLER, overriding pkg-config - - Use these variables to override the choices made by `configure' or to help - it to find libraries and programs with nonstandard names/locations. -@@ -35065,208 +35068,225 @@ fi - - - HAVE_POPPLER=no --POPPLER_HAS_OPTCONTENT=no --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 -+POPPLER_MAJOR_VERSION= -+POPPLER_MINOR_VERSION= - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for poppler" >&5 - $as_echo_n "checking for poppler... " >&6; } - - if test "$with_poppler" != "no" -a "$with_poppler" != ""; then - -- if test "$with_poppler" = "yes" ; then -- TEST_POPPLER_INC="-I/usr/include -I/usr/include/poppler" -- TEST_POPPLER_LIB="-lpoppler" -- else -- TEST_POPPLER_INC="-I$with_poppler/include -I$with_poppler/include/poppler" -- TEST_POPPLER_LIB="-L$with_poppler/lib -lpoppler" -- fi - -- # Check that we can accept Page::pageObj private member -- rm -f testpoppler.* -- echo '#define private public' > testpoppler.cpp -- echo '#include ' >> testpoppler.cpp -- echo '#include ' >> testpoppler.cpp -- echo 'int main(int argc, char** argv) { return &(((Page*)0x8000)->pageObj) == 0; } ' >> testpoppler.cpp - -- if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testpoppler.cpp -o testpoppler ${TEST_POPPLER_INC} ${TEST_POPPLER_LIB} 2>&1`" ; then -- HAVE_POPPLER=yes -- else -- # poppler 0.23.0 needs to be linked against pthread -- TEST_POPPLER_LIB="${TEST_POPPLER_LIB} -lpthread" -- if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testpoppler.cpp -o testpoppler ${TEST_POPPLER_INC} ${TEST_POPPLER_LIB} 2>&1`" ; then -- HAVE_POPPLER=yes -- fi -- fi -+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then -+ if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if ${ac_cv_path_PKG_CONFIG+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ case $PKG_CONFIG in -+ [\\/]* | ?:[\\/]*) -+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. -+ ;; -+ *) -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS - -- if test "$HAVE_POPPLER" = "yes"; then -- if test "$PDF_PLUGIN" = "no"; then -- LIBS="${TEST_POPPLER_LIB} ${LIBS}" -- fi -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -- POPPLER_INC=$TEST_POPPLER_INC -- POPPLER_PLUGIN_LIB="${TEST_POPPLER_LIB}" -- -- CHECK_OTHER_POPPLER_VERSION=yes -- -- if test "$CHECK_OTHER_POPPLER_VERSION" = "yes"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if OptionalContent has API >= 0.69.0" >&5 --$as_echo_n "checking if OptionalContent has API >= 0.69.0... " >&6; } -- rm -f testpoppler.* -- echo '#include ' > 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 -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -- else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+ ;; -+esac -+fi -+PKG_CONFIG=$ac_cv_path_PKG_CONFIG -+if test -n "$PKG_CONFIG"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -+$as_echo "$PKG_CONFIG" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 - $as_echo "no" >&6; } -- fi -- fi -+fi - -- if test "$CHECK_OTHER_POPPLER_VERSION" = "yes"; then -- # And now we check if we have Poppler >= 0.58.0 -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Object does have new API (>= 0.58.0)" >&5 --$as_echo_n "checking if Object does have new API (>= 0.58.0)... " >&6; } -- rm -f testpoppler.* -- echo '#include ' > 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 -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -- else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+ -+fi -+if test -z "$ac_cv_path_PKG_CONFIG"; then -+ ac_pt_PKG_CONFIG=$PKG_CONFIG -+ # Extract the first word of "pkg-config", so it can be a program name with args. -+set dummy pkg-config; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ case $ac_pt_PKG_CONFIG in -+ [\\/]* | ?:[\\/]*) -+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. -+ ;; -+ *) -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+ ;; -+esac -+fi -+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -+if test -n "$ac_pt_PKG_CONFIG"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -+$as_echo "$ac_pt_PKG_CONFIG" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 - $as_echo "no" >&6; } -- fi -- fi -+fi - -- if test "$CHECK_OTHER_POPPLER_VERSION" = "yes"; then -- -- # And now try another dirty thing, but this one is -- # optional. -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Catalog::optContent exists" >&5 --$as_echo_n "checking if Catalog::optContent exists... " >&6; } -- rm -f testpoppler.* -- echo '#define private public' > testpoppler.cpp -- echo '#include ' >> testpoppler.cpp -- echo '#include ' >> testpoppler.cpp -- echo 'int main(int argc, char** argv) { return &(((Catalog*)0x8000)->optContent) == 0; }' >> testpoppler.cpp -- if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testpoppler.cpp -c ${POPPLER_INC} 2>&1`" ; then -- POPPLER_HAS_OPTCONTENT=yes -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+ if test "x$ac_pt_PKG_CONFIG" = x; then -+ PKG_CONFIG="" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ PKG_CONFIG=$ac_pt_PKG_CONFIG -+ fi -+else -+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -+fi -+ -+fi -+if test -n "$PKG_CONFIG"; then -+ _pkg_min_version=0.21 -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } -+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 - $as_echo "yes" >&6; } -- else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+ else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 - $as_echo "no" >&6; } -- fi -+ PKG_CONFIG="" -+ fi - -- # And now we check if we have Poppler >= 0.16.0 -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if BaseStream constructor needs 2 arguments" >&5 --$as_echo_n "checking if BaseStream constructor needs 2 arguments... " >&6; } -- rm -f testpoppler.* -- echo '#include ' > testpoppler.cpp -- echo '#include ' >> testpoppler.cpp -- echo 'class TestStream: public BaseStream {' >> testpoppler.cpp -- echo 'public:' >> testpoppler.cpp -- echo ' TestStream() : BaseStream(0,0) {}' >> testpoppler.cpp -- echo '};' >> testpoppler.cpp -- echo 'int main(int argc, char** argv) { return 0; }' >> testpoppler.cpp -- if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testpoppler.cpp -c ${POPPLER_INC} 2>&1`" ; then -- POPPLER_BASE_STREAM_HAS_TWO_ARGS=yes -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -+fi - -- # And now we check if we have Poppler >= 0.20.0 -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have Poppler >= 0.20.0" >&5 --$as_echo_n "checking if we have Poppler >= 0.20.0... " >&6; } -- rm -f testpoppler.* -- echo '#include ' > testpoppler.cpp -- echo 'int main(int argc, char** argv) { setErrorCallback(0,0); return 0; }' >> testpoppler.cpp -- if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testpoppler.cpp -c ${POPPLER_INC} 2>&1`" ; then -- POPPLER_0_20_OR_LATER=yes -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -+pkg_failed=no -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for POPPLER" >&5 -+$as_echo_n "checking for POPPLER... " >&6; } - -- # And now we check if we have Poppler >= 0.23.0 -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have Poppler >= 0.23.0" >&5 --$as_echo_n "checking if we have Poppler >= 0.23.0... " >&6; } -- rm -f testpoppler.* -- echo '#include ' > testpoppler.cpp -- echo '#include ' >> testpoppler.cpp -- echo 'class TestStream: public BaseStream {' >> testpoppler.cpp -- echo 'public:' >> testpoppler.cpp -- echo ' TestStream() : BaseStream(0,0) {}' >> testpoppler.cpp -- echo ' ~TestStream() {}' >> testpoppler.cpp -- echo ' virtual BaseStream *copy() { return BaseStream::copy(); }' >> testpoppler.cpp -- echo '};' >> testpoppler.cpp -- echo 'int main(int argc, char** argv) { return 0; }' >> testpoppler.cpp -- if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testpoppler.cpp -c ${POPPLER_INC} 2>&1`" ; then -- POPPLER_0_23_OR_LATER=yes -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -- else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- fi -+if test -n "$PKG_CONFIG"; then -+ if test -n "$POPPLER_CFLAGS"; then -+ pkg_cv_POPPLER_CFLAGS="$POPPLER_CFLAGS" -+ else -+ if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"poppler >= 0.23.0\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "poppler >= 0.23.0") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then -+ pkg_cv_POPPLER_CFLAGS=`$PKG_CONFIG --cflags "poppler >= 0.23.0" 2>/dev/null` -+else -+ pkg_failed=yes -+fi -+ fi -+else -+ pkg_failed=untried -+fi -+if test -n "$PKG_CONFIG"; then -+ if test -n "$POPPLER_LIBS"; then -+ pkg_cv_POPPLER_LIBS="$POPPLER_LIBS" -+ else -+ if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"poppler >= 0.23.0\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "poppler >= 0.23.0") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then -+ pkg_cv_POPPLER_LIBS=`$PKG_CONFIG --libs "poppler >= 0.23.0" 2>/dev/null` -+else -+ pkg_failed=yes -+fi -+ fi -+else -+ pkg_failed=untried -+fi - -- else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- fi - -- else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- fi -+ -+if test $pkg_failed = yes; then -+ -+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then -+ _pkg_short_errors_supported=yes -+else -+ _pkg_short_errors_supported=no -+fi -+ if test $_pkg_short_errors_supported = yes; then -+ POPPLER_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "poppler >= 0.23.0"` -+ else -+ POPPLER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "poppler >= 0.23.0"` - fi -- else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+ # Put the nasty error message in config.log where it belongs -+ echo "$POPPLER_PKG_ERRORS" >&5 -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 - $as_echo "no" >&6; } -+ POPPLER_VERSION= -+elif test $pkg_failed = untried; then -+ POPPLER_VERSION= -+else -+ POPPLER_CFLAGS=$pkg_cv_POPPLER_CFLAGS -+ POPPLER_LIBS=$pkg_cv_POPPLER_LIBS -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } -+ POPPLER_VERSION=`$PKG_CONFIG --modversion poppler` -+fi -+ if test "$POPPLER_VERSION" != ""; then -+ HAVE_POPPLER=yes -+ POPPLER_MAJOR_VERSION=`expr $POPPLER_VERSION : '\([0-9]*\)'` -+ POPPLER_MINOR_VERSION=`expr $POPPLER_VERSION : '[0-9]*\.\([0-9]*\)'` -+ POPPLER_CFLAGS=`echo $POPPLER_CFLAGS $POPPLER_CFLAGS | sed "s/include\/poppler/include/"` - fi -- rm -f testpoppler.* -- rm -f testpoppler - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 - $as_echo "disabled" >&6; } - fi - --HAVE_POPPLER=$HAVE_POPPLER -- --POPPLER_HAS_OPTCONTENT=$POPPLER_HAS_OPTCONTENT -- --POPPLER_BASE_STREAM_HAS_TWO_ARGS=$POPPLER_BASE_STREAM_HAS_TWO_ARGS -- --POPPLER_0_20_OR_LATER=$POPPLER_0_20_OR_LATER -+if test "$HAVE_POPPLER" = "yes" -a "$PDF_PLUGIN" = "no"; then -+ LIBS="${POPPLER_LIBS} ${LIBS}" -+fi - --POPPLER_0_23_OR_LATER=$POPPLER_0_23_OR_LATER -+HAVE_POPPLER=$HAVE_POPPLER - --POPPLER_0_58_OR_LATER=$POPPLER_0_58_OR_LATER -+POPPLER_MAJOR_VERSION=$POPPLER_MAJOR_VERSION - --POPPLER_0_69_OR_LATER=$POPPLER_0_69_OR_LATER -+POPPLER_MINOR_VERSION=$POPPLER_MINOR_VERSION - --POPPLER_INC=$POPPLER_INC -+POPPLER_CFLAGS=$POPPLER_CFLAGS - --POPPLER_PLUGIN_LIB=$POPPLER_PLUGIN_LIB -+POPPLER_PLUGIN_LIB=$POPPLER_LIBS - - - -diff --git a/gdal/configure.ac b/gdal/configure.ac -index 56500f9ccfd..7f106be74cb 100644 ---- a/gdal/configure.ac -+++ b/gdal/configure.ac -@@ -4539,178 +4539,35 @@ dnl --------------------------------------------------------------------------- - AC_ARG_WITH(poppler,[ --with-poppler[=ARG] Include poppler(for PDF) support (ARG=no(default), yes or poppler install path)],,) - - HAVE_POPPLER=no --POPPLER_HAS_OPTCONTENT=no --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 -+POPPLER_MAJOR_VERSION= -+POPPLER_MINOR_VERSION= - - AC_MSG_CHECKING([for poppler]) - - if test "$with_poppler" != "no" -a "$with_poppler" != ""; then - -- if test "$with_poppler" = "yes" ; then -- TEST_POPPLER_INC="-I/usr/include -I/usr/include/poppler" -- TEST_POPPLER_LIB="-lpoppler" -- else -- TEST_POPPLER_INC="-I$with_poppler/include -I$with_poppler/include/poppler" -- TEST_POPPLER_LIB="-L$with_poppler/lib -lpoppler" -- fi -- -- # Check that we can accept Page::pageObj private member -- rm -f testpoppler.* -- echo '#define private public' > testpoppler.cpp -- echo '#include ' >> testpoppler.cpp -- echo '#include ' >> testpoppler.cpp -- echo 'int main(int argc, char** argv) { return &(((Page*)0x8000)->pageObj) == 0; } ' >> testpoppler.cpp -- -- if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testpoppler.cpp -o testpoppler ${TEST_POPPLER_INC} ${TEST_POPPLER_LIB} 2>&1`" ; then -+ PKG_PROG_PKG_CONFIG([0.21]) -+ PKG_CHECK_MODULES([POPPLER], [poppler >= 0.23.0], -+ [POPPLER_VERSION=`$PKG_CONFIG --modversion poppler`], [POPPLER_VERSION=]) -+ if test "$POPPLER_VERSION" != ""; then - HAVE_POPPLER=yes -- else -- # poppler 0.23.0 needs to be linked against pthread -- TEST_POPPLER_LIB="${TEST_POPPLER_LIB} -lpthread" -- if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testpoppler.cpp -o testpoppler ${TEST_POPPLER_INC} ${TEST_POPPLER_LIB} 2>&1`" ; then -- HAVE_POPPLER=yes -- fi -+ POPPLER_MAJOR_VERSION=`expr $POPPLER_VERSION : '\([[0-9]]*\)'` -+ POPPLER_MINOR_VERSION=`expr $POPPLER_VERSION : '[[0-9]]*\.\([[0-9]]*\)'` -+ POPPLER_CFLAGS=`echo $POPPLER_CFLAGS $POPPLER_CFLAGS | sed "s/include\/poppler/include/"` - fi -- -- if test "$HAVE_POPPLER" = "yes"; then -- if test "$PDF_PLUGIN" = "no"; then -- LIBS="${TEST_POPPLER_LIB} ${LIBS}" -- fi -- AC_MSG_RESULT([yes]) -- POPPLER_INC=$TEST_POPPLER_INC -- POPPLER_PLUGIN_LIB="${TEST_POPPLER_LIB}" -- -- CHECK_OTHER_POPPLER_VERSION=yes -- -- if test "$CHECK_OTHER_POPPLER_VERSION" = "yes"; then -- AC_MSG_CHECKING([if OptionalContent has API >= 0.69.0]) -- rm -f testpoppler.* -- echo '#include ' > 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 ' > 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 -- -- # And now try another dirty thing, but this one is -- # optional. -- AC_MSG_CHECKING([if Catalog::optContent exists]) -- rm -f testpoppler.* -- echo '#define private public' > testpoppler.cpp -- echo '#include ' >> testpoppler.cpp -- echo '#include ' >> testpoppler.cpp -- echo 'int main(int argc, char** argv) { return &(((Catalog*)0x8000)->optContent) == 0; }' >> testpoppler.cpp -- if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testpoppler.cpp -c ${POPPLER_INC} 2>&1`" ; then -- POPPLER_HAS_OPTCONTENT=yes -- AC_MSG_RESULT([yes]) -- else -- AC_MSG_RESULT([no]) -- fi -- -- # And now we check if we have Poppler >= 0.16.0 -- AC_MSG_CHECKING([if BaseStream constructor needs 2 arguments]) -- rm -f testpoppler.* -- echo '#include ' > testpoppler.cpp -- echo '#include ' >> testpoppler.cpp -- echo 'class TestStream: public BaseStream {' >> testpoppler.cpp -- echo 'public:' >> testpoppler.cpp -- echo ' TestStream() : BaseStream(0,0) {}' >> testpoppler.cpp -- echo '};' >> testpoppler.cpp -- echo 'int main(int argc, char** argv) { return 0; }' >> testpoppler.cpp -- if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testpoppler.cpp -c ${POPPLER_INC} 2>&1`" ; then -- POPPLER_BASE_STREAM_HAS_TWO_ARGS=yes -- AC_MSG_RESULT([yes]) -- -- # And now we check if we have Poppler >= 0.20.0 -- AC_MSG_CHECKING([if we have Poppler >= 0.20.0]) -- rm -f testpoppler.* -- echo '#include ' > testpoppler.cpp -- echo 'int main(int argc, char** argv) { setErrorCallback(0,0); return 0; }' >> testpoppler.cpp -- if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testpoppler.cpp -c ${POPPLER_INC} 2>&1`" ; then -- POPPLER_0_20_OR_LATER=yes -- AC_MSG_RESULT([yes]) -- -- # And now we check if we have Poppler >= 0.23.0 -- AC_MSG_CHECKING([if we have Poppler >= 0.23.0]) -- rm -f testpoppler.* -- echo '#include ' > testpoppler.cpp -- echo '#include ' >> testpoppler.cpp -- echo 'class TestStream: public BaseStream {' >> testpoppler.cpp -- echo 'public:' >> testpoppler.cpp -- echo ' TestStream() : BaseStream(0,0) {}' >> testpoppler.cpp -- echo ' ~TestStream() {}' >> testpoppler.cpp -- echo ' virtual BaseStream *copy() { return BaseStream::copy(); }' >> testpoppler.cpp -- echo '};' >> testpoppler.cpp -- echo 'int main(int argc, char** argv) { return 0; }' >> testpoppler.cpp -- if test -z "`${CXX} ${CXXFLAGS} ${CPPFLAGS} testpoppler.cpp -c ${POPPLER_INC} 2>&1`" ; then -- POPPLER_0_23_OR_LATER=yes -- AC_MSG_RESULT([yes]) -- else -- AC_MSG_RESULT([no]) -- fi -- -- else -- AC_MSG_RESULT([no]) -- fi -- -- else -- AC_MSG_RESULT([no]) -- fi -- fi -- else -- AC_MSG_RESULT([no]) -- fi -- rm -f testpoppler.* -- rm -f testpoppler - else - AC_MSG_RESULT([disabled]) - fi - -+if test "$HAVE_POPPLER" = "yes" -a "$PDF_PLUGIN" = "no"; then -+ LIBS="${POPPLER_LIBS} ${LIBS}" -+fi -+ - AC_SUBST(HAVE_POPPLER, $HAVE_POPPLER) --AC_SUBST(POPPLER_HAS_OPTCONTENT, $POPPLER_HAS_OPTCONTENT) --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) -+AC_SUBST(POPPLER_MAJOR_VERSION, $POPPLER_MAJOR_VERSION) -+AC_SUBST(POPPLER_MINOR_VERSION, $POPPLER_MINOR_VERSION) -+AC_SUBST(POPPLER_CFLAGS, $POPPLER_CFLAGS) -+AC_SUBST(POPPLER_PLUGIN_LIB, $POPPLER_LIBS) - - dnl --------------------------------------------------------------------------- - dnl Check if libpodofo is available -diff --git a/gdal/frmts/pdf/GNUmakefile b/gdal/frmts/pdf/GNUmakefile -index 6a267f529b2..1ce563a5144 100644 ---- a/gdal/frmts/pdf/GNUmakefile -+++ b/gdal/frmts/pdf/GNUmakefile -@@ -11,31 +11,7 @@ LD_SHARED = $(LD) -bundle - endif - - ifeq ($(HAVE_POPPLER),yes) --CPPFLAGS += -DHAVE_POPPLER --endif -- --ifeq ($(POPPLER_HAS_OPTCONTENT),yes) --CPPFLAGS += -DPOPPLER_HAS_OPTCONTENT --endif -- --ifeq ($(POPPLER_BASE_STREAM_HAS_TWO_ARGS),yes) --CPPFLAGS += -DPOPPLER_BASE_STREAM_HAS_TWO_ARGS --endif -- --ifeq ($(POPPLER_0_20_OR_LATER),yes) --CPPFLAGS += -DPOPPLER_0_20_OR_LATER --endif -- --ifeq ($(POPPLER_0_23_OR_LATER),yes) --CPPFLAGS += -DPOPPLER_0_23_OR_LATER --endif -- --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 -+CPPFLAGS += -DHAVE_POPPLER -DPOPPLER_MAJOR_VERSION=$(POPPLER_MAJOR_VERSION) -DPOPPLER_MINOR_VERSION=$(POPPLER_MINOR_VERSION) - endif - - ifeq ($(HAVE_PODOFO),yes) -diff --git a/gdal/frmts/pdf/pdfdataset.cpp b/gdal/frmts/pdf/pdfdataset.cpp -index 6e8223e4708..27c9b552431 100644 ---- a/gdal/frmts/pdf/pdfdataset.cpp -+++ b/gdal/frmts/pdf/pdfdataset.cpp -@@ -130,7 +130,7 @@ class ObjectAutoFree : public Object - public: - ObjectAutoFree() {} - ~ObjectAutoFree() { --#ifndef POPPLER_0_58_OR_LATER -+#if !(POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 58) - obj.free(); - #endif - } -@@ -176,17 +176,10 @@ class GDALPDFOutputDev : public SplashOutputDev - void SetEnableText(int bFlag) { bEnableText = bFlag; } - void SetEnableBitmap(int bFlag) { bEnableBitmap = bFlag; } - -- virtual void startPage(int pageNum, GfxState *state --#ifdef POPPLER_0_23_OR_LATER -- ,XRef* xrefIn --#endif -+ virtual void startPage(int pageNum, GfxState *state,XRef* xrefIn - ) override - { -- SplashOutputDev::startPage(pageNum, state --#ifdef POPPLER_0_23_OR_LATER -- ,xrefIn --#endif -- ); -+ SplashOutputDev::startPage(pageNum, state,xrefIn); - SplashBitmap* poBitmap = getBitmap(); - memset(poBitmap->getDataPtr(), 255, poBitmap->getRowSize() * poBitmap->getHeight()); - } -@@ -226,15 +219,6 @@ class GDALPDFOutputDev : public SplashOutputDev - SplashOutputDev::beginTextObject(state); - } - --#ifndef POPPLER_0_23_OR_LATER -- virtual GBool deviceHasTextClip(GfxState *state) override -- { -- if (bEnableText) -- return SplashOutputDev::deviceHasTextClip(state); -- return gFalse; -- } --#endif -- - virtual void endTextObject(GfxState *state) override - { - if (bEnableText) -@@ -260,7 +244,6 @@ class GDALPDFOutputDev : public SplashOutputDev - } - } - --#ifdef POPPLER_0_20_OR_LATER - virtual void setSoftMaskFromImageMask(GfxState *state, - Object *ref, Stream *str, - int width, int height, GBool invert, -@@ -279,7 +262,6 @@ class GDALPDFOutputDev : public SplashOutputDev - if (bEnableBitmap) - SplashOutputDev::unsetSoftMaskFromImageMask(state, baseMatrix); - } --#endif - - virtual void drawImage(GfxState *state, Object *ref, Stream *str, - int width, int height, GfxImageColorMap *colorMap, -@@ -1758,11 +1740,7 @@ CPLErr PDFDataset::ReadPixels( int nReqXOff, int nReqYOff, - } - - PDFDoc* poDoc = poDocPoppler; --#ifdef POPPLER_0_20_OR_LATER - poSplashOut->startDoc(poDoc); --#else -- poSplashOut->startDoc(poDoc->getXRef()); --#endif - - /* EVIL: we modify a private member... */ - /* poppler (at least 0.12 and 0.14 versions) don't render correctly */ -@@ -1770,12 +1748,10 @@ CPLErr PDFDataset::ReadPixels( int nReqXOff, int nReqYOff, - /* in those cases. This processing of optional content is an addition of */ - /* poppler in comparison to original xpdf, which hasn't the issue. All in */ - /* all, nullifying optContent removes the error message and improves the rendering */ --#ifdef POPPLER_HAS_OPTCONTENT - Catalog* poCatalog = poDoc->getCatalog(); - OCGs* poOldOCGs = poCatalog->optContent; - if (!bUseOCG) - poCatalog->optContent = nullptr; --#endif - poDoc->displayPageSlice(poSplashOut, - iPage, - dfDPI, dfDPI, -@@ -1785,9 +1761,7 @@ CPLErr PDFDataset::ReadPixels( int nReqXOff, int nReqYOff, - nReqXSize, nReqYSize); - - /* Restore back */ --#ifdef POPPLER_HAS_OPTCONTENT - poCatalog->optContent = poOldOCGs; --#endif - - SplashBitmap* poBitmap = poSplashOut->getBitmap(); - if (poBitmap->getWidth() != nReqXSize || poBitmap->getHeight() != nReqYSize) -@@ -2294,7 +2268,7 @@ GDALPDFObject* PDFDataset::GetCatalog() - if (bUseLib.test(PDFLIB_POPPLER)) - { - poCatalogObjectPoppler = new ObjectAutoFree; --#ifdef POPPLER_0_58_OR_LATER -+#if POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 58 - *poCatalogObjectPoppler->getObj() = poDocPoppler->getXRef()->getCatalog(); - #else - poDocPoppler->getXRef()->getCatalog(poCatalogObjectPoppler->getObj()); -@@ -2592,16 +2566,10 @@ static void PDFDatasetErrorFunctionCommon(const CPLString& osError) - CPLError(CE_Failure, CPLE_AppDefined, "%s", osError.c_str()); - } - --#ifdef POPPLER_0_20_OR_LATER -- - static void PDFDatasetErrorFunction(void* /* userData*/, - ErrorCategory /* eErrCategory */, --#ifdef POPPLER_0_23_OR_LATER - Goffset nPos, --#else -- int nPos, --#endif --#ifdef POPPLER_0_71_OR_LATER -+#if POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 71 - const char *pszMsg - #else - char *pszMsg -@@ -2615,17 +2583,6 @@ static void PDFDatasetErrorFunction(void* /* userData*/, - osError += pszMsg; - PDFDatasetErrorFunctionCommon(osError); - } --#else --static void PDFDatasetErrorFunction(int nPos, char *pszMsg, va_list args) --{ -- CPLString osError; -- -- if (nPos >= 0) -- osError.Printf("Pos = %d, ", nPos); -- osError += CPLString().vPrintf(pszMsg, args); -- PDFDatasetErrorFunctionCommon(osError); --} --#endif - #endif - - /************************************************************************/ -@@ -3447,7 +3404,7 @@ void PDFDataset::FindLayersPoppler() - } - else - { --#ifdef POPPLER_0_69_OR_LATER -+#if POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 69 - for( const auto& refOCGPair: optContentConfig->getOCGs() ) - { - auto ocg = refOCGPair.second.get(); -@@ -3485,7 +3442,7 @@ void PDFDataset::TurnLayersOnOffPoppler() - { - int i; - int bAll = EQUAL(pszLayers, "ALL"); --#ifdef POPPLER_0_69_OR_LATER -+#if POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 69 - for( const auto& refOCGPair: optContentConfig->getOCGs() ) - { - auto ocg = refOCGPair.second.get(); -@@ -4058,7 +4015,7 @@ GDALDataset *PDFDataset::Open( GDALOpenInfo * poOpenInfo ) - GDALPDFObject* poPageObj = nullptr; - #ifdef HAVE_POPPLER - PDFDoc* poDocPoppler = nullptr; --#ifdef POPPLER_0_58_OR_LATER -+#if POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 58 - Object oObj; - #else - ObjectAutoFree oObj; -@@ -4082,11 +4039,7 @@ GDALDataset *PDFDataset::Open( GDALOpenInfo * poOpenInfo ) - GooString* poUserPwd = nullptr; - - /* Set custom error handler for poppler errors */ --#ifdef POPPLER_0_20_OR_LATER - setErrorCallback(PDFDatasetErrorFunction, nullptr); --#else -- setErrorFunction(PDFDatasetErrorFunction); --#endif - - { - CPLMutexHolderD(&hGlobalParamsMutex); -@@ -4109,7 +4062,7 @@ GDALDataset *PDFDataset::Open( GDALOpenInfo * poOpenInfo ) - if (pszUserPwd) - poUserPwd = new GooString(pszUserPwd); - --#ifdef POPPLER_0_58_OR_LATER -+#if POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 58 - poDocPoppler = new PDFDoc(new VSIPDFFileStream(fp, pszFilename, std::move(oObj)), nullptr, poUserPwd); - #else - oObj.getObj()->initNull(); -@@ -4803,14 +4756,14 @@ GDALDataset *PDFDataset::Open( GDALOpenInfo * poOpenInfo ) - if( poDocPoppler->getXRef()->isOk() ) - { - Object oInfo; --#ifdef POPPLER_0_58_OR_LATER -+#if POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 58 - oInfo = poDocPoppler->getDocInfo(); - #else - poDocPoppler->getDocInfo(&oInfo); - #endif - GDALPDFObjectPoppler oInfoObjPoppler(&oInfo, FALSE); - poDS->ParseInfo(&oInfoObjPoppler); --#ifndef POPPLER_0_58_OR_LATER -+#if !(POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 58) - oInfo.free(); - #endif - } -diff --git a/gdal/frmts/pdf/pdfio.cpp b/gdal/frmts/pdf/pdfio.cpp -index 582d0632b41..7850e0d292a 100644 ---- a/gdal/frmts/pdf/pdfio.cpp -+++ b/gdal/frmts/pdf/pdfio.cpp -@@ -36,7 +36,6 @@ - - CPL_CVSID("$Id: pdfio.cpp 7e07230bbff24eb333608de4dbd460b7312839d0 2017-12-11 19:08:47Z Even Rouault $") - --#ifdef POPPLER_BASE_STREAM_HAS_TWO_ARGS - /* Poppler 0.31.0 is the first one that needs to know the file size */ - static vsi_l_offset VSIPDFFileStreamGetSize(VSILFILE* f) - { -@@ -45,7 +44,6 @@ static vsi_l_offset VSIPDFFileStreamGetSize(VSILFILE* f) - VSIFSeekL(f, 0, SEEK_SET); - return nSize; - } --#endif - - /************************************************************************/ - /* VSIPDFFileStream() */ -@@ -55,12 +53,10 @@ VSIPDFFileStream::VSIPDFFileStream( - VSILFILE* fIn, const char* pszFilename, - makeSubStream_object_type dictA - ) : --#ifdef POPPLER_0_58_OR_LATER -+#if POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 58 - BaseStream(std::move(dictA), (Goffset)VSIPDFFileStreamGetSize(fIn)), --#elif defined(POPPLER_BASE_STREAM_HAS_TWO_ARGS) -- BaseStream(dictA, (setPos_offset_type)VSIPDFFileStreamGetSize(fIn)), - #else -- BaseStream(dictA), -+ BaseStream(dictA, (setPos_offset_type)VSIPDFFileStreamGetSize(fIn)), - #endif - poParent(nullptr), - poFilename(new GooString(pszFilename)), -@@ -83,12 +79,10 @@ VSIPDFFileStream::VSIPDFFileStream( VSIPDFFileStream* poParentIn, - vsi_l_offset startA, GBool limitedA, - vsi_l_offset lengthA, - makeSubStream_object_type dictA) : --#ifdef POPPLER_0_58_OR_LATER -+#if POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 58 - BaseStream(std::move(dictA), (Goffset)lengthA), --#elif defined(POPPLER_BASE_STREAM_HAS_TWO_ARGS) -- BaseStream(dictA, (makeSubStream_offset_type)lengthA), - #else -- BaseStream(dictA), -+ BaseStream(dictA, (makeSubStream_offset_type)lengthA), - #endif - poParent(poParentIn), - poFilename(poParentIn->poFilename), -@@ -122,13 +116,13 @@ VSIPDFFileStream::~VSIPDFFileStream() - /* copy() */ - /************************************************************************/ - --#ifdef POPPLER_0_58_OR_LATER -+#if POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 58 - BaseStream* VSIPDFFileStream::copy() - { - return new VSIPDFFileStream(poParent, nStart, bLimited, - nLength, dict.copy()); - } --#elif defined(POPPLER_0_23_OR_LATER) -+#else - BaseStream* VSIPDFFileStream::copy() - { - return new VSIPDFFileStream(poParent, nStart, bLimited, -@@ -142,7 +136,7 @@ BaseStream* VSIPDFFileStream::copy() - Stream *VSIPDFFileStream::makeSubStream(makeSubStream_offset_type startA, GBool limitedA, - makeSubStream_offset_type lengthA, makeSubStream_object_type dictA) - { --#ifdef POPPLER_0_58_OR_LATER -+#if POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 58 - return new VSIPDFFileStream(this, - startA, limitedA, - lengthA, std::move(dictA)); -diff --git a/gdal/frmts/pdf/pdfio.h b/gdal/frmts/pdf/pdfio.h -index 2d58059e801..7ae15c88aa3 100644 ---- a/gdal/frmts/pdf/pdfio.h -+++ b/gdal/frmts/pdf/pdfio.h -@@ -38,34 +38,27 @@ - - #define BUFFER_SIZE 1024 - --#ifdef POPPLER_0_23_OR_LATER - #define getPos_ret_type Goffset - #define getStart_ret_type Goffset - #define makeSubStream_offset_type Goffset - #define setPos_offset_type Goffset - #define moveStart_delta_type Goffset --#else --#define getPos_ret_type int --#define getStart_ret_type Guint --#define makeSubStream_offset_type Guint --#define setPos_offset_type Guint --#define moveStart_delta_type int --#endif - --#ifdef POPPLER_0_58_OR_LATER -+#if POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 58 - #define makeSubStream_object_type Object&& - #else - #define makeSubStream_object_type Object* - #endif - - // Detect Poppler 0.71 that no longer defines GBool --#ifdef POPPLER_0_69_OR_LATER -+#if POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 69 - #ifndef initObj --#define POPPLER_0_71_OR_LATER -+#if POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 71 - #define GBool bool - #define gFalse false - #endif - #endif -+#endif - - class VSIPDFFileStream final: public BaseStream - { -@@ -78,9 +71,7 @@ class VSIPDFFileStream final: public BaseStream - makeSubStream_object_type dictA); - virtual ~VSIPDFFileStream(); - --#ifdef POPPLER_0_23_OR_LATER - virtual BaseStream* copy() override; --#endif - - virtual Stream * makeSubStream(makeSubStream_offset_type startA, GBool limitedA, - makeSubStream_offset_type lengthA, makeSubStream_object_type dictA) override; -@@ -102,7 +93,6 @@ class VSIPDFFileStream final: public BaseStream - virtual void close() override; - - private: --#ifdef POPPLER_BASE_STREAM_HAS_TWO_ARGS - /* getChars/hasGetChars added in poppler 0.15.0 - * POPPLER_BASE_STREAM_HAS_TWO_ARGS true from poppler 0.16, - * This test will be wrong for poppler 0.15 or 0.16, -@@ -110,10 +100,6 @@ class VSIPDFFileStream final: public BaseStream - */ - virtual GBool hasGetChars() override; - virtual int getChars(int nChars, Guchar *buffer) override; --#else -- virtual GBool hasGetChars() ; -- virtual int getChars(int nChars, Guchar *buffer) ; --#endif - - VSIPDFFileStream *poParent; - GooString *poFilename; -diff --git a/gdal/frmts/pdf/pdfobject.cpp b/gdal/frmts/pdf/pdfobject.cpp -index e8929aa1810..cc87a8ec258 100644 ---- a/gdal/frmts/pdf/pdfobject.cpp -+++ b/gdal/frmts/pdf/pdfobject.cpp -@@ -971,7 +971,7 @@ class GDALPDFStreamPoppler : public GDALPDFStream - - GDALPDFObjectPoppler::~GDALPDFObjectPoppler() - { --#ifndef POPPLER_0_58_OR_LATER -+#if !(POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 58) - m_po->free(); - #endif - if (m_bDestroy) -@@ -1055,7 +1055,7 @@ const CPLString& GDALPDFObjectPoppler::GetString() - { - if (GetType() == PDFObjectType_String) - { --#ifdef POPPLER_0_58_OR_LATER -+#if POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 58 - // At least available since poppler 0.41 - const GooString* gooString = m_po->getString(); - #else -@@ -1189,7 +1189,7 @@ GDALPDFObject* GDALPDFDictionaryPoppler::Get(const char* pszKey) - if (oIter != m_map.end()) - return oIter->second; - --#ifdef POPPLER_0_58_OR_LATER -+#if POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 58 - Object o = m_poDict->lookupNF(((char*)pszKey)); - if (!o.isNull()) - { -@@ -1323,7 +1323,7 @@ GDALPDFObject* GDALPDFArrayPoppler::Get(int nIndex) - if (m_v[nIndex] != nullptr) - return m_v[nIndex]; - --#ifdef POPPLER_0_58_OR_LATER -+#if POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 58 - Object o = m_poArray->getNF(nIndex); - if( !o.isNull() ) - { -diff --git a/gdal/nmake.opt b/gdal/nmake.opt -index 318f9ed784c..96f52297f25 100644 ---- a/gdal/nmake.opt -+++ b/gdal/nmake.opt -@@ -640,20 +640,11 @@ OCI_INCLUDE = -I$(ORACLE_HOME)\oci\include - #ZLIB_INC = -IC:\projects\zlib - #ZLIB_LIB = C:\projects\lib\Release\zlib.lib - --# Uncomment for PDF support --# Uncomment POPPLER_BASE_STREAM_HAS_TWO_ARGS = YES for Poppler >= 0.16.0 --# 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 -+# Uncomment for PDF support, and update version numbers (poppler 0.23 or later required) - #POPPLER_ENABLED = YES - #POPPLER_CFLAGS = -Ie:/kde/include -Ie:/kde/include/poppler --#POPPLER_HAS_OPTCONTENT = YES --#POPPLER_BASE_STREAM_HAS_TWO_ARGS = YES --#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_MAJOR_VERSION = 0 -+#POPPLER_MINOR_VERSION = 69 - #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 diff --git a/add-support-for-poppler-0.72.0-and-0.73.0.patch b/add-support-for-poppler-0.72.0-and-0.73.0.patch deleted file mode 100644 index ab5af7b..0000000 --- a/add-support-for-poppler-0.72.0-and-0.73.0.patch +++ /dev/null @@ -1,74 +0,0 @@ -From d295d0ebc3b41092ad072790c704c772098da210 Mon Sep 17 00:00:00 2001 -From: Even Rouault -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, "getString(); - #endif -+#if (POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 72) -+ return (osStr = GDALPDFGetUTF8StringFromBytes(reinterpret_cast(gooString->c_str()), -+ static_cast(gooString->getLength()))); -+#else - return (osStr = GDALPDFGetUTF8StringFromBytes(reinterpret_cast(gooString->getCString()), - static_cast(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 -+#else -+typedef unsigned char Guchar; -+#endif - #include - - /* begin of poppler xpdf includes */ diff --git a/gdal-2.4.0.tar.xz b/gdal-2.4.0.tar.xz deleted file mode 100644 index 36efc0a..0000000 --- a/gdal-2.4.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c3791dcc6d37e59f6efa86e2df2a55a4485237b0a48e330ae08949f0cdf00f27 -size 8874628 diff --git a/gdal-2.4.0.tar.xz.md5 b/gdal-2.4.0.tar.xz.md5 deleted file mode 100644 index b328c3b..0000000 --- a/gdal-2.4.0.tar.xz.md5 +++ /dev/null @@ -1 +0,0 @@ -794096364a50df4bc7c5b710d997b6b4 gdal-2.4.0.tar.xz diff --git a/gdal-2.4.1.tar.xz b/gdal-2.4.1.tar.xz new file mode 100644 index 0000000..133815f --- /dev/null +++ b/gdal-2.4.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd51b4900b2fc49b98d8714f55fc8a78ebfd07218357f93fb796791115a5a1ad +size 8887164 diff --git a/gdal-2.4.1.tar.xz.md5 b/gdal-2.4.1.tar.xz.md5 new file mode 100644 index 0000000..ee5dbc4 --- /dev/null +++ b/gdal-2.4.1.tar.xz.md5 @@ -0,0 +1 @@ +ff98500aab063da563acade884518dfa gdal-2.4.1.tar.xz diff --git a/gdal.changes b/gdal.changes index dc38849..00925bb 100644 --- a/gdal.changes +++ b/gdal.changes @@ -1,7 +1,20 @@ +------------------------------------------------------------------- +Thu Apr 4 16:11:05 UTC 2019 - Bruno Friedmann + +- 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 -- Fix boo#1128276 by providing correct Obsolete +- Fix boo#1128276 by providing correct Obsolete ------------------------------------------------------------------- Sat Feb 23 01:35:04 UTC 2019 - John Vandenberg @@ -26,26 +39,26 @@ Mon Dec 24 09:59:19 UTC 2018 - Guillaume GARDET ​EEDAI: read-only driver for Google Earth Engine Data API IGNFHeightASCIIGrid: read-only driver to read IGN-France height correction ASCII grids ​NGW: NextGIS Web read-only driver - NTv1: read-only driver for NTv1 datum shift grids + NTv1: read-only driver for NTv1 datum shift grids - New OGR drivers: ​EEDA: read-only driver for Google Earth Engine Data API ​GeoJSONSeq: read/creation support of new-line or record-separator separated GeoJSON features (#378) - ​NGW: NextGIS Web read-write driver + ​NGW: NextGIS Web read-write driver - Improved drivers: BAG: add read support for variable-resolution grids, and write support for single-resolution grids GTiff driver: add Lerc and WebP codecs PostgisRaster?: add support for out-db rasters RMF - MSSQLSpatial + MSSQLSpatial - RFC 72: Make GDAL Python autotest suite use pytest framework - Add /vsihdfs/ virtual file system handler for Hadoop File System (via libhdfs) - Add /vsiwebhdfs/ read-write virtual file system for Web Hadoop File System REST API - gdal_contour rewriting: speed optimizations and capability to compute polygon isosurfaces. - Remove PHP and Ruby bindings. - - Continued code linting in C++, Python scripts, Shell scripts and autotest + - Continued code linting in C++, Python scripts, Shell scripts and autotest * Backward compatibility issues - - The value of COMPRESSION_ZSTD used for ZStd-in-TIFF compression has been changed. - ZStd-compressed TIFF files produced by GDAL 2.3.0 will not be readable + - The value of COMPRESSION_ZSTD used for ZStd-in-TIFF compression has been changed. + ZStd-compressed TIFF files produced by GDAL 2.3.0 will not be readable * Full changelog: https://trac.osgeo.org/gdal/wiki/Release/2.4.0-News - Add md5 checksum - Refresh patch: @@ -61,10 +74,10 @@ Mon Dec 24 09:17:43 UTC 2018 - Guillaume GARDET Sat Sep 29 13:11:22 UTC 2018 - Bruno Friedmann - Update to new bugfix 2.3.2 version - See details https://trac.osgeo.org/gdal/wiki/Release/2.3.2-News - This adds 65 bug fixes on top of 2.3.1. + See details https://trac.osgeo.org/gdal/wiki/Release/2.3.2-News + This adds 65 bug fixes on top of 2.3.1. The C and C++ API and ABI are unchanged. -- Packaging: +- Packaging: + spec-cleaner -m -i URL and Requires order changes + Remove patch gdal-fix_ecw5_detection.patch (merged upstream) + Redone patch GDALmake.opt.in.patch with version 2.3.2 @@ -95,16 +108,16 @@ Tue Jul 10 07:52:21 UTC 2018 - guillaume@opensuse.org ------------------------------------------------------------------- Fri Jul 6 11:20:45 UTC 2018 - bruno@ioda-net.ch -- Upgrade to new bugfix 2.3.1 version - See details https://trac.osgeo.org/gdal/wiki/Release/2.3.0-News +- Upgrade to new bugfix 2.3.1 version + See details https://trac.osgeo.org/gdal/wiki/Release/2.3.0-News + Fix build with recent Poppler (0.64) (#573) + PDF driver: fix build against PDFium (#612) + Do not use json-c private API RDA and AmigoCloud? drivers(#618) + fix build against MySQL 8.0 - + Include gdalsse_priv.h from user defined paths + + Include gdalsse_priv.h from user defined paths + Unix: - update GRASS drivers to support GRASS 7.4.0 (#633) - - configure: use CXXFLAGS when CXX is used (#693) + - configure: use CXXFLAGS when CXX is used (#693) - Packaging : redone patches against new version + gdal-perl.patch @@ -122,17 +135,17 @@ Fri Jun 1 10:04:15 UTC 2018 - opensuse@dstoecker.de Mon May 14 14:03:36 UTC 2018 - bruno@ioda-net.ch - Upgrade to new 2.3.0 version - See details https://trac.osgeo.org/gdal/wiki/Release/2.3.0-News + See details https://trac.osgeo.org/gdal/wiki/Release/2.3.0-News + Source code is now hosted on github + RFC 70: Guessing output format from output file name extension for utilities https://trac.osgeo.org/gdal/wiki/rfc70_output_format_guess + RFC 68: C++11 Compilation requirement https://trac.osgeo.org/gdal/wiki/rfc68_cplusplus11 - GDAL now requires a C++11 compatible compiler. External code - using GDAL C++ API will also need to enable at least C++11 + GDAL now requires a C++11 compatible compiler. External code + using GDAL C++ API will also need to enable at least C++11 compilation mode, if the compiler defaults to C++98/C++03. - + Stricter const-ness in OGRGeomFieldDefn, OGRFeatureDefn and + + Stricter const-ness in OGRGeomFieldDefn, OGRFeatureDefn and OGRFeature classes, impacting out-of-tree drivers that subclass them. - Packaging : redone patches against new version @@ -147,7 +160,7 @@ Mon May 7 12:40:25 UTC 2018 - guillaume.gardet@opensuse.org ------------------------------------------------------------------- Thu Apr 5 14:51:21 UTC 2018 - bruno@ioda-net.ch -- Fix boo#1088014 by adding missing LICENSE in lib and main package +- Fix boo#1088014 by adding missing LICENSE in lib and main package Remove misplaced LICENSE.txt in /usr/share/gdal ------------------------------------------------------------------- @@ -171,8 +184,8 @@ Fri Jan 12 10:24:13 UTC 2018 - dimstar@opensuse.org Thu Nov 23 20:34:20 UTC 2017 - bruno@ioda-net.ch - Update to new upstream bugfix release 2.2.3 - See details https://trac.osgeo.org/gdal/wiki/Release/2.2.3-News -- Packaging : + See details https://trac.osgeo.org/gdal/wiki/Release/2.2.3-News +- Packaging : + remove wrong /usr/bin/env python shebang + use /usr/bin/python3 for all /usr/bin/gdal*.py scripts - Remove gdal-2.2.2-mariadb_102_build_fix.patch merged upstream @@ -189,7 +202,7 @@ Wed Nov 8 13:02:10 UTC 2017 - kstreitova@suse.com Sat Sep 23 13:30:27 UTC 2017 - bruno@ioda-net.ch - New upstream bugfix release 2.2.2 - See details https://trac.osgeo.org/gdal/wiki/Release/2.2.2-News + See details https://trac.osgeo.org/gdal/wiki/Release/2.2.2-News ------------------------------------------------------------------- Tue Aug 1 11:37:54 UTC 2017 - tchvatal@suse.com @@ -207,17 +220,17 @@ Fri Jul 14 15:15:38 UTC 2017 - toddrme2178@gmail.com Wed Jul 12 10:22:32 UTC 2017 - bruno@ioda-net.ch - New upstream bugfix release 2.2.1 - See details https://trac.osgeo.org/gdal/wiki/Release/2.2.1-News + See details https://trac.osgeo.org/gdal/wiki/Release/2.2.1-News - Packaging + Remove gdal-upstream-issue#6898-changeset#38636.patch merged ------------------------------------------------------------------- Wed May 24 09:00:11 UTC 2017 - bruno@ioda-net.ch -- New upstream release 2.2.0 +- New upstream release 2.2.0 - https://trac.osgeo.org/gdal/wiki/Release/2.2.0-News -- Packaging - + add patch gdal-upstream-issue#6898-changeset#38636.patch +- Packaging + + add patch gdal-upstream-issue#6898-changeset#38636.patch fixing non void return garbage in swig/perl. + redone patches against 2.2.0 gdal-libproj.patch @@ -235,7 +248,7 @@ Sat Oct 29 20:31:47 UTC 2016 - bruno@ioda-net.ch - Due to build failure on non x86 arch, and advise from upstream comment out the usage of obsolete jasper. - We have openjpeg2 anyway. + We have openjpeg2 anyway. ------------------------------------------------------------------- Fri Oct 28 07:14:22 UTC 2016 - bruno@ioda-net.ch @@ -264,7 +277,7 @@ Sun Sep 25 13:20:22 UTC 2016 - bruno@ioda-net.ch - https://trac.osgeo.org/gdal/wiki/Release/2.1.1-News - Packaging changes - Remove ogr_wrap.patch included upstream - - Added support to liblzma + - Added support to liblzma ------------------------------------------------------------------- Tue May 10 03:11:00 UTC 2016 - Angelos Tzotsos @@ -283,7 +296,7 @@ Tue May 10 03:11:00 UTC 2016 - Angelos Tzotsos Tue Feb 23 14:42:10 UTC 2016 - bruno@ioda-net.ch - Upgrade to 2x series version : 2.0.2 bugfix release - - https://trac.osgeo.org/gdal/wiki/Release/2.0.2-News + - https://trac.osgeo.org/gdal/wiki/Release/2.0.2-News - https://trac.osgeo.org/gdal/wiki/Release/2.0.1-News - https://trac.osgeo.org/gdal/wiki/Release/2.0.0-News @@ -356,159 +369,159 @@ Sat May 2 18:47:37 UTC 2015 - ecsos@opensuse.org - Upgrade to version 1.11.2 * Build - - configure: fix detection of OCI by changing linking order + - configure: fix detection of OCI by changing linking order to please modern GCC (#5550) - - configure: fix test to accept MariaDB 10.X as valid MySQL + - configure: fix test to accept MariaDB 10.X as valid MySQL (#5722) - More compiler warnings addressed (#5414) - - Windows build of PDF: fix compilation issue with + - Windows build of PDF: fix compilation issue with Visual Studio 2012 (#5744) - Windows build: Add support for MrSID 9.1 SDK (#5814) - - Windows build: when building netCDF, HDF4, HDF5 as plugins, - call registration of 'sub-drivers' GMT, HDF4Image and - HDF5Image (#5802) + - Windows build: when building netCDF, HDF4, HDF5 as plugins, + call registration of 'sub-drivers' GMT, HDF4Image and + HDF5Image (#5802) * Port - CSV finder: Stop probing for csv/horiz_cs.csv. (#5698) - - /vsicurl/: avoid reading after end-of-file and fix failure + - /vsicurl/: avoid reading after end-of-file and fix failure when reading more than 16MB in a single time (#5786) - - CPLHexToBinary(): faster implementation (#5812) + - CPLHexToBinary(): faster implementation (#5812) * GDAL Core and algorithms - Make GetMaskBand?() work with GDT_UInt16 alpha bands (#5692) - Fix 32bit overflow in GDALRasterBand::IRasterIO() (#5713) - RPC transformer: take into account nodata in RPC DEM (#5680) - - RPC transformer: add RPC_DEM_MISSING_VALUE transformer option + - RPC transformer: add RPC_DEM_MISSING_VALUE transformer option to avoid failure when there's no DEM at the transformed point (#5730) - - Fix GDALSuggestedWarpOutput() wrong extent in some - circumstances (e.g. dataset of big dimension with world + - Fix GDALSuggestedWarpOutput() wrong extent in some + circumstances (e.g. dataset of big dimension with world coordinates) (#5693) - - Fix crash when calling GetTiledVirtualMem?() on non-Linux + - Fix crash when calling GetTiledVirtualMem?() on non-Linux platform (#5728) - - warp: fix integer overflow when reprojecting into an area - with (part of) bounds completely outside of the source + - warp: fix integer overflow when reprojecting into an area + with (part of) bounds completely outside of the source projection (#5789) - - OpenCL warper: fix OpenCL code compilation with NVIDIA OpenCL - (#5772) + - OpenCL warper: fix OpenCL code compilation with NVIDIA OpenCL + (#5772) * Utilities - - gdalwarp: initialize destination dataset to no_data value + - gdalwarp: initialize destination dataset to no_data value when automatically propagating source nodata (#5675) - - gdalwarp: only apply INIT_DEST when processing the first + - gdalwarp: only apply INIT_DEST when processing the first input dataset (#5387) - - gdaldem: avoid too large files to be produced when using - -co COMPRESS=xxxx -co TILED=YES (#5678) + - gdaldem: avoid too large files to be produced when using + -co COMPRESS=xxxx -co TILED=YES (#5678) * GDAL drivers - GRASS driver: - - fix compilation issues against GRASS 7 (#2953) + - fix compilation issues against GRASS 7 (#2953) - GIF driver: - fix crash on images without color table (#5792) - - validate the size of the graphic control extension block - (#5793) + - validate the size of the graphic control extension block + (#5793) - GTiff driver: - - Internal overviews: for near, average, gauss, and pixel - interleaving, make sure to use the same code path for + - Internal overviews: for near, average, gauss, and pixel + interleaving, make sure to use the same code path for compressed vs uncompressed overviews (#5701) - - allow lossless copying of CMYK JPEG into JPEG-in-TIFF + - allow lossless copying of CMYK JPEG into JPEG-in-TIFF (#5712) - when overriding metadata in update mode, make sure to clear it from PAM file (#5807) - - fix GTiffRasterBand::DirectIO() to work with TIFF files + - fix GTiffRasterBand::DirectIO() to work with TIFF files with multiple directories (overviews, masks) (#5831) - - Internal libtiff: partial (mostly security related fixes) - upgrade to 4.0.4beta (#5830) + - Internal libtiff: partial (mostly security related fixes) + upgrade to 4.0.4beta (#5830) - ISIS3 driver: - - fix to recognize IsisCube?.Mapping.LatitudeType? = - Planetocentric (#5717) + - fix to recognize IsisCube?.Mapping.LatitudeType? = + Planetocentric (#5717) - JP2OpenJPEG driver: - - add compatibility with OpenJPEG 2.1 (#5579) + - add compatibility with OpenJPEG 2.1 (#5579) - JPEG driver: - - Report non-fatal libjpeg errors as CE_Warning - (or CE_Failure if GDAL_ERROR_ON_LIBJPEG_WARNING = TRUE) - (#5667) + - Report non-fatal libjpeg errors as CE_Warning + (or CE_Failure if GDAL_ERROR_ON_LIBJPEG_WARNING = TRUE) + (#5667) - KMLSuperOverlay driver: - - remove useless and unreliable computations on floating - point numbers that caused issues (truncated raster) - on 32bit (#5683) + - remove useless and unreliable computations on floating + point numbers that caused issues (truncated raster) + on 32bit (#5683) - USGSDEM driver: - - take into account horizontal unit = ft in the UTM case - (#5819) + - take into account horizontal unit = ft in the UTM case + (#5819) - VRT driver: - - fix RasterIO() to be able to fill buffers larger than 2GB - (#5700, #5734) + - fix RasterIO() to be able to fill buffers larger than 2GB + (#5700, #5734) * OGR core - - ogr_core.h: only ignore -Wfloat-equal for IsInit?() and not + - ogr_core.h: only ignore -Wfloat-equal for IsInit?() and not for the rest of the file and files that inc it (#5299) - - OGR layer algebra: properly initialize field maps to avoid - Valgrind warnings in OGRLayer::Update() (#5778) + - OGR layer algebra: properly initialize field maps to avoid + Valgrind warnings in OGRLayer::Update() (#5778) * OGR drivers - CSV driver: - - fix segfault when reading allCountries.txt of geonames.org - (#5668) + - fix segfault when reading allCountries.txt of geonames.org + (#5668) - FileGDB: - - avoid emitting error when opening a FileGDB v9, so that - OpenFileGDB can be tried to open it, in the case FileGDB - is a plugin (#5674) + - avoid emitting error when opening a FileGDB v9, so that + OpenFileGDB can be tried to open it, in the case FileGDB + is a plugin (#5674) - GeoJSON driver: - - ESRIJson: parse correctly rings of esriGeometryPolygon - objects to build correct Polygon or MultiPolygon? (#5538) + - ESRIJson: parse correctly rings of esriGeometryPolygon + objects to build correct Polygon or MultiPolygon? (#5538) - GML driver: - - Fix incorrect geometry cast when reading GML topogeometries + - Fix incorrect geometry cast when reading GML topogeometries (#5715) - - Update GFS files for RUIAN (UVOH & OB) (#5770) + - Update GFS files for RUIAN (UVOH & OB) (#5770) - LIBKML driver: - when skipped, fix segfault on second OGRRegisterAll() call (#5775) - - do not delete the libkml singleton factory (linked to #5775) + - do not delete the libkml singleton factory (linked to #5775) - MapInfo? File driver: - Add GDA94 datum entries to the lookup table (#5671) - - fix segfault in CreateFeature?() if passing an invalid OGR - feature style string (#1209) + - fix segfault in CreateFeature?() if passing an invalid OGR + feature style string (#1209) - MSSQL driver: - - Fix recognizing image columns as geometry columns for the + - Fix recognizing image columns as geometry columns for the select layers. (#5498) - Fix issue when creating non-spatial table (#5696) - - Fix to read metadata if the tables are specified in the + - Fix to read metadata if the tables are specified in the connection string (#5796) - Fix invalid use of CSLAddString() in OGR MSSQL (#5810) - - Fix crash if the tablename is specified in the connection - string (#5826) + - Fix crash if the tablename is specified in the connection + string (#5826) - MySQL driver: - -don't be dependant on locale when building spatial filter - (#5720) + -don't be dependant on locale when building spatial filter + (#5720) - NAS driver: - - make chevrons configurable by NAS_INDICATOR (#5708) + - make chevrons configurable by NAS_INDICATOR (#5708) - OCI driver: - - Initialize member variable to avoid UpdateLayerExtents?() + - Initialize member variable to avoid UpdateLayerExtents?() to be called randomly on non spatial tables (#5376) - - fix FID (multi_load=off, OGRNullFID) - start with 1 - (not -1) (#5454) + - fix FID (multi_load=off, OGRNullFID) - start with 1 + (not -1) (#5454) - OpenFileGDB driver: - - fix ResetReading?() on SQL layer with ORDER BY on indexed + - fix ResetReading?() on SQL layer with ORDER BY on indexed column (#5669) - - add support for non spatial GDB v9 tables (#5673) + - add support for non spatial GDB v9 tables (#5673) - PG driver: - - fix GDAL 1.11.0 regression that prevented to retrieve more - than 500 features from a connection with tables= parameter - and on a SQL result layer (#5837) + - fix GDAL 1.11.0 regression that prevented to retrieve more + than 500 features from a connection with tables= parameter + and on a SQL result layer (#5837) - SQLite/Spatialite driver: - - remove 'T' suffix when formatting the content of a Date + - remove 'T' suffix when formatting the content of a Date field (#5672) - - fix segmentation fault when executing OGR2SQLITE_Register() + - fix segmentation fault when executing OGR2SQLITE_Register() when compiling against sqlite 3.8.7 (#5725) - - make GetFIDColumn() work when run as first method call - (#5781) + - make GetFIDColumn() work when run as first method call + (#5781) - VRT driver: - - do not propagate ignoring of x and y cols of a - PointFromColumns? to the source layer (#5777) + - do not propagate ignoring of x and y cols of a + PointFromColumns? to the source layer (#5777) - XLSX driver: - - fix column numbering when there are more than 26 columns - (#5774) + - fix column numbering when there are more than 26 columns + (#5774) * SWIG Language Bindings - Python bindings: - Fix hang of Python in case of repeated call to gdal/ogr. UseExceptions?() and CE_Warning emitted (#5704) - fix processing error of ogr_python.i with SWIG 3 (#5795) - - NUMPY driver: avoid returning CE_None in GetGeoTransform?() - when there's no geotransform set (#5801) + - NUMPY driver: avoid returning CE_None in GetGeoTransform?() + when there's no geotransform set (#5801) ------------------------------------------------------------------- Fri Mar 27 13:53:57 UTC 2015 - dimstar@opensuse.org @@ -529,7 +542,7 @@ Sun Mar 8 20:39:00 UTC 2015 - mpluskal@suse.com ------------------------------------------------------------------- Mon Feb 9 16:46:37 UTC 2015 - mpluskal@suse.com -- Add GDALmake.opt.in.patch to fix random failures of parallel +- Add GDALmake.opt.in.patch to fix random failures of parallel builds ------------------------------------------------------------------- @@ -539,15 +552,15 @@ Mon Feb 9 15:15:10 UTC 2015 - mpluskal@suse.com - 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 +- Use autoreconf when possible to avoid issues with improper cflags used and parallel builds. -- Rename package to match upstream name (gdal) - library is +- 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) +- Add optional support to ECW JPEG lib support (disabled by default) ------------------------------------------------------------------- Sat Oct 11 08:35:27 UTC 2014 - behrisch@users.sourceforge.net @@ -561,50 +574,50 @@ 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 + * 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 + * Fix wrong include order in ingr and nitf subdirs w.r.t internal libtiff (#5644) - * Add CPL_UNUSED for gcc >= 4 (#5414) + * Add CPL_UNUSED for gcc >= 4 (#5414) - Port - * CPLSpawn() on Windows: quote arguments with spaces + * CPLSpawn() on Windows: quote arguments with spaces in them (#5469) - * /vsigzip/: avoid infinite loop when reading broken + * /vsigzip/: avoid infinite loop when reading broken .gml.gz file (#5486) - * /vsizip/: fix bug that caused premature end of file condition + * /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, + * 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) + * 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 + * Fix segfault in GDALPamRasterBand::SerializeToXML() when saving an empty RAT (#5451) - * Windows plugin: complementary fix to #5211 to avoid error + * Windows plugin: complementary fix to #5211 to avoid error dialog box when there are dependency problems (#5525) - * RPC transformer with DEM: fix near interpolation + * RPC transformer with DEM: fix near interpolation (patch by liminlu0314, #5553) - * OpenCL warper: remove unused variable in bilinear resampling + * OpenCL warper: remove unused variable in bilinear resampling that can cause compilation error (#5518) - * GDALCreateTPSTransformer(): fix crash if the forward or backward + * 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) + * 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 + * 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) + * 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 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 @@ -612,21 +625,21 @@ Previous upgrades from version 1.11.0 * OpenFileGDB: read-only support (no external dependency) * SXF: read-only support * WALK : read-only support - * WAsP .map : read-write 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 - +- Upgrade to EPSG 8.2 database + ------------------------------------------------------------------- Thu Oct 3 17:24:58 UTC 2013 - Angelos Tzotsos 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) +- 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) @@ -635,7 +648,7 @@ Upgrade to version 1.10.1: ------------------------------------------------------------------- Mon Jun 3 17:14:40 UTC 2013 - dvaleev@suse.com -- install man to the %{_mandir} +- install man to the %{_mandir} ------------------------------------------------------------------- Sat May 25 19:39:26 UTC 2013 - behrisch@users.sourceforge.net @@ -719,7 +732,7 @@ Sun Oct 14 20:00:15 UTC 2012 - schwab@linux-m68k.org ------------------------------------------------------------------- Fri Oct 12 16:52:14 UTC 2012 - Angelos Tzotsos -- Update to new release 1.9.2: +- 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) @@ -729,7 +742,7 @@ Fri Oct 12 16:52:14 UTC 2012 - Angelos Tzotsos 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 @@ -754,7 +767,7 @@ Fri Sep 14 18:30:43 UTC 2012 - behrisch@users.sourceforge.net ------------------------------------------------------------------- Fri Jun 29 00:05:57 UTC 2012 - Angelos Tzotsos -- added new parameters to avoid issue: +- added new parameters to avoid issue: https://bugs.archlinux.org/task/30471 http://www.mail-archive.com/ubuntu@lists.osgeo.org/msg00330.html @@ -779,16 +792,16 @@ Thu May 31 11:37:12 CEST 2012 - kukuk@suse.de 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) + *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 +- gdal-sqlite.patch moved upstream http://trac.osgeo.org/gdal/ticket/4515 ------------------------------------------------------------------- Sat May 12 19:28:16 UTC 2012 - behrisch@users.sourceforge.net @@ -809,7 +822,7 @@ Wed Feb 15 07:48:41 UTC 2012 - dassau@gbd-consult.de ------------------------------------------------------------------- Tue Jan 10 08:22:22 UTC 2012 - dassau@gbd-consult.de -- Update to new release 1.9.0 +- 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, @@ -819,7 +832,7 @@ Tue Jan 10 08:22:22 UTC 2012 - dassau@gbd-consult.de * 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) + (supercedes testepsg) ------------------------------------------------------------------- Thu Jul 21 20:19:34 UTC 2011 - dassau@gbd-consult.de @@ -833,7 +846,7 @@ Wed Apr 27 10:59:34 UTC 2011 - dassau@gbd-consult.de ------------------------------------------------------------------- Sun Apr 24 12:59:34 UTC 2011 - toddrme2178@gmail.com - + - Switched to valid groups (fix for RPMLINT warning) ------------------------------------------------------------------- diff --git a/gdal.spec b/gdal.spec index cce11a7..ced29b8 100644 --- a/gdal.spec +++ b/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 diff --git a/pkg-config-libpq.patch b/pkg-config-libpq.patch new file mode 100644 index 0000000..df03800 --- /dev/null +++ b/pkg-config-libpq.patch @@ -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 ---------------------------------------------------------------------------