#!/bin/bash set -e set -o xtrace export DEBIAN_FRONTEND=noninteractive CROSS_ARCHITECTURES="i386 ppc64el s390x" for arch in $CROSS_ARCHITECTURES; do dpkg --add-architecture $arch done apt-get install -y \ ca-certificates \ gnupg \ unzip \ wget # Upstream LLVM package repository apt-key add .gitlab-ci/container/llvm-snapshot.gpg.key echo "deb https://apt.llvm.org/buster/ llvm-toolchain-buster-9 main" >/etc/apt/sources.list.d/llvm9.list # Upstream Wine (WineHQ) package repository. We use the OBS service # instead of the repository at the winehq.org domain because: # # " The WineHQ packages for Debian 10 and later require libfaudio0 # as a dependency. Since the distro does not provide it for Debian # 10, users of that version can download libfaudio0 packages from # the OBS. See https://forum.winehq.org/viewtopic.php?f=8&t=32192 # for details." # # As explained at https://wiki.winehq.org/Debian apt-key add .gitlab-ci/container/obs-emulators-wine-debian.gpg.key echo 'deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Debian_10/ ./' >/etc/apt/sources.list.d/obs-emulators-wine-debian.list sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list echo 'deb https://deb.debian.org/debian buster-backports main' >/etc/apt/sources.list.d/backports.list apt-get update apt-get dist-upgrade -y apt-get install -y --no-remove \ autoconf \ automake \ autotools-dev \ bison \ ccache \ clang-9 \ cmake \ flex \ g++ \ gcc \ gettext \ git \ libclang-6.0-dev \ libclang-7-dev \ libclang-8-dev \ libclang-9-dev \ libclc-dev \ libelf-dev \ libepoxy-dev \ libexpat1-dev \ libgbm-dev \ libgtk-3-dev \ libomxil-bellagio-dev \ libpciaccess-dev \ libtool \ libunwind-dev \ libva-dev \ libvdpau-dev \ libvulkan-dev \ libvulkan-dev:ppc64el \ libx11-dev \ libx11-xcb-dev \ libxdamage-dev \ libxext-dev \ libxml2-utils \ libxrandr-dev \ libxrender-dev \ libxshmfence-dev \ libxvmc-dev \ libxxf86vm-dev \ llvm-6.0-dev \ llvm-7-dev \ llvm-9-dev \ meson \ pkg-config \ python-mako \ python3-mako \ python3-pil \ python3-requests \ qemu-user \ scons \ x11proto-dri2-dev \ x11proto-gl-dev \ x11proto-randr-dev \ xz-utils \ zlib1g-dev . .gitlab-ci/container/container_pre_build.sh # Cross-build Mesa deps for arch in $CROSS_ARCHITECTURES; do apt-get install -y --no-remove \ crossbuild-essential-${arch} \ libdrm-dev:${arch} \ libelf-dev:${arch} \ libexpat1-dev:${arch} \ libffi-dev:${arch} \ libllvm8:${arch} \ libstdc++6:${arch} \ libtinfo-dev:${arch} if [ "$arch" == "i386" ]; then # libpciaccess-dev is only needed for Intel. apt-get install -y --no-remove \ libpciaccess-dev:${arch} fi mkdir /var/cache/apt/archives/${arch} # Download llvm-* packages, but don't install them yet, since they can # only be installed for one architecture at a time apt-get install -o Dir::Cache::archives=/var/cache/apt/archives/$arch --download-only -y --no-remove \ llvm-8-dev:${arch} done apt-get install -y --no-remove \ llvm-8-dev \ # for 64bit windows cross-builds apt-get install -y --no-remove \ libz-mingw-w64-dev \ mingw-w64 \ winehq-stable # 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 <