-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeps_common.sh
executable file
·66 lines (60 loc) · 1.26 KB
/
deps_common.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
# Helpers used by deps_*.sh, meant to be sourced.
set -ex
BUILD_DIR="$(readlink -f "$(dirname "$0")")"
mkdir -p "$BUILD_DIR/deps"
cd "$BUILD_DIR/deps"
install_mstch() {
pushd .
if [[ ! -e "mstch" ]]; then
git clone https://github.com/no1msd/mstch
fi
cd mstch
cmake .
make
sudo make install
popd
}
install_zstd() {
pushd .
if [[ ! -e "zstd" ]]; then
git clone https://github.com/facebook/zstd
fi
cd zstd
make
sudo make install
popd
}
install_folly() {
pushd .
if [[ ! -e "folly" ]]; then
git clone https://github.com/facebook/folly
fi
cd folly/folly
FOLLY_VERSION="$(cat "$BUILD_DIR"/FOLLY_VERSION)" # on own line for set -e
git checkout "$FOLLY_VERSION"
# TODO: write folly dependency scripts for all supported platforms,
# instead of having the fbthrift scripts pre-install its dependencies.
if [[ -x "./build/deps_$1.sh" ]] ; then
"./build/deps_$1.sh"
fi
autoreconf -if
./configure
make
sudo make install
sudo ldconfig
popd
}
install_wangle() {
pushd .
if [[ ! -e "wangle" ]]; then
git clone https://github.com/facebook/wangle
fi
cd wangle/wangle
WANGLE_VERSION="$(cat "$BUILD_DIR"/WANGLE_VERSION)"
git checkout "$WANGLE_VERSION"
cmake .
make
sudo make install
popd
}