blob: f441108f3381d49ec14157cda5fdff5289bc929c [file] [log] [blame]
Alexandros Frantzis803ab5d2020-01-08 17:46:46 +02001#!/bin/bash
2
3set -ex
4
Tomeu Vizoso43873af2020-03-06 10:09:58 +01005# Need an unreleased version of Waffle for surfaceless support in apitrace
6# Replace this build with the Debian package once that's possible
7
8WAFFLE_VERSION="e3c995d9a2693b687501715b6550619922346089"
9git clone https://gitlab.freedesktop.org/mesa/waffle.git --single-branch --no-checkout /waffle
10pushd /waffle
11git checkout "$WAFFLE_VERSION"
Rohan Garg7406d622020-01-28 15:19:53 +010012cmake -B_build -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release $EXTRA_CMAKE_ARGS .
13make -C _build install
14mkdir -p build/lib build/bin
15cp _build/lib/libwaffle-1.so build/lib/libwaffle-1.so.0
16cp _build/bin/wflinfo build/bin/wflinfo
17${STRIP_CMD:-strip} build/lib/* build/bin/*
18find . -not -path './build' -not -path './build/*' -delete
Tomeu Vizoso43873af2020-03-06 10:09:58 +010019popd
Tomeu Vizoso43873af2020-03-06 10:09:58 +010020
Alexandros Frantzis803ab5d2020-01-08 17:46:46 +020021APITRACE_VERSION="9.0"
22
23git clone https://github.com/apitrace/apitrace.git --single-branch --no-checkout /apitrace
24pushd /apitrace
25git checkout "$APITRACE_VERSION"
Eric Anholtd3b652f2020-08-13 14:21:50 -070026# Note: The cmake stuff for waffle in apitrace fails to use waffle's library
27# directory. Just force the issue here.
28env LDFLAGS="-L/usr/local/lib" \
29 cmake -G Ninja -B_build -H. -DCMAKE_BUILD_TYPE=Release -DENABLE_GUI=False -DENABLE_WAFFLE=on -DWaffle_DIR=/usr/local/lib/cmake/Waffle/ $EXTRA_CMAKE_ARGS
Eric Anholtc1e7e832020-02-11 15:44:56 -080030ninja -C _build
Alexandros Frantzis803ab5d2020-01-08 17:46:46 +020031mkdir build
32cp _build/apitrace build
Alexandros Frantzis803ab5d2020-01-08 17:46:46 +020033cp _build/eglretrace build
Rohan Garg7406d622020-01-28 15:19:53 +010034${STRIP_CMD:-strip} build/*
Alexandros Frantzis803ab5d2020-01-08 17:46:46 +020035find . -not -path './build' -not -path './build/*' -delete
36popd