-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Expand file tree
/
Copy pathosx-deps
More file actions
executable file
·65 lines (58 loc) · 1.93 KB
/
osx-deps
File metadata and controls
executable file
·65 lines (58 loc) · 1.93 KB
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
#!/bin/bash
set -euo pipefail
cache="$HOME"/.cache/matplotlib
fold_start() {
key=$1
title=$2
echo -e "travis_fold:start:$key\e[2K"
echo -e "travis_time:start:$key\e[2K"
tick="$(date +%s)"
echo "$title"
}
fold_end() {
key=$1
tock="$(date +%s)"
nano=000000000
echo -e "travis_time:end:$key:start=$tick$nano,finish=$tock$nano,duration=$((tock - tick))$nano\e[2K"
echo -e "travis_fold:end:$key\e[2K"
}
cached_download() {
file=$1
url=$2
shasum=$3
path="$cache/$file"
if [[ ! -f "$path"
|| "$(shasum -a 256 "$path" | awk '{print $1}')" != "$shasum" ]]
then
curl -L -o "$path" "$url"
fi
}
fold_start Python "Install Python 3.8 from python.org"
cached_download python-3.8.5-macosx10.9.pkg \
https://www.python.org/ftp/python/3.8.5/python-3.8.5-macosx10.9.pkg \
e27c5a510c10f830084fb9c60b9e9aa8719d92e4537a80e6b4252c02396f0d29
sudo installer -package "$cache"/python-3.8.5-macosx10.9.pkg -target /
sudo ln -s /usr/local/bin/python3 /usr/local/bin/python
hash -r
fold_end Python
fold_start ccache 'Install ccache (compile it ourselves)'
cached_download ccache-3.7.11.tar.xz \
https://github.com/ccache/ccache/releases/download/v3.7.11/ccache-3.7.11.tar.xz \
8d450208099a4d202bd7df87caaec81baee20ce9dd62da91e9ea7b95a9072f68
tar xf "$cache"/ccache-3.7.11.tar.xz
pushd ccache-3.7.11
./configure --prefix=/usr/local
make -j2
make install
popd
for compiler in clang clang++ cc gcc c++ g++; do
ln -sf ccache /usr/local/bin/$compiler
done
fold_end ccache
fold_start freetype 'Install freetype (just unpack into the build directory)'
cached_download freetype-2.6.1.tar.gz \
https://download.savannah.gnu.org/releases/freetype/freetype-2.6.1.tar.gz \
0a3c7dfbda6da1e8fce29232e8e96d987ababbbf71ebc8c75659e4132c367014
mkdir -p build
tar -x -C build -f "$cache"/freetype-2.6.1.tar.gz
fold_end freetype