Import android-ndk from AUR adding workaround for CMake
This commit is contained in:
parent
4df3c28051
commit
972390ac6e
|
@ -0,0 +1,38 @@
|
|||
# Maintainer: Chih-Hsuan Yen <yan12125@gmail.com>
|
||||
# Contributor: Alexander F Rødseth <xyproto@archlinux.org>
|
||||
# Contributor: Daniel Micay <danielmicay@gmail.com>
|
||||
# Contributor: frownlee <florez.brownlee@gmail.com>
|
||||
|
||||
pkgname=android-ndk
|
||||
pkgver=r19.b
|
||||
pkgrel=1
|
||||
pkgdesc='Android C/C++ developer kit'
|
||||
arch=('x86_64')
|
||||
url='https://developer.android.com/ndk/'
|
||||
license=('GPL' 'LGPL' 'custom')
|
||||
options=('!strip' 'staticlibs')
|
||||
backup=('etc/profile.d/android-ndk.sh')
|
||||
install="$pkgname.install"
|
||||
replaces=('android-ndk64')
|
||||
depends=('glibc')
|
||||
source=('android-ndk.sh')
|
||||
source_x86_64=("https://dl.google.com/android/repository/$pkgname-${pkgver/./}-linux-x86_64.zip")
|
||||
sha1sums=('2479a8d74428eb651ad2b9772ad655d7a90af410')
|
||||
sha1sums_x86_64=('16f62346ab47f7125a0e977dcc08f54881f8a3d7')
|
||||
|
||||
prepare() {
|
||||
# workaround issue with CMake's internal Android support
|
||||
for toolchain in "$pkgname-${pkgver/./}/build/core/toolchains"/*/setup.mk; do
|
||||
msg2 "Patching $toolchain for CMake"
|
||||
printf '\nTOOLCHAIN_ROOT := $(call get-toolchain-root,$(TOOLCHAIN_NAME)-4.9)\n' >> "$toolchain"
|
||||
done
|
||||
}
|
||||
|
||||
package() {
|
||||
install -Ddm755 "$pkgdir/opt"
|
||||
mv "$pkgname-${pkgver/./}" "$pkgdir/opt/$pkgname"
|
||||
|
||||
install -Dm755 android-ndk.sh "$pkgdir/etc/profile.d/android-ndk.sh"
|
||||
}
|
||||
|
||||
# vim: ts=2 sw=2 et:
|
|
@ -0,0 +1,6 @@
|
|||
post_install() {
|
||||
echo 'Source /etc/profile.d/android-ndk.sh or login again to add the'
|
||||
echo 'Android NDK tools to your path.'
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
|
@ -0,0 +1,4 @@
|
|||
export PATH="$PATH:/opt/android-ndk"
|
||||
export ANDROID_NDK=/opt/android-ndk
|
||||
# Some programs such as gradle ask this as well:
|
||||
export ANDROID_NDK_HOME=/opt/android-ndk
|
Loading…
Reference in New Issue