OSDN Git Service

travis: Do our automake build tests with srcdir != builddir.
[android-x86/external-mesa.git] / .travis.yml
1 language: c
2
3 sudo: false
4 dist: trusty
5
6 cache:
7   apt: true
8   ccache: true
9
10 env:
11   global:
12     - XORG_RELEASES=http://xorg.freedesktop.org/releases/individual
13     - XCB_RELEASES=http://xcb.freedesktop.org/dist
14     - WAYLAND_RELEASES=http://wayland.freedesktop.org/releases
15     - XORGMACROS_VERSION=util-macros-1.19.0
16     - GLPROTO_VERSION=glproto-1.4.17
17     - DRI2PROTO_VERSION=dri2proto-2.8
18     - LIBPCIACCESS_VERSION=libpciaccess-0.13.4
19     - LIBDRM_VERSION=libdrm-2.4.74
20     - XCBPROTO_VERSION=xcb-proto-1.13
21     - LIBXCB_VERSION=libxcb-1.13
22     - LIBXSHMFENCE_VERSION=libxshmfence-1.2
23     - LIBVDPAU_VERSION=libvdpau-1.1
24     - LIBVA_VERSION=libva-1.7.0
25     - LIBWAYLAND_VERSION=wayland-1.15.0
26     - WAYLAND_PROTOCOLS_VERSION=wayland-protocols-1.8
27     - PKG_CONFIG_PATH=$HOME/prefix/lib/pkgconfig:$HOME/prefix/share/pkgconfig
28     - LD_LIBRARY_PATH="$HOME/prefix/lib:$LD_LIBRARY_PATH"
29     - PATH="$HOME/prefix/bin:$PATH"
30
31 matrix:
32   include:
33     - env:
34         - LABEL="meson Vulkan"
35         - BUILD=meson
36         - MESON_OPTIONS="-Ddri-drivers=[] -Dgallium-drivers=[]"
37         - LLVM_VERSION=5.0
38         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
39       addons:
40         apt:
41           sources:
42             - llvm-toolchain-trusty-5.0
43           packages:
44             # LLVM packaging is broken and misses these dependencies
45             - libedit-dev
46             # From sources above
47             - llvm-5.0-dev
48             # Common
49             - xz-utils
50             - libexpat1-dev
51             - libelf-dev
52             - python3-pip
53     - env:
54         - LABEL="meson loaders/classic DRI"
55         - BUILD=meson
56         - MESON_OPTIONS="-Dvulkan-drivers=[] -Dgallium-drivers=[]"
57       addons:
58         apt:
59           packages:
60             - xz-utils
61             - x11proto-xf86vidmode-dev
62             - libexpat1-dev
63             - libx11-xcb-dev
64             - libxdamage-dev
65             - libxfixes-dev
66             - python3-pip
67     - env:
68         - LABEL="make loaders/classic DRI"
69         - BUILD=make
70         - MAKEFLAGS="-j4"
71         - MAKE_CHECK_COMMAND="make check"
72         - DRI_LOADERS="--enable-glx --enable-gbm --enable-egl --with-platforms=x11,drm,surfaceless,wayland --enable-osmesa"
73         - DRI_DRIVERS="i915,i965,radeon,r200,swrast,nouveau"
74         - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
75         - GALLIUM_DRIVERS=""
76         - VULKAN_DRIVERS=""
77         - LIBUNWIND_FLAGS="--disable-libunwind"
78       addons:
79         apt:
80           packages:
81             - xz-utils
82             - x11proto-xf86vidmode-dev
83             - libexpat1-dev
84             - libx11-xcb-dev
85             - libxdamage-dev
86             - libxfixes-dev
87     - env:
88         # NOTE: Building SWR is 2x (yes two) times slower than all the other
89         # gallium drivers combined.
90         # Start this early so that it doesn't hunder the run time.
91         - LABEL="make Gallium Drivers SWR"
92         - BUILD=make
93         - MAKEFLAGS="-j4"
94         - MAKE_CHECK_COMMAND="true"
95         - LLVM_VERSION=4.0
96         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
97         - OVERRIDE_CC="gcc-4.8"
98         - OVERRIDE_CXX="g++-4.8"
99         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
100         - DRI_DRIVERS=""
101         - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
102         - GALLIUM_DRIVERS="swr"
103         - VULKAN_DRIVERS=""
104         - LIBUNWIND_FLAGS="--enable-libunwind"
105       addons:
106         apt:
107           sources:
108             - llvm-toolchain-trusty-4.0
109           packages:
110             # LLVM packaging is broken and misses these dependencies
111             - libedit-dev
112             # From sources above
113             - llvm-4.0-dev
114             # Common
115             - xz-utils
116             - x11proto-xf86vidmode-dev
117             - libexpat1-dev
118             - libx11-xcb-dev
119             - libelf-dev
120             - libunwind8-dev
121     - env:
122         - LABEL="make Gallium Drivers RadeonSI"
123         - BUILD=make
124         - MAKEFLAGS="-j4"
125         - MAKE_CHECK_COMMAND="true"
126         - LLVM_VERSION=5.0
127         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
128         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
129         - DRI_DRIVERS=""
130         - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
131         - GALLIUM_DRIVERS="radeonsi"
132         - VULKAN_DRIVERS=""
133         - LIBUNWIND_FLAGS="--enable-libunwind"
134       addons:
135         apt:
136           sources:
137             - llvm-toolchain-trusty-5.0
138           packages:
139             # LLVM packaging is broken and misses these dependencies
140             - libedit-dev
141             # From sources above
142             - llvm-5.0-dev
143             # Common
144             - xz-utils
145             - x11proto-xf86vidmode-dev
146             - libexpat1-dev
147             - libx11-xcb-dev
148             - libelf-dev
149             - libunwind8-dev
150     - env:
151         - LABEL="make Gallium Drivers Other"
152         - BUILD=make
153         - MAKEFLAGS="-j4"
154         - MAKE_CHECK_COMMAND="true"
155         - LLVM_VERSION=3.9
156         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
157         # New binutils linker is required for llvm-3.9
158         - OVERRIDE_PATH=/usr/lib/binutils-2.26/bin
159         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
160         - DRI_DRIVERS=""
161         - GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
162         - GALLIUM_DRIVERS="i915,nouveau,pl111,r300,r600,freedreno,svga,swrast,vc4,virgl,etnaviv,imx"
163         - VULKAN_DRIVERS=""
164         - LIBUNWIND_FLAGS="--enable-libunwind"
165       addons:
166         apt:
167           sources:
168             - llvm-toolchain-trusty-3.9
169           packages:
170             - binutils-2.26
171             # LLVM packaging is broken and misses these dependencies
172             - libedit-dev
173             # From sources above
174             - llvm-3.9-dev
175             # Common
176             - xz-utils
177             - x11proto-xf86vidmode-dev
178             - libexpat1-dev
179             - libx11-xcb-dev
180             - libelf-dev
181             - libunwind8-dev
182     - env:
183         # NOTE: Analogous to SWR above, building Clover is quite slow.
184         - LABEL="make Gallium ST Clover LLVM-3.9"
185         - BUILD=make
186         - MAKEFLAGS="-j4"
187         - MAKE_CHECK_COMMAND="true"
188         - LLVM_VERSION=3.9
189         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
190         - OVERRIDE_CC=gcc-4.7
191         - OVERRIDE_CXX=g++-4.7
192         # New binutils linker is required for llvm-3.9
193         - OVERRIDE_PATH=/usr/lib/binutils-2.26/bin
194         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
195         - DRI_DRIVERS=""
196         - GALLIUM_ST="--disable-dri --enable-opencl --enable-opencl-icd --enable-llvm --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
197         - GALLIUM_DRIVERS="r600"
198         - VULKAN_DRIVERS=""
199         - LIBUNWIND_FLAGS="--enable-libunwind"
200       addons:
201         apt:
202           sources:
203             - llvm-toolchain-trusty-3.9
204           packages:
205             - binutils-2.26
206             - libclc-dev
207             # LLVM packaging is broken and misses these dependencies
208             - libedit-dev
209             - g++-4.7
210             # From sources above
211             - llvm-3.9-dev
212             - clang-3.9
213             - libclang-3.9-dev
214             # Common
215             - xz-utils
216             - x11proto-xf86vidmode-dev
217             - libexpat1-dev
218             - libx11-xcb-dev
219             - libelf-dev
220             - libunwind8-dev
221     - env:
222         # NOTE: Analogous to SWR above, building Clover is quite slow.
223         - LABEL="make Gallium ST Clover LLVM-4.0"
224         - BUILD=make
225         - MAKEFLAGS="-j4"
226         - MAKE_CHECK_COMMAND="true"
227         - LLVM_VERSION=4.0
228         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
229         - OVERRIDE_CC=gcc-4.8
230         - OVERRIDE_CXX=g++-4.8
231         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
232         - DRI_DRIVERS=""
233         - GALLIUM_ST="--disable-dri --enable-opencl --enable-opencl-icd --enable-llvm --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
234         - GALLIUM_DRIVERS="r600"
235         - VULKAN_DRIVERS=""
236         - LIBUNWIND_FLAGS="--enable-libunwind"
237       addons:
238         apt:
239           sources:
240             - llvm-toolchain-trusty-4.0
241           packages:
242             - libclc-dev
243             # LLVM packaging is broken and misses these dependencies
244             - libedit-dev
245             - g++-4.8
246             # From sources above
247             - llvm-4.0-dev
248             - clang-4.0
249             - libclang-4.0-dev
250             # Common
251             - xz-utils
252             - x11proto-xf86vidmode-dev
253             - libexpat1-dev
254             - libx11-xcb-dev
255             - libelf-dev
256             - libunwind8-dev
257     - env:
258         # NOTE: Analogous to SWR above, building Clover is quite slow.
259         - LABEL="make Gallium ST Clover LLVM-5.0"
260         - BUILD=make
261         - MAKEFLAGS="-j4"
262         - MAKE_CHECK_COMMAND="true"
263         - LLVM_VERSION=5.0
264         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
265         - OVERRIDE_CC=gcc-4.8
266         - OVERRIDE_CXX=g++-4.8
267         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
268         - DRI_DRIVERS=""
269         - GALLIUM_ST="--disable-dri --enable-opencl --enable-opencl-icd --enable-llvm --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
270         - GALLIUM_DRIVERS="r600,radeonsi"
271         - VULKAN_DRIVERS=""
272         - LIBUNWIND_FLAGS="--enable-libunwind"
273       addons:
274         apt:
275           sources:
276             - llvm-toolchain-trusty-5.0
277           packages:
278             - libclc-dev
279             # LLVM packaging is broken and misses these dependencies
280             - libedit-dev
281             - g++-4.8
282             # From sources above
283             - llvm-5.0-dev
284             - clang-5.0
285             - libclang-5.0-dev
286             # Common
287             - xz-utils
288             - x11proto-xf86vidmode-dev
289             - libexpat1-dev
290             - libx11-xcb-dev
291             - libelf-dev
292             - libunwind8-dev
293     - env:
294         # NOTE: Analogous to SWR above, building Clover is quite slow.
295         - LABEL="make Gallium ST Clover LLVM-6.0"
296         - BUILD=make
297         - MAKEFLAGS="-j4"
298         - MAKE_CHECK_COMMAND="true"
299         - LLVM_VERSION=6.0
300         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
301         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
302         - DRI_DRIVERS=""
303         - GALLIUM_ST="--disable-dri --enable-opencl --enable-opencl-icd --enable-llvm --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
304         - GALLIUM_DRIVERS="r600,radeonsi"
305         - VULKAN_DRIVERS=""
306         - LIBUNWIND_FLAGS="--enable-libunwind"
307       addons:
308         apt:
309           sources:
310             - llvm-toolchain-trusty-6.0
311             # llvm-6 depends on gcc-4.9 which is not in main repo
312             - ubuntu-toolchain-r-test
313           packages:
314             - libclc-dev
315             # From sources above
316             - llvm-6.0-dev
317             - clang-6.0
318             - libclang-6.0-dev
319             # Common
320             - xz-utils
321             - x11proto-xf86vidmode-dev
322             - libexpat1-dev
323             - libx11-xcb-dev
324             - libelf-dev
325             - libunwind8-dev
326     - env:
327         - LABEL="make Gallium ST Other"
328         - BUILD=make
329         - MAKEFLAGS="-j4"
330         - MAKE_CHECK_COMMAND="true"
331         - LLVM_VERSION=3.3
332         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
333         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
334         - DRI_DRIVERS=""
335         - GALLIUM_ST="--enable-dri --disable-opencl --enable-xa --enable-nine --enable-xvmc --enable-vdpau --enable-va --enable-omx-bellagio --enable-gallium-osmesa"
336         # We need swrast for osmesa and nine.
337         # i915 most likely doesn't work with most ST.
338         # Regardless - we're doing a quick build test here.
339         - GALLIUM_DRIVERS="i915,swrast"
340         - VULKAN_DRIVERS=""
341         - LIBUNWIND_FLAGS="--enable-libunwind"
342       addons:
343         apt:
344           packages:
345             # We actually want to test against llvm-3.3
346             - llvm-3.3-dev
347             # Nine requires gcc 4.6... which is the one we have right ?
348             - libxvmc-dev
349             # Build locally, for now.
350             #- libvdpau-dev
351             #- libva-dev
352             - libomxil-bellagio-dev
353             # LLVM packaging is broken and misses these dependencies
354             - libedit-dev
355             # Common
356             - xz-utils
357             - x11proto-xf86vidmode-dev
358             - libexpat1-dev
359             - libx11-xcb-dev
360             - libelf-dev
361             - libunwind8-dev
362     - env:
363         - LABEL="make Vulkan"
364         - BUILD=make
365         - MAKEFLAGS="-j4"
366         - MAKE_CHECK_COMMAND="make -C src/gtest check && make -C src/intel check"
367         - LLVM_VERSION=5.0
368         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
369         - DRI_LOADERS="--disable-glx --disable-gbm --disable-egl --with-platforms=x11,wayland"
370         - DRI_DRIVERS=""
371         - GALLIUM_ST="--enable-dri --enable-dri3 --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
372         - GALLIUM_DRIVERS=""
373         - VULKAN_DRIVERS="intel,radeon"
374         - LIBUNWIND_FLAGS="--disable-libunwind"
375       addons:
376         apt:
377           sources:
378             - llvm-toolchain-trusty-5.0
379           packages:
380             # LLVM packaging is broken and misses these dependencies
381             - libedit-dev
382             # From sources above
383             - llvm-5.0-dev
384             # Common
385             - xz-utils
386             - x11proto-xf86vidmode-dev
387             - libexpat1-dev
388             - libx11-xcb-dev
389             - libelf-dev
390     - env:
391         - LABEL="scons"
392         - BUILD=scons
393         - SCONSFLAGS="-j4"
394         # Explicitly disable.
395         - SCONS_TARGET="llvm=0"
396         # Keep it symmetrical to the make build.
397         - SCONS_CHECK_COMMAND="scons llvm=0 check"
398       addons:
399         apt:
400           packages:
401             - scons
402             # Common
403             - xz-utils
404             - x11proto-xf86vidmode-dev
405             - libexpat1-dev
406             - libx11-xcb-dev
407             - libelf-dev
408     - env:
409         - LABEL="scons LLVM"
410         - BUILD=scons
411         - SCONSFLAGS="-j4"
412         - SCONS_TARGET="llvm=1"
413         # Keep it symmetrical to the make build.
414         - SCONS_CHECK_COMMAND="scons llvm=1 check"
415         - LLVM_VERSION=3.3
416         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
417       addons:
418         apt:
419           packages:
420             - scons
421             # LLVM packaging is broken and misses these dependencies
422             - libedit-dev
423             - llvm-3.3-dev
424             # Common
425             - xz-utils
426             - x11proto-xf86vidmode-dev
427             - libexpat1-dev
428             - libx11-xcb-dev
429             - libelf-dev
430     - env:
431         - LABEL="scons SWR"
432         - BUILD=scons
433         - SCONSFLAGS="-j4"
434         - SCONS_TARGET="swr=1"
435         - LLVM_VERSION=4.0
436         - LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
437         # Keep it symmetrical to the make build. There's no actual SWR, yet.
438         - SCONS_CHECK_COMMAND="true"
439         - OVERRIDE_CC="gcc-4.8"
440         - OVERRIDE_CXX="g++-4.8"
441       addons:
442         apt:
443           sources:
444             - llvm-toolchain-trusty-4.0
445           packages:
446             - scons
447             # LLVM packaging is broken and misses these dependencies
448             - libedit-dev
449             # From sources above
450             - llvm-4.0-dev
451             # Common
452             - xz-utils
453             - x11proto-xf86vidmode-dev
454             - libexpat1-dev
455             - libx11-xcb-dev
456             - libelf-dev
457     - env:
458         - LABEL="macOS make"
459         - BUILD=make
460         - MAKEFLAGS="-j4"
461         - MAKE_CHECK_COMMAND="make check"
462         - DRI_LOADERS="--with-platforms=x11 --disable-egl"
463       os: osx
464     - env:
465         - LABEL="macOS meson"
466         - BUILD=meson
467         - MESON_OPTIONS="-Degl=false"
468       os: osx
469
470 before_install:
471   - |
472     if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
473       HOMEBREW_NO_AUTO_UPDATE=1 brew install python3 ninja expat gettext
474       # Set PATH for homebrew pip3 installs
475       PATH="$HOME/Library/Python/3.6/bin:${PATH}"
476       # Set PKG_CONFIG_PATH for keg-only expat
477       PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:${PKG_CONFIG_PATH}"
478       # Set PATH for keg-only gettext
479       PATH="/usr/local/opt/gettext/bin:${PATH}"
480
481       # Install xquartz for prereqs ...
482       XQUARTZ_VERSION="2.7.11"
483       wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg
484       hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg
485       sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target /
486       hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION}
487       # ... and set paths
488       PATH="/opt/X11/bin:${PATH}"
489       PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}"
490       ACLOCAL="aclocal -I /opt/X11/share/aclocal -I /usr/local/share/aclocal"
491     fi
492
493 install:
494   - pip2 install --user mako
495
496   # Install a more modern meson from pip, since the version in the
497   # ubuntu repos is often quite old. Avoid >=0.45.0 as it needs python
498   # 3.5+
499   - if test "x$BUILD" = xmeson; then
500       pip3 install --user "meson<0.45.0";
501     fi
502
503   # Since libdrm gets updated in configure.ac regularly, try to pick up the
504   # latest version from there.
505   - for line in `grep "^LIBDRM.*_REQUIRED=" configure.ac`; do
506       old_ver=`echo $LIBDRM_VERSION | sed 's/libdrm-//'`;
507       new_ver=`echo $line | sed 's/.*REQUIRED=//'`;
508       if `echo "$old_ver,$new_ver" | tr ',' '\n' | sort -Vc 2> /dev/null`; then
509         export LIBDRM_VERSION="libdrm-$new_ver";
510       fi;
511     done
512
513   # Install dependencies where we require specific versions (or where
514   # disallowed by Travis CI's package whitelisting).
515
516   - |
517     if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
518       wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
519       tar -jxvf $XORGMACROS_VERSION.tar.bz2
520       (cd $XORGMACROS_VERSION && ./configure --prefix=$HOME/prefix && make install)
521
522       wget $XORG_RELEASES/proto/$GLPROTO_VERSION.tar.bz2
523       tar -jxvf $GLPROTO_VERSION.tar.bz2
524       (cd $GLPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
525
526       wget $XORG_RELEASES/proto/$DRI2PROTO_VERSION.tar.bz2
527       tar -jxvf $DRI2PROTO_VERSION.tar.bz2
528       (cd $DRI2PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
529
530       wget $XCB_RELEASES/$XCBPROTO_VERSION.tar.bz2
531       tar -jxvf $XCBPROTO_VERSION.tar.bz2
532       (cd $XCBPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
533
534       wget $XCB_RELEASES/$LIBXCB_VERSION.tar.bz2
535       tar -jxvf $LIBXCB_VERSION.tar.bz2
536       (cd $LIBXCB_VERSION && ./configure --prefix=$HOME/prefix && make install)
537
538       wget $XORG_RELEASES/lib/$LIBPCIACCESS_VERSION.tar.bz2
539       tar -jxvf $LIBPCIACCESS_VERSION.tar.bz2
540       (cd $LIBPCIACCESS_VERSION && ./configure --prefix=$HOME/prefix && make install)
541
542       wget http://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2
543       tar -jxvf $LIBDRM_VERSION.tar.bz2
544       (cd $LIBDRM_VERSION && ./configure --prefix=$HOME/prefix --enable-vc4 --enable-freedreno --enable-etnaviv-experimental-api && make install)
545
546       wget $XORG_RELEASES/lib/$LIBXSHMFENCE_VERSION.tar.bz2
547       tar -jxvf $LIBXSHMFENCE_VERSION.tar.bz2
548       (cd $LIBXSHMFENCE_VERSION && ./configure --prefix=$HOME/prefix && make install)
549
550       wget http://people.freedesktop.org/~aplattner/vdpau/$LIBVDPAU_VERSION.tar.bz2
551       tar -jxvf $LIBVDPAU_VERSION.tar.bz2
552       (cd $LIBVDPAU_VERSION && ./configure --prefix=$HOME/prefix && make install)
553
554       wget http://www.freedesktop.org/software/vaapi/releases/libva/$LIBVA_VERSION.tar.bz2
555       tar -jxvf $LIBVA_VERSION.tar.bz2
556       (cd $LIBVA_VERSION && ./configure --prefix=$HOME/prefix --disable-wayland --disable-dummy-driver && make install)
557
558       wget $WAYLAND_RELEASES/$LIBWAYLAND_VERSION.tar.xz
559       tar -axvf $LIBWAYLAND_VERSION.tar.xz
560       (cd $LIBWAYLAND_VERSION && ./configure --prefix=$HOME/prefix --enable-libraries --without-host-scanner --disable-documentation --disable-dtd-validation && make install)
561
562       wget $WAYLAND_RELEASES/$WAYLAND_PROTOCOLS_VERSION.tar.xz
563       tar -axvf $WAYLAND_PROTOCOLS_VERSION.tar.xz
564       (cd $WAYLAND_PROTOCOLS_VERSION && ./configure --prefix=$HOME/prefix && make install)
565
566       # Meson requires ninja >= 1.6, but trusty has 1.3.x
567       wget https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-linux.zip
568       unzip ninja-linux.zip
569       mv ninja $HOME/prefix/bin/
570
571       # Generate this header since one is missing on the Travis instance
572       mkdir -p linux
573       printf "%s\n" \
574            "#ifndef _LINUX_MEMFD_H" \
575            "#define _LINUX_MEMFD_H" \
576            "" \
577            "#define __NR_memfd_create 319" \
578            "#define SYS_memfd_create __NR_memfd_create" \
579            "" \
580            "#define MFD_CLOEXEC             0x0001U" \
581            "#define MFD_ALLOW_SEALING       0x0002U" \
582            "" \
583            "#endif /* _LINUX_MEMFD_H */" > linux/memfd.h
584     fi
585
586 script:
587   - if test "x$BUILD" = xmake; then
588       test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC";
589       test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX";
590       test -n "$OVERRIDE_PATH" && export PATH="$OVERRIDE_PATH:$PATH";
591
592       export CFLAGS="$CFLAGS -isystem`pwd`";
593
594       mkdir build &&
595       cd build &&
596       ../autogen.sh --enable-debug
597         $LIBUNWIND_FLAGS
598         $DRI_LOADERS
599         --with-dri-drivers=$DRI_DRIVERS
600         $GALLIUM_ST
601         --with-gallium-drivers=$GALLIUM_DRIVERS
602         --with-vulkan-drivers=$VULKAN_DRIVERS
603         --disable-llvm-shared-libs
604         &&
605       make && eval $MAKE_CHECK_COMMAND;
606     fi
607
608   - if test "x$BUILD" = xscons; then
609       test -n "$OVERRIDE_CC" && export CC="$OVERRIDE_CC";
610       test -n "$OVERRIDE_CXX" && export CXX="$OVERRIDE_CXX";
611       scons $SCONS_TARGET && eval $SCONS_CHECK_COMMAND;
612     fi
613
614   - |
615     if test "x$BUILD" = xmeson; then
616
617       # Travis CI has moved to LLVM 5.0, and meson is detecting
618       # automatically the available version in /usr/local/bin based on
619       # the PATH env variable order preference.
620       #
621       # As for 0.44.x, Meson cannot receive the path to the
622       # llvm-config binary as a configuration parameter. See
623       # https://github.com/mesonbuild/meson/issues/2887 and
624       # https://github.com/dcbaker/meson/commit/7c8b6ee3fa42f43c9ac7dcacc61a77eca3f1bcef
625       #
626       # We want to use the custom (APT) installed version. Therefore,
627       # let's make Meson find our wanted version sooner than the one
628       # at /usr/local/bin
629       #
630       # Once this is corrected, we would still need a patch similar
631       # to:
632       # https://lists.freedesktop.org/archives/mesa-dev/2017-December/180217.html
633       test -f /usr/bin/$LLVM_CONFIG && ln -s /usr/bin/$LLVM_CONFIG $HOME/prefix/bin/llvm-config
634
635       export CFLAGS="$CFLAGS -isystem`pwd`"
636       meson _build $MESON_OPTIONS
637       ninja -C _build
638     fi