mesa: add EXT_dsa glProgramUniform*EXT functions
[mesa.git] / .gitlab-ci / debian-install.sh
index 9b67f614e4a4d40aa06a19b99ca29b87016b4b5b..8a74b2877da5c391de4ad100be10fac2e8a0acb2 100644 (file)
@@ -11,30 +11,25 @@ for arch in $CROSS_ARCHITECTURES; do
 done
 
 apt-get install -y \
-      apt-transport-https \
       ca-certificates \
-      curl \
       wget \
-      unzip \
-      gnupg
-
-curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
-echo "deb [trusted=yes] https://apt.llvm.org/stretch/ llvm-toolchain-stretch-7 main" >/etc/apt/sources.list.d/llvm7.list
-echo "deb [trusted=yes] https://apt.llvm.org/stretch/ llvm-toolchain-stretch-8 main" >/etc/apt/sources.list.d/llvm8.list
+      unzip
 
 sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
-echo 'deb https://deb.debian.org/debian stretch-backports main' >/etc/apt/sources.list.d/backports.list
-echo 'deb https://deb.debian.org/debian jessie main' >/etc/apt/sources.list.d/jessie.list
+echo 'deb https://deb.debian.org/debian buster-backports main' >/etc/apt/sources.list.d/backports.list
 
 apt-get update
-apt-get install -y -t stretch-backports \
-      llvm-3.4-dev \
-      llvm-3.9-dev \
-      libclang-3.9-dev \
-      llvm-4.0-dev \
-      libclang-4.0-dev \
-      llvm-5.0-dev \
-      libclang-5.0-dev \
+
+# Use newer packages from backports by default
+cat >/etc/apt/preferences <<EOF
+Package: *
+Pin: release a=buster-backports
+Pin-Priority: 500
+EOF
+
+apt-get dist-upgrade -y
+
+apt-get install -y --no-remove \
       llvm-6.0-dev \
       libclang-6.0-dev \
       llvm-7-dev \
@@ -42,13 +37,7 @@ apt-get install -y -t stretch-backports \
       llvm-8-dev \
       libclang-8-dev \
       g++ \
-      clang-8
-
-# Install remaining packages from Debian buster to get newer versions
-echo "deb https://deb.debian.org/debian/ buster main" >/etc/apt/sources.list.d/buster.list
-echo "deb https://deb.debian.org/debian/ buster-updates main" >/etc/apt/sources.list.d/buster-updates.list
-apt-get update
-apt-get install -y \
+      clang-8 \
       git \
       bzip2 \
       zlib1g-dev \
@@ -85,23 +74,30 @@ apt-get install -y \
 
 # Cross-build Mesa deps
 for arch in $CROSS_ARCHITECTURES; do
-    apt-get install -y \
+    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 \
-        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 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
@@ -208,16 +204,18 @@ make
 popd
 
 # Use ccache to speed up builds
-apt-get install -y ccache
+apt-get install -y --no-remove ccache
 
 # We need xmllint to validate the XML files in Mesa
-apt-get install -y libxml2-utils
+apt-get install -y --no-remove libxml2-utils
 
 
 # Generate cross build files for Meson
 for arch in $CROSS_ARCHITECTURES; do
   cross_file="/cross_file-$arch.txt"
   /usr/share/meson/debcrossgen --arch "$arch" -o "$cross_file"
+  # 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"
   # Work around a bug in debcrossgen that should be fixed in the next release
   if [ "$arch" = "i386" ]; then
     sed -i "s|cpu_family = 'i686'|cpu_family = 'x86'|g" "$cross_file"
@@ -274,10 +272,8 @@ rm -rf /VK-GL-CTS
 ############### Uninstall the build software
 
 apt-get purge -y \
-      git \
-      curl \
+      wget \
       unzip \
-      gnupg \
       cmake \
       git \
       libgles2-mesa-dev \