-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-dependencies
executable file
·147 lines (134 loc) · 3.28 KB
/
install-dependencies
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
136
137
138
139
140
141
142
143
144
145
146
#!/bin/bash -e
# This script needs to be run with root rights.
if [ $UID -ne 0 ]; then
sudo $0
exit 0
fi
function printNotSupportedMessageAndExit() {
echo
echo "Currently this script only works for distributions supporting apt-get."
echo "Please add support for your distribution."
echo
exit 1
}
function checkInstaller {
# apt-get - Debian based distributions
apt-get --version &> /dev/null
if [ $? -eq 0 ]; then
installDependenciesWithApt
exit 0
fi
printNotSupportedMessageAndExit
}
# If the package $1 is available, prints it. Otherwise prints $2.
# Useful for handling when a package is renamed on new versions of Debian/Ubuntu.
function aptIfElse {
if apt-cache show $1 &>/dev/null; then
echo $1
else
echo $2
fi
}
function installDependenciesWithApt {
# These are dependencies necessary for building Qt and QtWebKit.
packages=" \
g++ \
binutils \
bubblewrap \
libc6-dev \
make \
cmake \
ninja-build \
bison \
flex \
gawk \
gperf \
perl \
python \
ruby \
libdbus-1-dev \
libevent-dev \
libfile-copy-recursive-perl \
$(aptIfElse libgcrypt20-dev libgcrypt11-dev) \
libgl1-mesa-dev \
libglu1-mesa-dev \
libhyphen-dev \
libjpeg-dev \
libopenjp2-7-dev \
libpng-dev \
libseccomp-dev \
libsqlite3-dev \
libtasn1-6-dev \
libwebp-dev \
libwoff-dev \
libx11-dev \
libx11-xcb-dev
libxcb-glx0-dev
libxcb1-dev \
libxcb-keysyms1-dev \
libxcb-image0-dev \
libxcb-shm0-dev \
libxcb-icccm4-dev \
libxcb-sync0-dev \
libxcb-xfixes0-dev \
libxcb-xinerama0-dev \
libxcb-shape0-dev \
libxcb-randr0-dev \
libxcb-render-util0-dev \
libxcomposite-dev \
libxext-dev \
libxfixes-dev \
libxrender-dev \
libxslt1-dev \
zlib1g-dev
"
# These are dependencies necessary for running tests.
packages="$packages \
apache2 \
curl \
fonts-liberation \
hyphen-en-us \
libapache2-mod-php \
libcgi-pm-perl \
libhttp-date-perl \
php-json \
python-psutil \
python-yaml \
ruby-json \
ruby-highline \
xvfb"
# These are dependencies necessary for update-qtwebkit-libs and jhbuild.
packages="$packages \
automake \
autopoint \
dwz \
git \
gettext \
patch \
libtool-bin \
libfaad-dev \
libfdk-aac-dev \
libmpg123-dev \
libopus-dev \
libtheora-dev \
libvorbis-dev \
libxml-libxml-perl \
"
# These are dependencies necessary for building GLib and GStreamer.
packages="$packages \
libpulse-dev \
"
if [ -n $BUILDING_DOCKER ]; then
# Additional stuff for Docker image
packages="$packages \
clang \
ccache \
gdb \
strace \
vim-tiny \
zstd \
"
fi
apt-get install -y --no-install-recommends $packages
}
checkInstaller