[freeimage] Use the SVN repo instead of the latest source archive. (#3414)

* [freeimage] Use the SVN repo instead of the latest source archive.

Requested in https://github.com/google/oss-fuzz/pull/2606#issuecomment-588533038

* fix the path

* fix path again

* more fixes

* should work now!

* test locally
This commit is contained in:
Max Moroz 2021-03-05 21:19:50 -08:00 committed by GitHub
parent 1aa590c4ff
commit db622f2e26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 9 deletions

View File

@ -16,10 +16,7 @@
FROM gcr.io/oss-fuzz-base/base-builder
RUN apt-get update && apt-get install -y make autoconf automake libtool wget
# This downloads the latest version at the time of writing. There does not
# appear to be a head version of FreeImage.
RUN wget https://downloads.sourceforge.net/freeimage/FreeImage3180.zip
RUN unzip FreeImage3180.zip
WORKDIR $SRC
RUN svn checkout https://svn.code.sf.net/p/freeimage/svn/ freeimage-svn
WORKDIR $SRC/freeimage-svn/FreeImage/trunk/
COPY build.sh $SRC/
COPY load_from_memory_fuzzer.cc $SRC/

View File

@ -15,15 +15,13 @@
#
################################################################################
pushd FreeImage
# b44ExpLogTable.cpp only contains a definition of main().
sed -i 's/Source\/OpenEXR\/IlmImf\/b44ExpLogTable.cpp//' Makefile.srcs
make LIBRARIES=-lc++ -j$(nproc)
popd
INSTALL_DIR="$PWD/Dist"
INSTALL_DIR=$SRC/FreeImage/Dist
cd $SRC
$CXX $CXXFLAGS -I${INSTALL_DIR}/ $LIB_FUZZING_ENGINE \
load_from_memory_fuzzer.cc ${INSTALL_DIR}/libfreeimage.a \