1#!/bin/bash 2 3set -e 4set -o xtrace 5 6export DEBIAN_FRONTEND=noninteractive 7 8# Ephemeral packages (installed for this script and removed again at the end) 9STABLE_EPHEMERAL=" \ 10 autoconf \ 11 automake \ 12 autotools-dev \ 13 bzip2 \ 14 cmake \ 15 libgbm-dev \ 16 libtool \ 17 python3-pip \ 18 " 19 20# We need multiarch for Wine 21dpkg --add-architecture i386 22apt-get update 23 24apt-get install -y --no-remove \ 25 $STABLE_EPHEMERAL \ 26 clang \ 27 libasan6 \ 28 libarchive-dev \ 29 libclang-cpp11-dev \ 30 libglvnd-dev \ 31 libllvmspirvlib-dev \ 32 liblua5.3-dev \ 33 libxcb-dri2-0-dev \ 34 libxcb-dri3-dev \ 35 libxcb-glx0-dev \ 36 libxcb-present-dev \ 37 libxcb-randr0-dev \ 38 libxcb-shm0-dev \ 39 libxcb-sync-dev \ 40 libxcb-xfixes0-dev \ 41 libxcb1-dev \ 42 libxml2-dev \ 43 llvm-11-dev \ 44 llvm-9-dev \ 45 ocl-icd-opencl-dev \ 46 procps \ 47 spirv-tools \ 48 strace \ 49 time \ 50 wine \ 51 wine32 52 53 54. .gitlab-ci/container/container_pre_build.sh 55 56 57# Debian's pkg-config wrapers for mingw are broken, and there's no sign that 58# they're going to be fixed, so we'll just have to fix it ourselves 59# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930492 60cat >/usr/local/bin/x86_64-w64-mingw32-pkg-config <<EOF 61#!/bin/sh 62 63PKG_CONFIG_LIBDIR=/usr/x86_64-w64-mingw32/lib/pkgconfig pkg-config \$@ 64EOF 65chmod +x /usr/local/bin/x86_64-w64-mingw32-pkg-config 66 67 68# dependencies where we want a specific version 69export XORG_RELEASES=https://xorg.freedesktop.org/releases/individual 70export WAYLAND_RELEASES=https://wayland.freedesktop.org/releases 71 72export XORGMACROS_VERSION=util-macros-1.19.0 73export LIBWAYLAND_VERSION=wayland-1.18.0 74 75wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2 76tar -xvf $XORGMACROS_VERSION.tar.bz2 && rm $XORGMACROS_VERSION.tar.bz2 77cd $XORGMACROS_VERSION; ./configure; make install; cd .. 78rm -rf $XORGMACROS_VERSION 79 80. .gitlab-ci/container/build-libdrm.sh 81 82wget $WAYLAND_RELEASES/$LIBWAYLAND_VERSION.tar.xz 83tar -xvf $LIBWAYLAND_VERSION.tar.xz && rm $LIBWAYLAND_VERSION.tar.xz 84cd $LIBWAYLAND_VERSION; ./configure --enable-libraries --without-host-scanner --disable-documentation --disable-dtd-validation; make install; cd .. 85rm -rf $LIBWAYLAND_VERSION 86 87 88pushd /usr/local 89git clone https://gitlab.freedesktop.org/mesa/shader-db.git --depth 1 90rm -rf shader-db/.git 91cd shader-db 92make 93popd 94 95git clone https://github.com/microsoft/DirectX-Headers -b v1.0.1 --depth 1 96pushd DirectX-Headers 97mkdir build 98cd build 99meson .. --backend=ninja --buildtype=release -Dbuild-test=false 100ninja 101ninja install 102popd 103rm -rf DirectX-Headers 104 105pip3 install git+https://git.lavasoftware.org/lava/lavacli@3db3ddc45e5358908bc6a17448059ea2340492b7 106 107############### Uninstall the build software 108 109apt-get purge -y \ 110 $STABLE_EPHEMERAL 111 112. .gitlab-ci/container/container_post_build.sh 113