提交 5070ded7 编写于 作者: B Bill Hamilton

Darwin: removed boost from brew install and added compiling boost from source version 1.66

上级 dead9cef
......@@ -60,6 +60,7 @@
printf "\n\tBeginning build version: ${VERSION}\n"
printf "\t$( date -u )\n"
printf "\tUser: $( whoami )\n"
printf "\tgit head id: $( cat .git/refs/heads/master )\n"
printf "\tCurrent branch: $( git branch | grep \* )\n"
printf "\n\tARCHITECTURE: ${ARCH}\n"
......@@ -141,6 +142,7 @@
FILE=${WORK_DIR}/scripts/eosio_build_darwin.sh
CXX_COMPILER=clang++
C_COMPILER=clang
export BOOST_ROOT=/usr/local
MONGOD_CONF=/usr/local/etc/mongod.conf
OPENSSL_ROOT_DIR=/usr/local/opt/openssl
export WASM_ROOT=/usr/local/wasm
......
......@@ -97,19 +97,6 @@
do
printf "\tChecking $name ... "
if [ ${tester} ${testee} ]; then
# check boost version, it should be 1_66
if [ "${brewname}" = "boost" ]; then
BVERSION=`cat "${testee}" 2>/dev/null | grep "#define BOOST_VERSION" | tail -1 \
| tr -s ' ' | cut -d\ -f3`
if [ ${BVERSION} < 106600 ]; then
BOOST_CHECK=1
DEP=$DEP"${brewname} "
DISPLAY="${DISPLAY}${COUNT}. ${name}\n\t"
printf "\t\t ${name} ${bldred}needs updating.${txtrst}.\n"
let COUNT++
continue
fi
fi
printf '\t\t %s found\n' "$name"
continue
fi
......@@ -183,6 +170,73 @@
printf "\n\tNo required Home Brew dependencies to install.\n"
fi
printf "\n\tChecking boost library installation.\n"
BVERSION=`cat "${BOOST_ROOT}/include/boost/version.hpp" 2>/dev/null | grep BOOST_LIB_VERSION | tail -1 | tr -s ' ' | cut -d\ -f3 | sed 's/[^0-9_]//g'`
if [ "${BVERSION}" != "1_67" ]; then
if [ ! -z "${BVERSION}" ]; then
printf "\tFound Boost Version ${BVERSION}.\n"
printf "\tEOS.IO requires Boost version 1.66.\n"
printf "\tWould you like to uninstall version ${BVERSION} and install Boost version 1.66.\n"
select yn in "Yes" "No"; do
case $yn in
[Yy]* )
printf "\tRemoving Boost Version ${BVERSION}.\n"
if [ -L "/usr/local/include/boost/version.hpp" ]; then
brew remove boost 2>/dev/null
if [ $? -ne 0 ]; then
printf "\tUnable to remove boost libraries at this time. 0\n"
printf "\tExiting now.\n\n"
exit 1;
fi
else
sudo rm -rf "${BOOST_ROOT}/include/boost"
if [ $? -ne 0 ]; then
printf "\tUnable to remove boost libraries at this time. 1\n"
printf "\tExiting now.\n\n"
exit;
fi
sudo rm -rf "${BOOST_ROOT}/lib/libboost*"
if [ $? -ne 0 ]; then
printf "\tUnable to remove boost libraries at this time. 2\n"
printf "\tExiting now.\n\n"
exit;
fi
fi
break;;
[Nn]* ) echo "User cancalled installation of Boost libraries, Exiting now."; exit;;
* ) echo "Please type 1 for yes or 2 for no.";;
esac
done
fi
printf "\tInstalling boost libraries.\n"
cd ${TEMP_DIR}
STATUS=$(curl -LO -w '%{http_code}' --connect-timeout 30 https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.bz2)
if [ "${STATUS}" -ne 200 ]; then
printf "\tUnable to download Boost libraries at this time.\n"
printf "\tExiting now.\n\n"
exit;
fi
tar xf ${TEMP_DIR}/boost_1_66_0.tar.bz2
rm -f ${TEMP_DIR}/boost_1_66_0.tar.bz2
cd ${TEMP_DIR}/boost_1_66_0/
./bootstrap.sh "--prefix=$BOOST_ROOT"
if [ $? -ne 0 ]; then
printf "\n\tInstallation of boost libraries failed. 0\n"
printf "\n\tExiting now.\n"
exit 1
fi
./b2 install
if [ $? -ne 0 ]; then
printf "\n\tInstallation of boost libraries failed. 1\n"
printf "\n\tExiting now.\n"
exit 1
fi
rm -rf ${TEMP_DIR}/boost_1_66_0/
printf "\tBoost 1.66.0 successfully installed @ ${BOOST_ROOT}.\n"
else
printf "\tBoost 1.66.0 found at ${BOOST_ROOT}.\n"
fi
printf "\n\tChecking MongoDB C++ driver installation.\n"
if [ ! -e /usr/local/lib/libmongocxx-static.a ]; then
cd ${TEMP_DIR}
......
......@@ -4,7 +4,6 @@ OpenSSL,-f,/usr/local/opt/openssl/lib/libssl.a,openssl,https://www.openssl.org/s
llvm,-x,/usr/local/opt/llvm@4/bin/clang-4.0,llvm@4,http://releases.llvm.org/5.0.1/llvm-5.0.1.src.tar.xz
wget,-x,/usr/local/bin/wget,wget,https://ftp.gnu.org/gnu/wget/wget-1.19.2.tar.gz
CMake,-x,/usr/local/bin/cmake,cmake,https://cmake.org/files/v3.10/cmake-3.10.1-Darwin-x86_64.tar.gz
Boost,-f,/usr/local/opt/boost/include/boost/version.hpp,boost,https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz
GMP,-f,/usr/local/opt/gmp/include/gmpxx.h,gmp,https://ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.bz2
gettext,-x,/usr/local/opt/gettext/bin/gettext,gettext,https://ftp.gnu.org/pub/gnu/gettext/gettext-latest.tar.gz
MongoDB,-x,/usr/local/opt/mongodb/bin/mongod,mongodb,https://fastdl.mongodb.org/osx/mongodb-osx-ssl-x86_64-3.6.3.tgz
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册