blob: 3fe9d46d96d2a06faa3bacd94b4525a0cc1fd557 (
plain)
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
|
#!/bin/sh -ex
#
# Copyright (c) 2018-2019 The strace developers.
# All rights reserved.
#
# SPDX-License-Identifier: GPL-2.0-or-later
j=-j`nproc` || j=
type sudo >/dev/null 2>&1 && sudo=sudo || sudo=
packages="
bison
bzip2
docbook5-xml
docbook-xsl-ns
flex
gettext
libaudit-dev
libdb-dev
libfl-dev
libselinux1-dev
libssl-dev
libxml2-utils
pkg-config
sed
w3m
xsltproc
xz-utils
$CC"
retry_if_failed()
{
for i in `seq 0 99`; do
"$@" && i= && break || sleep 1
done
[ -z "$i" ]
}
updated=
apt_get_install()
{
[ -n "$updated" ] || {
retry_if_failed $sudo apt-get -qq update
updated=1
}
retry_if_failed $sudo \
apt-get -qq --no-install-suggests --no-install-recommends \
install -y "$@"
}
case "${BUILD-}" in
meson)
python -m pip install meson ninja
;;
*)
packages="$packages autoconf automake autopoint libtool make"
;;
esac
case "$CC" in
gcc-*)
retry_if_failed \
$sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
;;
esac
case "$TARGET" in
x32|x86)
packages="$packages gcc-multilib"
case "$CC" in
gcc-*) packages="$packages $CC-multilib" ;;
esac
;;
esac
apt_get_install $packages
case "${CHECK-}" in
coverage)
apt_get_install lcov python-pip python-setuptools
retry_if_failed \
pip install --user codecov
;;
valgrind)
apt_get_install valgrind
;;
esac
|