5 export DEBIAN_FRONTEND=noninteractive
7 CROSS_ARCHITECTURES=(i386 armhf arm64 ppc64el)
8 for arch in ${CROSS_ARCHITECTURES[@]}; do
9 dpkg --add-architecture $arch
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
20 # Use newer packages from backports by default
21 cat >/etc/apt/preferences <<EOF
23 Pin: release a=buster-backports
27 apt-get dist-upgrade -y
29 apt-get install -y --no-remove \
47 for arch in ${CROSS_ARCHITECTURES[@]}; do
48 cross_file=/cross_file-$arch.txt
50 # Cross-build libdrm deps
51 apt-get install -y --no-remove \
53 libpciaccess-dev:$arch \
54 crossbuild-essential-$arch
56 # Generate cross build files for Meson
57 /usr/share/meson/debcrossgen --arch $arch -o $cross_file
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
66 # Test that the oldest Meson version we claim to support is still supported
67 pip3 install meson==0.43