diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
commit | e6918187568dbd01842d8d1d2c808ce16a894239 (patch) | |
tree | 64f88b554b444a49f656b6c656111a145cbbaa28 /src/boost/libs/beast/tools/install-dependencies.sh | |
parent | Initial commit. (diff) | |
download | ceph-upstream/18.2.2.tar.xz ceph-upstream/18.2.2.zip |
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/boost/libs/beast/tools/install-dependencies.sh')
-rwxr-xr-x | src/boost/libs/beast/tools/install-dependencies.sh | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/boost/libs/beast/tools/install-dependencies.sh b/src/boost/libs/beast/tools/install-dependencies.sh new file mode 100755 index 000000000..e865187ba --- /dev/null +++ b/src/boost/libs/beast/tools/install-dependencies.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash +# Exit if anything fails. +set -eux + +HERE=$PWD + +# Override gcc version to $GCC_VER. +# Put an appropriate symlink at the front of the path. +mkdir -pv $HOME/bin +for g in gcc g++ gcov gcc-ar gcc-nm gcc-ranlib +do + test -x $( type -p ${g}-$GCC_VER ) + ln -sv $(type -p ${g}-$GCC_VER) $HOME/bin/${g} +done + +if [[ -n ${CLANG_VER:-} ]]; then + # There are cases where the directory exists, but the exe is not available. + # Use this workaround for now. + if [[ ! -x llvm-${LLVM_VERSION}/bin/llvm-config ]] && [[ -d llvm-${LLVM_VERSION} ]]; then + rm -fr llvm-${LLVM_VERSION} + fi + if [[ ! -d llvm-${LLVM_VERSION} ]]; then + mkdir llvm-${LLVM_VERSION} + LLVM_URL="http://llvm.org/releases/${LLVM_VERSION}/clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-ubuntu-14.04.tar.xz" + wget -O - ${LLVM_URL} | tar -Jxvf - --strip 1 -C llvm-${LLVM_VERSION} + fi + llvm-${LLVM_VERSION}/bin/llvm-config --version; + export LLVM_CONFIG="llvm-${LLVM_VERSION}/bin/llvm-config"; +fi + +# NOTE, changed from PWD -> HOME +export PATH=$HOME/bin:$PATH + +# What versions are we ACTUALLY running? +if [ -x $HOME/bin/g++ ]; then + $HOME/bin/g++ -v +fi +if [ -x $HOME/bin/clang ]; then + $HOME/bin/clang -v +fi + +# Avoid `spurious errors` caused by ~/.npm permission issues +# Does it already exist? Who owns? What permissions? +ls -lah ~/.npm || mkdir ~/.npm + +# Make sure we own it +chown -Rc $USER ~/.npm |