From d371a02be87602e3a897b4c87c13f2880b86b418 Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Tue, 16 Jan 2018 22:32:14 +0100 Subject: [PATCH] Moved the build script to the repository of ImageMagick. (#1078) --- projects/imagemagick/build.sh | 42 +---------------------------------- 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/projects/imagemagick/build.sh b/projects/imagemagick/build.sh index 18cf51e75..47c4c67e6 100755 --- a/projects/imagemagick/build.sh +++ b/projects/imagemagick/build.sh @@ -14,44 +14,4 @@ # ################################################################################ -./configure --prefix="$WORK" --disable-shared --disable-docs -make "-j$(nproc)" -make install - -$CXX $CXXFLAGS -std=c++11 -I"$WORK/include/ImageMagick-7" "$SRC/imagemagick/Magick++/fuzz/encoder_list.cc" \ - -o "$WORK/encoder_list" \ - -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 \ - "$WORK/lib/libMagick++-7.Q16HDRI.a" \ - "$WORK/lib/libMagickWand-7.Q16HDRI.a" \ - "$WORK/lib/libMagickCore-7.Q16HDRI.a" - -for f in $SRC/imagemagick/Magick++/fuzz/*_fuzzer.cc; do - fuzzer=$(basename "$f" _fuzzer.cc) - # encoder_fuzzer is special - if [ "$fuzzer" = "encoder" ]; then - continue - fi - $CXX $CXXFLAGS -std=c++11 -I"$WORK/include/ImageMagick-7" \ - "$f" -o "$OUT/${fuzzer}_fuzzer" \ - -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 \ - -lFuzzingEngine "$WORK/lib/libMagick++-7.Q16HDRI.a" \ - "$WORK/lib/libMagickWand-7.Q16HDRI.a" "$WORK/lib/libMagickCore-7.Q16HDRI.a" -done - -for encoder in $("$WORK/encoder_list"); do - $CXX $CXXFLAGS -std=c++11 -I"$WORK/include/ImageMagick-7" \ - "$SRC/imagemagick/Magick++/fuzz/encoder_fuzzer.cc" -o "$OUT/encoder_${encoder,,}_fuzzer" \ - -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 \ - "-DFUZZ_IMAGEMAGICK_ENCODER=$encoder" \ - -lFuzzingEngine "$WORK/lib/libMagick++-7.Q16HDRI.a" \ - "$WORK/lib/libMagickWand-7.Q16HDRI.a" "$WORK/lib/libMagickCore-7.Q16HDRI.a" -done - -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 +. Magick++/fuzz/build.sh