Unverified Commit 8d76fe66 authored by xoviat's avatar xoviat Committed by GitHub
Browse files

libraries: allow build_simple with configure args (#56)

Allow configure arguments to be passed to the build_simple
functions and also rework the tests a bit.
parents 7aa74304 ba670659
...@@ -52,10 +52,14 @@ if [ -n "$IS_OSX" ]; then ...@@ -52,10 +52,14 @@ if [ -n "$IS_OSX" ]; then
fi fi
function build_simple { function build_simple {
# Example: build_simple libpng $LIBPNG_VERSION \
# http://download.sourceforge.net/libpng tar.gz \
# --additional --configure --arguments
local name=$1 local name=$1
local version=$2 local version=$2
local url=$3 local url=$3
local ext=${4:-tar.gz} local ext=${4:-tar.gz}
local configure_args=${@:5}
if [ -e "${name}-stamp" ]; then if [ -e "${name}-stamp" ]; then
return return
fi fi
...@@ -63,7 +67,7 @@ function build_simple { ...@@ -63,7 +67,7 @@ function build_simple {
local archive=${name_version}.${ext} local archive=${name_version}.${ext}
fetch_unpack $url/$archive fetch_unpack $url/$archive
(cd $name_version \ (cd $name_version \
&& ./configure --prefix=$BUILD_PREFIX \ && ./configure --prefix=$BUILD_PREFIX $configure_args \
&& make \ && make \
&& make install) && make install)
touch "${name}-stamp" touch "${name}-stamp"
...@@ -174,16 +178,12 @@ function build_xz { ...@@ -174,16 +178,12 @@ function build_xz {
} }
function build_libwebp { function build_libwebp {
if [ -e libwebp-stamp ]; then return; fi
build_libpng build_libpng
build_tiff build_tiff
build_giflib build_giflib
fetch_unpack https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-${LIBWEBP_VERSION}.tar.gz build_simple libwebp $LIBWEBP_VERSION \
(cd libwebp-${LIBWEBP_VERSION} && \ https://storage.googleapis.com/downloads.webmproject.org/releases/webp/ tar.gz \
./configure --enable-libwebpmux --enable-libwebpdemux --prefix=$BUILD_PREFIX \ --enable-libwebpmux --enable-libwebpdemux
&& make \
&& make install)
touch libwebp-stamp
} }
function build_freetype { function build_freetype {
...@@ -198,15 +198,10 @@ function build_libyaml { ...@@ -198,15 +198,10 @@ function build_libyaml {
function build_szip { function build_szip {
# Build szip without encoding (patent restrictions) # Build szip without encoding (patent restrictions)
if [ -e szip-stamp ]; then return; fi
build_zlib build_zlib
local szip_url=https://www.hdfgroup.org/ftp/lib-external/szip/ build_simple szip $SZIP_VERSION \
fetch_unpack ${szip_url}/$SZIP_VERSION/src/szip-$SZIP_VERSION.tar.gz https://www.hdfgroup.org/ftp/lib-external/szip/ tar.gz \
(cd szip-$SZIP_VERSION \ --enable-encoding=no
&& ./configure --enable-encoding=no --prefix=$BUILD_PREFIX \
&& make \
&& make install)
touch szip-stamp
} }
function build_hdf5 { function build_hdf5 {
......
...@@ -4,5 +4,16 @@ export BUILD_PREFIX="${PWD}/builds" ...@@ -4,5 +4,16 @@ export BUILD_PREFIX="${PWD}/builds"
rm_mkdir $BUILD_PREFIX rm_mkdir $BUILD_PREFIX
source library_builders.sh source library_builders.sh
build_openssl # set -e -x
build_swig
function suppress {
# Suppress the output of a bash command unless it fails
rm -f $HOME/suppress.out 2> /dev/null || true
$* 2>&1 > $HOME/suppress.out || cat $HOME/suppress.out
rm $HOME/suppress.out
}
suppress build_openssl
suppress build_libwebp
suppress build_szip
suppress build_swig
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment