OSDN Git Service

drm mode : fix memory leak when freeing drmModePropertyPtr
[android-x86/external-libdrm.git] / .gitlab-ci / debian-install.sh
1 #!/usr/bin/env bash
2 set -o errexit
3 set -o xtrace
4
5 export DEBIAN_FRONTEND=noninteractive
6
7 CROSS_ARCHITECTURES=(i386 armhf arm64 ppc64el)
8 for arch in ${CROSS_ARCHITECTURES[@]}; do
9   dpkg --add-architecture $arch
10 done
11
12 apt-get install -y \
13   ca-certificates
14
15 sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
16 echo 'deb https://deb.debian.org/debian buster-backports main' >/etc/apt/sources.list.d/backports.list
17
18 apt-get update
19
20 # Use newer packages from backports by default
21 cat >/etc/apt/preferences <<EOF
22 Package: *
23 Pin: release a=buster-backports
24 Pin-Priority: 500
25 EOF
26
27 apt-get dist-upgrade -y
28
29 apt-get install -y --no-remove \
30   build-essential \
31   docbook-xsl \
32   libatomic-ops-dev \
33   libcairo2-dev \
34   libcunit1-dev \
35   libpciaccess-dev \
36   libxslt1-dev \
37   meson \
38   ninja-build \
39   pkg-config \
40   python3 \
41   python3-pip \
42   python3-wheel \
43   python3-setuptools \
44   valgrind \
45   xsltproc
46
47 for arch in ${CROSS_ARCHITECTURES[@]}; do
48   cross_file=/cross_file-$arch.txt
49
50   # Cross-build libdrm deps
51   apt-get install -y --no-remove \
52     libcairo2-dev:$arch \
53     libpciaccess-dev:$arch \
54     crossbuild-essential-$arch
55
56   # Generate cross build files for Meson
57   /usr/share/meson/debcrossgen --arch $arch -o $cross_file
58
59   # Work around a bug in debcrossgen that should be fixed in the next release
60   if [ $arch = i386 ]; then
61     sed -i "s|cpu_family = 'i686'|cpu_family = 'x86'|g" $cross_file
62   fi
63 done
64
65
66 # Test that the oldest Meson version we claim to support is still supported
67 pip3 install meson==0.43