export DEBIAN_FRONTEND=noninteractive
-CROSS_ARCHITECTURES="armhf arm64 i386"
+CROSS_ARCHITECTURES="i386"
for arch in $CROSS_ARCHITECTURES; do
dpkg --add-architecture $arch
done
libx11-xcb-dev \
libelf-dev \
libunwind-dev \
- libglvnd-dev \
+ autoconf \
+ automake \
+ autotools-dev \
+ libtool \
+ libxext-dev \
+ libx11-dev \
+ x11proto-gl-dev \
libgtk-3-dev \
libpng-dev \
libgbm-dev \
libgles2-mesa-dev \
+ libvulkan-dev \
python-mako \
python3-mako \
bison \
apt-get install -y --no-remove \
libdrm-dev:${arch} \
libexpat1-dev:${arch} \
- linux-libc-dev:${arch}/stretch-backports \
- libelf-dev:${arch}
+ libelf-dev:${arch} \
+ crossbuild-essential-${arch}
done
-apt-get install -y --no-remove \
- g++/stretch \
- dpkg-dev \
- gcc-aarch64-linux-gnu \
- g++-aarch64-linux-gnu \
- gcc-arm-linux-gnueabihf \
- g++-arm-linux-gnueabihf \
- gcc-i686-linux-gnu \
- g++-i686-linux-gnu
# for 64bit windows cross-builds
-apt-get install -y --no-remove mingw-w64
+apt-get install -y --no-remove \
+ mingw-w64 \
+ libz-mingw-w64-dev \
+ wine \
+ wine32 \
+ wine64
+
+# Debian's pkg-config wrapers for mingw are broken, and there's no sign that
+# they're going to be fixed, so we'll just have to fix it ourselves
+# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930492
+cat >/usr/local/bin/x86_64-w64-mingw32-pkg-config <<EOF
+#!/bin/sh
+
+PKG_CONFIG_LIBDIR=/usr/x86_64-w64-mingw32/lib/pkgconfig pkg-config \$@
+EOF
+chmod +x /usr/local/bin/x86_64-w64-mingw32-pkg-config
# for the vulkan overlay layer
wget https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-linux-Release.zip
export GLPROTO_VERSION=glproto-1.4.17
export DRI2PROTO_VERSION=dri2proto-2.8
export LIBPCIACCESS_VERSION=libpciaccess-0.13.4
-export LIBDRM_VERSION=libdrm-2.4.99
+export LIBDRM_VERSION=libdrm-2.4.100
export XCBPROTO_VERSION=xcb-proto-1.13
export RANDRPROTO_VERSION=randrproto-1.5.0
export LIBXRANDR_VERSION=libXrandr-1.5.0
cd $WAYLAND_PROTOCOLS_VERSION; ./configure; make install; cd ..
rm -rf $WAYLAND_PROTOCOLS_VERSION
+
+# The version of libglvnd-dev in debian is too old
+# Check this page to see when this local compilation can be dropped in favour of the package:
+# https://packages.debian.org/libglvnd-dev
+GLVND_VERSION=1.2.0
+wget https://gitlab.freedesktop.org/glvnd/libglvnd/-/archive/v$GLVND_VERSION/libglvnd-v$GLVND_VERSION.tar.gz
+tar -xvf libglvnd-v$GLVND_VERSION.tar.gz && rm libglvnd-v$GLVND_VERSION.tar.gz
+pushd libglvnd-v$GLVND_VERSION; ./autogen.sh; ./configure; make install; popd
+rm -rf libglvnd-v$GLVND_VERSION
+
+
pushd /usr/local
git clone https://gitlab.freedesktop.org/mesa/shader-db.git --depth 1
rm -rf shader-db/.git
for arch in $CROSS_ARCHITECTURES; do
cross_file="/cross_file-$arch.txt"
/usr/share/meson/debcrossgen --arch "$arch" -o "$cross_file"
- # Work around a bug in debcrossgen that should be fixed in the next release
+ # Explicitly set ccache path for cross compilers
+ sed -i "s|/usr/bin/\([^-]*\)-linux-gnu\([^-]*\)-g|/usr/lib/ccache/\\1-linux-gnu\\2-g|g" "$cross_file"
if [ "$arch" = "i386" ]; then
+ # Work around a bug in debcrossgen that should be fixed in the next release
sed -i "s|cpu_family = 'i686'|cpu_family = 'x86'|g" "$cross_file"
+ # Don't need wrapper for i386 executables
+ sed -i -e '/\[properties\]/a\' -e "needs_exe_wrapper = False" "$cross_file"
fi
done
unzip \
cmake \
git \
+ autoconf \
+ automake \
+ autotools-dev \
+ libtool \
+ x11proto-gl-dev \
libgles2-mesa-dev \
libgbm-dev