-
Notifications
You must be signed in to change notification settings - Fork 933
/
install_debian_deps.sh
executable file
·135 lines (119 loc) · 3.3 KB
/
install_debian_deps.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#!/bin/bash
set -euo pipefail
print_help() {
echo "usage: $0 [group]..."
echo
echo " available groups: "${!GROUPED_DEPS[@]}""
}
declare -rA GROUPED_DEPS=(
[gcc]="binutils gcc build-essential cmake ccache curl unzip git pkg-config mold"
[clang]="binutils clang make cmake ccache curl unzip git pkg-config mold"
[coverity]="binutils clang-12 make cmake ccache curl unzip git pkg-config"
[gcc_preprocess]="
binutils
build-essential
clang
cmake
curl
gcc
git
libclang-dev
ninja-build
python3-clang
python3-pip
unzip
"
# Common dependencies for building OpenMW.
[openmw-deps]="
libboost-program-options-dev
libboost-system-dev libboost-iostreams-dev
libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev
libsdl2-dev libqt5opengl5-dev qttools5-dev qttools5-dev-tools libopenal-dev
libunshield-dev libtinyxml-dev libbullet-dev liblz4-dev libpng-dev libjpeg-dev
libluajit-5.1-dev librecast-dev libsqlite3-dev ca-certificates libicu-dev
libyaml-cpp-dev libqt5svg5 libqt5svg5-dev
"
# These dependencies can alternatively be built and linked statically.
[openmw-deps-dynamic]="libmygui-dev libopenscenegraph-dev libsqlite3-dev libcollada-dom-dev"
[clang-tidy]="clang-tidy"
# Pre-requisites for building MyGUI and OSG for static linking.
#
# * MyGUI and OSG: libsdl2-dev liblz4-dev libfreetype6-dev
# * OSG: libgl-dev
#
# Plugins:
# * DAE: libcollada-dom-dev libboost-system-dev libboost-filesystem-dev
# * JPEG: libjpeg-dev
# * PNG: libpng-dev
[openmw-deps-static]="
libcollada-dom-dev libfreetype6-dev libjpeg-dev libpng-dev
libsdl2-dev libboost-system-dev libboost-filesystem-dev libgl-dev
"
[openmw-coverage]="gcovr"
[openmw-integration-tests]="
ca-certificates
gdb
git
git-lfs
libavcodec58
libavformat58
libavutil56
libboost-iostreams1.74.0
libboost-program-options1.74.0
libboost-system1.74.0
libbullet3.24
libcollada-dom2.5-dp0
libicu70
libjpeg8
libluajit-5.1-2
liblz4-1
libmyguiengine3debian1v5
libopenal1
libopenscenegraph161
libpng16-16
libqt5opengl5
librecast1
libsdl2-2.0-0
libsqlite3-0
libswresample3
libswscale5
libtinyxml2.6.2v5
libyaml-cpp0.8
python3-pip
xvfb
"
[libasan6]="libasan6"
[android]="binutils build-essential cmake ccache curl unzip git pkg-config"
[openmw-clang-format]="
clang-format-14
git-core
"
[openmw-qt-translations]="
qttools5-dev
qttools5-dev-tools
git-core
"
)
if [[ $# -eq 0 ]]; then
>&2 print_help
exit 1
fi
deps=()
for group in "$@"; do
if [[ ! -v GROUPED_DEPS[$group] ]]; then
>&2 echo "error: unknown group ${group}"
exit 1
fi
deps+=(${GROUPED_DEPS[$group]})
done
export APT_CACHE_DIR="${PWD}/apt-cache"
export DEBIAN_FRONTEND=noninteractive
set -x
mkdir -pv "$APT_CACHE_DIR"
apt-get update -yqq
apt-get -qq -o dir::cache::archives="$APT_CACHE_DIR" install -y --no-install-recommends software-properties-common gnupg >/dev/null
add-apt-repository -y ppa:openmw/openmw
add-apt-repository -y ppa:openmw/openmw-daily
add-apt-repository -y ppa:openmw/staging
apt-get -qq -o dir::cache::archives="$APT_CACHE_DIR" install -y --no-install-recommends "${deps[@]}" >/dev/null
apt list --installed