Alexandros Frantzis | 803ab5d | 2020-01-08 17:46:46 +0200 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | set -ex |
| 4 | |
Tomeu Vizoso | 43873af | 2020-03-06 10:09:58 +0100 | [diff] [blame] | 5 | # Need an unreleased version of Waffle for surfaceless support in apitrace |
| 6 | # Replace this build with the Debian package once that's possible |
| 7 | |
| 8 | WAFFLE_VERSION="e3c995d9a2693b687501715b6550619922346089" |
| 9 | git clone https://gitlab.freedesktop.org/mesa/waffle.git --single-branch --no-checkout /waffle |
| 10 | pushd /waffle |
| 11 | git checkout "$WAFFLE_VERSION" |
Rohan Garg | 7406d62 | 2020-01-28 15:19:53 +0100 | [diff] [blame] | 12 | cmake -B_build -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release $EXTRA_CMAKE_ARGS . |
| 13 | make -C _build install |
| 14 | mkdir -p build/lib build/bin |
| 15 | cp _build/lib/libwaffle-1.so build/lib/libwaffle-1.so.0 |
| 16 | cp _build/bin/wflinfo build/bin/wflinfo |
| 17 | ${STRIP_CMD:-strip} build/lib/* build/bin/* |
| 18 | find . -not -path './build' -not -path './build/*' -delete |
Tomeu Vizoso | 43873af | 2020-03-06 10:09:58 +0100 | [diff] [blame] | 19 | popd |
Tomeu Vizoso | 43873af | 2020-03-06 10:09:58 +0100 | [diff] [blame] | 20 | |
Alexandros Frantzis | 803ab5d | 2020-01-08 17:46:46 +0200 | [diff] [blame] | 21 | APITRACE_VERSION="9.0" |
| 22 | |
| 23 | git clone https://github.com/apitrace/apitrace.git --single-branch --no-checkout /apitrace |
| 24 | pushd /apitrace |
| 25 | git checkout "$APITRACE_VERSION" |
Eric Anholt | d3b652f | 2020-08-13 14:21:50 -0700 | [diff] [blame] | 26 | # Note: The cmake stuff for waffle in apitrace fails to use waffle's library |
| 27 | # directory. Just force the issue here. |
| 28 | env 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 Anholt | c1e7e83 | 2020-02-11 15:44:56 -0800 | [diff] [blame] | 30 | ninja -C _build |
Alexandros Frantzis | 803ab5d | 2020-01-08 17:46:46 +0200 | [diff] [blame] | 31 | mkdir build |
| 32 | cp _build/apitrace build |
Alexandros Frantzis | 803ab5d | 2020-01-08 17:46:46 +0200 | [diff] [blame] | 33 | cp _build/eglretrace build |
Rohan Garg | 7406d62 | 2020-01-28 15:19:53 +0100 | [diff] [blame] | 34 | ${STRIP_CMD:-strip} build/* |
Alexandros Frantzis | 803ab5d | 2020-01-08 17:46:46 +0200 | [diff] [blame] | 35 | find . -not -path './build' -not -path './build/*' -delete |
| 36 | popd |