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 \
46 for arch
in ${CROSS_ARCHITECTURES[@]}; do
47 cross_file
=/cross_file-
$arch.txt
49 # Cross-build libdrm deps
50 apt-get
install -y --no-remove \
52 libpciaccess-dev
:$arch \
53 crossbuild-essential-
$arch
55 # Generate cross build files for Meson
56 /usr
/share
/meson
/debcrossgen
--arch $arch -o $cross_file
58 # Work around a bug in debcrossgen that should be fixed in the next release
59 if [ $arch = i386
]; then
60 sed -i "s|cpu_family = 'i686'|cpu_family = 'x86'|g" $cross_file
65 # Test that the oldest Meson version we claim to support is still supported
66 pip3
install meson
==0.46