1 |
commit: 97efbbf30d14f2b2206c7382c01dc5eac6c3dccc |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Dec 31 05:05:49 2018 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Dec 31 05:10:42 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97efbbf3 |
7 |
|
8 |
dev-util/android-tools: version bump to 9.0.0_p3 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/674146 |
11 |
Closes: https://bugs.gentoo.org/668792 |
12 |
Package-Manager: Portage-2.3.53, Repoman-2.3.12 |
13 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
14 |
|
15 |
dev-util/android-tools/Manifest | 8 ++ |
16 |
.../android-tools/android-tools-9.0.0_p3.ebuild | 131 +++++++++++++++++++++ |
17 |
2 files changed, 139 insertions(+) |
18 |
|
19 |
diff --git a/dev-util/android-tools/Manifest b/dev-util/android-tools/Manifest |
20 |
index 15a69b3f57d..fb65eeeaa15 100644 |
21 |
--- a/dev-util/android-tools/Manifest |
22 |
+++ b/dev-util/android-tools/Manifest |
23 |
@@ -14,4 +14,12 @@ DIST android-tools-8.1.0_r1-extras.tar.xz 275952 BLAKE2B 0fd3c536fee6ffbe2cdd432 |
24 |
DIST android-tools-8.1.0_r1-f2fs-tools.tar.xz 93924 BLAKE2B b8b6c7ba4c3f5309bfcfc91bd57d018d7af66f8dd25590207fd545f0dba02961826bf9963a56c7994feea5db8f9caedfe4fe62870420d9544283f87ec337cfb8 SHA512 de726be0691c58a5093098bd30cfc06c4312c44bec040cbecd594694cb7b38742dafd1f00b08c18f1b70abf56571738eb3e85e612f082e09e51a98980444e069 |
25 |
DIST android-tools-8.1.0_r1-selinux.tar.xz 3188060 BLAKE2B 8c513d858e8dcaed705975ad61f362d7b1c2252685a63a1ad6035f36b0b402f1857ac5d2635d35ffa10f05b4a2605f30f27dcc5e9d91930eb0656f3ce2da036d SHA512 8799f10b4dba840ecea8f6abb8166c2e137eb3f0d9c5cfb132c661cf17800f2eeaafb1b4ec9e8974fc3324fae99e3654e52397c987faf1d48ab6148152d84f11 |
26 |
DIST android-tools-8.1.0_r1.ninja.xz 2740 BLAKE2B 34473e33970cefdaf82bbe4524665fd50e6617cf867757ca07cdccc2e7356f43ef4bb455080ef4bac516ddba3c4e4120f0b27306e84725f8d5738a81800e3a53 SHA512 707e0e1c53832a42384e93d363f80007b76f18166b9f3f7d516431410b05319b1acc804daa1fddc218e11feb48de48683efb5203f4fa6d80646dcb1a2953139f |
27 |
+DIST android-tools-9.0.0_r3-arch.tar.xz 7628 BLAKE2B d0d7267d41ade2031d72236c18850ea329afbdd57a2b5bf25837e405d3e66d7aaef5b48996e7aafd4cf6e4543de03ba6549823845e5e8cb35c6d4bc900b8e275 SHA512 534d99fe15b3a3ba4f2a7331662fdb8645424830122cc4c1ff0b44d43059280610389147d4a916c55b3be71ac84d019223c90993cbdae2588f9e9737f0b5606d |
28 |
+DIST android-tools-9.0.0_r3-core.tar.gz 27484684 BLAKE2B d071adacd5be0341a9114e57242fe51f623773683b9db2735eac9231a77cc22651f09e1c63682e729494aa6409939696a5635afcd5e8a40ec0f75d2784c00ffc SHA512 0edc8b02b57085ce88b39c987284af1c681870594b20ab9ecf4be98a0cfdff2905bc80f5d8eeb7fbc7f4604b800b6f95bc6b2b0321c900bf833313dfcbb2eefb |
29 |
+DIST android-tools-9.0.0_r3-e2fsprogs.tar.xz 5255616 BLAKE2B 5fe62da70686148d755c60c1cef4b64d80f0c6a891d13a778d2a3209f950b0f9c5b19bf39ed28c5d38d01103ef1ea474133f57b7104a4fdf80eafd8edc17a3a5 SHA512 a9c3c180ddb96f10710a18794b20cfc641d40af3643a1133091127a40c27fa724b6e6f1af8e66fc1e1ca33053e33499b910880eab05979a2de95a0d3d7a79f93 |
30 |
+DIST android-tools-9.0.0_r3-extras.tar.xz 1653548 BLAKE2B 1a8c2ee2e564adc04d646ab54e1913d17e9ed0fb0ef3872bd8a459ecad5fbf7324830c1120c367d9515607ecc659fb0f27c4f7db740fda318fd13be1300a6a51 SHA512 13dc145faf919c1f7cc183f823ca46330568daff19ffb110af383876cdb6b0e9f0a83690a4e22633b572c1e6c2aba14ef0181c01720095173d258320229e9108 |
31 |
+DIST android-tools-9.0.0_r3-f2fs-tools.tar.xz 212092 BLAKE2B 32775e5b049bd2ff2ce7c9ea3362a602dcda6328e39036902020bd372a812898d84912f686cf347b225af630c2dea81ce30b601ac968b1168e2851b94ac2da2e SHA512 4fac8f18533c5c2270aed6e60b21721c643a44a27b37482ff8fd8fa4d7c875eb8a626d544ec4e6efb89c7408ae97e66ffd123588e90b98312e5291575ca8baa6 |
32 |
+DIST android-tools-9.0.0_r3-selinux.tar.xz 3202332 BLAKE2B 60a884eb1bd34fe5796f8fb33e5aefd7f9ffc85ac91784e0a8f0ca663010cf2222c80f4c419019b5817f9cbd8037ab78914e42417193e1b802a2682bb82c0097 SHA512 f0a77dc0ac91d434573370110c70529caabfd5f036c02ae5f1a4b2097e48324198d03ecdc92a622e1590012dd3f20f103384fed468f5e27aebcaf9315bb87078 |
33 |
+DIST android-tools-9.0.0_r3.ninja.xz 4244 BLAKE2B 14cea7523f22a7f4e02e93c32e4d4684e057abbe8e2b537b7e942cc27c13ea2aa13bcdb5c3ccafc261b8d7fc4b4cd4b9394e0970734b36111ccffbacecc5cfb9 SHA512 46956a608d6a9b93f1a035d6b0e153c476b55d4f8a2db4915b18ac9904a6d07befcbceb8e2e50054e7dbe2970be8539243134cd9722d2f2ec8a36a3153e03c56 |
34 |
DIST boringssl-14308731e5446a73ac2258688a9688b524483cb6.tar.gz 13030361 BLAKE2B 6982416b6e193e7faccd41fff3bd35f80b11d7495251d876e6b081bd94a887ec3c6bf5b7852d9595594fc2bdc57353f268272ef01fb79f7c93b52d46cbda69ac SHA512 171b524b0452a48853b2c8010ff5e14d5d720e69eeaf1d3b79f675838f3afa94aee9de2f47b37303feb2d92cbf77639efe585786625b7b37b8cc2ba727c37fdc |
35 |
+DIST boringssl-45210dd4e21ace9d28cb76b3f83303fcdd2efcce.tar.gz 13581532 BLAKE2B ca2f6757807adc265314a7444605c6199a19847fb426384bafa201bf63f4e3c7c567fb8094b740b8a00caf0d106bb1efea2893b00d45c9772740a81dc0a186f3 SHA512 c6695d078ee7b3694898dfdc0ee3382d01f9bb592ea46eb64026c73565735fd7251bbb0fd3e8c8552394bcdad5717de7ee5106cf1ed91aacec05d779ad693f6a |
36 |
|
37 |
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 |
38 |
new file mode 100644 |
39 |
index 00000000000..6399a1eb13c |
40 |
--- /dev/null |
41 |
+++ b/dev-util/android-tools/android-tools-9.0.0_p3.ebuild |
42 |
@@ -0,0 +1,131 @@ |
43 |
+# Copyright 1999-2018 Gentoo Authors |
44 |
+# Distributed under the terms of the GNU General Public License v2 |
45 |
+ |
46 |
+EAPI="6" |
47 |
+ |
48 |
+PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} ) |
49 |
+CMAKE_MAKEFILE_GENERATOR="ninja" |
50 |
+ |
51 |
+inherit flag-o-matic bash-completion-r1 ninja-utils toolchain-funcs cmake-utils python-r1 python-utils-r1 |
52 |
+ |
53 |
+MY_PV="${PV/_p/_r}" |
54 |
+MY_P=${PN}-${MY_PV} |
55 |
+ |
56 |
+DESCRIPTION="Android platform tools (adb, fastboot, and mkbootimg)" |
57 |
+HOMEPAGE="https://android.googlesource.com/platform/system/core.git/" |
58 |
+# See helper scripts in files/ for creating these tarballs and getting this hash. |
59 |
+BORINGSSL_SHA1="45210dd4e21ace9d28cb76b3f83303fcdd2efcce" |
60 |
+# The ninja file was created by running the ruby script from archlinux by hand and fixing the build vars. |
61 |
+# No point in depending on something large/uncommon like ruby just to generate a ninja file. |
62 |
+SRC_URI="https://git.archlinux.org/svntogit/community.git/snapshot/community-0ffb7b41d599741d100a6a00a4bb20e162cd3f90.tar.xz -> ${MY_P}-arch.tar.xz |
63 |
+ https://github.com/android/platform_system_core/archive/android-${MY_PV}.tar.gz -> ${MY_P}-core.tar.gz |
64 |
+ https://github.com/google/boringssl/archive/${BORINGSSL_SHA1}.tar.gz -> boringssl-${BORINGSSL_SHA1}.tar.gz |
65 |
+ mirror://gentoo/${MY_P}-e2fsprogs.tar.xz https://dev.gentoo.org/~zmedico/dist/${MY_P}-e2fsprogs.tar.xz |
66 |
+ mirror://gentoo/${MY_P}-extras.tar.xz https://dev.gentoo.org/~zmedico/dist/${MY_P}-extras.tar.xz |
67 |
+ mirror://gentoo/${MY_P}-selinux.tar.xz https://dev.gentoo.org/~zmedico/dist/${MY_P}-selinux.tar.xz |
68 |
+ mirror://gentoo/${MY_P}-f2fs-tools.tar.xz https://dev.gentoo.org/~zmedico/dist/${MY_P}-f2fs-tools.tar.xz |
69 |
+ mirror://gentoo/${MY_P}.ninja.xz https://dev.gentoo.org/~zmedico/dist/${MY_P}.ninja.xz" |
70 |
+ |
71 |
+# The entire source code is Apache-2.0, except for fastboot which is BSD-2. |
72 |
+LICENSE="Apache-2.0 BSD-2" |
73 |
+SLOT="0" |
74 |
+KEYWORDS="~amd64 ~arm ~x86 ~x86-linux" |
75 |
+IUSE="python" |
76 |
+ |
77 |
+DEPEND="sys-libs/zlib:= |
78 |
+ dev-libs/libpcre2:= |
79 |
+ virtual/libusb:1=" |
80 |
+RDEPEND="${DEPEND} |
81 |
+ python? ( ${PYTHON_DEPS} )" |
82 |
+DEPEND+=" |
83 |
+ dev-lang/go" |
84 |
+ |
85 |
+S=${WORKDIR} |
86 |
+CMAKE_USE_DIR="${S}/boringssl" |
87 |
+ |
88 |
+unpack_into() { |
89 |
+ local archive="$1" |
90 |
+ local dir="$2" |
91 |
+ |
92 |
+ mkdir -p "${dir}" |
93 |
+ pushd "${dir}" >/dev/null || die |
94 |
+ unpack "${archive}" |
95 |
+ if [[ ${dir} != ./* ]] ; then |
96 |
+ mv */* ./ || die |
97 |
+ fi |
98 |
+ popd >/dev/null |
99 |
+} |
100 |
+ |
101 |
+src_unpack() { |
102 |
+ unpack_into "${MY_P}-arch.tar.xz" arch |
103 |
+ unpack_into "${MY_P}-core.tar.gz" core |
104 |
+ unpack_into "${MY_P}-e2fsprogs.tar.xz" ./e2fsprogs |
105 |
+ unpack_into "${MY_P}-extras.tar.xz" extras |
106 |
+ unpack_into "${MY_P}-f2fs-tools.tar.xz" ./f2fs-tools |
107 |
+ unpack_into "${MY_P}-selinux.tar.xz" ./selinux |
108 |
+ unpack_into boringssl-${BORINGSSL_SHA1}.tar.gz boringssl |
109 |
+ |
110 |
+ unpack "${MY_P}.ninja.xz" |
111 |
+ mv "${MY_P}.ninja" "build.ninja" || die |
112 |
+ |
113 |
+ # Avoid depending on gtest just for its prod headers when boringssl bundles it. |
114 |
+ ln -s ../../boringssl/third_party/googletest/include/gtest core/include/ || die |
115 |
+} |
116 |
+ |
117 |
+src_prepare() { |
118 |
+ sed -e 's:elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i386"):\0\n set(ARCH "x86")\nelseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i586"):' \ |
119 |
+ -i "${S}"/boringssl/CMakeLists.txt || die #668792 |
120 |
+ |
121 |
+ cd "${S}"/core || die |
122 |
+ eapply "${WORKDIR}"/arch/trunk/fix_build_core.patch |
123 |
+ eapply "${FILESDIR}"/android-tools-8.1.0_p1-build.patch |
124 |
+ |
125 |
+ cd "${S}"/selinux || die |
126 |
+ eapply "${WORKDIR}"/arch/trunk/fix_build_selinux.patch |
127 |
+ |
128 |
+ cd "${S}"/e2fsprogs || die |
129 |
+ eapply "${WORKDIR}"/arch/trunk/fix_build_e2fsprogs.patch |
130 |
+ |
131 |
+ cd "${S}"/extras |
132 |
+ sed -e 's|^#include <sys/cdefs.h>$|/*\0*/|' \ |
133 |
+ -e 's|^__BEGIN_DECLS$|#ifdef __cplusplus\nextern "C" {\n#endif|' \ |
134 |
+ -e 's|^__END_DECLS$|#ifdef __cplusplus\n}\n#endif|' \ |
135 |
+ -i ext4_utils/include/ext4_utils/ext4_crypt{,_init_extensions}.h || die #580686 |
136 |
+ |
137 |
+ cd "${S}" || die |
138 |
+ default |
139 |
+ |
140 |
+ # The pregenerated ninja file expects the build/ dir. |
141 |
+ BUILD_DIR="${CMAKE_USE_DIR}/build" |
142 |
+ cmake-utils_src_prepare |
143 |
+} |
144 |
+ |
145 |
+src_configure() { |
146 |
+ append-lfs-flags |
147 |
+ |
148 |
+ cmake-utils_src_configure |
149 |
+ |
150 |
+ sed -i \ |
151 |
+ -e "s:@CC@:$(tc-getCC):g" \ |
152 |
+ -e "s:@CXX@:$(tc-getCXX):g" \ |
153 |
+ -e "s:@CFLAGS@:${CFLAGS}:g" \ |
154 |
+ -e "s:@CPPFLAGS@:${CPPFLAGS}:g" \ |
155 |
+ -e "s:@CXXFLAGS@:${CXXFLAGS}:g" \ |
156 |
+ -e "s:@LDFLAGS@:${LDFLAGS}:g" \ |
157 |
+ -e "s:@PV@:${PV}:g" \ |
158 |
+ build.ninja || die |
159 |
+} |
160 |
+ |
161 |
+src_compile() { |
162 |
+ # We only need a few libs from boringssl. |
163 |
+ cmake-utils_src_compile libcrypto.a libssl.a |
164 |
+ |
165 |
+ eninja |
166 |
+} |
167 |
+ |
168 |
+src_install() { |
169 |
+ dobin adb e2fsdroid ext2simg fastboot mke2fs.android |
170 |
+ dodoc core/adb/*.{txt,TXT} core/fastboot/README.md |
171 |
+ use python && python_foreach_impl python_doexe core/mkbootimg/mkbootimg |
172 |
+ newbashcomp arch/trunk/bash_completion.fastboot fastboot |
173 |
+} |