diff options
Diffstat (limited to 'dev-util')
-rw-r--r-- | dev-util/Manifest.gz | bin | 68115 -> 68106 bytes | |||
-rw-r--r-- | dev-util/android-tools/Manifest | 3 | ||||
-rw-r--r-- | dev-util/android-tools/android-tools-34.0.1.ebuild | 95 | ||||
-rw-r--r-- | dev-util/android-tools/files/android-tools-34.0.0-protobuf.patch | 41 |
4 files changed, 139 insertions, 0 deletions
diff --git a/dev-util/Manifest.gz b/dev-util/Manifest.gz Binary files differindex f54bf0a20368..679692471588 100644 --- a/dev-util/Manifest.gz +++ b/dev-util/Manifest.gz diff --git a/dev-util/android-tools/Manifest b/dev-util/android-tools/Manifest index effc904816cc..3a22885d1e7c 100644 --- a/dev-util/android-tools/Manifest +++ b/dev-util/android-tools/Manifest @@ -1,8 +1,11 @@ AUX android-tools-33.0.3-adb-0023-Update-usage-of-usbdevfs_urb-to-match-new-kernel-UAP.patch 5109 BLAKE2B 4deee34669ce000050d04cf01040920a22ca0caafca006ff2651198a60936dce9e8f783263b05beb91bef8c015e14362725aa4dc23c32be30c6796ad20e69ad7 SHA512 4b8afcf5290be113d98572a9a1ad5309c8bf75f0c17aed2f698d3302f796f8fb7ead3422d649c4909019cf766ae16fc0d75401fb15eb42130e58b451d628af21 AUX android-tools-33.0.3-adb-gcc-13.patch 798 BLAKE2B dea7b3086b4e879224625dbc50de045d4c3f05fed4fa5254b041d3c4526cfa04bd764b9f67f17ed332efe66a6b43637c71b3fe0db4a276ae133c5be74cb50ab9 SHA512 55444dcb7d4266f412ca54a018783fe10abe751e9aca3ef8494245a0b358bece07743c3773659d891822acfef0fa2edafec7857a0f4b522177b670f2a2489b96 +AUX android-tools-34.0.0-protobuf.patch 1414 BLAKE2B 599881bcf7b0b44592f3779abe54f1e727a6726ff758d51c5a7cdf3d2a08439dcf4ec6e9cae5ad36f7f64bb7d57d40c8c629752469925e6372371449e0a3d6fb SHA512 14a9bbeef4de9f6c6d13af2b0797fa448670be0c4e3ae6453dae90674a5ac685b18361a12619a3ce7900f511b3cea2e1508bf35b127fb18aa6e2942eb52c36ef 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 +DIST android-tools-34.0.1.tar.xz 37904276 BLAKE2B 6b4d31dadbc646d52c8abd65602264dc16127eb36286d23be447539b0d9b46154592a04af37b3e7617933e62529e953b958db8cb77622e72cfe5ab176f822437 SHA512 413ddcca9a461d1c0a12d7fd19b9d8955619b281e1153318ed961bec17ad92bec103671abc8d63525bc83669376f37c11c887cc4cada85719120dff6c3951274 EBUILD android-tools-33.0.3-r1.ebuild 2384 BLAKE2B 5254d2332524ba5f45b697a4a629092847d4500f46aeb63cd3a87a098803eace1e1f8fa23bc00f3c6e26a2a9383fd6c165a30c89071ba44a11da7296ee3c1e3c SHA512 9191f11cf7cca821db90a877f5d2b9763b983f5d8553ab2ea19062ffa1c967158fab0e2f936672cae3440c2451d691905e1a776002468f6300d5d06e959ef988 EBUILD android-tools-34.0.0.ebuild 2438 BLAKE2B 59b54a35075efb311afad6b54a70d3091a16bd16fe7d99e23d189784ab40481b89e36d836c076aeb5f134d320051375d7cabc8ff8bd5fa834b95cfa7de5fafae SHA512 019fc5ca93170e7a4441a806940621a2b03cc2e50443a8fe26a458aef1150605bbb5c12fecc45687aed2b64a51cb48369d341deaf325e92c98d15398493974a6 +EBUILD android-tools-34.0.1.ebuild 2491 BLAKE2B bc6d076805c9b8bb9b0da85167cbe645106163fe1f87872677dff114f3a4be3581a1c7b705178c9054cd7d1b49b862065fa2541c61a729944e6e4627c694e8e7 SHA512 bb9c5e2bc7e448cb046a9653fc77031bf3852c385b9a12c3483075571083b0c81a5583b5b9e4b35fa669fff473dee6862d9a50c968e8abcf044e647075a73033 MISC metadata.xml 724 BLAKE2B 7ef6e07d806dff51946236dfee2f5eaf207fd7c9cde6e73cb7f372fea5cd8b2b559e4f1fe81a315c41beed5beba92603cc93a16183d63953fbed4ba0d2941116 SHA512 d47cf87259ad2b2a8d6f8edf6b2c2084d0046773447ed9647cc232437ec8f3e8c452cb26ac7e0a619b220e073518903b77c55ba7c2e9f7663069fea2e7096e75 diff --git a/dev-util/android-tools/android-tools-34.0.1.ebuild b/dev-util/android-tools/android-tools-34.0.1.ebuild new file mode 100644 index 000000000000..74e9b64d54ea --- /dev/null +++ b/dev-util/android-tools/android-tools-34.0.1.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..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" + eapply "${FILESDIR}/${PN}-34.0.0-protobuf.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 +} diff --git a/dev-util/android-tools/files/android-tools-34.0.0-protobuf.patch b/dev-util/android-tools/files/android-tools-34.0.0-protobuf.patch new file mode 100644 index 000000000000..d7aa309410a4 --- /dev/null +++ b/dev-util/android-tools/files/android-tools-34.0.0-protobuf.patch @@ -0,0 +1,41 @@ +https://bugs.gentoo.org/912789 +https://github.com/nmeum/android-tools/commit/c5eae90a06072c6982e483f8154e490b47e620f7 +https://github.com/nmeum/android-tools/pull/120#issuecomment-1621066529 + +--- a/vendor/CMakeLists.txt ++++ b/vendor/CMakeLists.txt +@@ -73,6 +73,8 @@ + pkg_check_modules(libzstd REQUIRED IMPORTED_TARGET libzstd) + ++find_package(Protobuf CONFIG) + find_package(Protobuf REQUIRED) ++set(PROTOBUF_LIBRARIES protobuf::libprotobuf) + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) + +--- a/vendor/extras/libjsonpb/parse/jsonpb.cpp ++++ b/vendor/extras/libjsonpb/parse/jsonpb.cpp +@@ -50,8 +50,10 @@ + if (!status.ok()) { + #if GOOGLE_PROTOBUF_VERSION < 3016000 + return MakeError<std::string>(status.error_message().as_string()); +-#else ++#elif GOOGLE_PROTOBUF_VERSION < 4022000 + return MakeError<std::string>(status.message().as_string()); ++#else ++ return MakeError<std::string>(std::string(status.message())); + #endif + } + return ErrorOr<std::string>(std::move(json)); +@@ -67,8 +69,10 @@ + if (!status.ok()) { + #if GOOGLE_PROTOBUF_VERSION < 3016000 + return MakeError<std::monostate>(status.error_message().as_string()); +-#else ++#elif GOOGLE_PROTOBUF_VERSION < 4022000 + return MakeError<std::monostate>(status.message().as_string()); ++#else ++ return MakeError<std::monostate>(std::string(status.message())); + #endif + } + if (!message->ParseFromString(binary)) { |