summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcryptogopher <github@michalczyk.pro>2017-04-23 17:52:22 +0200
committerZac Medico <zmedico@gentoo.org>2017-04-23 18:22:26 -0700
commita15118e530db51aa438f0c605eba297c5adda83b (patch)
tree818b67dfb82ee9e458a611c3bc04686473f6ce5f /dev-util/android-tools/android-tools-6.0.1_p79.ebuild
parentapp-text/calibre: patch older versions for bug 540596 (diff)
downloadgentoo-a15118e530db51aa438f0c605eba297c5adda83b.tar.gz
gentoo-a15118e530db51aa438f0c605eba297c5adda83b.tar.bz2
gentoo-a15118e530db51aa438f0c605eba297c5adda83b.zip
dev-util/android-tools: version bump 6.0.1_p79
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Diffstat (limited to 'dev-util/android-tools/android-tools-6.0.1_p79.ebuild')
-rw-r--r--dev-util/android-tools/android-tools-6.0.1_p79.ebuild72
1 files changed, 72 insertions, 0 deletions
diff --git a/dev-util/android-tools/android-tools-6.0.1_p79.ebuild b/dev-util/android-tools/android-tools-6.0.1_p79.ebuild
new file mode 100644
index 000000000000..61a84f5ea642
--- /dev/null
+++ b/dev-util/android-tools/android-tools-6.0.1_p79.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit bash-completion-r1 eutils toolchain-funcs
+
+MY_PV="${PV/_p/_r}"
+MY_P=${PN}-${MY_PV}
+
+DESCRIPTION="Android platform tools (adb, fastboot, and mkbootimg)"
+HOMEPAGE="https://android.googlesource.com/platform/system/core.git/"
+# Downloading git tarballs generated by android.googlesource.com
+# Archlinux package contains patches and build script generation mechanism.
+SRC_URI="https://git.archlinux.org/svntogit/community.git/snapshot/community-6a03c4736c9734f5ac3d6b5b912605690a6eaa5f.tar.gz -> ${MY_P}-arch.tar.gz
+https://github.com/android/platform_system_core/archive/android-${MY_PV}.tar.gz -> ${MY_P}-core.tar.gz
+mirror://gentoo/${MY_P}-extras.tar.gz
+mirror://gentoo/${MY_P}-libselinux.tar.gz
+mirror://gentoo/${MY_P}-f2fs-tools.tar.gz"
+
+# The entire source code is Apache-2.0, except for fastboot which is BSD-2.
+LICENSE="Apache-2.0 BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~arm-linux ~x86-linux"
+IUSE="libressl"
+
+RDEPEND="sys-libs/zlib:=
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ dev-libs/libpcre"
+# dev-lang/ruby is necessary for build script generation.
+DEPEND="${RDEPEND}
+ dev-lang/ruby:*"
+
+S=${WORKDIR}
+
+src_unpack() {
+ local dir filename
+ for filename in ${A}; do
+ if [[ ${filename} =~ ^${MY_P}-(.*)\.tar\.gz$ ]]; then
+ dir=${BASH_REMATCH[1]}
+ mkdir -p "${dir}" || die
+ pushd "${dir}" >/dev/null
+ unpack "${filename}"
+ popd > /dev/null
+ else
+ die "unrecognized file in \${A}: ${filename}"
+ fi
+ done
+}
+
+src_prepare() {
+ mv core/*/* core/ || die
+ epatch arch/*/trunk/fix_build.patch
+ cp arch/*/trunk/generate_build.rb ./ || die
+ default
+}
+
+src_compile() {
+ chmod +x ./generate_build.rb || die
+ ./generate_build.rb > build.sh || die
+ chmod +x build.sh || die
+ ./build.sh || die
+}
+
+src_install() {
+ dobin adb
+ dobin fastboot
+ dobin mkbootimg
+ # Omitting, app-shells/bash-completion contains completion for adb
+ #newbashcomp arch/*/trunk/bash_completion.adb adb
+ newbashcomp arch/*/trunk/bash_completion.fastboot fastboot
+}