6 export DEBIAN_FRONTEND
=noninteractive
8 CROSS_ARCHITECTURES
="i386 ppc64el s390x"
9 for arch
in $CROSS_ARCHITECTURES; do
10 dpkg
--add-architecture $arch
19 # Upstream LLVM package repository
20 apt-key add .gitlab-ci
/container
/llvm-snapshot.gpg.key
21 echo "deb https://apt.llvm.org/buster/ llvm-toolchain-buster-9 main" >/etc
/apt
/sources.list.d
/llvm9.list
23 sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc
/apt
/sources.list
24 echo 'deb https://deb.debian.org/debian buster-backports main' >/etc
/apt
/sources.list.d
/backports.list
25 echo 'deb https://deb.debian.org/debian testing main' >/etc
/apt
/sources.list.d
/testing.list
29 # Don't use newer packages from testing by default
30 cat >/etc
/apt
/preferences
<<EOF
32 Pin: release a=testing
36 apt-get dist-upgrade
-y
38 apt-get
install -y --no-remove \
59 libomxil-bellagio-dev \
61 libpciaccess-dev
:i386 \
67 libvulkan-dev
:ppc64el \
95 apt-get
install -y --no-remove -t buster-backports \
99 # Cross-build Mesa deps
100 for arch
in $CROSS_ARCHITECTURES; do
101 apt-get
install -y --no-remove \
102 crossbuild-essential-
${arch} \
104 libexpat1-dev
:${arch} \
109 apt-get
install -y --no-remove -t buster-backports \
112 mkdir
/var
/cache
/apt
/archives
/${arch}
113 # Download llvm-* packages, but don't install them yet, since they can
114 # only be installed for one architecture at a time
115 apt-get
install -o Dir
::Cache
::archives
=/var
/cache
/apt
/archives
/$arch --download-only \
116 -y --no-remove -t buster-backports \
120 apt-get
install -y --no-remove -t buster-backports \
124 # Install packages we need from Debian testing last, to avoid pulling in more
126 # Need to allow removing libgcc1 for these
127 apt-get
install -y -t testing \
132 apt-get
install -y --no-remove -t testing \
133 g
++-mingw-w64-x86-64-win32 \
137 . .gitlab-ci
/container
/container_pre_build.sh
140 # Debian's pkg-config wrapers for mingw are broken, and there's no sign that
141 # they're going to be fixed, so we'll just have to fix it ourselves
142 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930492
143 cat >/usr
/local
/bin
/x86_64-w64-mingw32-pkg-config
<<EOF
146 PKG_CONFIG_LIBDIR=/usr/x86_64-w64-mingw32/lib/pkgconfig pkg-config \$@
148 chmod +x
/usr
/local
/bin
/x86_64-w64-mingw32-pkg-config
151 # Generate cross build files for Meson
152 for arch
in $CROSS_ARCHITECTURES; do
153 . .gitlab-ci
/create-cross-file.sh
$arch
157 # for the vulkan overlay layer
158 wget https
://github.com
/KhronosGroup
/glslang
/releases
/download
/master-tot
/glslang-master-linux-Release.
zip
159 unzip glslang-master-linux-Release.
zip bin
/glslangValidator
160 install -m755 bin
/glslangValidator
/usr
/local
/bin
/
161 rm bin
/glslangValidator glslang-master-linux-Release.
zip
164 # dependencies where we want a specific version
165 export XORG_RELEASES
=https
://xorg.freedesktop.org
/releases
/individual
166 export XCB_RELEASES
=https
://xcb.freedesktop.org
/dist
167 export WAYLAND_RELEASES
=https
://wayland.freedesktop.org
/releases
169 export XORGMACROS_VERSION
=util-macros-1.19
.0
170 export LIBDRM_VERSION
=libdrm-2.4
.100
171 export XCBPROTO_VERSION
=xcb-proto-1.13
172 export LIBXCB_VERSION
=libxcb-1.13
173 export LIBWAYLAND_VERSION
=wayland-1.15
.0
174 export WAYLAND_PROTOCOLS_VERSION
=wayland-protocols-1.12
176 wget
$XORG_RELEASES/util
/$XORGMACROS_VERSION.
tar.bz2
177 tar -xvf $XORGMACROS_VERSION.
tar.bz2
&& rm $XORGMACROS_VERSION.
tar.bz2
178 cd $XORGMACROS_VERSION; .
/configure
; make install; cd ..
179 rm -rf $XORGMACROS_VERSION
181 wget
$XCB_RELEASES/$XCBPROTO_VERSION.
tar.bz2
182 tar -xvf $XCBPROTO_VERSION.
tar.bz2
&& rm $XCBPROTO_VERSION.
tar.bz2
183 cd $XCBPROTO_VERSION; .
/configure
; make install; cd ..
184 rm -rf $XCBPROTO_VERSION
186 wget
$XCB_RELEASES/$LIBXCB_VERSION.
tar.bz2
187 tar -xvf $LIBXCB_VERSION.
tar.bz2
&& rm $LIBXCB_VERSION.
tar.bz2
188 cd $LIBXCB_VERSION; .
/configure
; make install; cd ..
189 rm -rf $LIBXCB_VERSION
191 wget https
://dri.freedesktop.org
/libdrm
/$LIBDRM_VERSION.
tar.bz2
192 tar -xvf $LIBDRM_VERSION.
tar.bz2
&& rm $LIBDRM_VERSION.
tar.bz2
194 meson build
-D vc4
=true
-D freedreno
=true
-D etnaviv
=true
-D libdir
=lib
/x86_64-linux-gnu
; ninja
-C build
install
195 rm -rf build
; meson
--cross-file=/cross_file-ppc64el.txt build
-D libdir
=lib
/powerpc64le-linux-gnu
; ninja
-C build
install
196 rm -rf build
; meson
--cross-file=/cross_file-i386.txt build
-D libdir
=lib
/i386-linux-gnu
; ninja
-C build
install
198 rm -rf $LIBDRM_VERSION
200 wget
$WAYLAND_RELEASES/$LIBWAYLAND_VERSION.
tar.xz
201 tar -xvf $LIBWAYLAND_VERSION.
tar.xz
&& rm $LIBWAYLAND_VERSION.
tar.xz
202 cd $LIBWAYLAND_VERSION; .
/configure
--enable-libraries --without-host-scanner --disable-documentation --disable-dtd-validation; make install; cd ..
203 rm -rf $LIBWAYLAND_VERSION
205 wget
$WAYLAND_RELEASES/$WAYLAND_PROTOCOLS_VERSION.
tar.xz
206 tar -xvf $WAYLAND_PROTOCOLS_VERSION.
tar.xz
&& rm $WAYLAND_PROTOCOLS_VERSION.
tar.xz
207 cd $WAYLAND_PROTOCOLS_VERSION; .
/configure
; make install; cd ..
208 rm -rf $WAYLAND_PROTOCOLS_VERSION
211 # The version of libglvnd-dev in debian is too old
212 # Check this page to see when this local compilation can be dropped in favour of the package:
213 # https://packages.debian.org/libglvnd-dev
215 wget https
://gitlab.freedesktop.org
/glvnd
/libglvnd
/-/archive
/v
$GLVND_VERSION/libglvnd-v
$GLVND_VERSION.
tar.gz
216 tar -xvf libglvnd-v
$GLVND_VERSION.
tar.gz
&& rm libglvnd-v
$GLVND_VERSION.
tar.gz
217 pushd libglvnd-v
$GLVND_VERSION; .
/autogen.sh
; .
/configure
; make install; popd
218 rm -rf libglvnd-v
$GLVND_VERSION
222 git clone https
://gitlab.freedesktop.org
/mesa
/shader-db.git
--depth 1
223 rm -rf shader-db
/.git
229 ############### Uninstall the build software
243 . .gitlab-ci
/container
/container_post_build.sh