diff --git a/projects/kcodecs/Dockerfile b/projects/kcodecs/Dockerfile index 3d70e831a..1c563cf0d 100644 --- a/projects/kcodecs/Dockerfile +++ b/projects/kcodecs/Dockerfile @@ -15,7 +15,8 @@ ################################################################################ FROM gcr.io/oss-fuzz-base/base-builder -RUN apt-get install --yes cmake gperf +RUN apt-get install --yes cmake +RUN curl -L http://ftp.gnu.org/pub/gnu/gperf/gperf-3.1.tar.gz -O RUN git clone --depth 1 --branch=5.15 git://code.qt.io/qt/qtbase.git RUN git clone --depth 1 https://invent.kde.org/frameworks/kcodecs.git RUN git clone --depth 1 https://invent.kde.org/frameworks/extra-cmake-modules.git diff --git a/projects/kcodecs/build.sh b/projects/kcodecs/build.sh index 2f8c857b1..85f5be3d0 100644 --- a/projects/kcodecs/build.sh +++ b/projects/kcodecs/build.sh @@ -15,6 +15,20 @@ # ################################################################################ +cd $SRC +tar xzf gperf*.tar.gz && rm -f gperf*.tar.gz +cd gperf* +FUZZ_CFLAGS="${CFLAGS}" +FUZZ_CXXFLAGS="${CXXFLAGS}" +unset CFLAGS +unset CXXFLAGS +# gperf is a code generator, so no need to sanitize it +./configure --prefix=/usr +make -j$(nproc) install +export CFLAGS="${FUZZ_CFLAGS}" +export CXXFLAGS="${FUZZ_CXXFLAGS}" + + cd $SRC cd extra-cmake-modules cmake .