1# Copyright 2018 Google Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#
15################################################################################
16FROM gcr.io/oss-fuzz-base/base-builder
17RUN apt-get update && apt-get install -y python3-pip gtk-doc-tools libffi-dev
18RUN pip3 install -U meson==0.55.3 ninja
19
20RUN git clone --depth 1 git://git.sv.nongnu.org/freetype/freetype2.git
21ADD https://ftp.gnome.org/pub/gnome/sources/glib/2.64/glib-2.64.2.tar.xz $SRC
22RUN tar xvJf $SRC/glib-2.64.2.tar.xz
23RUN git clone --depth 1 https://gitlab.freedesktop.org/cairo/cairo.git && \
24    zip -q $SRC/cairo_seed_corpus.zip $SRC/cairo/test/reference/*
25
26ADD https://raw.githubusercontent.com/google/fuzzing/master/dictionaries/png.dict $SRC/cairo.dict
27
28WORKDIR $SRC/cairo
29COPY targets $SRC/fuzz
30COPY build.sh $SRC/
31