Download boost 1.65.1 from bintray. (#1019)

* Download boost 1.65.1 from bintray.

* Pass --no-check-certificate to wget.
This commit is contained in:
Robert Nishihara
2017-09-27 13:25:05 -07:00
committed by Philipp Moritz
parent 5a50e80b63
commit 116fe168b5
+7 -4
View File
@@ -7,23 +7,26 @@ set -e
TP_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)
BOOST_VERSION=1.65.1
BOOST_VERSION_UNDERSCORE=1_65_1
# Download and compile boost if it isn't already present.
if [ ! -d $TP_DIR/boost ]; then
# The wget command frequently fails, so retry up to 20 times.
for COUNT in {1..20}; do
# Attempt to wget boost and break from the retry loop if it succeeds.
wget --no-check-certificate http://downloads.sourceforge.net/project/boost/boost/1.60.0/boost_1_60_0.tar.gz -O $TP_DIR/boost_1_60_0.tar.gz && break
wget --no-check-certificate https://dl.bintray.com/boostorg/release/$BOOST_VERSION/source/boost_$BOOST_VERSION_UNDERSCORE.tar.gz -O $TP_DIR/boost_$BOOST_VERSION_UNDERSCORE.tar.gz && break
# If none of the retries succeeded at getting boost, then fail.
if [[ $COUNT == 20 ]]; then
exit 1
fi
done
tar xf $TP_DIR/boost_1_60_0.tar.gz -C $TP_DIR/
rm -rf $TP_DIR/boost_1_60_0.tar.gz
tar xf $TP_DIR/boost_$BOOST_VERSION_UNDERSCORE.tar.gz -C $TP_DIR/
rm -rf $TP_DIR/boost_$BOOST_VERSION_UNDERSCORE.tar.gz
# Compile boost.
pushd $TP_DIR/boost_1_60_0
pushd $TP_DIR/boost_$BOOST_VERSION_UNDERSCORE
./bootstrap.sh
./bjam cxxflags=-fPIC cflags=-fPIC --prefix=$TP_DIR/boost --with-filesystem --with-system install > /dev/null
popd