Date: Friday, October 6, 2017 @ 00:33:17 Author: foutrelis Revision: 261804
archrelease: copy trunk to community-staging-i686, community-staging-x86_64 Added: gdal/repos/community-staging-i686/ gdal/repos/community-staging-i686/PKGBUILD (from rev 261803, gdal/trunk/PKGBUILD) gdal/repos/community-staging-i686/gdal-2.2-poppler-0.58.patch (from rev 261803, gdal/trunk/gdal-2.2-poppler-0.58.patch) gdal/repos/community-staging-i686/gdal-perl-vendor.patch (from rev 261803, gdal/trunk/gdal-perl-vendor.patch) gdal/repos/community-staging-i686/gdal.changelog (from rev 261803, gdal/trunk/gdal.changelog) gdal/repos/community-staging-x86_64/ gdal/repos/community-staging-x86_64/PKGBUILD (from rev 261803, gdal/trunk/PKGBUILD) gdal/repos/community-staging-x86_64/gdal-2.2-poppler-0.58.patch (from rev 261803, gdal/trunk/gdal-2.2-poppler-0.58.patch) gdal/repos/community-staging-x86_64/gdal-perl-vendor.patch (from rev 261803, gdal/trunk/gdal-perl-vendor.patch) gdal/repos/community-staging-x86_64/gdal.changelog (from rev 261803, gdal/trunk/gdal.changelog) ------------------------------------------------------+ community-staging-i686/PKGBUILD | 86 ++ community-staging-i686/gdal-2.2-poppler-0.58.patch | 625 +++++++++++++++++ community-staging-i686/gdal-perl-vendor.patch | 28 community-staging-i686/gdal.changelog | 87 ++ community-staging-x86_64/PKGBUILD | 86 ++ community-staging-x86_64/gdal-2.2-poppler-0.58.patch | 625 +++++++++++++++++ community-staging-x86_64/gdal-perl-vendor.patch | 28 community-staging-x86_64/gdal.changelog | 87 ++ 8 files changed, 1652 insertions(+) Copied: gdal/repos/community-staging-i686/PKGBUILD (from rev 261803, gdal/trunk/PKGBUILD) =================================================================== --- community-staging-i686/PKGBUILD (rev 0) +++ community-staging-i686/PKGBUILD 2017-10-06 00:33:17 UTC (rev 261804) @@ -0,0 +1,86 @@ +# $Id$ +# Maintainer: Jaroslav Lichtblau <svetlemo...@archlinux.org> +# Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org +# Contributor: William Rea <sillywi...@gmail.com> + +pkgname=gdal +pkgver=2.2.1 +pkgrel=7 +pkgdesc="A translator library for raster geospatial data formats" +arch=('i686' 'x86_64') +url="http://www.gdal.org/" +license=('custom') +depends=('curl' 'geos' 'giflib' 'hdf5' 'libgeotiff' 'libjpeg-turbo' 'libpng' 'libspatialite' 'libtiff' 'netcdf' + 'openjpeg2' 'poppler' 'python2' 'python2-numpy' 'cfitsio' 'sqlite' 'libmariadbclient' 'postgresql-libs') +makedepends=('perl' 'swig' 'chrpath' 'doxygen') +optdepends=('postgresql: postgresql database support' + 'mariadb: mariadb database support' + 'perl: perl binding support') +options=('!emptydirs') +changelog=$pkgname.changelog +source=(http://download.osgeo.org/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.xz + gdal-perl-vendor.patch + gdal-2.2-poppler-0.58.patch) +sha256sums=('927098d54083ac919a497f787b835b099e9a194f2e5444dbff901f7426b86066' + '20989e5fa499206b42c92280ce084fdf7b2f661a4233fc349611cc57102fe114' + '17bbcfed72cdc346f1b5bb83247eb51e93ddcf0b00c8bf5e246338a2fb8a567d') + +prepare() { + cd "${srcdir}"/$pkgname-$pkgver + +# python2 fixes + sed -i 's_python python1.5_python2 python python1.5_' configure + for file in swig/python/{,osgeo/,samples/,scripts/}*.py; do + sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' $file + done + +# Fix mandir + sed -i "s|^mandir=.*|mandir='\${prefix}/share/man'|" configure + +# Fix Perl bindings installation path + patch -Np1 -i ../gdal-perl-vendor.patch + +# poppler 0.58.x API change +# https://trac.osgeo.org/gdal/changeset/40036 + patch -Np4 -i ../gdal-2.2-poppler-0.58.patch +} + +build() { + cd "${srcdir}"/$pkgname-$pkgver + export CFLAGS="$CFLAGS -fno-strict-aliasing" + +# bug #23654 + export LDFLAGS="$LDFLAGS -Wl,--as-needed" + + ./configure --prefix=/usr --with-netcdf --with-libtiff --with-sqlite3 --with-geotiff \ + --with-mysql --with-python --with-curl --with-hdf5 --with-perl --with-geos \ + --with-png --with-poppler --with-spatialite --with-openjpeg + +# workaround for bug #13646 + sed -i 's/PY_HAVE_SETUPTOOLS=1/PY_HAVE_SETUPTOOLS=/g' ./GDALmake.opt + sed -i 's/EXE_DEP_LIBS/KILL_EXE_DEP_LIBS/' apps/GNUmakefile + + make + make man +} + +package () { + cd "${srcdir}"/$pkgname-$pkgver + + make DESTDIR="${pkgdir}" install + make DESTDIR="${pkgdir}" install-man + +# install license + install -Dm644 LICENSE.TXT "${pkgdir}"/usr/share/licenses/$pkgname/LICENSE + +#FS15477 clean up junks - still present in 2.2.1 + rm -f "${pkgdir}"/usr/share/man/man1/_build_gdal_src_gdal-${pkgver}_apps_.1 + +# Remove RPATH + eval local $(perl -V:vendorarch) + chrpath --delete "${pkgdir}"${vendorarch}/auto/Geo/OSR/OSR.so + chrpath --delete "${pkgdir}"${vendorarch}/auto/Geo/OGR/OGR.so + chrpath --delete "${pkgdir}"${vendorarch}/auto/Geo/GDAL/GDAL.so + chrpath --delete "${pkgdir}"${vendorarch}/auto/Geo/GDAL/Const/Const.so + chrpath --delete "${pkgdir}"${vendorarch}/auto/Geo/GNM/GNM.so +} Copied: gdal/repos/community-staging-i686/gdal-2.2-poppler-0.58.patch (from rev 261803, gdal/trunk/gdal-2.2-poppler-0.58.patch) =================================================================== --- community-staging-i686/gdal-2.2-poppler-0.58.patch (rev 0) +++ community-staging-i686/gdal-2.2-poppler-0.58.patch 2017-10-06 00:33:17 UTC (rev 261804) @@ -0,0 +1,625 @@ +Index: /branches/2.2/gdal/GDALmake.opt.in +=================================================================== +--- /branches/2.2/gdal/GDALmake.opt.in (revision 40035) ++++ /branches/2.2/gdal/GDALmake.opt.in (revision 40036) +@@ -473,4 +473,5 @@ + 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_INC = @POPPLER_INC@ + POPPLER_PLUGIN_LIB = @POPPLER_PLUGIN_LIB@ +Index: /branches/2.2/gdal/configure +=================================================================== +--- /branches/2.2/gdal/configure (revision 40035) ++++ /branches/2.2/gdal/configure (revision 40036) +@@ -663,4 +663,5 @@ + POPPLER_PLUGIN_LIB + POPPLER_INC ++POPPLER_0_58_OR_LATER + POPPLER_0_23_OR_LATER + POPPLER_0_20_OR_LATER +@@ -32272,4 +32273,6 @@ + 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 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for poppler" >&5 +@@ -32312,15 +32315,19 @@ + POPPLER_PLUGIN_LIB="${TEST_POPPLER_LIB}" + +- # 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; } ++ CHECK_OTHER_POPPLER_VERSION=yes ++ ++ # 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 '#define private public' > testpoppler.cpp +- echo '#include <poppler/Object.h>' >> testpoppler.cpp +- echo '#include <poppler/Catalog.h>' >> testpoppler.cpp +- echo 'int main(int argc, char** argv) { return &(((Catalog*)0x8000)->optContent) == 0; }' >> testpoppler.cpp ++ 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } +@@ -32330,48 +32337,73 @@ + 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 <poppler/Object.h>' > testpoppler.cpp +- echo '#include <poppler/Stream.h>' >> 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} 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; } +- +- # 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; } ++ 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 '#include <poppler/Error.h>' > testpoppler.cpp +- echo 'int main(int argc, char** argv) { setErrorCallback(0,0); return 0; }' >> testpoppler.cpp ++ echo '#define private public' > testpoppler.cpp ++ echo '#include <poppler/Object.h>' >> testpoppler.cpp ++ echo '#include <poppler/Catalog.h>' >> testpoppler.cpp ++ echo 'int main(int argc, char** argv) { return &(((Catalog*)0x8000)->optContent) == 0; }' >> testpoppler.cpp + if test -z "`${CXX} testpoppler.cpp -c ${POPPLER_INC} 2>&1`" ; then +- POPPLER_0_20_OR_LATER=yes ++ POPPLER_HAS_OPTCONTENT=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&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; } ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ 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 <poppler/Object.h>' > testpoppler.cpp ++ echo '#include <poppler/Stream.h>' >> 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} 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; } ++ ++ # 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 <poppler/Object.h>' > testpoppler.cpp +- echo '#include <poppler/Stream.h>' >> 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 ++ echo '#include <poppler/Error.h>' > testpoppler.cpp ++ echo 'int main(int argc, char** argv) { setErrorCallback(0,0); return 0; }' >> testpoppler.cpp + if test -z "`${CXX} testpoppler.cpp -c ${POPPLER_INC} 2>&1`" ; then +- POPPLER_0_23_OR_LATER=yes ++ POPPLER_0_20_OR_LATER=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&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 <poppler/Object.h>' > testpoppler.cpp ++ echo '#include <poppler/Stream.h>' >> 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} 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 ++ + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +@@ -32383,8 +32415,4 @@ + $as_echo "no" >&6; } + fi +- +- else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } + fi + else +@@ -32408,4 +32436,6 @@ + + POPPLER_0_23_OR_LATER=$POPPLER_0_23_OR_LATER ++ ++POPPLER_0_58_OR_LATER=$POPPLER_0_58_OR_LATER + + POPPLER_INC=$POPPLER_INC +Index: /branches/2.2/gdal/configure.ac +=================================================================== +--- /branches/2.2/gdal/configure.ac (revision 40035) ++++ /branches/2.2/gdal/configure.ac (revision 40036) +@@ -4284,4 +4284,6 @@ + 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 + + AC_MSG_CHECKING([for poppler]) +@@ -4322,14 +4324,18 @@ + POPPLER_PLUGIN_LIB="${TEST_POPPLER_LIB}" + +- # And now try another dirty thing, but this one is +- # optional. +- AC_MSG_CHECKING([if Catalog::optContent exists]) ++ 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 '#define private public' > testpoppler.cpp +- echo '#include <poppler/Object.h>' >> testpoppler.cpp +- echo '#include <poppler/Catalog.h>' >> testpoppler.cpp +- echo 'int main(int argc, char** argv) { return &(((Catalog*)0x8000)->optContent) == 0; }' >> testpoppler.cpp ++ 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 +@@ -4337,42 +4343,63 @@ + 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 <poppler/Object.h>' > testpoppler.cpp +- echo '#include <poppler/Stream.h>' >> 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} 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]) ++ 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 '#include <poppler/Error.h>' > testpoppler.cpp +- echo 'int main(int argc, char** argv) { setErrorCallback(0,0); return 0; }' >> testpoppler.cpp ++ echo '#define private public' > testpoppler.cpp ++ echo '#include <poppler/Object.h>' >> testpoppler.cpp ++ echo '#include <poppler/Catalog.h>' >> testpoppler.cpp ++ echo 'int main(int argc, char** argv) { return &(((Catalog*)0x8000)->optContent) == 0; }' >> testpoppler.cpp + if test -z "`${CXX} testpoppler.cpp -c ${POPPLER_INC} 2>&1`" ; then +- POPPLER_0_20_OR_LATER=yes ++ POPPLER_HAS_OPTCONTENT=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]) ++ 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 <poppler/Object.h>' > testpoppler.cpp ++ echo '#include <poppler/Stream.h>' >> 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} 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 <poppler/Object.h>' > testpoppler.cpp +- echo '#include <poppler/Stream.h>' >> 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 ++ echo '#include <poppler/Error.h>' > testpoppler.cpp ++ echo 'int main(int argc, char** argv) { setErrorCallback(0,0); return 0; }' >> testpoppler.cpp + if test -z "`${CXX} testpoppler.cpp -c ${POPPLER_INC} 2>&1`" ; then +- POPPLER_0_23_OR_LATER=yes ++ 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 <poppler/Object.h>' > testpoppler.cpp ++ echo '#include <poppler/Stream.h>' >> 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} 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]) +@@ -4382,7 +4409,4 @@ + AC_MSG_RESULT([no]) + fi +- +- else +- AC_MSG_RESULT([no]) + fi + else +@@ -4400,4 +4424,5 @@ + 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_INC, $POPPLER_INC) + AC_SUBST(POPPLER_PLUGIN_LIB, $POPPLER_PLUGIN_LIB) +Index: /branches/2.2/gdal/frmts/pdf/GNUmakefile +=================================================================== +--- /branches/2.2/gdal/frmts/pdf/GNUmakefile (revision 40035) ++++ /branches/2.2/gdal/frmts/pdf/GNUmakefile (revision 40036) +@@ -32,4 +32,8 @@ + endif + ++ifeq ($(POPPLER_0_58_OR_LATER),yes) ++CPPFLAGS += -DPOPPLER_0_58_OR_LATER ++endif ++ + ifeq ($(HAVE_PODOFO),yes) + CPPFLAGS += -DHAVE_PODOFO +Index: /branches/2.2/gdal/frmts/pdf/makefile.vc +=================================================================== +--- /branches/2.2/gdal/frmts/pdf/makefile.vc (revision 40035) ++++ /branches/2.2/gdal/frmts/pdf/makefile.vc (revision 40036) +@@ -15,5 +15,5 @@ + + !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) -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) -DHAVE_POPPLER + + !IFDEF POPPLER_HAS_OPTCONTENT +@@ -31,4 +31,8 @@ + !IFDEF POPPLER_0_23_OR_LATER + POPPLER_0_23_OR_LATER_FLAGS = -DPOPPLER_0_23_OR_LATER ++!ENDIF ++ ++!IFDEF POPPLER_0_58_OR_LATER ++POPPLER_0_58_OR_LATER_FLAGS = -DPOPPLER_0_58_OR_LATER + !ENDIF + +Index: /branches/2.2/gdal/frmts/pdf/pdfdataset.cpp +=================================================================== +--- /branches/2.2/gdal/frmts/pdf/pdfdataset.cpp (revision 40035) ++++ /branches/2.2/gdal/frmts/pdf/pdfdataset.cpp (revision 40036) +@@ -130,5 +130,9 @@ + public: + ObjectAutoFree() {} +- ~ObjectAutoFree() { obj.free(); } ++ ~ObjectAutoFree() { ++#ifndef POPPLER_0_58_OR_LATER ++ obj.free(); ++#endif ++ } + + Object* getObj() { return &obj; } +@@ -2286,5 +2290,9 @@ + { + poCatalogObjectPoppler = new ObjectAutoFree; ++#ifdef POPPLER_0_58_OR_LATER ++ *poCatalogObjectPoppler->getObj() = poDocPoppler->getXRef()->getCatalog(); ++#else + poDocPoppler->getXRef()->getCatalog(poCatalogObjectPoppler->getObj()); ++#endif + if (!poCatalogObjectPoppler->getObj()->isNull()) + poCatalogObject = new GDALPDFObjectPoppler(poCatalogObjectPoppler->getObj(), FALSE); +@@ -4027,5 +4035,9 @@ + #ifdef HAVE_POPPLER + PDFDoc* poDocPoppler = NULL; ++#ifdef POPPLER_0_58_OR_LATER ++ Object oObj; ++#else + ObjectAutoFree oObj; ++#endif + Page* poPagePoppler = NULL; + Catalog* poCatalogPoppler = NULL; +@@ -4074,6 +4086,10 @@ + poUserPwd = new GooString(pszUserPwd); + ++#ifdef POPPLER_0_58_OR_LATER ++ poDocPoppler = new PDFDoc(new VSIPDFFileStream(fp, pszFilename, std::move(oObj)), NULL, poUserPwd); ++#else + oObj.getObj()->initNull(); + poDocPoppler = new PDFDoc(new VSIPDFFileStream(fp, pszFilename, oObj.getObj()), NULL, poUserPwd); ++#endif + delete poUserPwd; + +@@ -4766,8 +4782,14 @@ + { + Object oInfo; ++#ifdef POPPLER_0_58_OR_LATER ++ oInfo = poDocPoppler->getDocInfo(); ++#else + poDocPoppler->getDocInfo(&oInfo); ++#endif + GDALPDFObjectPoppler oInfoObjPoppler(&oInfo, FALSE); + poDS->ParseInfo(&oInfoObjPoppler); ++#ifndef POPPLER_0_58_OR_LATER + oInfo.free(); ++#endif + } + +Index: /branches/2.2/gdal/frmts/pdf/pdfio.cpp +=================================================================== +--- /branches/2.2/gdal/frmts/pdf/pdfio.cpp (revision 40035) ++++ /branches/2.2/gdal/frmts/pdf/pdfio.cpp (revision 40036) +@@ -53,6 +53,10 @@ + + VSIPDFFileStream::VSIPDFFileStream( +- VSILFILE* fIn, const char* pszFilename, Object *dictA) : +-#ifdef POPPLER_BASE_STREAM_HAS_TWO_ARGS ++ VSILFILE* fIn, const char* pszFilename, ++ makeSubStream_object_type dictA ++) : ++#ifdef POPPLER_0_58_OR_LATER ++ BaseStream(std::move(dictA), (Goffset)VSIPDFFileStreamGetSize(fIn)), ++#elif defined(POPPLER_BASE_STREAM_HAS_TWO_ARGS) + BaseStream(dictA, (setPos_offset_type)VSIPDFFileStreamGetSize(fIn)), + #else +@@ -78,6 +82,9 @@ + VSIPDFFileStream::VSIPDFFileStream( VSIPDFFileStream* poParentIn, + vsi_l_offset startA, GBool limitedA, +- vsi_l_offset lengthA, Object *dictA ) : +-#ifdef POPPLER_BASE_STREAM_HAS_TWO_ARGS ++ vsi_l_offset lengthA, ++ makeSubStream_object_type dictA) : ++#ifdef POPPLER_0_58_OR_LATER ++ BaseStream(std::move(dictA), (Goffset)lengthA), ++#elif defined(POPPLER_BASE_STREAM_HAS_TWO_ARGS) + BaseStream(dictA, (makeSubStream_offset_type)lengthA), + #else +@@ -116,5 +123,11 @@ + /************************************************************************/ + +-#ifdef POPPLER_0_23_OR_LATER ++#ifdef POPPLER_0_58_OR_LATER ++BaseStream* VSIPDFFileStream::copy() ++{ ++ return new VSIPDFFileStream(poParent, nStart, bLimited, ++ nLength, dict.copy()); ++} ++#elif defined(POPPLER_0_23_OR_LATER) + BaseStream* VSIPDFFileStream::copy() + { +@@ -127,11 +140,16 @@ + /* makeSubStream() */ + /************************************************************************/ +- + Stream *VSIPDFFileStream::makeSubStream(makeSubStream_offset_type startA, GBool limitedA, +- makeSubStream_offset_type lengthA, Object *dictA) +-{ ++ makeSubStream_offset_type lengthA, makeSubStream_object_type dictA) ++{ ++#ifdef POPPLER_0_58_OR_LATER ++ return new VSIPDFFileStream(this, ++ startA, limitedA, ++ lengthA, std::move(dictA)); ++#else + return new VSIPDFFileStream(this, + startA, limitedA, + lengthA, dictA); ++#endif + } + +Index: /branches/2.2/gdal/frmts/pdf/pdfio.h +=================================================================== +--- /branches/2.2/gdal/frmts/pdf/pdfio.h (revision 40035) ++++ /branches/2.2/gdal/frmts/pdf/pdfio.h (revision 40036) +@@ -53,11 +53,19 @@ + #endif + ++#ifdef POPPLER_0_58_OR_LATER ++#define makeSubStream_object_type Object&& ++#else ++#define makeSubStream_object_type Object* ++#endif ++ + class VSIPDFFileStream: public BaseStream + { + public: +- VSIPDFFileStream(VSILFILE* f, const char* pszFilename, Object *dictA); ++ VSIPDFFileStream(VSILFILE* f, const char* pszFilename, ++ makeSubStream_object_type dictA); + VSIPDFFileStream(VSIPDFFileStream* poParent, + vsi_l_offset startA, GBool limitedA, +- vsi_l_offset lengthA, Object *dictA); ++ vsi_l_offset lengthA, ++ makeSubStream_object_type dictA); + virtual ~VSIPDFFileStream(); + +@@ -67,5 +75,5 @@ + + virtual Stream * makeSubStream(makeSubStream_offset_type startA, GBool limitedA, +- makeSubStream_offset_type lengthA, Object *dictA) override; ++ makeSubStream_offset_type lengthA, makeSubStream_object_type dictA) override; + virtual getPos_ret_type getPos() override; + virtual getStart_ret_type getStart() override; +Index: /branches/2.2/gdal/frmts/pdf/pdfobject.cpp +=================================================================== +--- /branches/2.2/gdal/frmts/pdf/pdfobject.cpp (revision 40035) ++++ /branches/2.2/gdal/frmts/pdf/pdfobject.cpp (revision 40036) +@@ -972,5 +972,7 @@ + GDALPDFObjectPoppler::~GDALPDFObjectPoppler() + { ++#ifndef POPPLER_0_58_OR_LATER + m_po->free(); ++#endif + if (m_bDestroy) + delete m_po; +@@ -1183,4 +1185,33 @@ + return oIter->second; + ++#ifdef POPPLER_0_58_OR_LATER ++ Object o = m_poDict->lookupNF(((char*)pszKey)); ++ if (!o.isNull()) ++ { ++ int nRefNum = 0; ++ int nRefGen = 0; ++ if( o.isRef()) ++ { ++ nRefNum = o.getRefNum(); ++ nRefGen = o.getRefGen(); ++ Object o2 = m_poDict->lookup((char*)pszKey); ++ if( !o2.isNull() ) ++ { ++ GDALPDFObjectPoppler* poObj = new GDALPDFObjectPoppler(new Object(std::move(o2)), TRUE); ++ poObj->SetRefNumAndGen(nRefNum, nRefGen); ++ m_map[pszKey] = poObj; ++ return poObj; ++ } ++ } ++ else ++ { ++ GDALPDFObjectPoppler* poObj = new GDALPDFObjectPoppler(new Object(std::move(o)), TRUE); ++ poObj->SetRefNumAndGen(nRefNum, nRefGen); ++ m_map[pszKey] = poObj; ++ return poObj; ++ } ++ } ++ return NULL; ++#else + Object* po = new Object; + if (m_poDict->lookupNF((char*)pszKey, po) && !po->isNull()) +@@ -1211,4 +1242,5 @@ + return NULL; + } ++#endif + } + +@@ -1287,4 +1319,33 @@ + return m_v[nIndex]; + ++#ifdef POPPLER_0_58_OR_LATER ++ Object o = m_poArray->getNF(nIndex); ++ if( !o.isNull() ) ++ { ++ int nRefNum = 0; ++ int nRefGen = 0; ++ if( o.isRef()) ++ { ++ nRefNum = o.getRefNum(); ++ nRefGen = o.getRefGen(); ++ Object o2 = m_poArray->get(nIndex); ++ if( !o2.isNull() ) ++ { ++ GDALPDFObjectPoppler* poObj = new GDALPDFObjectPoppler(new Object(std::move(o2)), TRUE); ++ poObj->SetRefNumAndGen(nRefNum, nRefGen); ++ m_v[nIndex] = poObj; ++ return poObj; ++ } ++ } ++ else ++ { ++ GDALPDFObjectPoppler* poObj = new GDALPDFObjectPoppler(new Object(std::move(o)), TRUE); ++ poObj->SetRefNumAndGen(nRefNum, nRefGen); ++ m_v[nIndex] = poObj; ++ return poObj; ++ } ++ } ++ return NULL; ++#else + Object* po = new Object; + if (m_poArray->getNF(nIndex, po)) +@@ -1315,4 +1376,5 @@ + return NULL; + } ++#endif + } + +Index: /branches/2.2/gdal/nmake.opt +=================================================================== +--- /branches/2.2/gdal/nmake.opt (revision 40035) ++++ /branches/2.2/gdal/nmake.opt (revision 40036) +@@ -622,4 +622,5 @@ + # 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 + #POPPLER_ENABLED = YES + #POPPLER_CFLAGS = -Ie:/kde/include -Ie:/kde/include/poppler +@@ -628,4 +629,5 @@ + #POPPLER_0_20_OR_LATER = YES + #POPPLER_0_23_OR_LATER = YES ++#POPPLER_0_58_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 + Copied: gdal/repos/community-staging-i686/gdal-perl-vendor.patch (from rev 261803, gdal/trunk/gdal-perl-vendor.patch) =================================================================== --- community-staging-i686/gdal-perl-vendor.patch (rev 0) +++ community-staging-i686/gdal-perl-vendor.patch 2017-10-06 00:33:17 UTC (rev 261804) @@ -0,0 +1,28 @@ +Description: pass INSTALLDIRS=vendor to Makefile.PL to get stuff into the right place +Origin: vendor +Forwarded: not-needed +Author: gregor herrmann <gre...@debian.org> +Last-Update: 2014-07-08 + +--- a/swig/perl/Makefile ++++ b/swig/perl/Makefile +@@ -7,7 +7,7 @@ build: Makefile_Geo__GDAL + $(MAKE) -f Makefile_Geo__OSR + + Makefile_Geo__GDAL: +- perl Makefile.PL INSTALL_BASE=$(INST_PREFIX) ++ perl Makefile.PL INSTALLDIRS=vendor + + test: build + $(MAKE) -f Makefile_Geo__GDAL test +--- a/swig/perl/GNUmakefile ++++ b/swig/perl/GNUmakefile +@@ -30,7 +30,7 @@ build: gdal_wrap.cc Makefile_Geo__GDAL + gdal_wrap.cc: generate + + Makefile_Geo__GDAL: +- perl Makefile.PL INSTALL_BASE=$(INST_PREFIX) ++ perl Makefile.PL INSTALLDIRS=vendor + + test: build + $(MAKE) -f Makefile_Geo__GDAL test Copied: gdal/repos/community-staging-i686/gdal.changelog (from rev 261803, gdal/trunk/gdal.changelog) =================================================================== --- community-staging-i686/gdal.changelog (rev 0) +++ community-staging-i686/gdal.changelog 2017-10-06 00:33:17 UTC (rev 261804) @@ -0,0 +1,87 @@ +2017-08-06 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 2.2.1-1 + +2017-07-10 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 2.2.0-1 + * hdf5 1.10.1 rebuild + +2017-01-22 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 2.1.2-1 + +2016-08-02 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 2.1.1-1 glew 2.0.0 / poppler 0.46.0 rebuilds rebuild + +2016-06-05 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 2.1.0-2 cfitsio 3.390 rebuild + +2016-05-22 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 2.1.0-1 + +2016-04-12 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 2.0.2-5 + * hdf5 1.10.0 rebuild + +2016-02-08 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 2.0.2-1 + +2016-01-23 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 2.0.0-7 + * postgresql-libs 9.5 rebuild + * openjpeg2 added as dependency + +2015-10-06 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 2.0.1-2 FS#46581 fix + +2015-06-27 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 2.0.0-1 + +2015-03-01 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 1.11.2-2 poppler 0.31.0 rebuild + +2015-02-23 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 1.11.2-1 + +2015-01-29 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 1.11.1-6 poppler 0.30.0 rebuild + +2014-12-22 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 1.11.1-5 FS#43193 fix + +2014-12-20 Evangelos Foutras <evange...@foutrelis.com> + * gdal 1.11.1-4 poppler 0.29.0 rebuild + +2014-11-25 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 1.11.1-3 hdf5 1.8.14 rebuild + +2014-10-03 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 1.11.1-1 + +2014-07-28 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 1.11.0-4 libspatialite soname rebuild + +2014-05-27 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 1.11.0-2 giflib soname rebuild + +2014-04-27 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 1.11.0-1 + +2013-11-11 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 1.10.1-1 + +2013-09-29 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 1.10.0-4 FS#36328 fix + +2013-05-18 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 1.10.0-1 + +2011-02-19 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 1.8.0-1 + +2010-11-20 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * Update to major release 1.7.3 + +2010-06-26 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * FS#19946 fixed in 1.7.2-2 + +2010-05-05 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * Update to major release 1.7.2 Copied: gdal/repos/community-staging-x86_64/PKGBUILD (from rev 261803, gdal/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2017-10-06 00:33:17 UTC (rev 261804) @@ -0,0 +1,86 @@ +# $Id$ +# Maintainer: Jaroslav Lichtblau <svetlemo...@archlinux.org> +# Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org +# Contributor: William Rea <sillywi...@gmail.com> + +pkgname=gdal +pkgver=2.2.1 +pkgrel=7 +pkgdesc="A translator library for raster geospatial data formats" +arch=('i686' 'x86_64') +url="http://www.gdal.org/" +license=('custom') +depends=('curl' 'geos' 'giflib' 'hdf5' 'libgeotiff' 'libjpeg-turbo' 'libpng' 'libspatialite' 'libtiff' 'netcdf' + 'openjpeg2' 'poppler' 'python2' 'python2-numpy' 'cfitsio' 'sqlite' 'libmariadbclient' 'postgresql-libs') +makedepends=('perl' 'swig' 'chrpath' 'doxygen') +optdepends=('postgresql: postgresql database support' + 'mariadb: mariadb database support' + 'perl: perl binding support') +options=('!emptydirs') +changelog=$pkgname.changelog +source=(http://download.osgeo.org/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.xz + gdal-perl-vendor.patch + gdal-2.2-poppler-0.58.patch) +sha256sums=('927098d54083ac919a497f787b835b099e9a194f2e5444dbff901f7426b86066' + '20989e5fa499206b42c92280ce084fdf7b2f661a4233fc349611cc57102fe114' + '17bbcfed72cdc346f1b5bb83247eb51e93ddcf0b00c8bf5e246338a2fb8a567d') + +prepare() { + cd "${srcdir}"/$pkgname-$pkgver + +# python2 fixes + sed -i 's_python python1.5_python2 python python1.5_' configure + for file in swig/python/{,osgeo/,samples/,scripts/}*.py; do + sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' $file + done + +# Fix mandir + sed -i "s|^mandir=.*|mandir='\${prefix}/share/man'|" configure + +# Fix Perl bindings installation path + patch -Np1 -i ../gdal-perl-vendor.patch + +# poppler 0.58.x API change +# https://trac.osgeo.org/gdal/changeset/40036 + patch -Np4 -i ../gdal-2.2-poppler-0.58.patch +} + +build() { + cd "${srcdir}"/$pkgname-$pkgver + export CFLAGS="$CFLAGS -fno-strict-aliasing" + +# bug #23654 + export LDFLAGS="$LDFLAGS -Wl,--as-needed" + + ./configure --prefix=/usr --with-netcdf --with-libtiff --with-sqlite3 --with-geotiff \ + --with-mysql --with-python --with-curl --with-hdf5 --with-perl --with-geos \ + --with-png --with-poppler --with-spatialite --with-openjpeg + +# workaround for bug #13646 + sed -i 's/PY_HAVE_SETUPTOOLS=1/PY_HAVE_SETUPTOOLS=/g' ./GDALmake.opt + sed -i 's/EXE_DEP_LIBS/KILL_EXE_DEP_LIBS/' apps/GNUmakefile + + make + make man +} + +package () { + cd "${srcdir}"/$pkgname-$pkgver + + make DESTDIR="${pkgdir}" install + make DESTDIR="${pkgdir}" install-man + +# install license + install -Dm644 LICENSE.TXT "${pkgdir}"/usr/share/licenses/$pkgname/LICENSE + +#FS15477 clean up junks - still present in 2.2.1 + rm -f "${pkgdir}"/usr/share/man/man1/_build_gdal_src_gdal-${pkgver}_apps_.1 + +# Remove RPATH + eval local $(perl -V:vendorarch) + chrpath --delete "${pkgdir}"${vendorarch}/auto/Geo/OSR/OSR.so + chrpath --delete "${pkgdir}"${vendorarch}/auto/Geo/OGR/OGR.so + chrpath --delete "${pkgdir}"${vendorarch}/auto/Geo/GDAL/GDAL.so + chrpath --delete "${pkgdir}"${vendorarch}/auto/Geo/GDAL/Const/Const.so + chrpath --delete "${pkgdir}"${vendorarch}/auto/Geo/GNM/GNM.so +} Copied: gdal/repos/community-staging-x86_64/gdal-2.2-poppler-0.58.patch (from rev 261803, gdal/trunk/gdal-2.2-poppler-0.58.patch) =================================================================== --- community-staging-x86_64/gdal-2.2-poppler-0.58.patch (rev 0) +++ community-staging-x86_64/gdal-2.2-poppler-0.58.patch 2017-10-06 00:33:17 UTC (rev 261804) @@ -0,0 +1,625 @@ +Index: /branches/2.2/gdal/GDALmake.opt.in +=================================================================== +--- /branches/2.2/gdal/GDALmake.opt.in (revision 40035) ++++ /branches/2.2/gdal/GDALmake.opt.in (revision 40036) +@@ -473,4 +473,5 @@ + 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_INC = @POPPLER_INC@ + POPPLER_PLUGIN_LIB = @POPPLER_PLUGIN_LIB@ +Index: /branches/2.2/gdal/configure +=================================================================== +--- /branches/2.2/gdal/configure (revision 40035) ++++ /branches/2.2/gdal/configure (revision 40036) +@@ -663,4 +663,5 @@ + POPPLER_PLUGIN_LIB + POPPLER_INC ++POPPLER_0_58_OR_LATER + POPPLER_0_23_OR_LATER + POPPLER_0_20_OR_LATER +@@ -32272,4 +32273,6 @@ + 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 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for poppler" >&5 +@@ -32312,15 +32315,19 @@ + POPPLER_PLUGIN_LIB="${TEST_POPPLER_LIB}" + +- # 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; } ++ CHECK_OTHER_POPPLER_VERSION=yes ++ ++ # 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 '#define private public' > testpoppler.cpp +- echo '#include <poppler/Object.h>' >> testpoppler.cpp +- echo '#include <poppler/Catalog.h>' >> testpoppler.cpp +- echo 'int main(int argc, char** argv) { return &(((Catalog*)0x8000)->optContent) == 0; }' >> testpoppler.cpp ++ 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } +@@ -32330,48 +32337,73 @@ + 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 <poppler/Object.h>' > testpoppler.cpp +- echo '#include <poppler/Stream.h>' >> 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} 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; } +- +- # 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; } ++ 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 '#include <poppler/Error.h>' > testpoppler.cpp +- echo 'int main(int argc, char** argv) { setErrorCallback(0,0); return 0; }' >> testpoppler.cpp ++ echo '#define private public' > testpoppler.cpp ++ echo '#include <poppler/Object.h>' >> testpoppler.cpp ++ echo '#include <poppler/Catalog.h>' >> testpoppler.cpp ++ echo 'int main(int argc, char** argv) { return &(((Catalog*)0x8000)->optContent) == 0; }' >> testpoppler.cpp + if test -z "`${CXX} testpoppler.cpp -c ${POPPLER_INC} 2>&1`" ; then +- POPPLER_0_20_OR_LATER=yes ++ POPPLER_HAS_OPTCONTENT=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&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; } ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ 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 <poppler/Object.h>' > testpoppler.cpp ++ echo '#include <poppler/Stream.h>' >> 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} 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; } ++ ++ # 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 <poppler/Object.h>' > testpoppler.cpp +- echo '#include <poppler/Stream.h>' >> 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 ++ echo '#include <poppler/Error.h>' > testpoppler.cpp ++ echo 'int main(int argc, char** argv) { setErrorCallback(0,0); return 0; }' >> testpoppler.cpp + if test -z "`${CXX} testpoppler.cpp -c ${POPPLER_INC} 2>&1`" ; then +- POPPLER_0_23_OR_LATER=yes ++ POPPLER_0_20_OR_LATER=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&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 <poppler/Object.h>' > testpoppler.cpp ++ echo '#include <poppler/Stream.h>' >> 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} 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 ++ + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +@@ -32383,8 +32415,4 @@ + $as_echo "no" >&6; } + fi +- +- else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } + fi + else +@@ -32408,4 +32436,6 @@ + + POPPLER_0_23_OR_LATER=$POPPLER_0_23_OR_LATER ++ ++POPPLER_0_58_OR_LATER=$POPPLER_0_58_OR_LATER + + POPPLER_INC=$POPPLER_INC +Index: /branches/2.2/gdal/configure.ac +=================================================================== +--- /branches/2.2/gdal/configure.ac (revision 40035) ++++ /branches/2.2/gdal/configure.ac (revision 40036) +@@ -4284,4 +4284,6 @@ + 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 + + AC_MSG_CHECKING([for poppler]) +@@ -4322,14 +4324,18 @@ + POPPLER_PLUGIN_LIB="${TEST_POPPLER_LIB}" + +- # And now try another dirty thing, but this one is +- # optional. +- AC_MSG_CHECKING([if Catalog::optContent exists]) ++ 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 '#define private public' > testpoppler.cpp +- echo '#include <poppler/Object.h>' >> testpoppler.cpp +- echo '#include <poppler/Catalog.h>' >> testpoppler.cpp +- echo 'int main(int argc, char** argv) { return &(((Catalog*)0x8000)->optContent) == 0; }' >> testpoppler.cpp ++ 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 +@@ -4337,42 +4343,63 @@ + 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 <poppler/Object.h>' > testpoppler.cpp +- echo '#include <poppler/Stream.h>' >> 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} 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]) ++ 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 '#include <poppler/Error.h>' > testpoppler.cpp +- echo 'int main(int argc, char** argv) { setErrorCallback(0,0); return 0; }' >> testpoppler.cpp ++ echo '#define private public' > testpoppler.cpp ++ echo '#include <poppler/Object.h>' >> testpoppler.cpp ++ echo '#include <poppler/Catalog.h>' >> testpoppler.cpp ++ echo 'int main(int argc, char** argv) { return &(((Catalog*)0x8000)->optContent) == 0; }' >> testpoppler.cpp + if test -z "`${CXX} testpoppler.cpp -c ${POPPLER_INC} 2>&1`" ; then +- POPPLER_0_20_OR_LATER=yes ++ POPPLER_HAS_OPTCONTENT=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]) ++ 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 <poppler/Object.h>' > testpoppler.cpp ++ echo '#include <poppler/Stream.h>' >> 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} 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 <poppler/Object.h>' > testpoppler.cpp +- echo '#include <poppler/Stream.h>' >> 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 ++ echo '#include <poppler/Error.h>' > testpoppler.cpp ++ echo 'int main(int argc, char** argv) { setErrorCallback(0,0); return 0; }' >> testpoppler.cpp + if test -z "`${CXX} testpoppler.cpp -c ${POPPLER_INC} 2>&1`" ; then +- POPPLER_0_23_OR_LATER=yes ++ 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 <poppler/Object.h>' > testpoppler.cpp ++ echo '#include <poppler/Stream.h>' >> 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} 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]) +@@ -4382,7 +4409,4 @@ + AC_MSG_RESULT([no]) + fi +- +- else +- AC_MSG_RESULT([no]) + fi + else +@@ -4400,4 +4424,5 @@ + 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_INC, $POPPLER_INC) + AC_SUBST(POPPLER_PLUGIN_LIB, $POPPLER_PLUGIN_LIB) +Index: /branches/2.2/gdal/frmts/pdf/GNUmakefile +=================================================================== +--- /branches/2.2/gdal/frmts/pdf/GNUmakefile (revision 40035) ++++ /branches/2.2/gdal/frmts/pdf/GNUmakefile (revision 40036) +@@ -32,4 +32,8 @@ + endif + ++ifeq ($(POPPLER_0_58_OR_LATER),yes) ++CPPFLAGS += -DPOPPLER_0_58_OR_LATER ++endif ++ + ifeq ($(HAVE_PODOFO),yes) + CPPFLAGS += -DHAVE_PODOFO +Index: /branches/2.2/gdal/frmts/pdf/makefile.vc +=================================================================== +--- /branches/2.2/gdal/frmts/pdf/makefile.vc (revision 40035) ++++ /branches/2.2/gdal/frmts/pdf/makefile.vc (revision 40036) +@@ -15,5 +15,5 @@ + + !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) -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) -DHAVE_POPPLER + + !IFDEF POPPLER_HAS_OPTCONTENT +@@ -31,4 +31,8 @@ + !IFDEF POPPLER_0_23_OR_LATER + POPPLER_0_23_OR_LATER_FLAGS = -DPOPPLER_0_23_OR_LATER ++!ENDIF ++ ++!IFDEF POPPLER_0_58_OR_LATER ++POPPLER_0_58_OR_LATER_FLAGS = -DPOPPLER_0_58_OR_LATER + !ENDIF + +Index: /branches/2.2/gdal/frmts/pdf/pdfdataset.cpp +=================================================================== +--- /branches/2.2/gdal/frmts/pdf/pdfdataset.cpp (revision 40035) ++++ /branches/2.2/gdal/frmts/pdf/pdfdataset.cpp (revision 40036) +@@ -130,5 +130,9 @@ + public: + ObjectAutoFree() {} +- ~ObjectAutoFree() { obj.free(); } ++ ~ObjectAutoFree() { ++#ifndef POPPLER_0_58_OR_LATER ++ obj.free(); ++#endif ++ } + + Object* getObj() { return &obj; } +@@ -2286,5 +2290,9 @@ + { + poCatalogObjectPoppler = new ObjectAutoFree; ++#ifdef POPPLER_0_58_OR_LATER ++ *poCatalogObjectPoppler->getObj() = poDocPoppler->getXRef()->getCatalog(); ++#else + poDocPoppler->getXRef()->getCatalog(poCatalogObjectPoppler->getObj()); ++#endif + if (!poCatalogObjectPoppler->getObj()->isNull()) + poCatalogObject = new GDALPDFObjectPoppler(poCatalogObjectPoppler->getObj(), FALSE); +@@ -4027,5 +4035,9 @@ + #ifdef HAVE_POPPLER + PDFDoc* poDocPoppler = NULL; ++#ifdef POPPLER_0_58_OR_LATER ++ Object oObj; ++#else + ObjectAutoFree oObj; ++#endif + Page* poPagePoppler = NULL; + Catalog* poCatalogPoppler = NULL; +@@ -4074,6 +4086,10 @@ + poUserPwd = new GooString(pszUserPwd); + ++#ifdef POPPLER_0_58_OR_LATER ++ poDocPoppler = new PDFDoc(new VSIPDFFileStream(fp, pszFilename, std::move(oObj)), NULL, poUserPwd); ++#else + oObj.getObj()->initNull(); + poDocPoppler = new PDFDoc(new VSIPDFFileStream(fp, pszFilename, oObj.getObj()), NULL, poUserPwd); ++#endif + delete poUserPwd; + +@@ -4766,8 +4782,14 @@ + { + Object oInfo; ++#ifdef POPPLER_0_58_OR_LATER ++ oInfo = poDocPoppler->getDocInfo(); ++#else + poDocPoppler->getDocInfo(&oInfo); ++#endif + GDALPDFObjectPoppler oInfoObjPoppler(&oInfo, FALSE); + poDS->ParseInfo(&oInfoObjPoppler); ++#ifndef POPPLER_0_58_OR_LATER + oInfo.free(); ++#endif + } + +Index: /branches/2.2/gdal/frmts/pdf/pdfio.cpp +=================================================================== +--- /branches/2.2/gdal/frmts/pdf/pdfio.cpp (revision 40035) ++++ /branches/2.2/gdal/frmts/pdf/pdfio.cpp (revision 40036) +@@ -53,6 +53,10 @@ + + VSIPDFFileStream::VSIPDFFileStream( +- VSILFILE* fIn, const char* pszFilename, Object *dictA) : +-#ifdef POPPLER_BASE_STREAM_HAS_TWO_ARGS ++ VSILFILE* fIn, const char* pszFilename, ++ makeSubStream_object_type dictA ++) : ++#ifdef POPPLER_0_58_OR_LATER ++ BaseStream(std::move(dictA), (Goffset)VSIPDFFileStreamGetSize(fIn)), ++#elif defined(POPPLER_BASE_STREAM_HAS_TWO_ARGS) + BaseStream(dictA, (setPos_offset_type)VSIPDFFileStreamGetSize(fIn)), + #else +@@ -78,6 +82,9 @@ + VSIPDFFileStream::VSIPDFFileStream( VSIPDFFileStream* poParentIn, + vsi_l_offset startA, GBool limitedA, +- vsi_l_offset lengthA, Object *dictA ) : +-#ifdef POPPLER_BASE_STREAM_HAS_TWO_ARGS ++ vsi_l_offset lengthA, ++ makeSubStream_object_type dictA) : ++#ifdef POPPLER_0_58_OR_LATER ++ BaseStream(std::move(dictA), (Goffset)lengthA), ++#elif defined(POPPLER_BASE_STREAM_HAS_TWO_ARGS) + BaseStream(dictA, (makeSubStream_offset_type)lengthA), + #else +@@ -116,5 +123,11 @@ + /************************************************************************/ + +-#ifdef POPPLER_0_23_OR_LATER ++#ifdef POPPLER_0_58_OR_LATER ++BaseStream* VSIPDFFileStream::copy() ++{ ++ return new VSIPDFFileStream(poParent, nStart, bLimited, ++ nLength, dict.copy()); ++} ++#elif defined(POPPLER_0_23_OR_LATER) + BaseStream* VSIPDFFileStream::copy() + { +@@ -127,11 +140,16 @@ + /* makeSubStream() */ + /************************************************************************/ +- + Stream *VSIPDFFileStream::makeSubStream(makeSubStream_offset_type startA, GBool limitedA, +- makeSubStream_offset_type lengthA, Object *dictA) +-{ ++ makeSubStream_offset_type lengthA, makeSubStream_object_type dictA) ++{ ++#ifdef POPPLER_0_58_OR_LATER ++ return new VSIPDFFileStream(this, ++ startA, limitedA, ++ lengthA, std::move(dictA)); ++#else + return new VSIPDFFileStream(this, + startA, limitedA, + lengthA, dictA); ++#endif + } + +Index: /branches/2.2/gdal/frmts/pdf/pdfio.h +=================================================================== +--- /branches/2.2/gdal/frmts/pdf/pdfio.h (revision 40035) ++++ /branches/2.2/gdal/frmts/pdf/pdfio.h (revision 40036) +@@ -53,11 +53,19 @@ + #endif + ++#ifdef POPPLER_0_58_OR_LATER ++#define makeSubStream_object_type Object&& ++#else ++#define makeSubStream_object_type Object* ++#endif ++ + class VSIPDFFileStream: public BaseStream + { + public: +- VSIPDFFileStream(VSILFILE* f, const char* pszFilename, Object *dictA); ++ VSIPDFFileStream(VSILFILE* f, const char* pszFilename, ++ makeSubStream_object_type dictA); + VSIPDFFileStream(VSIPDFFileStream* poParent, + vsi_l_offset startA, GBool limitedA, +- vsi_l_offset lengthA, Object *dictA); ++ vsi_l_offset lengthA, ++ makeSubStream_object_type dictA); + virtual ~VSIPDFFileStream(); + +@@ -67,5 +75,5 @@ + + virtual Stream * makeSubStream(makeSubStream_offset_type startA, GBool limitedA, +- makeSubStream_offset_type lengthA, Object *dictA) override; ++ makeSubStream_offset_type lengthA, makeSubStream_object_type dictA) override; + virtual getPos_ret_type getPos() override; + virtual getStart_ret_type getStart() override; +Index: /branches/2.2/gdal/frmts/pdf/pdfobject.cpp +=================================================================== +--- /branches/2.2/gdal/frmts/pdf/pdfobject.cpp (revision 40035) ++++ /branches/2.2/gdal/frmts/pdf/pdfobject.cpp (revision 40036) +@@ -972,5 +972,7 @@ + GDALPDFObjectPoppler::~GDALPDFObjectPoppler() + { ++#ifndef POPPLER_0_58_OR_LATER + m_po->free(); ++#endif + if (m_bDestroy) + delete m_po; +@@ -1183,4 +1185,33 @@ + return oIter->second; + ++#ifdef POPPLER_0_58_OR_LATER ++ Object o = m_poDict->lookupNF(((char*)pszKey)); ++ if (!o.isNull()) ++ { ++ int nRefNum = 0; ++ int nRefGen = 0; ++ if( o.isRef()) ++ { ++ nRefNum = o.getRefNum(); ++ nRefGen = o.getRefGen(); ++ Object o2 = m_poDict->lookup((char*)pszKey); ++ if( !o2.isNull() ) ++ { ++ GDALPDFObjectPoppler* poObj = new GDALPDFObjectPoppler(new Object(std::move(o2)), TRUE); ++ poObj->SetRefNumAndGen(nRefNum, nRefGen); ++ m_map[pszKey] = poObj; ++ return poObj; ++ } ++ } ++ else ++ { ++ GDALPDFObjectPoppler* poObj = new GDALPDFObjectPoppler(new Object(std::move(o)), TRUE); ++ poObj->SetRefNumAndGen(nRefNum, nRefGen); ++ m_map[pszKey] = poObj; ++ return poObj; ++ } ++ } ++ return NULL; ++#else + Object* po = new Object; + if (m_poDict->lookupNF((char*)pszKey, po) && !po->isNull()) +@@ -1211,4 +1242,5 @@ + return NULL; + } ++#endif + } + +@@ -1287,4 +1319,33 @@ + return m_v[nIndex]; + ++#ifdef POPPLER_0_58_OR_LATER ++ Object o = m_poArray->getNF(nIndex); ++ if( !o.isNull() ) ++ { ++ int nRefNum = 0; ++ int nRefGen = 0; ++ if( o.isRef()) ++ { ++ nRefNum = o.getRefNum(); ++ nRefGen = o.getRefGen(); ++ Object o2 = m_poArray->get(nIndex); ++ if( !o2.isNull() ) ++ { ++ GDALPDFObjectPoppler* poObj = new GDALPDFObjectPoppler(new Object(std::move(o2)), TRUE); ++ poObj->SetRefNumAndGen(nRefNum, nRefGen); ++ m_v[nIndex] = poObj; ++ return poObj; ++ } ++ } ++ else ++ { ++ GDALPDFObjectPoppler* poObj = new GDALPDFObjectPoppler(new Object(std::move(o)), TRUE); ++ poObj->SetRefNumAndGen(nRefNum, nRefGen); ++ m_v[nIndex] = poObj; ++ return poObj; ++ } ++ } ++ return NULL; ++#else + Object* po = new Object; + if (m_poArray->getNF(nIndex, po)) +@@ -1315,4 +1376,5 @@ + return NULL; + } ++#endif + } + +Index: /branches/2.2/gdal/nmake.opt +=================================================================== +--- /branches/2.2/gdal/nmake.opt (revision 40035) ++++ /branches/2.2/gdal/nmake.opt (revision 40036) +@@ -622,4 +622,5 @@ + # 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 + #POPPLER_ENABLED = YES + #POPPLER_CFLAGS = -Ie:/kde/include -Ie:/kde/include/poppler +@@ -628,4 +629,5 @@ + #POPPLER_0_20_OR_LATER = YES + #POPPLER_0_23_OR_LATER = YES ++#POPPLER_0_58_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 + Copied: gdal/repos/community-staging-x86_64/gdal-perl-vendor.patch (from rev 261803, gdal/trunk/gdal-perl-vendor.patch) =================================================================== --- community-staging-x86_64/gdal-perl-vendor.patch (rev 0) +++ community-staging-x86_64/gdal-perl-vendor.patch 2017-10-06 00:33:17 UTC (rev 261804) @@ -0,0 +1,28 @@ +Description: pass INSTALLDIRS=vendor to Makefile.PL to get stuff into the right place +Origin: vendor +Forwarded: not-needed +Author: gregor herrmann <gre...@debian.org> +Last-Update: 2014-07-08 + +--- a/swig/perl/Makefile ++++ b/swig/perl/Makefile +@@ -7,7 +7,7 @@ build: Makefile_Geo__GDAL + $(MAKE) -f Makefile_Geo__OSR + + Makefile_Geo__GDAL: +- perl Makefile.PL INSTALL_BASE=$(INST_PREFIX) ++ perl Makefile.PL INSTALLDIRS=vendor + + test: build + $(MAKE) -f Makefile_Geo__GDAL test +--- a/swig/perl/GNUmakefile ++++ b/swig/perl/GNUmakefile +@@ -30,7 +30,7 @@ build: gdal_wrap.cc Makefile_Geo__GDAL + gdal_wrap.cc: generate + + Makefile_Geo__GDAL: +- perl Makefile.PL INSTALL_BASE=$(INST_PREFIX) ++ perl Makefile.PL INSTALLDIRS=vendor + + test: build + $(MAKE) -f Makefile_Geo__GDAL test Copied: gdal/repos/community-staging-x86_64/gdal.changelog (from rev 261803, gdal/trunk/gdal.changelog) =================================================================== --- community-staging-x86_64/gdal.changelog (rev 0) +++ community-staging-x86_64/gdal.changelog 2017-10-06 00:33:17 UTC (rev 261804) @@ -0,0 +1,87 @@ +2017-08-06 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 2.2.1-1 + +2017-07-10 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 2.2.0-1 + * hdf5 1.10.1 rebuild + +2017-01-22 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 2.1.2-1 + +2016-08-02 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 2.1.1-1 glew 2.0.0 / poppler 0.46.0 rebuilds rebuild + +2016-06-05 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 2.1.0-2 cfitsio 3.390 rebuild + +2016-05-22 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 2.1.0-1 + +2016-04-12 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 2.0.2-5 + * hdf5 1.10.0 rebuild + +2016-02-08 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 2.0.2-1 + +2016-01-23 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 2.0.0-7 + * postgresql-libs 9.5 rebuild + * openjpeg2 added as dependency + +2015-10-06 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 2.0.1-2 FS#46581 fix + +2015-06-27 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 2.0.0-1 + +2015-03-01 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 1.11.2-2 poppler 0.31.0 rebuild + +2015-02-23 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 1.11.2-1 + +2015-01-29 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 1.11.1-6 poppler 0.30.0 rebuild + +2014-12-22 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 1.11.1-5 FS#43193 fix + +2014-12-20 Evangelos Foutras <evange...@foutrelis.com> + * gdal 1.11.1-4 poppler 0.29.0 rebuild + +2014-11-25 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 1.11.1-3 hdf5 1.8.14 rebuild + +2014-10-03 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 1.11.1-1 + +2014-07-28 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 1.11.0-4 libspatialite soname rebuild + +2014-05-27 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 1.11.0-2 giflib soname rebuild + +2014-04-27 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 1.11.0-1 + +2013-11-11 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 1.10.1-1 + +2013-09-29 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 1.10.0-4 FS#36328 fix + +2013-05-18 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 1.10.0-1 + +2011-02-19 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * gdal 1.8.0-1 + +2010-11-20 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * Update to major release 1.7.3 + +2010-06-26 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * FS#19946 fixed in 1.7.2-2 + +2010-05-05 Jaroslav Lichtblau <svetlemo...@archlinux.org> + * Update to major release 1.7.2