diff options
author | Jianhua Lu <lujianhua000@gmail.com> | 2023-03-12 17:00:44 +0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2023-03-12 16:42:11 -0700 |
commit | 149cd622143dccf0198373e2d252d008644f583f (patch) | |
tree | 7f0c2399c1e99941ec611f366148bb2425ae4ea2 /dev-util/android-tools | |
parent | dev-cpp/cpp-httplib: bump to 0.12.1 (diff) | |
download | gentoo-149cd622143dccf0198373e2d252d008644f583f.tar.gz gentoo-149cd622143dccf0198373e2d252d008644f583f.tar.bz2 gentoo-149cd622143dccf0198373e2d252d008644f583f.zip |
dev-util/android-tools: add 34.0.0
Bump from 33.0.3-r1 -> 34.0.0.
1. Remove apply adb patches statement line, as they has been merged.
2. Add mkdtboimg and avbtool python script.
Closes: https://github.com/gentoo/gentoo/pull/30073
Signed-off-by: Jianhua Lu <lujianhua000@gmail.com>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'dev-util/android-tools')
-rw-r--r-- | dev-util/android-tools/Manifest | 1 | ||||
-rw-r--r-- | dev-util/android-tools/android-tools-34.0.0.ebuild | 94 |
2 files changed, 95 insertions, 0 deletions
diff --git a/dev-util/android-tools/Manifest b/dev-util/android-tools/Manifest index ce460cffc27c..157b8efb06a8 100644 --- a/dev-util/android-tools/Manifest +++ b/dev-util/android-tools/Manifest @@ -1,2 +1,3 @@ DIST android-tools-31.0.3-no-gtest.patch 3152 BLAKE2B da71e3cba87b21ffcb144602a06d7e269faabd173233363b757cd2191c051f8d3281f591117d4551d7acc029d6e2d421f702f9f836dfe0dec6c676aa39a2d9fe SHA512 a28d2264bf40c420a279acf1f4c3b4588d96ce2d6e2d6d322abbde62d773804bef10dc33f13dd52c7de80ace6c58f91ae28f5d4e8e97dfae4d2a8473d8537423 DIST android-tools-33.0.3.tar.xz 25300756 BLAKE2B 4254f0ab8657966cf56e2a7c3e9a3d889dfa9f26e61d8b46480bb74c5a8be33494f450827e3b2db4087006b3160892e6a846ef33719870cbbd032647cfc3ce78 SHA512 78c8141f5f13f1c0e5da474e1d79760a612e911519af4e9f21c0e5005f2ce99f3aeacf16f3fcdfe1250fc795a88190fa243592e1066a2156e1fd8d2b9c3d7f71 +DIST android-tools-34.0.0.tar.xz 37882448 BLAKE2B 19698c08dd650abba61e5cad9f7474ee3993f5b1fd2f173221560e5ccfc1677093758c325833993a68058c1427e132986b009f9e69a1eae9c4447053920b6feb SHA512 2d24cd95df7da1efa902fab3c848e2ebf09d3335fac61e667b19e1892e95c30a850413d354ceda72a402014623bbda4154cc33fb93a62c31fece8857efbbd596 diff --git a/dev-util/android-tools/android-tools-34.0.0.ebuild b/dev-util/android-tools/android-tools-34.0.0.ebuild new file mode 100644 index 000000000000..499cca3d2025 --- /dev/null +++ b/dev-util/android-tools/android-tools-34.0.0.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..11} ) + +inherit cmake python-r1 + +DESCRIPTION="Android platform tools (adb, fastboot, and mkbootimg)" +HOMEPAGE="https://github.com/nmeum/android-tools/ https://developer.android.com/" + +MY_PV="${PV//_/}" +SRC_URI="https://github.com/nmeum/android-tools/releases/download/${MY_PV}/${PN}-${MY_PV}.tar.xz + https://dev.gentoo.org/~zmedico/dist/${PN}-31.0.3-no-gtest.patch +" +S="${WORKDIR}/${PN}-${MY_PV}" + +# 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 ~arm64 ~x86" +IUSE="python udev" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +# dev-libs/libpcre only required for e2fsdroid +DEPEND=" + app-arch/brotli:= + app-arch/lz4:= + app-arch/zstd:= + dev-libs/libpcre2:= + >=dev-libs/protobuf-3.0.0:= + sys-libs/zlib:= + virtual/libusb:1= +" +RDEPEND="${DEPEND} + udev? ( dev-util/android-udev-rules ) + python? ( ${PYTHON_DEPS} ) +" +BDEPEND=" + dev-lang/go + dev-lang/perl +" + +DOCS=() + +src_prepare() { + eapply "${DISTDIR}/${PN}-31.0.3-no-gtest.patch" + + cd "${S}/vendor/core" || die + eapply "${S}/patches/core/0011-Remove-the-useless-dependency-on-gtest.patch" + + cd "${S}/vendor/libziparchive" || die + eapply "${S}/patches/libziparchive/0004-Remove-the-useless-dependency-on-gtest.patch" + + cd "${S}" || die + rm -r patches || die + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + # Statically link the bundled boringssl + -DBUILD_SHARED_LIBS=OFF + ) + cmake_src_configure +} + +src_compile() { + export GOCACHE="${T}/go-build" + export GOFLAGS="-mod=vendor" + cmake_src_compile +} + +src_install() { + cmake_src_install + rm "${ED}/usr/bin/mkbootimg" || die + rm "${ED}/usr/bin/unpack_bootimg" || die + rm "${ED}/usr/bin/repack_bootimg" || die + rm "${ED}/usr/bin/mkdtboimg" || die + rm "${ED}/usr/bin/avbtool" || die + + if use python; then + python_foreach_impl python_newexe vendor/mkbootimg/mkbootimg.py mkbootimg + python_foreach_impl python_newexe vendor/mkbootimg/unpack_bootimg.py unpack_bootimg + python_foreach_impl python_newexe vendor/mkbootimg/repack_bootimg.py repack_bootimg + python_foreach_impl python_newexe vendor/libufdt/utils/src/mkdtboimg.py mkdtboimg + python_foreach_impl python_newexe vendor/avb/avbtool.py avbtool + fi + docinto adb + dodoc vendor/adb/*.{txt,TXT} + docinto fastboot + dodoc vendor/core/fastboot/README.md +} |