diff options
author | Lovell Fuller <lovell@users.noreply.github.com> | 2021-08-18 12:56:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-18 12:56:41 +0100 |
commit | 12453df2aa2b6e3793a97d1576b17e0dbb4812ff (patch) | |
tree | 0c0f63d791a1841a15f1657ec950ca78e8772355 /projects | |
parent | 2550a06f11cb5c4f332ebda58218364d74404bbd (diff) |
libvips: add imagequant and cgif dependencies (#6241)
Build libvips without test and tools subdirs as these are
not directly fuzz tested.
Diffstat (limited to 'projects')
-rw-r--r-- | projects/libvips/Dockerfile | 4 | ||||
-rwxr-xr-x | projects/libvips/build.sh | 20 |
2 files changed, 24 insertions, 0 deletions
diff --git a/projects/libvips/Dockerfile b/projects/libvips/Dockerfile index 79c46e8b..d10e0004 100644 --- a/projects/libvips/Dockerfile +++ b/projects/libvips/Dockerfile @@ -22,11 +22,13 @@ RUN apt-get update && apt-get install -y \ nasm \ gtk-doc-tools \ gobject-introspection \ + python3-pip \ libfftw3-dev \ libexpat1-dev \ libffi-dev \ libselinux1-dev \ glib2.0-dev +RUN pip3 install meson ninja RUN mkdir afl-testcases RUN curl https://lcamtuf.coredump.cx/afl/demo/afl_testcases.tgz | tar xzC afl-testcases RUN git clone --depth 1 https://github.com/libvips/libvips @@ -41,6 +43,8 @@ RUN git clone --depth 1 https://gitlab.com/libtiff/libtiff RUN git clone --depth 1 https://aomedia.googlesource.com/aom RUN git clone --depth 1 https://github.com/strukturag/libheif RUN git clone --depth 1 --recursive https://github.com/libjxl/libjxl.git +RUN git clone --depth 1 https://github.com/lovell/libimagequant.git +RUN git clone --depth 1 https://github.com/dloebl/cgif.git WORKDIR libvips COPY build.sh $SRC/ diff --git a/projects/libvips/build.sh b/projects/libvips/build.sh index 5f94e2f6..1bfb0525 100755 --- a/projects/libvips/build.sh +++ b/projects/libvips/build.sh @@ -182,7 +182,25 @@ sed -i'.bak' "s/-lbrotlidec/&-static/" $WORK/lib/pkgconfig/libbrotlidec.pc sed -i'.bak' "s/-lbrotlicommon/&-static/" $WORK/lib/pkgconfig/libbrotlicommon.pc popd +# libimagequant +pushd $SRC/libimagequant +meson setup --prefix=$WORK --libdir=lib --default-library=static build +cd build +ninja -j$(nproc) +ninja install +popd + +# cgif +pushd $SRC/cgif +meson setup --prefix=$WORK --libdir=lib --default-library=static build +cd build +ninja -j$(nproc) +ninja install +popd + # libvips +sed -i'.bak' "/test/d" Makefile.am +sed -i'.bak' "/tools/d" Makefile.am PKG_CONFIG="pkg-config --static" ./autogen.sh \ --disable-shared \ --disable-modules \ @@ -229,6 +247,8 @@ for fuzzer in fuzz/*_fuzzer.cc; do $WORK/lib/libbrotlienc-static.a \ $WORK/lib/libbrotlidec-static.a \ $WORK/lib/libbrotlicommon-static.a \ + $WORK/lib/libimagequant.a \ + $WORK/lib/libcgif.a \ $LIB_FUZZING_ENGINE \ -Wl,-Bstatic \ -lfftw3 -lgmodule-2.0 -lgio-2.0 -lgobject-2.0 -lffi -lglib-2.0 -lpcre -lexpat \ |