Skip to content

Commit

Permalink
Merge pull request OSGeo#1891 from rouault/travis_ubuntu1604_add_pdfium
Browse files Browse the repository at this point in the history
Travis: add support for PDFium in Ubuntu 16.04 build
  • Loading branch information
rouault authored Sep 28, 2019
2 parents c08908f + 6187802 commit 0232dcf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
8 changes: 7 additions & 1 deletion gdal/ci/travis/ubuntu_1604/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ sudo chroot "$chroot" add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
sudo chroot "$chroot" apt-get update
# Disable postgresql since it draws ssl-cert that doesn't install cleanly
# postgis postgresql-9.1 postgresql-client-9.1 postgresql-9.1-postgis-2.1 postgresql-9.1-postgis-2.1-scripts libpq-dev
sudo chroot "$chroot" apt-get install -y --allow-unauthenticated python-numpy libpng12-dev libjpeg-dev libgif-dev liblzma-dev libgeos-dev libcurl4-gnutls-dev libproj-dev libxml2-dev libexpat-dev libxerces-c-dev libnetcdf-dev netcdf-bin libpoppler-dev libpoppler-private-dev libsqlite3-dev gpsbabel swig libhdf4-alt-dev libhdf5-serial-dev libpodofo-dev poppler-utils libfreexl-dev unixodbc-dev libwebp-dev libepsilon-dev liblcms2-2 libpcre3-dev libcrypto++-dev libdap-dev libfyba-dev libkml-dev libmysqlclient-dev libogdi3.2-dev libcfitsio-dev openjdk-8-jdk couchdb libzstd1-dev ccache curl autoconf automake sqlite3
sudo chroot "$chroot" apt-get install -y --allow-unauthenticated python-numpy libpng12-dev libjpeg-dev libgif-dev liblzma-dev libgeos-dev libcurl4-gnutls-dev libproj-dev libxml2-dev libexpat-dev libxerces-c-dev libnetcdf-dev netcdf-bin libpoppler-dev libpoppler-private-dev libsqlite3-dev gpsbabel swig libhdf4-alt-dev libhdf5-serial-dev libpodofo-dev poppler-utils libfreexl-dev unixodbc-dev libwebp-dev libepsilon-dev liblcms2-dev libpcre3-dev libcrypto++-dev libdap-dev libfyba-dev libkml-dev libmysqlclient-dev libogdi3.2-dev libcfitsio-dev openjdk-8-jdk couchdb libzstd1-dev ccache curl autoconf automake sqlite3
sudo chroot "$chroot" apt-get install -y doxygen texlive-latex-base
sudo chroot "$chroot" apt-get install -y make
sudo chroot "$chroot" apt-get install -y python-dev
Expand All @@ -55,6 +55,12 @@ tar xzf FileGDB_API_1_5_64gcc51.tar.gz
sudo cp FileGDB_API-64gcc51/lib/* "$chroot/usr/lib"
sudo chroot "$chroot" ldconfig

# PDFium
wget https://github.com/rouault/pdfium_build_gdal_3_1/releases/download/v1_pdfium_3922/install-ubuntu1604-rev3922.tar.gz
tar xzf install-ubuntu1604-rev3922.tar.gz
sudo cp -r install/* "$chroot/usr/"
rm -rf install

sudo chroot "$chroot" sh -c "curl -sSL 'https://bootstrap.pypa.io/get-pip.py' | python"
sudo chroot "$chroot" pip install flake8
# flake8 codes to just emulate pyflakes (http://flake8.pycqa.org/en/latest/user/error-codes.html)
Expand Down
2 changes: 1 addition & 1 deletion gdal/ci/travis/ubuntu_1604/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ sudo chroot "$chroot" sh -c "cd $PWD && cd rl2 && make -j3 install"
chroot "$chroot" sh -c "cd $PWD/proj && ./autogen.sh && CC='ccache $PWD/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-16.04/bin/clang' CXX='ccache $PWD/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-16.04/bin/clang' CFLAGS='-DPROJ_RENAME_SYMBOLS' CXXFLAGS='-DPROJ_RENAME_SYMBOLS' LDFLAGS='-lstdc++' ./configure --disable-static --prefix=/usr/local && CCACHE_CPP2=yes make -j3"
sudo chroot "$chroot" sh -c "cd $PWD/proj && make -j3 install && mv /usr/local/lib/libproj.so.15.0.0 /usr/local/lib/libinternalproj.so.15.0.0 && rm /usr/local/lib/libproj.so* && rm /usr/local/lib/libproj.la && ln -s libinternalproj.so.15.0.0 /usr/local/lib/libinternalproj.so.15 && ln -s libinternalproj.so.15.0.0 /usr/local/lib/libinternalproj.so"

chroot "$chroot" sh -c "cd $PWD/gdal && CCACHE_CPP2=yes CC='ccache $PWD/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-16.04/bin/clang' CXX='ccache $PWD/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-16.04/bin/clang' LDFLAGS='-lstdc++' ./configure --prefix=/usr --without-libtool --enable-debug --with-jpeg12 --with-python --with-poppler --with-podofo --with-spatialite --with-mysql --with-liblzma --with-webp --with-epsilon --with-proj=/usr/local --with-poppler --with-podofo --with-hdf5 --with-dods-root=/usr --with-sosi --with-mysql --with-rasterlite2 --with-fgdb=$PWD/FileGDB_API-64gcc51"
chroot "$chroot" sh -c "cd $PWD/gdal && CCACHE_CPP2=yes CC='ccache $PWD/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-16.04/bin/clang' CXX='ccache $PWD/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-16.04/bin/clang' LDFLAGS='-lstdc++' ./configure --prefix=/usr --without-libtool --enable-debug --with-jpeg12 --with-python --with-poppler --with-podofo --with-spatialite --with-mysql --with-liblzma --with-webp --with-epsilon --with-proj=/usr/local --with-poppler --with-podofo --with-hdf5 --with-dods-root=/usr --with-sosi --with-mysql --with-rasterlite2 --with-fgdb=$PWD/FileGDB_API-64gcc51 --with-pdfium"

chroot "$chroot" bash -c "cd $PWD/gdal && scripts/cppcheck.sh"

Expand Down
4 changes: 1 addition & 3 deletions gdal/configure
Original file line number Diff line number Diff line change
Expand Up @@ -40381,14 +40381,12 @@ if test "$with_pdfium" != "no" -a "$with_pdfium" != ""; then
if test "$with_pdfium" = "yes" ; then
PDFIUM_INC="-I/usr/include/pdfium"
PDFIUM_LIB="-lpdfium"
PDFIUM_LIBDIR="/usr"
else
PDFIUM_INC="-I$with_pdfium/include/pdfium"
PDFIUM_LIB="-L$with_pdfium/lib -lpdfium"
PDFIUM_LIBDIR="$with_pdfium"
fi

PDFIUM_LIB="$PDFIUM_LIB -ljpeg -lpng -lz -llcms2 -lpthread"
PDFIUM_LIB="$PDFIUM_LIB -ljpeg -lpng -lz -llcms2 -lpthread -lm -lstdc++"

if test ! -z "`uname | grep Darwin`" ; then
PDFIUM_LIB="-stdlib=libstdc++ $PDFIUM_LIB"
Expand Down
4 changes: 1 addition & 3 deletions gdal/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -5002,14 +5002,12 @@ if test "$with_pdfium" != "no" -a "$with_pdfium" != ""; then
if test "$with_pdfium" = "yes" ; then
PDFIUM_INC="-I/usr/include/pdfium"
PDFIUM_LIB="-lpdfium"
PDFIUM_LIBDIR="/usr"
else
PDFIUM_INC="-I$with_pdfium/include/pdfium"
PDFIUM_LIB="-L$with_pdfium/lib -lpdfium"
PDFIUM_LIBDIR="$with_pdfium"
fi

PDFIUM_LIB="$PDFIUM_LIB -ljpeg -lpng -lz -llcms2 -lpthread"
PDFIUM_LIB="$PDFIUM_LIB -ljpeg -lpng -lz -llcms2 -lpthread -lm -lstdc++"

if test ! -z "`uname | grep Darwin`" ; then
PDFIUM_LIB="-stdlib=libstdc++ $PDFIUM_LIB"
Expand Down

0 comments on commit 0232dcf

Please sign in to comment.