2017-03-29 23:21:58 +00:00
|
|
|
#!/bin/bash -eu
|
2017-03-31 15:41:34 +00:00
|
|
|
# Copyright 2017 Google Inc.
|
2017-03-29 23:21:58 +00:00
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2017-10-12 16:48:41 +00:00
|
|
|
tar -xJf $SRC/zlib-1.2.11.tar.xz
|
|
|
|
pushd zlib-1.2.11
|
|
|
|
./configure --static
|
|
|
|
make -j$(nproc)
|
|
|
|
export ZLIB_CFLAGS="-I$(pwd)"
|
|
|
|
export ZLIB_LIBS="-L$(pwd) -lz"
|
|
|
|
popd
|
2017-04-04 15:55:01 +00:00
|
|
|
|
|
|
|
tar -xzf $SRC/lcms2-2.8.tar.gz
|
|
|
|
pushd lcms2-2.8
|
|
|
|
./configure --disable-shared --enable-static --without-jpeg --without-tiff
|
|
|
|
make -C src -j$(nproc)
|
2017-10-12 16:48:41 +00:00
|
|
|
export LCMS2_CFLAGS="-I$(pwd)/include"
|
|
|
|
export LCMS2_LIBS="-L$(pwd)/src -llcms2"
|
|
|
|
popd
|
|
|
|
|
|
|
|
tar -xJf $SRC/libpng-1.6.34.tar.xz
|
|
|
|
pushd libpng-1.6.34
|
|
|
|
./configure --disable-shared --enable-static CPPFLAGS="$ZLIB_CFLAGS" LDFLAGS="$ZLIB_LIBS"
|
|
|
|
make -j$(nproc)
|
|
|
|
export LIBPNG_CFLAGS="-I$(pwd)"
|
|
|
|
export LIBPNG_LIBS="-L$(pwd) -lpng16"
|
|
|
|
popd
|
|
|
|
|
2017-11-13 21:46:46 +00:00
|
|
|
tar -xzf $SRC/libxml2-2.9.7.tar.gz
|
|
|
|
pushd libxml2-2.9.7
|
2017-10-12 16:48:41 +00:00
|
|
|
./configure --disable-shared --enable-static --disable-ipv6 --without-python --without-zlib --without-lzma
|
|
|
|
make -j$(nproc)
|
|
|
|
export LIBXML_CFLAGS="-I$(pwd)/include"
|
|
|
|
export LIBXML_LIBS="-L$(pwd) -lxml2"
|
|
|
|
export XML_CFLAGS="$LIBXML_CFLAGS"
|
|
|
|
export XML_LIBS="$LIBXML_LIBS"
|
|
|
|
popd
|
|
|
|
|
2018-01-09 15:45:26 +00:00
|
|
|
tar -xzf $SRC/icu4c-60_2-src.tgz
|
2017-10-12 16:48:41 +00:00
|
|
|
pushd icu/source
|
2017-11-13 21:46:46 +00:00
|
|
|
patch -p2 < $SRC/icu4c-ubsan.patch
|
|
|
|
patch -p3 < $SRC/ofz3670.patch
|
2018-01-19 16:36:40 +00:00
|
|
|
patch -p3 < $SRC/ofz4860.patch
|
2017-10-12 16:48:41 +00:00
|
|
|
./configure --disable-shared --enable-static --with-data-packaging=static --disable-dyload --disable-strict \
|
|
|
|
--disable-layout --disable-samples --disable-extras --disable-icuio --disable-plugins \
|
|
|
|
CPPFLAGS=-DU_USE_STRTOD_L=0
|
|
|
|
make -j$(nproc)
|
|
|
|
export ICU_CFLAGS="-I$(pwd) -I$(pwd)/i18n -I$(pwd)/common"
|
|
|
|
export ICU_LIBS="-L$(pwd)/lib -licui18n -licuuc -licudata"
|
2017-04-04 15:55:01 +00:00
|
|
|
popd
|
2017-03-29 23:21:58 +00:00
|
|
|
|
2018-01-09 15:45:26 +00:00
|
|
|
tar -xjf $SRC/boost_1_66_0.tar.bz2
|
|
|
|
pushd boost_1_66_0
|
2017-11-16 15:07:02 +00:00
|
|
|
patch -p2 < $SRC/ofz2894.patch
|
2017-11-18 15:24:47 +00:00
|
|
|
patch -p2 < $SRC/ofz4303.patch
|
2017-11-16 15:07:02 +00:00
|
|
|
export CPPFLAGS="-I$(pwd)"
|
|
|
|
popd
|
|
|
|
|
|
|
|
tar -xjf $SRC/mdds-1.3.1.tar.bz2
|
|
|
|
pushd mdds-1.3.1
|
|
|
|
./configure
|
|
|
|
export MDDS_CFLAGS="-I$(pwd)/include"
|
|
|
|
export MDDS_LIBS=' '
|
|
|
|
popd
|
|
|
|
|
2017-03-29 23:21:58 +00:00
|
|
|
pushd librevenge
|
|
|
|
./autogen.sh
|
2017-09-16 15:51:03 +00:00
|
|
|
./configure --without-docs --disable-werror --disable-shared --enable-static --disable-tests --enable-fuzzers
|
2017-03-29 23:21:58 +00:00
|
|
|
make -j$(nproc)
|
|
|
|
rvnginc=$(pwd)/inc
|
|
|
|
rvnglib=$(pwd)/src/lib
|
2017-10-12 16:48:41 +00:00
|
|
|
export REVENGE_CFLAGS="-I$(pwd)/inc"
|
|
|
|
export REVENGE_LIBS="-L$(pwd)/src/lib -lrevenge-0.0"
|
|
|
|
export REVENGE_STREAM_CFLAGS="-I$(pwd)/inc"
|
|
|
|
export REVENGE_STREAM_LIBS="-L$(pwd)/src/lib -lrevenge-stream-0.0"
|
|
|
|
export REVENGE_GENERATORS_CFLAGS="-I$(pwd)/inc"
|
|
|
|
export REVENGE_GENERATORS_LIBS="-L$(pwd)/src/lib -lrevenge-generators-0.0"
|
2017-03-29 23:21:58 +00:00
|
|
|
popd
|
|
|
|
|
2017-04-04 15:00:20 +00:00
|
|
|
pushd libmspub
|
2017-03-29 23:21:58 +00:00
|
|
|
./autogen.sh
|
2017-10-12 16:48:41 +00:00
|
|
|
./configure --without-docs --disable-werror --disable-shared --enable-static --disable-tools --enable-fuzzers
|
2017-04-04 15:55:01 +00:00
|
|
|
make -j$(nproc)
|
|
|
|
popd
|
|
|
|
|
|
|
|
pushd libcdr
|
|
|
|
./autogen.sh
|
2017-10-12 16:48:41 +00:00
|
|
|
./configure --without-docs --disable-werror --disable-shared --enable-static --disable-tools --enable-fuzzers --disable-tests
|
2017-04-04 15:55:01 +00:00
|
|
|
make -j$(nproc)
|
|
|
|
popd
|
|
|
|
|
|
|
|
pushd libvisio
|
|
|
|
./autogen.sh
|
2017-10-12 16:48:41 +00:00
|
|
|
./configure --without-docs --disable-werror --disable-shared --enable-static --disable-tools --enable-fuzzers --disable-tests
|
2017-04-04 15:55:01 +00:00
|
|
|
make -j$(nproc)
|
|
|
|
popd
|
|
|
|
|
|
|
|
pushd libzmf
|
|
|
|
./autogen.sh
|
2017-10-12 16:48:41 +00:00
|
|
|
./configure --without-docs --disable-werror --disable-shared --enable-static --disable-tools --enable-fuzzers --disable-tests
|
2017-04-04 15:55:01 +00:00
|
|
|
make -j$(nproc)
|
|
|
|
popd
|
|
|
|
|
|
|
|
pushd libpagemaker
|
|
|
|
./autogen.sh
|
2017-10-12 16:48:41 +00:00
|
|
|
./configure --without-docs --disable-werror --disable-shared --enable-static --disable-tools --enable-fuzzers
|
2017-04-04 15:55:01 +00:00
|
|
|
make -j$(nproc)
|
|
|
|
popd
|
|
|
|
|
|
|
|
pushd libfreehand
|
|
|
|
./autogen.sh
|
2017-10-12 16:48:41 +00:00
|
|
|
./configure --without-docs --disable-werror --disable-shared --enable-static --disable-tools --enable-fuzzers --disable-tests
|
2017-03-29 23:21:58 +00:00
|
|
|
make -j$(nproc)
|
2017-04-04 15:00:20 +00:00
|
|
|
popd
|
2017-03-29 23:21:58 +00:00
|
|
|
|
2017-04-04 17:05:20 +00:00
|
|
|
pushd libwpd
|
|
|
|
./autogen.sh
|
2017-10-12 16:48:41 +00:00
|
|
|
./configure --without-docs --disable-werror --disable-shared --enable-static --disable-tools --enable-fuzzers
|
2017-04-04 17:05:20 +00:00
|
|
|
make -j$(nproc)
|
2017-10-12 16:48:41 +00:00
|
|
|
export WPD_CFLAGS=-I$(pwd)/inc
|
|
|
|
export WPD_LIBS="-L$(pwd)/src/lib -lwpd-0.10"
|
2017-04-04 17:05:20 +00:00
|
|
|
popd
|
|
|
|
|
|
|
|
pushd libwpg
|
|
|
|
./autogen.sh
|
2017-10-12 16:48:41 +00:00
|
|
|
./configure --without-docs --disable-werror --disable-shared --enable-static --disable-tools --enable-fuzzers
|
2017-04-04 17:05:20 +00:00
|
|
|
make -j$(nproc)
|
|
|
|
popd
|
|
|
|
|
2017-04-04 20:55:53 +00:00
|
|
|
pushd libstaroffice
|
|
|
|
./autogen.sh
|
2017-10-12 16:48:41 +00:00
|
|
|
./configure --without-docs --disable-werror --disable-shared --enable-static --disable-tools --enable-fuzzers
|
2017-04-04 20:55:53 +00:00
|
|
|
make -j$(nproc)
|
|
|
|
popd
|
|
|
|
|
|
|
|
pushd libwps
|
|
|
|
./autogen.sh
|
2017-10-12 16:48:41 +00:00
|
|
|
./configure --without-docs --disable-werror --disable-shared --enable-static --disable-tools --enable-fuzzers
|
2017-04-04 20:55:53 +00:00
|
|
|
make -j$(nproc)
|
|
|
|
popd
|
|
|
|
|
|
|
|
pushd libmwaw
|
|
|
|
./autogen.sh
|
2017-10-12 16:48:41 +00:00
|
|
|
./configure --without-docs --disable-werror --disable-shared --enable-static --disable-tools --disable-zip --enable-fuzzers
|
2017-09-17 13:42:37 +00:00
|
|
|
make -C src/lib -j$(nproc)
|
|
|
|
# Link with less parallelism to avoid memory problems on the builders
|
|
|
|
make -j2
|
2017-04-04 20:55:53 +00:00
|
|
|
popd
|
|
|
|
|
|
|
|
pushd libe-book
|
|
|
|
./autogen.sh
|
2017-10-12 16:48:41 +00:00
|
|
|
./configure --without-docs --disable-werror --disable-shared --enable-static \
|
|
|
|
--without-tools --enable-fuzzers --without-liblangtag --disable-tests
|
2017-04-04 20:55:53 +00:00
|
|
|
make -j$(nproc)
|
|
|
|
popd
|
|
|
|
|
2017-04-05 14:45:17 +00:00
|
|
|
pushd libabw
|
|
|
|
./autogen.sh
|
2017-10-12 16:48:41 +00:00
|
|
|
./configure --without-docs --disable-werror --disable-shared --enable-static --disable-tools --enable-fuzzers
|
2017-04-05 14:45:17 +00:00
|
|
|
make -j$(nproc)
|
|
|
|
popd
|
|
|
|
|
2017-04-07 13:48:13 +00:00
|
|
|
pushd libetonyek
|
|
|
|
./autogen.sh
|
2017-09-16 15:51:03 +00:00
|
|
|
./configure --without-docs --disable-werror --disable-shared --enable-static \
|
2017-10-12 16:48:41 +00:00
|
|
|
--without-tools --enable-fuzzers --with-mdds=0.x --without-liblangtag --disable-tests
|
2017-04-07 13:48:13 +00:00
|
|
|
make -j$(nproc)
|
|
|
|
popd
|
|
|
|
|
2017-08-27 22:42:33 +00:00
|
|
|
pushd libqxp
|
|
|
|
./autogen.sh
|
2017-10-12 16:48:41 +00:00
|
|
|
./configure --without-docs --disable-werror --disable-shared --enable-static --disable-tools --enable-fuzzers --disable-tests
|
2017-08-27 22:42:33 +00:00
|
|
|
make -j$(nproc)
|
|
|
|
popd
|
|
|
|
|
2017-04-04 15:00:20 +00:00
|
|
|
cp */src/fuzz/*fuzzer $OUT
|
2017-04-17 14:26:16 +00:00
|
|
|
cp */src/fuzz/*.dict $OUT
|
2017-04-04 15:00:20 +00:00
|
|
|
cp *_seed_corpus.zip $OUT
|
2017-04-05 14:45:17 +00:00
|
|
|
cp *.options $OUT
|