aboutsummaryrefslogtreecommitdiff
path: root/projects/kcodecs
diff options
context:
space:
mode:
authortsdgeos <aacid@kde.org>2021-06-22 13:54:18 +0200
committerGitHub <noreply@github.com>2021-06-22 07:54:18 -0400
commit89d8215b93836a97b45b0600fa3f7f65f1477c9d (patch)
tree3503474a58683eb52dbb15e980050cfce6f3f016 /projects/kcodecs
parentd217819bd7f8dcf18cb1af4ebe521417be091b6f (diff)
downloadoss-fuzz-89d8215b93836a97b45b0600fa3f7f65f1477c9d.tar.gz
Fix kcodecs build (#5955)
New kcodecs requires C++17, we need a newer gperf able of generating C++17 compliant code
Diffstat (limited to 'projects/kcodecs')
-rw-r--r--projects/kcodecs/Dockerfile3
-rw-r--r--projects/kcodecs/build.sh14
2 files changed, 16 insertions, 1 deletions
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
@@ -16,6 +16,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 .
make install