diff options
author | Kristian H. Kristensen <hoegsberg@google.com> | 2020-07-28 15:25:49 -0700 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2020-08-05 18:08:07 +0000 |
commit | 932f51d593418c95bf8f56ac9335d5f6c52c1285 (patch) | |
tree | 61ec827763ea1fc4563d8c58a4a09e4fa3b6072e /bin | |
parent | 5ae7098ebab1d15fa903d8888a1a73058e5976ff (diff) | |
download | mesa-932f51d593418c95bf8f56ac9335d5f6c52c1285.tar.gz mesa-932f51d593418c95bf8f56ac9335d5f6c52c1285.tar.bz2 mesa-932f51d593418c95bf8f56ac9335d5f6c52c1285.zip |
ci: Include enough Android headers to let us compile test EGL
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6112>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/update-android-headers.sh | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/bin/update-android-headers.sh b/bin/update-android-headers.sh new file mode 100755 index 00000000000..df5cf16a328 --- /dev/null +++ b/bin/update-android-headers.sh @@ -0,0 +1,53 @@ +#!/bin/sh + +set -eu + +if [ ! -e .git ]; then + echo must run from top-level directory; + exit 1 +fi + +if [ ! -d platform-hardware-libhardware ]; then + git clone --depth 1 https://android.googlesource.com/platform/hardware/libhardware platform-hardware-libhardware + git clone --depth 1 https://android.googlesource.com/platform/system/core platform-system-core + git clone --depth 1 https://android.googlesource.com/platform/frameworks/native platform-frameworks-native +fi + +dest=include/android_stub + +rm -rf ${dest} +mkdir ${dest} + + +# These directories contains mostly only the files we need, so copy wholesale + +cp -av platform-frameworks-native/libs/nativewindow/include/vndk \ + platform-system-core/libsync/include/sync \ + platform-system-core/libsync/include/ndk \ + platform-system-core/libbacktrace/include/backtrace \ + platform-system-core/libsystem/include/system \ + platform-system-core/liblog/include/log \ + platform-frameworks-native/libs/nativewindow/include/system \ + platform-frameworks-native/libs/nativebase/include/nativebase \ + ${dest} + + +# We only need a few files from these big directories so just copy those + +mkdir ${dest}/hardware +cp -av platform-hardware-libhardware/include/hardware/{hardware,gralloc,fb}.h ${dest}/hardware +cp -av platform-frameworks-native/vulkan/include/hardware/hwvulkan.h ${dest}/hardware + +mkdir ${dest}/cutils +cp -av platform-system-core/libcutils/include/cutils/{log,native_handle,properties}.h ${dest}/cutils + + +# include/android has files from a few different projects + +mkdir ${dest}/android +cp -av platform-frameworks-native/libs/nativewindow/include/android/* \ + platform-frameworks-native/libs/arect/include/android/* \ + platform-system-core/liblog/include/android/* \ + platform-system-core/libsync/include/android/* \ + ${dest}/android + |