diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-07-22 10:17:30 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-07-22 10:17:30 +0000 |
commit | ca11beabae33eb59fb981b8adf50b1d47a2a98f0 (patch) | |
tree | 3e4691a396e6e54cd54224a190663d5cf976625b /lib/mesa/bin/update-android-headers.sh | |
parent | 27c8a50e8bbde7d28b1fc46d715a4c469e24f2c4 (diff) |
Import Mesa 21.1.5
Diffstat (limited to 'lib/mesa/bin/update-android-headers.sh')
-rwxr-xr-x | lib/mesa/bin/update-android-headers.sh | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/lib/mesa/bin/update-android-headers.sh b/lib/mesa/bin/update-android-headers.sh new file mode 100755 index 000000000..43473d8a2 --- /dev/null +++ b/lib/mesa/bin/update-android-headers.sh @@ -0,0 +1,54 @@ +#!/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/apex \ + 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,gralloc1,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 + |