vkd3d-shader/hlsl: Use a block in hlsl_normalize_binary_exprs().
[vkd3d.git] / gitlab / image.docker
blobc0257398807c1153a76eb417d1391bba9448ec54
1 # FROM line will be added dynamically
3 WORKDIR /tmp
5 # Package spirv-tools from Debian has two problems for us: first, it
6 # doesn't have shared libraries; second, it's not multiarch. So we
7 # have to rebuild it with some tweaks. In order to make it multiarch
8 # we also have to drop the executables, but we don't care about those
9 # anyway.
11 # Mesa requires Meson >= 1.1.0, which is not available on Debian bookworm.
12 # Fortunately that can be worked around by removing some features from
13 # meson.build, which are not needed for llvmpipe. Notice that we use
14 # "git show | patch -R" instead of "git revert" so we don't have to configure
15 # a valid email and user name for git.
17 RUN export DEBIAN_FRONTEND=noninteractive; \
18     echo 'path-exclude=/usr/share/doc/*' > /etc/dpkg/dpkg.cfg.d/99-exclude-cruft && \
19     echo 'path-exclude=/usr/share/locale/*' >> /etc/dpkg/dpkg.cfg.d/99-exclude-cruft && \
20     echo 'path-exclude=/usr/share/man/*' >> /etc/dpkg/dpkg.cfg.d/99-exclude-cruft && \
21     echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf && \
22     echo '#!/bin/sh' > /usr/sbin/policy-rc.d && \
23     echo 'exit 101' >> /usr/sbin/policy-rc.d && \
24     chmod +x /usr/sbin/policy-rc.d && \
25     dpkg --add-architecture i386 && \
26     sed -i -e 's|Types: deb|Types: deb deb-src|g' /etc/apt/sources.list.d/* && \
27     apt-get update && \
28     apt-get dist-upgrade -y && \
29     apt-get install -y build-essential pkg-config gcc-mingw-w64 crossbuild-essential-i386 \
30                        autoconf automake libtool flex bison curl \
31                        git ca-certificates rsync \
32                        llvm-15-dev meson ninja-build python3-mako \
33                        zlib1g-dev libexpat-dev libdrm-dev libglvnd-dev \
34                        doxygen doxygen-latex graphviz \
35                        mesa-vulkan-drivers mesa-vulkan-drivers:i386 \
36                        vulkan-tools spirv-headers \
37                        libegl-dev libegl-dev:i386 \
38                        libvulkan-dev libvulkan-dev:i386 \
39                        libncurses-dev libncurses-dev:i386 \
40                        libopengl-dev libopengl-dev:i386 \
41                        libxcb1-dev libxcb1-dev:i386 \
42                        libxcb-util-dev libxcb-util-dev:i386 \
43                        libxcb-icccm4-dev libxcb-icccm4-dev:i386 \
44                        libxcb-keysyms1-dev libxcb-keysyms1-dev:i386 && \
45     apt-get build-dep -y spirv-tools && \
46     apt-get build-dep -y -ai386 spirv-tools && \
48     git clone --depth 1 --branch wine-3.21 https://gitlab.winehq.org/wine/wine.git && \
49     cd wine && \
50     mkdir build && \
51     cd build && \
52     ../configure --enable-win64 --without-x --without-freetype && \
53     make tools/widl/widl && \
54     cp tools/widl/widl /usr/local/bin && \
55     cd ../.. && \
56     rm -rf wine && \
58     apt-get source spirv-tools && \
59     cd spirv-tools-* && \
60     sed -i -e 's|-DBUILD_SHARED_LIBS=OFF|-DBUILD_SHARED_LIBS=ON|g' debian/rules && \
61     sed -i -e 's|dh_install$|dh_install \&\& rm debian/spirv-tools/usr/bin/*|g' debian/rules && \
62     sed -i '/Architecture: any/a Multi-Arch: same' debian/control && \
63     dpkg-buildpackage -uc -us && \
64     cd .. && \
65     rm -f spirv-tools-dbgsym_*.deb && \
66     dpkg -i spirv-tools_*.deb && \
67     rm -fr * && \
69     apt-get source spirv-tools && \
70     cd spirv-tools-* && \
71     sed -i -e 's|-DBUILD_SHARED_LIBS=OFF|-DBUILD_SHARED_LIBS=ON|g' debian/rules && \
72     sed -i -e 's|dh_install$|dh_install \&\& rm debian/spirv-tools/usr/bin/*|g' debian/rules && \
73     sed -i '/Architecture: any/a Multi-Arch: same' debian/control && \
74     CONFIG_SITE=/etc/dpkg-cross/cross-config.amd64 DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -ai386 -Pcross,nocheck -uc -us && \
75     cd .. && \
76     rm -f spirv-tools-dbgsym_*.deb && \
77     dpkg -i spirv-tools_*.deb && \
78     rm -fr * && \
80     git clone --branch mesa-24.2.4 https://gitlab.freedesktop.org/mesa/mesa.git && \
81     cd mesa && \
82     git show 876db9135048 | patch -p1 -R && \
83     sed -i -e '981,991d' meson.build && \
84     mkdir build && \
85     cd build && \
86     meson setup --buildtype release -Dprefix=/opt/mesa24 -Dplatforms= -Dvideo-codecs= -Dvulkan-drivers=swrast -Dgallium-drivers=swrast -Dopengl=true -Degl=enabled -Dglvnd=true -Dshared-glapi=enabled -Dglx=disabled -Dgles1=disabled -Dgles2=disabled .. && \
87     meson install && \
88     cd ../.. && \
89     rm -fr mesa && \
91     apt-get clean && \
92     curl -L -s https://github.com/microsoft/DirectXShaderCompiler/releases/download/v1.8.2407/linux_dxc_2024_07_31.x86_64.tar.gz | tar zx -C /usr/local ./lib/libdxcompiler.so ./lib/libdxil.so && \
93     groupadd host-render -g 800 && \
94     useradd -m gitlab -G host-render
96 USER gitlab