android-ndk-10b.ebuild 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. DESCRIPTION="Open Handset Alliance's Android NDK (Native Dev Kit)"
  5. HOMEPAGE="http://developer.android.com/sdk/ndk/"
  6. SRC_URI="x86? ( target-32? ( https://dl.google.com/android/ndk/${PN}32-r${PV}-linux-x86.tar.bz2 )
  7. target-64? ( https://dl.google.com/android/ndk/${PN}64-r${PV}-linux-x86.tar.bz2 ) )
  8. amd64? ( target-32? ( https://dl.google.com/android/ndk/${PN}32-r${PV}-linux-x86_64.tar.bz2 )
  9. target-64? ( https://dl.google.com/android/ndk/${PN}64-r${PV}-linux-x86_64.tar.bz2 ) )"
  10. LICENSE="android"
  11. SLOT="0"
  12. KEYWORDS="~amd64 ~x86"
  13. IUSE="+target-32 target-64"
  14. RESTRICT="mirror strip installsources test"
  15. DEPEND=""
  16. RDEPEND=">=dev-util/android-sdk-update-manager-10
  17. >=sys-devel/make-3.81"
  18. S="${WORKDIR}/${PN}-r${PV}"
  19. ANDROID_NDK_DIR="opt/${PN}"
  20. QA_PREBUILT="*"
  21. PYTHON_UPDATER_IGNORE="1"
  22. src_configure() {
  23. :
  24. }
  25. src_compile() {
  26. :
  27. }
  28. src_install() {
  29. dodir "/${ANDROID_NDK_DIR}"
  30. cp -pPR * "${ED}/${ANDROID_NDK_DIR}" || die
  31. fowners -R root:android "/${ANDROID_NDK_DIR}"
  32. fperms 0775 "/${ANDROID_NDK_DIR}/"{,build,docs,platforms,samples}
  33. fperms 0775 "/${ANDROID_NDK_DIR}/"{sources,tests,toolchains}
  34. dodir "/${ANDROID_NDK_DIR}/out"
  35. fowners root:android "/${ANDROID_NDK_DIR}/out"
  36. fperms 3775 "/${ANDROID_NDK_DIR}/out"
  37. ANDROID_PREFIX="${EPREFIX}/${ANDROID_NDK_DIR}"
  38. ANDROID_PATH="${EPREFIX}/${ANDROID_NDK_DIR}"
  39. for i in toolchains/*/prebuilt/linux-*/bin
  40. do
  41. ANDROID_PATH="${ANDROID_PATH}:${ANDROID_PREFIX}/${i}"
  42. done
  43. printf '%s' \
  44. "PATH=\"${ANDROID_PATH}\"" \
  45. $'\n' \
  46. > "${T}/80${PN}" || die
  47. doenvd "${T}/80${PN}"
  48. echo "SEARCH_DIRS_MASK=\"${EPREFIX}/${ANDROID_NDK_DIR}\"" \
  49. > "${T}/80${PN}" || die
  50. insinto "/etc/revdep-rebuild"
  51. doins "${T}/80${PN}"
  52. }