anv: Add HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED in vk_format
[mesa.git] / .gitlab-ci / debian-install.sh
1 #!/bin/bash
2
3 set -e
4 set -o xtrace
5
6 export DEBIAN_FRONTEND=noninteractive
7
8 apt-get install -y \
9 apt-transport-https \
10 ca-certificates \
11 curl \
12 wget \
13 unzip \
14 gnupg \
15 software-properties-common
16
17 curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
18 add-apt-repository "deb https://apt.llvm.org/stretch/ llvm-toolchain-stretch-7 main"
19 add-apt-repository "deb https://apt.llvm.org/stretch/ llvm-toolchain-stretch-8 main"
20
21 sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
22 echo 'deb https://deb.debian.org/debian stretch-backports main' >/etc/apt/sources.list.d/backports.list
23 echo 'deb https://deb.debian.org/debian jessie main' >/etc/apt/sources.list.d/jessie.list
24
25 apt-get update
26 apt-get install -y -t stretch-backports \
27 llvm-3.4-dev \
28 llvm-3.9-dev \
29 libclang-3.9-dev \
30 llvm-4.0-dev \
31 libclang-4.0-dev \
32 llvm-5.0-dev \
33 libclang-5.0-dev \
34 llvm-6.0-dev \
35 libclang-6.0-dev \
36 llvm-7-dev \
37 libclang-7-dev \
38 llvm-8-dev \
39 libclang-8-dev \
40 g++ \
41 clang-8
42
43 # Install remaining packages from Debian buster to get newer versions
44 add-apt-repository "deb https://deb.debian.org/debian/ buster main"
45 add-apt-repository "deb https://deb.debian.org/debian/ buster-updates main"
46 apt-get update
47 apt-get install -y \
48 bzip2 \
49 zlib1g-dev \
50 pkg-config \
51 libxrender-dev \
52 libxdamage-dev \
53 libxxf86vm-dev \
54 gcc \
55 libclc-dev \
56 libxvmc-dev \
57 libomxil-bellagio-dev \
58 xz-utils \
59 libexpat1-dev \
60 libx11-xcb-dev \
61 libelf-dev \
62 libunwind-dev \
63 libglvnd-dev \
64 python-mako \
65 python3-mako \
66 meson \
67 scons
68
69 # autotools build deps
70 apt-get install -y \
71 automake \
72 libtool \
73 bison \
74 flex \
75 gettext \
76 make
77
78 # for 64bit windows cross-builds
79 apt-get install -y mingw-w64
80
81 # for the vulkan overlay layer
82 wget https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-linux-Release.zip
83 unzip glslang-master-linux-Release.zip bin/glslangValidator
84 install -m755 bin/glslangValidator /usr/local/bin/
85 rm bin/glslangValidator glslang-master-linux-Release.zip
86
87
88 # dependencies where we want a specific version
89 export XORG_RELEASES=https://xorg.freedesktop.org/releases/individual
90 export XCB_RELEASES=https://xcb.freedesktop.org/dist
91 export WAYLAND_RELEASES=https://wayland.freedesktop.org/releases
92
93 export XORGMACROS_VERSION=util-macros-1.19.0
94 export GLPROTO_VERSION=glproto-1.4.17
95 export DRI2PROTO_VERSION=dri2proto-2.8
96 export LIBPCIACCESS_VERSION=libpciaccess-0.13.4
97 export LIBDRM_VERSION=libdrm-2.4.97
98 export XCBPROTO_VERSION=xcb-proto-1.13
99 export RANDRPROTO_VERSION=randrproto-1.3.0
100 export LIBXRANDR_VERSION=libXrandr-1.3.0
101 export LIBXCB_VERSION=libxcb-1.13
102 export LIBXSHMFENCE_VERSION=libxshmfence-1.3
103 export LIBVDPAU_VERSION=libvdpau-1.1
104 export LIBVA_VERSION=libva-1.7.0
105 export LIBWAYLAND_VERSION=wayland-1.15.0
106 export WAYLAND_PROTOCOLS_VERSION=wayland-protocols-1.8
107
108 wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
109 tar -xvf $XORGMACROS_VERSION.tar.bz2 && rm $XORGMACROS_VERSION.tar.bz2
110 cd $XORGMACROS_VERSION; ./configure; make install; cd ..
111 rm -rf $XORGMACROS_VERSION
112
113 wget $XORG_RELEASES/proto/$GLPROTO_VERSION.tar.bz2
114 tar -xvf $GLPROTO_VERSION.tar.bz2 && rm $GLPROTO_VERSION.tar.bz2
115 cd $GLPROTO_VERSION; ./configure; make install; cd ..
116 rm -rf $GLPROTO_VERSION
117
118 wget $XORG_RELEASES/proto/$DRI2PROTO_VERSION.tar.bz2
119 tar -xvf $DRI2PROTO_VERSION.tar.bz2 && rm $DRI2PROTO_VERSION.tar.bz2
120 cd $DRI2PROTO_VERSION; ./configure; make install; cd ..
121 rm -rf $DRI2PROTO_VERSION
122
123 wget $XCB_RELEASES/$XCBPROTO_VERSION.tar.bz2
124 tar -xvf $XCBPROTO_VERSION.tar.bz2 && rm $XCBPROTO_VERSION.tar.bz2
125 cd $XCBPROTO_VERSION; ./configure; make install; cd ..
126 rm -rf $XCBPROTO_VERSION
127
128 wget $XCB_RELEASES/$LIBXCB_VERSION.tar.bz2
129 tar -xvf $LIBXCB_VERSION.tar.bz2 && rm $LIBXCB_VERSION.tar.bz2
130 cd $LIBXCB_VERSION; ./configure; make install; cd ..
131 rm -rf $LIBXCB_VERSION
132
133 wget $XORG_RELEASES/lib/$LIBPCIACCESS_VERSION.tar.bz2
134 tar -xvf $LIBPCIACCESS_VERSION.tar.bz2 && rm $LIBPCIACCESS_VERSION.tar.bz2
135 cd $LIBPCIACCESS_VERSION; ./configure; make install; cd ..
136 rm -rf $LIBPCIACCESS_VERSION
137
138 wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2
139 tar -xvf $LIBDRM_VERSION.tar.bz2 && rm $LIBDRM_VERSION.tar.bz2
140 cd $LIBDRM_VERSION; ./configure --enable-vc4 --enable-freedreno --enable-etnaviv-experimental-api; make install; cd ..
141 rm -rf $LIBDRM_VERSION
142
143 wget $XORG_RELEASES/proto/$RANDRPROTO_VERSION.tar.bz2
144 tar -xvf $RANDRPROTO_VERSION.tar.bz2 && rm $RANDRPROTO_VERSION.tar.bz2
145 cd $RANDRPROTO_VERSION; ./configure; make install; cd ..
146 rm -rf $RANDRPROTO_VERSION
147
148 wget $XORG_RELEASES/lib/$LIBXRANDR_VERSION.tar.bz2
149 tar -xvf $LIBXRANDR_VERSION.tar.bz2 && rm $LIBXRANDR_VERSION.tar.bz2
150 cd $LIBXRANDR_VERSION; ./configure; make install; cd ..
151 rm -rf $LIBXRANDR_VERSION
152
153 wget $XORG_RELEASES/lib/$LIBXSHMFENCE_VERSION.tar.bz2
154 tar -xvf $LIBXSHMFENCE_VERSION.tar.bz2 && rm $LIBXSHMFENCE_VERSION.tar.bz2
155 cd $LIBXSHMFENCE_VERSION; ./configure; make install; cd ..
156 rm -rf $LIBXSHMFENCE_VERSION
157
158 wget https://people.freedesktop.org/~aplattner/vdpau/$LIBVDPAU_VERSION.tar.bz2
159 tar -xvf $LIBVDPAU_VERSION.tar.bz2 && rm $LIBVDPAU_VERSION.tar.bz2
160 cd $LIBVDPAU_VERSION; ./configure; make install; cd ..
161 rm -rf $LIBVDPAU_VERSION
162
163 wget https://www.freedesktop.org/software/vaapi/releases/libva/$LIBVA_VERSION.tar.bz2
164 tar -xvf $LIBVA_VERSION.tar.bz2 && rm $LIBVA_VERSION.tar.bz2
165 cd $LIBVA_VERSION; ./configure --disable-wayland --disable-dummy-driver; make install; cd ..
166 rm -rf $LIBVA_VERSION
167
168 wget $WAYLAND_RELEASES/$LIBWAYLAND_VERSION.tar.xz
169 tar -xvf $LIBWAYLAND_VERSION.tar.xz && rm $LIBWAYLAND_VERSION.tar.xz
170 cd $LIBWAYLAND_VERSION; ./configure --enable-libraries --without-host-scanner --disable-documentation --disable-dtd-validation; make install; cd ..
171 rm -rf $LIBWAYLAND_VERSION
172
173 wget $WAYLAND_RELEASES/$WAYLAND_PROTOCOLS_VERSION.tar.xz
174 tar -xvf $WAYLAND_PROTOCOLS_VERSION.tar.xz && rm $WAYLAND_PROTOCOLS_VERSION.tar.xz
175 cd $WAYLAND_PROTOCOLS_VERSION; ./configure; make install; cd ..
176 rm -rf $WAYLAND_PROTOCOLS_VERSION
177
178 # Use ccache to speed up builds
179 apt-get install -y ccache
180
181 # We need xmllint to validate the XML files in Mesa
182 apt-get install -y libxml2-utils
183
184 # Remove unused packages
185 apt-get purge -y \
186 automake \
187 libtool \
188 make \
189 curl \
190 unzip \
191 wget \
192 gnupg \
193 software-properties-common
194 apt-get autoremove -y --purge