From: Dirk Lemstra Date: Tue, 16 Jan 2018 20:44:56 +0000 (+0100) Subject: Move build script into the repo. X-Git-Tag: 7.0.7-22~52 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=88a6ce6b6ccbf459113fcca552e1fb6927156b13;p=imagemagick Move build script into the repo. --- diff --git a/Magick++/fuzz/build.sh b/Magick++/fuzz/build.sh new file mode 100644 index 000000000..193e5e6a9 --- /dev/null +++ b/Magick++/fuzz/build.sh @@ -0,0 +1,23 @@ +#!/bin/bash -eu + +./configure --prefix="$WORK" --disable-shared --disable-docs +make "-j$(nproc)" +make install + +MAGICK_COMPILER=$CXX +MAGICK_COMPILER_FLAGS=$CXXFLAGS +MAGICK_INCLUDE="$WORK/include/ImageMagick-7" +MAGICK_SRC="$SRC/imagemagick/Magick++/fuzz" +MAGICK_LIBS="-lFuzzingEngine $WORK/lib/libMagick++-7.Q16HDRI.a $WORK/lib/libMagickWand-7.Q16HDRI.a $WORK/lib/libMagickCore-7.Q16HDRI.a" +MAGICK_OUTPUT=$OUT + +. $MAGICK_SRC/build_fuzzers.sh + +mkdir afl_testcases +(cd afl_testcases; tar xvf "$SRC/afl_testcases.tgz") +for format in gif jpg png bmp ico webp tif; do + mkdir $format + find afl_testcases -type f -name '*.'$format -exec mv -n {} $format/ \; + zip -rj $format.zip $format/ + cp $format.zip "$OUT/encoder_${format}_fuzzer_seed_corpus.zip" +done \ No newline at end of file