
To support Android drivers, we're going to want to be tracking that Mesa's build succeeds on a real android toolchain. This still uses the android stubs since these libs aren't in the NDK. Note that I had to drop the Intel and AMD drivers currently: we don't have LLVM cross-compiled for Android in this container, and I'm honestly hoping ACO saves us from that. Intel has dependencies on libexpat, which AOSP really doesn't want to bring in, and it looks to me like those dependencies could be optional. Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6700>
39 lines
740 B
Bash
39 lines
740 B
Bash
#!/bin/sh
|
|
|
|
# Makes a .pc file in the Android NDK for meson to find its libraries.
|
|
|
|
set -ex
|
|
|
|
ndk="$1"
|
|
pc="$2"
|
|
cflags="$3"
|
|
libs="$4"
|
|
version="$5"
|
|
|
|
sysroot=$ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot
|
|
|
|
for arch in \
|
|
x86_64-linux-android \
|
|
i686-linux-android \
|
|
aarch64-linux-android \
|
|
arm-linux-androideabi; do
|
|
pcdir=$sysroot/usr/lib/$arch/pkgconfig
|
|
mkdir -p $pcdir
|
|
|
|
cat >$pcdir/$pc <<EOF
|
|
prefix=$sysroot
|
|
exec_prefix=$sysroot
|
|
libdir=$sysroot/usr/lib/$arch/29
|
|
sharedlibdir=$sysroot/usr/lib/$arch
|
|
includedir=$sysroot/usr/include
|
|
|
|
Name: zlib
|
|
Description: zlib compression library
|
|
Version: $version
|
|
|
|
Requires:
|
|
Libs: -L$sysroot/usr/lib/$arch/29 $libs
|
|
Cflags: -I$sysroot/usr/include $cflags
|
|
EOF
|
|
done
|