pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
android-tools: Import android-tools-35.0.2
Module Name: pkgsrc-wip
Committed By: Mike Volokhov <mike.volokhov%gmail.com@localhost>
Pushed By: mishka
Date: Sun May 24 20:35:58 2026 +0300
Changeset: 601c64ebb6b8c8bc9ba85bd40c6d85ebc8f7728f
Modified Files:
Makefile
Added Files:
android-tools/DESCR
android-tools/Makefile
android-tools/PLIST
android-tools/PLIST.adb-only
android-tools/TODO
android-tools/distinfo
android-tools/patches/patch-vendor_extras_libjsonpb_parse_jsonpb.cpp
Log Message:
android-tools: Import android-tools-35.0.2
CMake-based packaging of the modern AOSP adb, fastboot and image
utilities, via nmeum/android-tools (the same source used by Arch,
Debian, Fedora and Alpine). Tracks Google's SDK Platform-Tools.
Intended as a replacement for devel/android-tools-adb, which still
ships the 2015 C-era adb from Android 5.x and fails to push the
scrcpy server (and other modern payloads) to current devices with
"protocol fault (no status)".
Initial import is darwin/Linux focused; fastboot and adb's fdevent
loop both need work to build on the BSDs (epoll, Linux usbfs).
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=601c64ebb6b8c8bc9ba85bd40c6d85ebc8f7728f
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 3 +-
android-tools/DESCR | 3 ++
android-tools/Makefile | 55 ++++++++++++++++++++++
android-tools/PLIST | 27 +++++++++++
android-tools/PLIST.adb-only | 3 ++
android-tools/TODO | 13 +++++
android-tools/distinfo | 6 +++
.../patch-vendor_extras_libjsonpb_parse_jsonpb.cpp | 19 ++++++++
8 files changed, 128 insertions(+), 1 deletion(-)
diffs:
diff --git a/Makefile b/Makefile
index bde3093bad..bd843038d7 100644
--- a/Makefile
+++ b/Makefile
@@ -169,6 +169,7 @@ SUBDIR+= amavis-logwatch
SUBDIR+= amlogic-meson-fwtools
SUBDIR+= amneziawg-go
SUBDIR+= analizo
+SUBDIR+= android-tools
SUBDIR+= angelscript
SUBDIR+= ansible-junos-stdlib
SUBDIR+= anthy-dic-jis34
@@ -5174,9 +5175,9 @@ SUBDIR+= rhapsody
SUBDIR+= riak
SUBDIR+= riak14
SUBDIR+= ricochet
+SUBDIR+= rio
SUBDIR+= ripe-rpsl-objectlibrary
SUBDIR+= ripit
-SUBDIR+= rio
SUBDIR+= ripole
SUBDIR+= rippled
SUBDIR+= riscv64-none-elf-binutils
diff --git a/android-tools/DESCR b/android-tools/DESCR
new file mode 100644
index 0000000000..eead8106b3
--- /dev/null
+++ b/android-tools/DESCR
@@ -0,0 +1,3 @@
+Android unofficial platform-tools, a CMake-based extraction of the
+modern AOSP adb, fastboot, mkbootimg and image utilities. Tracks
+Google's SDK Platform-Tools releases.
diff --git a/android-tools/Makefile b/android-tools/Makefile
new file mode 100644
index 0000000000..9349f46394
--- /dev/null
+++ b/android-tools/Makefile
@@ -0,0 +1,55 @@
+# $NetBSD$
+
+DISTNAME= android-tools-35.0.2
+CATEGORIES= devel
+MASTER_SITES= ${MASTER_SITE_GITHUB:=nmeum/}android-tools/releases/download/${PKGVERSION_NOREV}/
+EXTRACT_SUFX= .tar.xz
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://github.com/nmeum/android-tools/
+COMMENT= Unoffical CMake-based build system for Android CLI utils
+LICENSE= apache-2.0
+
+CONFLICTS+= android-tools-adb-[0-9]*
+
+USE_LANGUAGES= c c++
+USE_TOOLS+= pkg-config gmake perl
+
+GCC_REQD+= 10 # C++17 + designated initializers
+
+# Required by upstream's build for a couple of helpers (per README).
+BUILD_DEPENDS+= go-[0-9]*:../../lang/go
+
+REPLACE_PYTHON+= vendor/avb/avbtool.py
+REPLACE_PYTHON+= vendor/mkbootimg/mkbootimg.py
+REPLACE_PYTHON+= vendor/mkbootimg/repack_bootimg.py
+REPLACE_PYTHON+= vendor/mkbootimg/unpack_bootimg.py
+REPLACE_PYTHON+= vendor/libufdt/utils/src/mkdtboimg.py
+
+CHECK_PORTABILITY_SKIP+= vendor/logging/logcat/logcatd.sh
+CHECK_PORTABILITY_SKIP+= vendor/extras/ioshark/compile-only.sh
+CHECK_PORTABILITY_SKIP+= vendor/extras/ioshark/collect-straces-ftraces.sh
+
+.include "../../mk/bsd.prefs.mk"
+.include "../../lang/python/application.mk"
+
+# XXX fastboot's USB backend has heavy Linux-isms (linux/usbdevice_fs.h,
+# epoll). Constrain to platforms where upstream is known to build.
+.if ${OPSYS} == "Linux" || ${OPSYS} == "Darwin"
+PLIST_SRC= ${PKGDIR}/PLIST
+.else
+PLIST_SRC= ${PKGDIR}/PLIST.adb-only
+.endif
+
+LDFLAGS.Darwin+= -framework CoreFoundation -framework IOKit
+
+.include "../../archivers/brotli/buildlink3.mk"
+.include "../../archivers/lz4/buildlink3.mk"
+.include "../../archivers/zstd/buildlink3.mk"
+.include "../../devel/cmake/build.mk"
+.include "../../devel/googletest/buildlink3.mk"
+.include "../../devel/libusb1/buildlink3.mk"
+.include "../../devel/pcre2/buildlink3.mk"
+.include "../../devel/protobuf/buildlink3.mk"
+.include "../../textproc/fmtlib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/android-tools/PLIST b/android-tools/PLIST
new file mode 100644
index 0000000000..0723d1b906
--- /dev/null
+++ b/android-tools/PLIST
@@ -0,0 +1,27 @@
+@comment $NetBSD$
+bin/adb
+bin/append2simg
+bin/avbtool
+bin/ext2simg
+bin/fastboot
+bin/img2simg
+bin/lpadd
+bin/lpdump
+bin/lpflash
+bin/lpmake
+bin/lpunpack
+bin/make_f2fs
+bin/mkbootimg
+bin/mkdtboimg
+bin/mke2fs.android
+bin/repack_bootimg
+bin/simg2img
+bin/sload_f2fs
+bin/unpack_bootimg
+man/man1/adb.1
+share/android-tools/completions/adb
+share/android-tools/completions/fastboot
+share/android-tools/mkbootimg/gki/generate_gki_certificate.py
+share/android-tools/mkbootimg/mkbootimg.py
+share/bash-completion/completions/adb
+share/bash-completion/completions/fastboot
diff --git a/android-tools/PLIST.adb-only b/android-tools/PLIST.adb-only
new file mode 100644
index 0000000000..d0619ffd25
--- /dev/null
+++ b/android-tools/PLIST.adb-only
@@ -0,0 +1,3 @@
+@comment $NetBSD$
+bin/adb
+man/man1/adb.1
diff --git a/android-tools/TODO b/android-tools/TODO
new file mode 100644
index 0000000000..7026ecdda4
--- /dev/null
+++ b/android-tools/TODO
@@ -0,0 +1,13 @@
+- Linux smoke build. Package has been built and stage-installed
+ cleanly on darwin/arm64 only. Confirm Linux before committing -
+ the PLIST/PLIST.adb-only split assumes Linux works equivalently.
+
+- NetBSD/other BSD: fastboot's USB backend uses Linux usbfs ioctls
+ and epoll, and adb's fdevent loop uses epoll. PLIST.adb-only
+ exists but has not been exercised; adb on NetBSD likely needs
+ patches porting fdevent to kqueue.
+
+- Reverse-CONFLICTS in devel/android-tools-adb. Add
+ CONFLICTS+= android-tools-[0-9]*
+ to that Makefile so install order doesn't matter and pkg_admin
+ reports the conflict from either direction.
diff --git a/android-tools/distinfo b/android-tools/distinfo
new file mode 100644
index 0000000000..2221e7aa7c
--- /dev/null
+++ b/android-tools/distinfo
@@ -0,0 +1,6 @@
+$NetBSD$
+
+BLAKE2s (android-tools-35.0.2.tar.xz) = 094cf25230baf2319ef022c892bb2c5b4f0e7183a62c20efc432a7250d55e956
+SHA512 (android-tools-35.0.2.tar.xz) = 391ce4d638b274d7bbae24a3df8de8b5812a982570f29b2aef37d12a3ba7ed6f66b5c0b7f908759e0b0da30d152b5319af0fef16c54bdc3b9f4074fb22f80d10
+Size (android-tools-35.0.2.tar.xz) = 18847376 bytes
+SHA1 (patch-vendor_extras_libjsonpb_parse_jsonpb.cpp) = 477a8b03280b6fdb0f09578d4e6a4cb49f083b42
diff --git a/android-tools/patches/patch-vendor_extras_libjsonpb_parse_jsonpb.cpp b/android-tools/patches/patch-vendor_extras_libjsonpb_parse_jsonpb.cpp
new file mode 100644
index 0000000000..df5d0a5c45
--- /dev/null
+++ b/android-tools/patches/patch-vendor_extras_libjsonpb_parse_jsonpb.cpp
@@ -0,0 +1,19 @@
+$NetBSD$
+
+protobuf 27+ changed Descriptor::full_name() to return absl::string_view
+instead of const std::string&, which no longer participates in operator+
+with std::string. Wrap explicitly so the expression compiles against
+both old and new protobuf.
+
+--- vendor/extras/libjsonpb/parse/jsonpb.cpp.orig
++++ vendor/extras/libjsonpb/parse/jsonpb.cpp
+@@ -33,7 +33,8 @@ using google::protobuf::util::TypeResolv
+ static constexpr char kTypeUrlPrefix[] = "type.googleapis.com";
+
+ std::string GetTypeUrl(const Message& message) {
+- return std::string(kTypeUrlPrefix) + "/" + message.GetDescriptor()->full_name();
++ return std::string(kTypeUrlPrefix) + "/" +
++ std::string(message.GetDescriptor()->full_name());
+ }
+
+ ErrorOr<std::string> MessageToJsonString(const Message& message) {
Home |
Main Index |
Thread Index |
Old Index