diff --git a/projects/gdal/Dockerfile b/projects/gdal/Dockerfile index a9fc71646..bd687fd15 100644 --- a/projects/gdal/Dockerfile +++ b/projects/gdal/Dockerfile @@ -16,9 +16,9 @@ FROM gcr.io/oss-fuzz-base/base-builder MAINTAINER even.rouault@spatialys.com -RUN apt-get update && apt-get install -y make autoconf automake libtool g++ zlib1g-dev libsqlite3-dev libexpat-dev liblzma-dev libxerces-c-dev libpng12-dev libgif-dev libwebp-dev libicu-dev libnetcdf-dev curl cmake libssl-dev sqlite3 -# libgeos-dev libjpeg-dev libcurl4-gnutls-dev libxml2-dev netcdf-bin libpoppler-dev libspatialite-dev libhdf4-alt-dev libhdf5-serial-dev poppler-utils libfreexl-dev unixodbc-dev libepsilon-dev libpcre3-dev -# libpodofo-dev libcrypto++-dev +RUN dpkg --add-architecture i386 && \ + apt-get update && \ + apt-get install -y make autoconf automake libtool g++ curl cmake sqlite3 RUN git clone --depth 1 https://github.com/OSGeo/gdal gdal RUN git clone --depth 1 https://github.com/OSGeo/proj.4 gdal/proj diff --git a/projects/gdal/build.sh b/projects/gdal/build.sh index 7718f25fe..714543872 100755 --- a/projects/gdal/build.sh +++ b/projects/gdal/build.sh @@ -15,10 +15,26 @@ # ################################################################################ +I386_PACKAGES="zlib1g-dev:i386 libexpat-dev:i386 liblzma-dev:i386 \ + libxerces-c-dev:i386 libpng12-dev:i386 libgif-dev:i386 \ + libwebp-dev:i386 libicu-dev:i386 libnetcdf-dev:i386 \ + libssl-dev:i386 libsqlite3-dev:i386" +X64_PACKAGES="zlib1g-dev libexpat-dev liblzma-dev \ + libxerces-c-dev libpng12-dev libgif-dev \ + libwebp-dev libicu-dev libnetcdf-dev \ + libssl-dev libsqlite3-dev" + +if [ "$ARCHITECTURE" = "i386" ]; then + apt-get install -y $I386_PACKAGES automake libtool autoconf +else + apt-get install -y $X64_PACKAGES +fi + + # build libproj.a (proj master required) cd proj ./autogen.sh -./configure --disable-shared --prefix=$SRC/install +SQLITE3_CFLAGS=-I/usr/include SQLITE3_LIBS=-lsqlite3 ./configure --disable-shared --prefix=$SRC/install make clean -s make -j$(nproc) -s make install @@ -46,7 +62,7 @@ cd ../.. # build gdal cd gdal export LDFLAGS=${CXXFLAGS} -./configure --without-libtool --with-liblzma --with-expat --with-sqlite3 --with-xerces --with-webp --with-netcdf=$SRC/install --with-curl=$SRC/install --without-hdf5 --with-jpeg=internal --with-proj=$SRC/install +./configure --without-libtool --with-liblzma --with-expat --with-sqlite3 --with-xerces --with-webp --with-netcdf=$SRC/install --with-curl=$SRC/install/bin/curl-config --without-hdf5 --with-jpeg=internal --with-proj=$SRC/install make clean -s make -j$(nproc) -s static-lib diff --git a/projects/gdal/project.yaml b/projects/gdal/project.yaml index 474100e6b..d5bbd9bac 100644 --- a/projects/gdal/project.yaml +++ b/projects/gdal/project.yaml @@ -7,3 +7,6 @@ auto_ccs: - "juergen.fischer@gmail.com" - "athomas@thinkspatial.com.au" - "ari.jolma@gmail.com" +architectures: + - x86_64 + - i386