summaryrefslogtreecommitdiff
path: root/dev-util/android-tools
diff options
context:
space:
mode:
authorPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
committerPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
commitecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch)
treeb89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /dev-util/android-tools
parent1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff)
downloadbaldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip
Updating liguros repo
Diffstat (limited to 'dev-util/android-tools')
-rw-r--r--dev-util/android-tools/Manifest26
-rw-r--r--dev-util/android-tools/android-tools-5.1.1_p13.ebuild65
-rw-r--r--dev-util/android-tools/android-tools-6.0.1_p79.ebuild87
-rw-r--r--dev-util/android-tools/android-tools-8.1.0_p1.ebuild125
-rw-r--r--dev-util/android-tools/android-tools-9.0.0_p3-r1.ebuild137
-rw-r--r--dev-util/android-tools/android-tools-9.0.0_p3.ebuild132
-rw-r--r--dev-util/android-tools/files/android-tools-8.1.0_p1-build.patch30
-rwxr-xr-xdev-util/android-tools/files/make-tarballs.sh128
-rw-r--r--dev-util/android-tools/metadata.xml17
9 files changed, 747 insertions, 0 deletions
diff --git a/dev-util/android-tools/Manifest b/dev-util/android-tools/Manifest
new file mode 100644
index 000000000000..1420ab0f3a98
--- /dev/null
+++ b/dev-util/android-tools/Manifest
@@ -0,0 +1,26 @@
+DIST android-tools-5.1.1_r13-arch.tar.gz 4078 BLAKE2B 718f94b0854189533f11545a8962c2cc85bc01797057a77525babd7f5e01c76f12764cab0da30cf8abe364c0ec757193cc8c49bef3278925076efd3633fc5fcf SHA512 e38e0d1c966b569defc6df185c0e2b35b3766a7f89bcc3f60cea9b536f37b5b6b76f40457735b509d806c4c5b24f6b3805b51b85ffeb4d04fc14a731f81414c3
+DIST android-tools-5.1.1_r13-core.tar.gz 1210720 BLAKE2B 0ec56b07c206ab122d1286dfa55424c3ffa4382cbe3f55f6ca351ca9e4555537e9404a5ee239adb90667d91c9212de85c8c264662489b69d3b7846c4b4bcd80d SHA512 2ce2f03193840bd894cb4638bd23a321e53c6185e9816729193714b9e2d068f5ca4ebcee4edc7febaa4ea1ee3621aa6977217a5a84d2f116f35b000969a4af15
+DIST android-tools-5.1.1_r13-extras.tar.gz 282690 BLAKE2B b0be4168ca4cdf6c7ed359f01104b2b20cf36678153bae00ffb8cdc9d79e0518f850d9f1ad3eb3a2f998418a6fcd1c54cf4199a2ae37c696e5f657bbed8c778c SHA512 322d45be02d3d5a5bf677e3a38a44085258ee7b9a8c0a7bc08ddb4104168170d5969699ee54e19009a2bd0d7e0ac6ad7971ccc67e2a0311c6f1ba7fb76cfce83
+DIST android-tools-5.1.1_r13-f2fs-tools.tar.gz 65931 BLAKE2B 658bae1a0d713887522eba2264971ae1f68093d9f3cf8ac1c2de96600219fc9f3624595de273ca3af76a69edf3a36b8136d9bb6b75a147beb2fc804864fd7b82 SHA512 66f4be04164df8bb5138105db4e9d5b79c09cd8c28a0d30a6d1e6dead77961614172c96fa680953bf445b934f14b4dbbc21ce89a909d9f278f2eca1ca2e1e656
+DIST android-tools-5.1.1_r13-libselinux.tar.gz 49085 BLAKE2B 50136b205fd6a6b055f82b16fe4e234bf060d40400e62e2a53c9943f67181d35564b000ec27fa060c2e01f7e4dea441079c5b06d1b5de21a9bcd15e8fa271a9b SHA512 b1a8960b98206118a07f11e7e67429c0d4b8f89c4f65919bcd02a6ba1c7f30e5b73a9431ce8d10fc6ffa6e487b79061b84a969490bf22a49188dc5cd9dd46a2f
+DIST android-tools-6.0.1_r79-arch.tar.gz 13466 BLAKE2B ddb064303659468b648a46ea24aae648968088de4aaea2b64e7b9d946d867daaf6ed1f4094cb7b29beb803387d2253580c85a46e9392bc1ccb2461186f2e52ef SHA512 90b8638d247897da33f6e861492c58df0e9877738650083c3307bd787d234d728e6c9097ac1401c254eb3daf4c6b18da4ee84dd16749acf6359fcb42781862fc
+DIST android-tools-6.0.1_r79-core.tar.gz 1186562 BLAKE2B 473454d340e65f98201508cb04293118d6e2ecc06e33d0d76ca81c536ea00a7818ebe4c4ccd30efef36aaaa1a9ec6ee3a57c00e2a82af28cbc49f4c973ab46be SHA512 a48f8c562305cbc951e008979920d9efe02e232c41997423457ff1e2f115e526b295c260a501d4050ce280ca7155793b95f7a60bad5cbc165ba80d6a225152f0
+DIST android-tools-6.0.1_r79-extras.tar.gz 648657 BLAKE2B 4582ddd57b729492e08987e17304c62778504ffc316ab26df8c83fff1aed33226106474131d5ad0e3e302b577c83a2b78d0be04fef9711e39861a223580ab1b9 SHA512 e10694737c518f591eff4e808bb826c83bf45dc44c5c1ee8a4082a6e0653350ffe2986e299348cb4a1219203192d01546a05e9354ce05e29897f856c147de8c3
+DIST android-tools-6.0.1_r79-f2fs-tools.tar.gz 70255 BLAKE2B ab9ce3efd33c28a1a0a9cb8a5415057498dd493e059183cc9d3fcc9de1b5ca4d7488c75695c94700fc6a4e5503beb8647576c7096fa50229f98485d2983ce152 SHA512 0871f99f78006028889b42668ec627b6515bb812ad3ec4a489f62187a79f64d2a74f66556698a5f05fc99932f75fefd8810dedceeab744b212beb764e97b82c8
+DIST android-tools-6.0.1_r79-libselinux.tar.gz 50814 BLAKE2B f09f26c801be83bc97f4b18606f513ce0fae791126a30c90067e3b2066c991fa1390ab2d0fac2475f755f3245179718204d5014f47ece46801dc0f80caf9758b SHA512 686557271271c4d59fb968c5aa76b433955009733f3151c4c86faa996ce846088d6632b0969b23699822b7a6f09eae60abedba6abb0edc9d444159bbdb5c6f91
+DIST android-tools-8.1.0_r1-arch.tar.gz 6250 BLAKE2B 65447517a33438c8531a9d707c6107703eaccb558e505e51a88ef51e70f83488620f76eb0240dc0899211cf120e9e1ffbea041086f1d8133f30b56358aba76d6 SHA512 5746e0b2f6aae37ebe60b7b1e939699a11de2f44286497f77d700c3896e02559d55002f036ecdc1c412844bfce4ab245b9086193dc982e6be74bcaea61010c5c
+DIST android-tools-8.1.0_r1-core.tar.gz 5227179 BLAKE2B afb280d67fe1b926e1f1ad68409584ad0209eb48921542e2bd490448c888cdf4bf6fb4c6f9552d580c7a396e79c2c85019e79a9a6c9881ea962c2f1064c33d82 SHA512 2c8e67232ca6348a4fd4b5d7077715491d2168c46fc8e336635a961bbbed156ef480718ee58393501196e9315c6c1bda807f8966944e3bc209dd5a0f7088642e
+DIST android-tools-8.1.0_r1-extras.tar.xz 275952 BLAKE2B 0fd3c536fee6ffbe2cdd4321604d32dc3a2b48a1b3edcb9121e83ceea760e491b47b301c3d8126565efd6b11adabd4f89c79bbe8731585660ce395af9e643fe7 SHA512 bfe3af89eadf38ce6805637e41f3fb15feb85455902f6a43e52a2f95dd1595cc896a9f46ccc82ab8db433f56a05f2f4c0ba85b77f40b03d5d69c8fec4082a2da
+DIST android-tools-8.1.0_r1-f2fs-tools.tar.xz 93924 BLAKE2B b8b6c7ba4c3f5309bfcfc91bd57d018d7af66f8dd25590207fd545f0dba02961826bf9963a56c7994feea5db8f9caedfe4fe62870420d9544283f87ec337cfb8 SHA512 de726be0691c58a5093098bd30cfc06c4312c44bec040cbecd594694cb7b38742dafd1f00b08c18f1b70abf56571738eb3e85e612f082e09e51a98980444e069
+DIST android-tools-8.1.0_r1-selinux.tar.xz 3188060 BLAKE2B 8c513d858e8dcaed705975ad61f362d7b1c2252685a63a1ad6035f36b0b402f1857ac5d2635d35ffa10f05b4a2605f30f27dcc5e9d91930eb0656f3ce2da036d SHA512 8799f10b4dba840ecea8f6abb8166c2e137eb3f0d9c5cfb132c661cf17800f2eeaafb1b4ec9e8974fc3324fae99e3654e52397c987faf1d48ab6148152d84f11
+DIST android-tools-8.1.0_r1.ninja.xz 2740 BLAKE2B 34473e33970cefdaf82bbe4524665fd50e6617cf867757ca07cdccc2e7356f43ef4bb455080ef4bac516ddba3c4e4120f0b27306e84725f8d5738a81800e3a53 SHA512 707e0e1c53832a42384e93d363f80007b76f18166b9f3f7d516431410b05319b1acc804daa1fddc218e11feb48de48683efb5203f4fa6d80646dcb1a2953139f
+DIST android-tools-9.0.0_p3-fix-build-with-glibc-2.30.patch 1262 BLAKE2B fa2d3cd31e82dd3b17bb840096c6158f1b117cb12b8b3c6f6c604efd85f880346c04e8e98b17bebd68d56e06cdc126677ad96dbd6214175544a9b93020292956 SHA512 21c2501fa24f59489e656ac5122c906476ad573e63f6dcc88605dafde9d4b8927ea904708caaababd12155153d969d2480aff591d98057859e8b885e94aa126a
+DIST android-tools-9.0.0_r3-arch.tar.xz 7628 BLAKE2B d0d7267d41ade2031d72236c18850ea329afbdd57a2b5bf25837e405d3e66d7aaef5b48996e7aafd4cf6e4543de03ba6549823845e5e8cb35c6d4bc900b8e275 SHA512 534d99fe15b3a3ba4f2a7331662fdb8645424830122cc4c1ff0b44d43059280610389147d4a916c55b3be71ac84d019223c90993cbdae2588f9e9737f0b5606d
+DIST android-tools-9.0.0_r3-core.tar.gz 27484684 BLAKE2B d071adacd5be0341a9114e57242fe51f623773683b9db2735eac9231a77cc22651f09e1c63682e729494aa6409939696a5635afcd5e8a40ec0f75d2784c00ffc SHA512 0edc8b02b57085ce88b39c987284af1c681870594b20ab9ecf4be98a0cfdff2905bc80f5d8eeb7fbc7f4604b800b6f95bc6b2b0321c900bf833313dfcbb2eefb
+DIST android-tools-9.0.0_r3-e2fsprogs.tar.xz 5255616 BLAKE2B 5fe62da70686148d755c60c1cef4b64d80f0c6a891d13a778d2a3209f950b0f9c5b19bf39ed28c5d38d01103ef1ea474133f57b7104a4fdf80eafd8edc17a3a5 SHA512 a9c3c180ddb96f10710a18794b20cfc641d40af3643a1133091127a40c27fa724b6e6f1af8e66fc1e1ca33053e33499b910880eab05979a2de95a0d3d7a79f93
+DIST android-tools-9.0.0_r3-extras.tar.xz 1653548 BLAKE2B 1a8c2ee2e564adc04d646ab54e1913d17e9ed0fb0ef3872bd8a459ecad5fbf7324830c1120c367d9515607ecc659fb0f27c4f7db740fda318fd13be1300a6a51 SHA512 13dc145faf919c1f7cc183f823ca46330568daff19ffb110af383876cdb6b0e9f0a83690a4e22633b572c1e6c2aba14ef0181c01720095173d258320229e9108
+DIST android-tools-9.0.0_r3-f2fs-tools.tar.xz 212092 BLAKE2B 32775e5b049bd2ff2ce7c9ea3362a602dcda6328e39036902020bd372a812898d84912f686cf347b225af630c2dea81ce30b601ac968b1168e2851b94ac2da2e SHA512 4fac8f18533c5c2270aed6e60b21721c643a44a27b37482ff8fd8fa4d7c875eb8a626d544ec4e6efb89c7408ae97e66ffd123588e90b98312e5291575ca8baa6
+DIST android-tools-9.0.0_r3-selinux.tar.xz 3202332 BLAKE2B 60a884eb1bd34fe5796f8fb33e5aefd7f9ffc85ac91784e0a8f0ca663010cf2222c80f4c419019b5817f9cbd8037ab78914e42417193e1b802a2682bb82c0097 SHA512 f0a77dc0ac91d434573370110c70529caabfd5f036c02ae5f1a4b2097e48324198d03ecdc92a622e1590012dd3f20f103384fed468f5e27aebcaf9315bb87078
+DIST android-tools-9.0.0_r3.ninja.xz 4244 BLAKE2B 14cea7523f22a7f4e02e93c32e4d4684e057abbe8e2b537b7e942cc27c13ea2aa13bcdb5c3ccafc261b8d7fc4b4cd4b9394e0970734b36111ccffbacecc5cfb9 SHA512 46956a608d6a9b93f1a035d6b0e153c476b55d4f8a2db4915b18ac9904a6d07befcbceb8e2e50054e7dbe2970be8539243134cd9722d2f2ec8a36a3153e03c56
+DIST boringssl-14308731e5446a73ac2258688a9688b524483cb6.tar.gz 13030361 BLAKE2B 6982416b6e193e7faccd41fff3bd35f80b11d7495251d876e6b081bd94a887ec3c6bf5b7852d9595594fc2bdc57353f268272ef01fb79f7c93b52d46cbda69ac SHA512 171b524b0452a48853b2c8010ff5e14d5d720e69eeaf1d3b79f675838f3afa94aee9de2f47b37303feb2d92cbf77639efe585786625b7b37b8cc2ba727c37fdc
+DIST boringssl-45210dd4e21ace9d28cb76b3f83303fcdd2efcce.tar.gz 13581532 BLAKE2B ca2f6757807adc265314a7444605c6199a19847fb426384bafa201bf63f4e3c7c567fb8094b740b8a00caf0d106bb1efea2893b00d45c9772740a81dc0a186f3 SHA512 c6695d078ee7b3694898dfdc0ee3382d01f9bb592ea46eb64026c73565735fd7251bbb0fd3e8c8552394bcdad5717de7ee5106cf1ed91aacec05d779ad693f6a
diff --git a/dev-util/android-tools/android-tools-5.1.1_p13.ebuild b/dev-util/android-tools/android-tools-5.1.1_p13.ebuild
new file mode 100644
index 000000000000..62e4096698a0
--- /dev/null
+++ b/dev-util/android-tools/android-tools-5.1.1_p13.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+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/"
+# For stable digests, git tarballs generated by android.googlesource.com
+# are fetched from mirror://gentoo/.
+SRC_URI="https://projects.archlinux.org/svntogit/community.git/snapshot/community-caa300cf262afcf5bdb4dcc923dee54e3715fd5c.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 ~x86-linux"
+IUSE="libressl"
+
+RDEPEND="sys-libs/zlib:=
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ dev-libs/libpcre"
+DEPEND="${RDEPEND}"
+
+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
+ sed -e 's|#include <dlfcn.h>|\0\n#include <stddef.h>\n#include <string.h>\n|' \
+ -i extras/f2fs_utils/f2fs_utils.c || die
+ mv arch/*/trunk/Makefile ./ || die
+ sed -i '1i#include <sys/sysmacros.h>' core/adb/usb_linux.c || die #580058
+ sed -e 's|^#include <sys/cdefs.h>$|/*\0*/|' \
+ -e 's|^__BEGIN_DECLS$|#ifdef __cplusplus\nextern "C" {\n#endif|' \
+ -e 's|^__END_DECLS$|#ifdef __cplusplus\n}\n#endif|' \
+ -i extras/ext4_utils/sha1.{c,h} || die #580686
+ tc-export CC
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install
+ newbashcomp arch/*/trunk/bash_completion fastboot
+}
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..6ad2b5147928
--- /dev/null
+++ b/dev-util/android-tools/android-tools-6.0.1_p79.ebuild
@@ -0,0 +1,87 @@
+# 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 ~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}
+ virtual/rubygems"
+
+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
+ sed -i '1i#include <sys/sysmacros.h>' core/adb/usb_linux.cpp || die #616508
+ sed -e 's|^#include <sys/cdefs.h>$|/*\0*/|' \
+ -e 's|^__BEGIN_DECLS$|#ifdef __cplusplus\nextern "C" {\n#endif|' \
+ -e 's|^__END_DECLS$|#ifdef __cplusplus\n}\n#endif|' \
+ -i extras/ext4_utils/sha1.{c,h} || die #580686
+ default
+}
+
+src_compile() {
+ # Dynamically detect rubygems interpreter (bug 631398).
+ local ruby_bin=$(type -P ruby) ruby_error_log=${T}/generate_build.rb.log success=
+ for ruby_bin in "${ruby_bin}" "${ruby_bin}"[[:digit:]][[:digit:]]; do
+ "${ruby_bin}" ./generate_build.rb 1> build.sh 2> "${ruby_error_log}" && \
+ { success=1; break; }
+ done
+ if [[ -z ${success} ]]; then
+ cat "${ruby_error_log}" >&2
+ die "${ruby_bin} ./generate_build.rb failed"
+ fi
+ sed -e 's:^gcc:${CC}:' -e 's:^g++:${CXX}:' -i build.sh || die
+ chmod +x build.sh || die
+ tc-export CC CXX
+ bash -e ./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
+}
diff --git a/dev-util/android-tools/android-tools-8.1.0_p1.ebuild b/dev-util/android-tools/android-tools-8.1.0_p1.ebuild
new file mode 100644
index 000000000000..95483f444700
--- /dev/null
+++ b/dev-util/android-tools/android-tools-8.1.0_p1.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python3_6 )
+CMAKE_MAKEFILE_GENERATOR="ninja"
+
+inherit flag-o-matic bash-completion-r1 ninja-utils toolchain-funcs cmake-utils python-r1
+
+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/"
+# See helper scripts in files/ for creating these tarballs and getting this hash.
+BORINGSSL_SHA1="14308731e5446a73ac2258688a9688b524483cb6"
+# The ninja file was created by running the ruby script from archlinux by hand and fixing the build vars.
+# No point in depending on something large/uncommon like ruby just to generate a ninja file.
+SRC_URI="https://git.archlinux.org/svntogit/community.git/snapshot/community-2b7f9774cc468205fec145e64e9103aee8e5c6f9.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
+ https://github.com/google/boringssl/archive/${BORINGSSL_SHA1}.tar.gz -> boringssl-${BORINGSSL_SHA1}.tar.gz
+ mirror://gentoo/${MY_P}-extras.tar.xz https://dev.gentoo.org/~vapier/dist/${MY_P}-extras.tar.xz
+ mirror://gentoo/${MY_P}-selinux.tar.xz https://dev.gentoo.org/~vapier/dist/${MY_P}-selinux.tar.xz
+ mirror://gentoo/${MY_P}-f2fs-tools.tar.xz https://dev.gentoo.org/~vapier/dist/${MY_P}-f2fs-tools.tar.xz
+ mirror://gentoo/${MY_P}.ninja.xz https://dev.gentoo.org/~vapier/dist/${MY_P}.ninja.xz"
+
+# 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 ~arm x86 ~x86-linux"
+IUSE="python"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DEPEND="sys-libs/zlib:=
+ dev-libs/libpcre2:=
+ virtual/libusb:1="
+RDEPEND="${DEPEND}
+ python? ( ${PYTHON_DEPS} )"
+DEPEND+="
+ dev-lang/go"
+
+S=${WORKDIR}
+CMAKE_USE_DIR="${S}/boringssl"
+
+unpack_into() {
+ local archive="$1"
+ local dir="$2"
+
+ mkdir -p "${dir}"
+ pushd "${dir}" >/dev/null || die
+ unpack "${archive}"
+ if [[ ${dir} != ./* ]] ; then
+ mv */* ./ || die
+ fi
+ popd >/dev/null
+}
+
+src_unpack() {
+ unpack_into "${MY_P}-arch.tar.gz" arch
+ unpack_into "${MY_P}-core.tar.gz" core
+ unpack_into "${MY_P}-extras.tar.xz" extras
+ unpack_into "${MY_P}-f2fs-tools.tar.xz" ./f2fs-tools
+ unpack_into "${MY_P}-selinux.tar.xz" ./selinux
+ unpack_into boringssl-${BORINGSSL_SHA1}.tar.gz boringssl
+
+ unpack "${MY_P}.ninja.xz"
+ mv "${MY_P}.ninja" "build.ninja" || die
+
+ # Avoid depending on gtest just for its prod headers when boringssl bundles it.
+ ln -s ../../boringssl/third_party/googletest/include/gtest core/include/ || die
+}
+
+src_prepare() {
+ cd "${S}"/core
+ eapply "${WORKDIR}"/arch/trunk/fix_build_core.patch
+ eapply "${FILESDIR}"/${P}-build.patch
+ sed -i '1i#include <sys/sysmacros.h>' adb/client/usb_linux.cpp || die #616508
+
+ cd "${S}"/selinux
+ eapply "${WORKDIR}"/arch/trunk/fix_build_selinux.patch
+
+ cd "${S}"/extras
+ sed -e 's|^#include <sys/cdefs.h>$|/*\0*/|' \
+ -e 's|^__BEGIN_DECLS$|#ifdef __cplusplus\nextern "C" {\n#endif|' \
+ -e 's|^__END_DECLS$|#ifdef __cplusplus\n}\n#endif|' \
+ -i ext4_utils/sha1.{c,h} || die #580686
+
+ cd "${S}"
+ default
+
+ # The pregenerated ninja file expects the build/ dir.
+ BUILD_DIR="${CMAKE_USE_DIR}/build"
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ append-lfs-flags
+
+ cmake-utils_src_configure
+
+ sed -i \
+ -e "s:@CC@:$(tc-getCC):g" \
+ -e "s:@CXX@:$(tc-getCXX):g" \
+ -e "s:@CFLAGS@:${CFLAGS}:g" \
+ -e "s:@CPPFLAGS@:${CPPFLAGS}:g" \
+ -e "s:@CXXFLAGS@:${CXXFLAGS}:g" \
+ -e "s:@LDFLAGS@:${LDFLAGS}:g" \
+ -e "s:@PV@:${PV}:g" \
+ build.ninja || die
+}
+
+src_compile() {
+ # We only need a few libs from boringssl.
+ cmake-utils_src_compile libcrypto.a libssl.a
+
+ eninja
+}
+
+src_install() {
+ dobin adb fastboot
+ dodoc core/adb/*.{txt,TXT} core/fastboot/README.md
+ use python && python_foreach_impl python_doexe core/mkbootimg/mkbootimg
+ newbashcomp arch/trunk/bash_completion.fastboot fastboot
+}
diff --git a/dev-util/android-tools/android-tools-9.0.0_p3-r1.ebuild b/dev-util/android-tools/android-tools-9.0.0_p3-r1.ebuild
new file mode 100644
index 000000000000..67c0ac57ad6e
--- /dev/null
+++ b/dev-util/android-tools/android-tools-9.0.0_p3-r1.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python3_{6,7} )
+CMAKE_MAKEFILE_GENERATOR="ninja"
+
+inherit flag-o-matic bash-completion-r1 ninja-utils toolchain-funcs cmake-utils python-r1
+
+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/"
+# See helper scripts in files/ for creating these tarballs and getting this hash.
+BORINGSSL_SHA1="45210dd4e21ace9d28cb76b3f83303fcdd2efcce"
+GLIBC_GETTID_PATCH="${P}-fix-build-with-glibc-2.30.patch"
+# The ninja file was created by running the ruby script from archlinux by hand and fixing the build vars.
+# No point in depending on something large/uncommon like ruby just to generate a ninja file.
+SRC_URI="https://git.archlinux.org/svntogit/community.git/snapshot/community-0ffb7b41d599741d100a6a00a4bb20e162cd3f90.tar.xz -> ${MY_P}-arch.tar.xz
+ https://github.com/android/platform_system_core/archive/android-${MY_PV}.tar.gz -> ${MY_P}-core.tar.gz
+ https://github.com/google/boringssl/archive/${BORINGSSL_SHA1}.tar.gz -> boringssl-${BORINGSSL_SHA1}.tar.gz
+ mirror://gentoo/${MY_P}-e2fsprogs.tar.xz https://dev.gentoo.org/~zmedico/dist/${MY_P}-e2fsprogs.tar.xz
+ mirror://gentoo/${MY_P}-extras.tar.xz https://dev.gentoo.org/~zmedico/dist/${MY_P}-extras.tar.xz
+ mirror://gentoo/${MY_P}-selinux.tar.xz https://dev.gentoo.org/~zmedico/dist/${MY_P}-selinux.tar.xz
+ mirror://gentoo/${MY_P}-f2fs-tools.tar.xz https://dev.gentoo.org/~zmedico/dist/${MY_P}-f2fs-tools.tar.xz
+ mirror://gentoo/${MY_P}.ninja.xz https://dev.gentoo.org/~zmedico/dist/${MY_P}.ninja.xz
+ https://raw.githubusercontent.com/nmeum/android-tools/8a30dba5768304176fd78aaa131242f6b880f828/patches/core/0022-Use-glibc-s-gettid-when-using-glibc-2.30.patch -> ${GLIBC_GETTID_PATCH}"
+
+# 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 ~arm x86 ~x86-linux"
+IUSE="python"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DEPEND="sys-libs/zlib:=
+ dev-libs/libpcre2:=
+ virtual/libusb:1="
+RDEPEND="${DEPEND}
+ python? ( ${PYTHON_DEPS} )"
+DEPEND+="
+ dev-lang/go"
+
+S=${WORKDIR}
+CMAKE_USE_DIR="${S}/boringssl"
+
+unpack_into() {
+ local archive="$1"
+ local dir="$2"
+
+ mkdir -p "${dir}"
+ pushd "${dir}" >/dev/null || die
+ unpack "${archive}"
+ if [[ ${dir} != ./* ]] ; then
+ mv */* ./ || die
+ fi
+ popd >/dev/null
+}
+
+src_unpack() {
+ unpack_into "${MY_P}-arch.tar.xz" arch
+ unpack_into "${MY_P}-core.tar.gz" core
+ unpack_into "${MY_P}-e2fsprogs.tar.xz" ./e2fsprogs
+ unpack_into "${MY_P}-extras.tar.xz" extras
+ unpack_into "${MY_P}-f2fs-tools.tar.xz" ./f2fs-tools
+ unpack_into "${MY_P}-selinux.tar.xz" ./selinux
+ unpack_into boringssl-${BORINGSSL_SHA1}.tar.gz boringssl
+
+ unpack "${MY_P}.ninja.xz"
+ mv "${MY_P}.ninja" "build.ninja" || die
+
+ # Avoid depending on gtest just for its prod headers when boringssl bundles it.
+ ln -s ../../boringssl/third_party/googletest/include/gtest core/include/ || die
+}
+
+src_prepare() {
+ sed -e 's:elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i386"):\0\n set(ARCH "x86")\nelseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i586"):' \
+ -i "${S}"/boringssl/CMakeLists.txt || die #668792
+
+ cd "${S}"/core || die
+ eapply "${WORKDIR}"/arch/trunk/fix_build_core.patch
+ eapply "${FILESDIR}"/android-tools-8.1.0_p1-build.patch
+ eapply "${DISTDIR}/${GLIBC_GETTID_PATCH}"
+
+ cd "${S}"/selinux || die
+ eapply "${WORKDIR}"/arch/trunk/fix_build_selinux.patch
+
+ cd "${S}"/e2fsprogs || die
+ eapply "${WORKDIR}"/arch/trunk/fix_build_e2fsprogs.patch
+
+ cd "${S}"/extras
+ sed -e 's|^#include <sys/cdefs.h>$|/*\0*/|' \
+ -e 's|^__BEGIN_DECLS$|#ifdef __cplusplus\nextern "C" {\n#endif|' \
+ -e 's|^__END_DECLS$|#ifdef __cplusplus\n}\n#endif|' \
+ -i ext4_utils/include/ext4_utils/ext4_crypt{,_init_extensions}.h || die #580686
+
+ cd "${S}" || die
+ default
+
+ sed -E \
+ -e "s|^(CC =).*|\\1 $(tc-getCC)|g" \
+ -e "s|^(CXX =).*|\\1 $(tc-getCXX)|g" \
+ -e "s|^(CFLAGS =).*|\\1 ${CFLAGS}|g" \
+ -e "s|^(CPPFLAGS =).*|\\1 ${CPPFLAGS}|g" \
+ -e "s|^(CXXFLAGS =).*|\\1 ${CXXFLAGS}|g" \
+ -e "s|^(LDFLAGS =).*|\\1 ${LDFLAGS}|g" \
+ -e "s|^(PKGVER =).*|\\1 ${MY_PV}|g" \
+ -i build.ninja || die
+
+ grep -rlZ -- -Werror . | xargs -0 sed -e 's:-Werror ::g' -e 's: -Werror::g' -i || die #706946
+
+ # The pregenerated ninja file expects the build/ dir.
+ BUILD_DIR="${CMAKE_USE_DIR}/build"
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ append-lfs-flags
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ # We only need a few libs from boringssl.
+ cmake-utils_src_compile libcrypto.a libssl.a
+
+ eninja
+}
+
+src_install() {
+ dobin adb e2fsdroid ext2simg fastboot mke2fs.android
+ dodoc core/adb/*.{txt,TXT} core/fastboot/README.md
+ use python && python_foreach_impl python_doexe core/mkbootimg/mkbootimg
+ newbashcomp arch/trunk/bash_completion.fastboot fastboot
+}
diff --git a/dev-util/android-tools/android-tools-9.0.0_p3.ebuild b/dev-util/android-tools/android-tools-9.0.0_p3.ebuild
new file mode 100644
index 000000000000..36c89fee7e76
--- /dev/null
+++ b/dev-util/android-tools/android-tools-9.0.0_p3.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python3_{6,7} )
+CMAKE_MAKEFILE_GENERATOR="ninja"
+
+inherit flag-o-matic bash-completion-r1 ninja-utils toolchain-funcs cmake-utils python-r1
+
+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/"
+# See helper scripts in files/ for creating these tarballs and getting this hash.
+BORINGSSL_SHA1="45210dd4e21ace9d28cb76b3f83303fcdd2efcce"
+# The ninja file was created by running the ruby script from archlinux by hand and fixing the build vars.
+# No point in depending on something large/uncommon like ruby just to generate a ninja file.
+SRC_URI="https://git.archlinux.org/svntogit/community.git/snapshot/community-0ffb7b41d599741d100a6a00a4bb20e162cd3f90.tar.xz -> ${MY_P}-arch.tar.xz
+ https://github.com/android/platform_system_core/archive/android-${MY_PV}.tar.gz -> ${MY_P}-core.tar.gz
+ https://github.com/google/boringssl/archive/${BORINGSSL_SHA1}.tar.gz -> boringssl-${BORINGSSL_SHA1}.tar.gz
+ mirror://gentoo/${MY_P}-e2fsprogs.tar.xz https://dev.gentoo.org/~zmedico/dist/${MY_P}-e2fsprogs.tar.xz
+ mirror://gentoo/${MY_P}-extras.tar.xz https://dev.gentoo.org/~zmedico/dist/${MY_P}-extras.tar.xz
+ mirror://gentoo/${MY_P}-selinux.tar.xz https://dev.gentoo.org/~zmedico/dist/${MY_P}-selinux.tar.xz
+ mirror://gentoo/${MY_P}-f2fs-tools.tar.xz https://dev.gentoo.org/~zmedico/dist/${MY_P}-f2fs-tools.tar.xz
+ mirror://gentoo/${MY_P}.ninja.xz https://dev.gentoo.org/~zmedico/dist/${MY_P}.ninja.xz"
+
+# 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 ~arm x86 ~x86-linux"
+IUSE="python"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DEPEND="sys-libs/zlib:=
+ dev-libs/libpcre2:=
+ virtual/libusb:1="
+RDEPEND="${DEPEND}
+ python? ( ${PYTHON_DEPS} )"
+DEPEND+="
+ dev-lang/go"
+
+S=${WORKDIR}
+CMAKE_USE_DIR="${S}/boringssl"
+
+unpack_into() {
+ local archive="$1"
+ local dir="$2"
+
+ mkdir -p "${dir}"
+ pushd "${dir}" >/dev/null || die
+ unpack "${archive}"
+ if [[ ${dir} != ./* ]] ; then
+ mv */* ./ || die
+ fi
+ popd >/dev/null
+}
+
+src_unpack() {
+ unpack_into "${MY_P}-arch.tar.xz" arch
+ unpack_into "${MY_P}-core.tar.gz" core
+ unpack_into "${MY_P}-e2fsprogs.tar.xz" ./e2fsprogs
+ unpack_into "${MY_P}-extras.tar.xz" extras
+ unpack_into "${MY_P}-f2fs-tools.tar.xz" ./f2fs-tools
+ unpack_into "${MY_P}-selinux.tar.xz" ./selinux
+ unpack_into boringssl-${BORINGSSL_SHA1}.tar.gz boringssl
+
+ unpack "${MY_P}.ninja.xz"
+ mv "${MY_P}.ninja" "build.ninja" || die
+
+ # Avoid depending on gtest just for its prod headers when boringssl bundles it.
+ ln -s ../../boringssl/third_party/googletest/include/gtest core/include/ || die
+}
+
+src_prepare() {
+ sed -e 's:elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i386"):\0\n set(ARCH "x86")\nelseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i586"):' \
+ -i "${S}"/boringssl/CMakeLists.txt || die #668792
+
+ cd "${S}"/core || die
+ eapply "${WORKDIR}"/arch/trunk/fix_build_core.patch
+ eapply "${FILESDIR}"/android-tools-8.1.0_p1-build.patch
+
+ cd "${S}"/selinux || die
+ eapply "${WORKDIR}"/arch/trunk/fix_build_selinux.patch
+
+ cd "${S}"/e2fsprogs || die
+ eapply "${WORKDIR}"/arch/trunk/fix_build_e2fsprogs.patch
+
+ cd "${S}"/extras
+ sed -e 's|^#include <sys/cdefs.h>$|/*\0*/|' \
+ -e 's|^__BEGIN_DECLS$|#ifdef __cplusplus\nextern "C" {\n#endif|' \
+ -e 's|^__END_DECLS$|#ifdef __cplusplus\n}\n#endif|' \
+ -i ext4_utils/include/ext4_utils/ext4_crypt{,_init_extensions}.h || die #580686
+
+ cd "${S}" || die
+ default
+
+ sed -E \
+ -e "s|^(CC =).*|\\1 $(tc-getCC)|g" \
+ -e "s|^(CXX =).*|\\1 $(tc-getCXX)|g" \
+ -e "s|^(CFLAGS =).*|\\1 ${CFLAGS}|g" \
+ -e "s|^(CPPFLAGS =).*|\\1 ${CPPFLAGS}|g" \
+ -e "s|^(CXXFLAGS =).*|\\1 ${CXXFLAGS}|g" \
+ -e "s|^(LDFLAGS =).*|\\1 ${LDFLAGS}|g" \
+ -e "s|^(PKGVER =).*|\\1 ${MY_PV}|g" \
+ -i build.ninja || die
+
+ # The pregenerated ninja file expects the build/ dir.
+ BUILD_DIR="${CMAKE_USE_DIR}/build"
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ append-lfs-flags
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ # We only need a few libs from boringssl.
+ cmake-utils_src_compile libcrypto.a libssl.a
+
+ eninja
+}
+
+src_install() {
+ dobin adb e2fsdroid ext2simg fastboot mke2fs.android
+ dodoc core/adb/*.{txt,TXT} core/fastboot/README.md
+ use python && python_foreach_impl python_doexe core/mkbootimg/mkbootimg
+ newbashcomp arch/trunk/bash_completion.fastboot fastboot
+}
diff --git a/dev-util/android-tools/files/android-tools-8.1.0_p1-build.patch b/dev-util/android-tools/files/android-tools-8.1.0_p1-build.patch
new file mode 100644
index 000000000000..f3d664ef70a3
--- /dev/null
+++ b/dev-util/android-tools/files/android-tools-8.1.0_p1-build.patch
@@ -0,0 +1,30 @@
+--- a/adb/sysdeps.h
++++ b/adb/sysdeps.h
+@@ -66,6 +66,11 @@
+ #endif
+ #endif
+
++#ifndef __clang__
++#define _Nonnull
++#define _Nullable
++#endif
++
+ #ifdef _WIN32
+
+ // Clang-only nullability specifiers
+--- a/libcutils/include/cutils/trace.h
++++ b/libcutils/include/cutils/trace.h
+@@ -18,7 +18,13 @@
+ #define _LIBS_CUTILS_TRACE_H
+
+ #include <inttypes.h>
++// https://gcc.gnu.org/PR60932
++#ifdef __cplusplus
++#include <atomic>
++using namespace std;
++#else
+ #include <stdatomic.h>
++#endif
+ #include <stdbool.h>
+ #include <stdint.h>
+ #include <stdio.h>
diff --git a/dev-util/android-tools/files/make-tarballs.sh b/dev-util/android-tools/files/make-tarballs.sh
new file mode 100755
index 000000000000..5a0a775c1290
--- /dev/null
+++ b/dev-util/android-tools/files/make-tarballs.sh
@@ -0,0 +1,128 @@
+#!/bin/bash
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Create the various tarballs we need. GoB does not provide stable archives (unlike github),
+# and some repos are uselessly fat, so we have to create things by hand. Fun times.
+
+set -e
+
+die() {
+ echo "error: $*" >&2
+ exit 1
+}
+
+fetch_boringssl() {
+ local ver=$1 tag=$2
+ local content hash
+
+ echo "checking boringssl in ${tag}"
+ content=$(wget -nv "https://android.googlesource.com/platform/external/boringssl/+/${tag}/BORINGSSL_REVISION?format=TEXT" -O -)
+ hash=$(echo "${content}" | base64 -d)
+ echo "using boringssl ${hash}"
+
+ local tar="${DISTDIR}/boringssl-${hash}.tar.gz"
+ if [[ ! -e ${tar} ]] ; then
+ # We use github as it provides stable tarballs. GoB does not (includes timestamps).
+ # https://boringssl.googlesource.com/boringssl/+archive/${hash}.tar.gz
+ wget -c "https://github.com/google/boringssl/archive/${hash}.tar.gz" -O "${tar}"
+ fi
+
+ du -h "${tar}"
+}
+
+# The extras repo has ballooned to ~200MB, so we have to strip the large useless
+# files and random binaries.
+fetch_extras() {
+ local ver=$1 tag=$2
+ local tar="${DISTDIR}/android-tools-${ver}-extras.tar.xz"
+
+ if [[ ! -e ${tar} ]] ; then
+ local prune=(
+ ioshark
+ memory_replay
+ perfprofd
+ simpleperf
+ )
+ local dir="${tag}-extras"
+ rm -rf "${dir}"
+ mkdir "${dir}"
+ cd "${dir}"
+
+ wget "https://android.googlesource.com/platform/system/extras/+archive/${tag}.tar.gz" -O extras.tar.gz
+ tar xf extras.tar.gz
+ rm -rf "${prune[@]}" extras.tar.gz
+
+ cd ..
+ tar cf - "${dir}" | xz -9 > "${dir}.tar.xz"
+ rm -rf "${dir}"
+
+ mv "${dir}.tar.xz" "${tar}"
+ fi
+
+ du -h "${tar}"
+}
+
+# Since the GoB archive is unstable, we might as well rewrite it into xz to shrink.
+fetch_selinux() {
+ local ver=$1 tag=$2
+ local tar="${DISTDIR}/android-tools-${ver}-selinux.tar.xz"
+
+ if [[ ! -e ${tar} ]] ; then
+ wget "https://android.googlesource.com/platform/external/selinux/+archive/${tag}.tar.gz" -O - | zcat | xz > "${tar}"
+ fi
+
+ du -h "${tar}"
+}
+
+# Since the GoB archive is unstable, we might as well rewrite it into xz to shrink.
+fetch_f2fs() {
+ local ver=$1 tag=$2
+ local tar="${DISTDIR}/android-tools-${ver}-f2fs-tools.tar.xz"
+
+ if [[ ! -e ${tar} ]] ; then
+ wget "https://android.googlesource.com/platform/external/f2fs-tools/+archive/${tag}.tar.gz" -O - | zcat | xz > "${tar}"
+ fi
+
+ du -h "${tar}"
+}
+
+usage() {
+ local status=$1
+
+ [[ ${status} -eq 1 ]] && exec 1>&2
+
+ cat <<-EOF
+ Usage: $0 <android version>
+
+ To find the next available version, consult:
+ https://git.archlinux.org/svntogit/community.git/log/trunk?h=packages/android-tools
+
+ They have some helper scripts for building the files directly.
+
+ Example:
+ $0 android-8.1.0_r1
+ EOF
+
+ exit ${status}
+}
+
+main() {
+ [[ $# -ne 1 ]] && usage 1
+ [[ $1 == "-h" || $1 == "--help" ]] && usage 0
+
+ if [[ -z ${DISTDIR} ]] ; then
+ eval $(portageq -v envvar DISTDIR)
+ fi
+ if [[ -z ${DISTDIR} ]] ; then
+ die "Please set \$DISTDIR first"
+ fi
+
+ local ver="${1#android-}"
+ local tag="android-${ver}"
+ fetch_boringssl "${ver}" "${tag}"
+ fetch_extras "${ver}" "${tag}"
+ fetch_selinux "${ver}" "${tag}"
+ fetch_f2fs "${ver}" "${tag}"
+}
+main "$@"
diff --git a/dev-util/android-tools/metadata.xml b/dev-util/android-tools/metadata.xml
new file mode 100644
index 000000000000..8778b7b9129a
--- /dev/null
+++ b/dev-util/android-tools/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <upstream>
+ <bugs-to>https://code.google.com/p/android/issues/list</bugs-to>
+ <changelog>https://android.googlesource.com/platform/system/core.git/+log/HEAD</changelog>
+ <doc>https://android.googlesource.com/platform/system/core.git/+/master/adb/OVERVIEW.TXT</doc>
+ <remote-id type="cpe">cpe:/a:google:android_debug_bridge</remote-id>
+ <remote-id type="github">android/platform_system_core</remote-id>
+ <remote-id type="launchpad">ubuntu</remote-id>
+ </upstream>
+ <maintainer type="person">
+ <email>zmedico@gentoo.org</email>
+ <name>Zac Medico</name>
+ </maintainer>
+ <origin>gentoo-staging</origin>
+</pkgmetadata>