From 8e2d57684bd49355b80572592c3af5cefc19a69c Mon Sep 17 00:00:00 2001 From: Sean Kau Date: Wed, 22 Jan 2020 18:24:10 -0800 Subject: [PATCH] Switch Ghostscript to upstream freetype (#3286) * Switch to freetype library. Reintegrate freetype * remove pkg-config dependency --- projects/ghostscript/Dockerfile | 3 ++- projects/ghostscript/build.sh | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/projects/ghostscript/Dockerfile b/projects/ghostscript/Dockerfile index 21dadb540..c4cdbd9dd 100644 --- a/projects/ghostscript/Dockerfile +++ b/projects/ghostscript/Dockerfile @@ -17,8 +17,9 @@ FROM gcr.io/oss-fuzz-base/base-builder MAINTAINER skau@google.com -RUN apt-get update && apt-get install -y autoconf zlibc liblcms2-dev libfreetype6-dev libpng-dev libtiff-dev +RUN apt-get update && apt-get install -y autoconf zlibc libtool liblcms2-dev libpng-dev libtiff-dev RUN git clone --branch branch-2.2 --single-branch --depth 1 https://github.com/apple/cups.git cups +RUN git clone --branch VER-2-10-1 --single-branch --depth 1 https://git.savannah.nongnu.org/git/freetype/freetype2.git freetype RUN git clone --single-branch --depth 1 git://git.ghostscript.com/ghostpdl.git ghostpdl RUN mkdir ghostpdl/fuzz diff --git a/projects/ghostscript/build.sh b/projects/ghostscript/build.sh index b6f9a827f..11ca104f8 100755 --- a/projects/ghostscript/build.sh +++ b/projects/ghostscript/build.sh @@ -36,14 +36,16 @@ rm -rf libpng || die rm -rf tiff || die rm -rf zlib || die -export CUPSCONFIG="$WORK/cups-config" +mv ../freetype freetype + +CUPSCONFIG="$WORK/cups-config" CUPS_CFLAGS=$($CUPSCONFIG --cflags) CUPS_LDFLAGS=$($CUPSCONFIG --ldflags) CUPS_LIBS=$($CUPSCONFIG --image --libs) export CXXFLAGS="$CXXFLAGS $CUPS_CFLAGS" -./autogen.sh -CPPFLAGS="${CPPFLAGS:-} $CUPS_CFLAGS" ./configure \ +CPPFLAGS="${CPPFLAGS:-} $CUPS_CFLAGS" ./autogen.sh \ + CUPSCONFIG=$CUPSCONFIG \ --enable-freetype --enable-fontconfig \ --enable-cups --with-ijs --with-jbig2dec \ --with-drivers=cups,ljet4,laserjet,pxlmono,pxlcolor,pcl3,uniprint