svn commit: r453204 - in head/devel: android-tools-adb android-tools-adb-devel android-tools-adb-devel/files android-tools-adb/files android-tools-fastboot android-tools-fastboot-devel android-tool...
Jan Beich
jbeich at FreeBSD.org
Mon Oct 30 18:36:24 UTC 2017
Author: jbeich
Date: Mon Oct 30 18:36:22 2017
New Revision: 453204
URL: https://svnweb.freebsd.org/changeset/ports/453204
Log:
devel/android-tools-{adb,fastboot}: update to 8.0.0.r24
Changes: https://android.googlesource.com/platform/system/core/+log/android-8.0.0_r4..android-8.0.0_r24/adb
Changes: https://android.googlesource.com/platform/system/core/+log/android-8.0.0_r4..android-8.0.0_r24/fastboot
Added:
head/devel/android-tools-fastboot/files/patch-libsparse_sparse__read.cpp (contents, props changed)
- copied, changed from r453203, head/devel/android-tools-fastboot-devel/files/patch-libsparse_sparse__read.cpp
Deleted:
head/devel/android-tools-adb-devel/files/patch-adb_client_usb__libusb.cpp
head/devel/android-tools-adb-devel/files/patch-base_include_android-base_logging.h
head/devel/android-tools-fastboot-devel/files/patch-libsparse_sparse__read.cpp
Modified:
head/devel/android-tools-adb-devel/Makefile (contents, props changed)
head/devel/android-tools-adb/Makefile (contents, props changed)
head/devel/android-tools-adb/distinfo (contents, props changed)
head/devel/android-tools-adb/files/Makefile (contents, props changed)
head/devel/android-tools-adb/files/patch-adb_client_usb__libusb.cpp (contents, props changed)
head/devel/android-tools-adb/files/patch-base_include_android-base_logging.h (contents, props changed)
head/devel/android-tools-fastboot-devel/Makefile (contents, props changed)
head/devel/android-tools-fastboot/Makefile (contents, props changed)
head/devel/android-tools-fastboot/distinfo (contents, props changed)
head/devel/android-tools-fastboot/files/Makefile (contents, props changed)
Modified: head/devel/android-tools-adb-devel/Makefile
==============================================================================
--- head/devel/android-tools-adb-devel/Makefile Mon Oct 30 18:36:00 2017 (r453203)
+++ head/devel/android-tools-adb-devel/Makefile Mon Oct 30 18:36:22 2017 (r453204)
@@ -9,7 +9,6 @@ CONFLICTS_INSTALL= ${PORTNAME}-[0-9]*
MASTERDIR= ${.CURDIR}/../android-tools-adb
DISTINFO_FILE= ${.CURDIR}/distinfo
-EXTRA_PATCHES= ${.CURDIR}/files/patch-*
GH_MYTAG= ${DISTVERSIONPREFIX}${DISTVERSION:C/-[0-9]*$//}
Modified: head/devel/android-tools-adb/Makefile
==============================================================================
--- head/devel/android-tools-adb/Makefile Mon Oct 30 18:36:00 2017 (r453203)
+++ head/devel/android-tools-adb/Makefile Mon Oct 30 18:36:22 2017 (r453204)
@@ -2,16 +2,10 @@
PORTNAME= android-tools-adb
DISTVERSIONPREFIX= android-
-DISTVERSION?= 8.0.0_r4
-PORTREVISION?= 1
+DISTVERSION?= 8.0.0_r24
+PORTREVISION?= 0
CATEGORIES= devel comms
-.ifndef EXTRA_PATCHES
-PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
-PATCHFILES+= 46de1d7f03b7.patch:-p1
-PATCHFILES+= 5d002b8d6ae0.patch:-p1
-.endif
-
MAINTAINER= jbeich at FreeBSD.org
COMMENT= Android debug bridge command line tool
@@ -25,14 +19,10 @@ GH_PROJECT= platform_system_core
.ifdef DISTVERSIONSUFFIX
GH_REVISION= ${DISTVERSIONSUFFIX:S/-g//} # snapshot
.else
-GH_REVISION= f6a78079a81a # generated by: make update-revision
+GH_REVISION= 6cd85e2a8934 # generated by: make update-revision
.endif
CONFLICTS_INSTALL?= ${PORTNAME}-devel-*
-
-.ifndef EXTRA_PATCHES
-EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-base_include_android-base_logging.h
-.endif
USES= compiler:c++14-lang pkgconfig ssl uidfix
BUILD_WRKSRC= ${WRKSRC}/adb
Modified: head/devel/android-tools-adb/distinfo
==============================================================================
--- head/devel/android-tools-adb/distinfo Mon Oct 30 18:36:00 2017 (r453203)
+++ head/devel/android-tools-adb/distinfo Mon Oct 30 18:36:22 2017 (r453204)
@@ -1,10 +1,10 @@
-TIMESTAMP = 1498603192
-SHA256 (android-platform_system_core-android-8.0.0_r4_GH0.tar.gz) = 3eb686edb1ccaa7312fb195b65c413823a6d60442d519c499c18b2d18c3094a9
-SIZE (android-platform_system_core-android-8.0.0_r4_GH0.tar.gz) = 5115403
+TIMESTAMP = 1502781926
+SHA256 (android-platform_system_core-android-8.0.0_r24_GH0.tar.gz) = 6b55a409e6c03f58add5a0d13765ebcb6aee7ecef6452ef5d780228209cb8a3a
+SIZE (android-platform_system_core-android-8.0.0_r24_GH0.tar.gz) = 5190913
SHA256 (mbrubeck-android-completion-c1b0656_GH0.tar.gz) = ca3311ba47a5edd56c929ac9aae57c02c2c3f1636519c5f67abb00b6e3ecd75c
SIZE (mbrubeck-android-completion-c1b0656_GH0.tar.gz) = 5967
-SHA256 (android-platform_development-android-8.0.0_r4_GH0.tar.gz) = b6399cc349a332ef818f5041dd39742322bcf96d54663ec8a11e38cb5271096c
-SIZE (android-platform_development-android-8.0.0_r4_GH0.tar.gz) = 93751770
+SHA256 (android-platform_development-android-8.0.0_r24_GH0.tar.gz) = 1477bab3bfe7202ab7bc716a20deb99e5c151d69df44a6a478e7de2cf10acb4d
+SIZE (android-platform_development-android-8.0.0_r24_GH0.tar.gz) = 93766075
SHA256 (46de1d7f03b7.patch) = 93bf49a9a93f2b660f39041f8dbd179ea8f1170c1bebeee42f7df1dc1c393579
SIZE (46de1d7f03b7.patch) = 12346
SHA256 (5d002b8d6ae0.patch) = 0d105587abea3afbfd320a95be3f8532f213778a6f699150c4d4477334c9eef2
Modified: head/devel/android-tools-adb/files/Makefile
==============================================================================
--- head/devel/android-tools-adb/files/Makefile Mon Oct 30 18:36:00 2017 (r453203)
+++ head/devel/android-tools-adb/files/Makefile Mon Oct 30 18:36:22 2017 (r453204)
@@ -101,7 +101,7 @@ SRCS+= stderr_write.c
REVISION?= $$(${GIT} rev-parse --short=12 HEAD 2>/dev/null || echo unknown)
-CPPFLAGS+= -DADB_REVISION="\"${REVISION}-android\""
+CPPFLAGS+= -DADB_VERSION="\"26.0.0 rc1-${REVISION}-android\""
CPPFLAGS+= -DADB_HOST=1
CPPFLAGS+= -DHAVE_FORKEXEC=1
CPPFLAGS+= -DHAVE_SYMLINKS
Modified: head/devel/android-tools-adb/files/patch-adb_client_usb__libusb.cpp
==============================================================================
--- head/devel/android-tools-adb/files/patch-adb_client_usb__libusb.cpp Mon Oct 30 18:36:00 2017 (r453203)
+++ head/devel/android-tools-adb/files/patch-adb_client_usb__libusb.cpp Mon Oct 30 18:36:22 2017 (r453204)
@@ -28,3 +28,103 @@
usb_handle(const std::string& device_address, const std::string& serial,
unique_device_handle&& device_handle, uint8_t interface, uint8_t bulk_in,
uint8_t bulk_out, size_t zero_mask, size_t max_packet_size)
+@@ -152,7 +156,14 @@ struct usb_handle : public ::usb_handle {
+ static auto& usb_handles = *new std::unordered_map<std::string, std::unique_ptr<usb_handle>>();
+ static auto& usb_handles_mutex = *new std::mutex();
+
++#if defined(LIBUSB_API_VERSION) && LIBUSB_API_VERSION >= 0x01000102
+ static libusb_hotplug_callback_handle hotplug_handle;
++#else
++static std::thread* device_poll_thread = nullptr;
++static bool terminate_device_poll_thread = false;
++static auto& device_poll_mutex = *new std::mutex();
++static auto& device_poll_cv = *new std::condition_variable();
++#endif
+
+ static std::string get_device_address(libusb_device* device) {
+ return StringPrintf("usb:%d:%d", libusb_get_bus_number(device),
+@@ -380,6 +391,7 @@ static void process_device(libusb_device* device) {
+ LOG(INFO) << "registered new usb device '" << device_serial << "'";
+ }
+
++#if defined(LIBUSB_API_VERSION) && LIBUSB_API_VERSION >= 0x01000102
+ static std::atomic<int> connecting_devices(0);
+
+ static void device_connected(libusb_device* device) {
+@@ -449,7 +461,31 @@ static int hotplug_callback(libusb_context*, libusb_de
+ hotplug_queue.Push({event, device});
+ return 0;
+ }
++#else
++static void poll_for_devices() {
++ libusb_device** list;
++ adb_thread_setname("device poll");
++ while (true) {
++ const ssize_t device_count = libusb_get_device_list(nullptr, &list);
+
++ LOG(VERBOSE) << "found " << device_count << " attached devices";
++
++ for (ssize_t i = 0; i < device_count; ++i) {
++ process_device(list[i]);
++ }
++
++ libusb_free_device_list(list, 1);
++
++ adb_notify_device_scan_complete();
++
++ std::unique_lock<std::mutex> lock(device_poll_mutex);
++ if (device_poll_cv.wait_for(lock, 500ms, []() { return terminate_device_poll_thread; })) {
++ return;
++ }
++ }
++}
++#endif
++
+ void usb_init() {
+ LOG(DEBUG) << "initializing libusb...";
+ int rc = libusb_init(nullptr);
+@@ -457,6 +493,7 @@ void usb_init() {
+ LOG(FATAL) << "failed to initialize libusb: " << libusb_error_name(rc);
+ }
+
++#if defined(LIBUSB_API_VERSION) && LIBUSB_API_VERSION >= 0x01000102
+ // Register the hotplug callback.
+ rc = libusb_hotplug_register_callback(
+ nullptr, static_cast<libusb_hotplug_event>(LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED |
+@@ -467,6 +504,7 @@ void usb_init() {
+ if (rc != LIBUSB_SUCCESS) {
+ LOG(FATAL) << "failed to register libusb hotplug callback";
+ }
++#endif
+
+ // Spawn a thread for libusb_handle_events.
+ std::thread([]() {
+@@ -475,10 +513,28 @@ void usb_init() {
+ libusb_handle_events(nullptr);
+ }
+ }).detach();
++
++#if !defined(LIBUSB_API_VERSION) || LIBUSB_API_VERSION < 0x01000102
++ std::unique_lock<std::mutex> lock(device_poll_mutex);
++ device_poll_thread = new std::thread(poll_for_devices);
++#endif
+ }
+
+ void usb_cleanup() {
++#if defined(LIBUSB_API_VERSION) && LIBUSB_API_VERSION >= 0x01000102
+ libusb_hotplug_deregister_callback(nullptr, hotplug_handle);
++#else
++ {
++ std::unique_lock<std::mutex> lock(device_poll_mutex);
++ terminate_device_poll_thread = true;
++
++ if (!device_poll_thread) {
++ return;
++ }
++ }
++ device_poll_cv.notify_all();
++ device_poll_thread->join();
++#endif
+ }
+
+ // Dispatch a libusb transfer, unlock |device_lock|, and then wait for the result.
Modified: head/devel/android-tools-adb/files/patch-base_include_android-base_logging.h
==============================================================================
--- head/devel/android-tools-adb/files/patch-base_include_android-base_logging.h Mon Oct 30 18:36:00 2017 (r453203)
+++ head/devel/android-tools-adb/files/patch-base_include_android-base_logging.h Mon Oct 30 18:36:22 2017 (r453204)
@@ -9,3 +9,12 @@
#include <functional>
#include <memory>
#include <ostream>
+@@ -321,7 +321,7 @@ struct LogAbortAfterFullExpr {
+ // DCHECKs are debug variants of CHECKs only enabled in debug builds. Generally
+ // CHECK should be used unless profiling identifies a CHECK as being in
+ // performance critical code.
+-#if defined(NDEBUG) && !defined(__clang_analyzer__)
++#if defined(NDEBUG) && !defined(__clang_analyzer__) || !defined(__ANDROID__)
+ static constexpr bool kEnableDChecks = false;
+ #else
+ static constexpr bool kEnableDChecks = true;
Modified: head/devel/android-tools-fastboot-devel/Makefile
==============================================================================
--- head/devel/android-tools-fastboot-devel/Makefile Mon Oct 30 18:36:00 2017 (r453203)
+++ head/devel/android-tools-fastboot-devel/Makefile Mon Oct 30 18:36:22 2017 (r453204)
@@ -14,6 +14,5 @@ CONFLICTS_INSTALL= ${PORTNAME}-[0-9]*
MASTERDIR= ${.CURDIR}/../android-tools-fastboot
DISTINFO_FILE= ${.CURDIR}/distinfo
-EXTRA_PATCHES= ${.CURDIR}/files/patch-*
.include "${MASTERDIR}/Makefile"
Modified: head/devel/android-tools-fastboot/Makefile
==============================================================================
--- head/devel/android-tools-fastboot/Makefile Mon Oct 30 18:36:00 2017 (r453203)
+++ head/devel/android-tools-fastboot/Makefile Mon Oct 30 18:36:22 2017 (r453204)
@@ -2,8 +2,8 @@
PORTNAME= android-tools-fastboot
DISTVERSIONPREFIX= android-
-DISTVERSION?= 8.0.0_r4
-PORTREVISION?= 1
+DISTVERSION?= 8.0.0_r24
+PORTREVISION?= 0
CATEGORIES= devel sysutils
MASTER_SITES= https://anonscm.debian.org/cgit/android-tools/android-tools.git/plain/debian/:manpage
DISTFILES= fastboot.1?id=706e754:manpage
@@ -29,7 +29,7 @@ GH_SUBDIR= libselinux:libselinux
.ifdef DISTVERSIONSUFFIX
GH_REVISION= ${DISTVERSIONSUFFIX:S/-g//} # snapshot
.else
-GH_REVISION= f6a78079a81a # generated by: make update-revision
+GH_REVISION= 6cd85e2a8934 # generated by: make update-revision
.endif
CONFLICTS_INSTALL?= ${PORTNAME}-devel-*
@@ -37,6 +37,7 @@ CONFLICTS_INSTALL?= ${PORTNAME}-devel-*
USES= compiler:c++11-lib pkgconfig uidfix
BUILD_WRKSRC= ${WRKSRC}/fastboot
INSTALL_WRKSRC= ${BUILD_WRKSRC}
+CPPFLAGS+= -D_GLIBCXX_USE_C99 # XXX ports/193528
MAKEFILE?= ${.CURDIR}/files/Makefile
MAKE_ENV= BINDIR="${PREFIX}/bin" EXTRADIR="${FILESDIR}" \
FILESDIR="${DOCSDIR}" REVISION="${GH_REVISION}" \
Modified: head/devel/android-tools-fastboot/distinfo
==============================================================================
--- head/devel/android-tools-fastboot/distinfo Mon Oct 30 18:36:00 2017 (r453203)
+++ head/devel/android-tools-fastboot/distinfo Mon Oct 30 18:36:22 2017 (r453204)
@@ -1,10 +1,10 @@
-TIMESTAMP = 1495068953
+TIMESTAMP = 1502781926
SHA256 (fastboot.1?id=706e754) = 2af01b064440952a82f1602691a0fecc030302722a71444946fb70d9c423d283
SIZE (fastboot.1?id=706e754) = 5906
-SHA256 (android-platform_system_core-android-8.0.0_r4_GH0.tar.gz) = 3eb686edb1ccaa7312fb195b65c413823a6d60442d519c499c18b2d18c3094a9
-SIZE (android-platform_system_core-android-8.0.0_r4_GH0.tar.gz) = 5115403
-SHA256 (jbeich-platform_system_extras-android-8.0.0_r4_GH0.tar.gz) = 83d4a27f5ffa434688b62d00fcc33edd352bdc523f8b7fcbc3e8d0c1453b1c41
-SIZE (jbeich-platform_system_extras-android-8.0.0_r4_GH0.tar.gz) = 192575526
+SHA256 (android-platform_system_core-android-8.0.0_r24_GH0.tar.gz) = 6b55a409e6c03f58add5a0d13765ebcb6aee7ecef6452ef5d780228209cb8a3a
+SIZE (android-platform_system_core-android-8.0.0_r24_GH0.tar.gz) = 5190913
+SHA256 (jbeich-platform_system_extras-android-8.0.0_r24_GH0.tar.gz) = 3cd5069ada498e1fc69c531d00b145c5391484a69a09c1334c185d88ed6034b1
+SIZE (jbeich-platform_system_extras-android-8.0.0_r24_GH0.tar.gz) = 193208820
SHA256 (jbeich-platform_external_libselinux-android-7.1.2_r17_GH0.tar.gz) = 659e43d3e14b4f4fe8955975ad268310bfad0529f408fb33342ed70ae0d456c7
SIZE (jbeich-platform_external_libselinux-android-7.1.2_r17_GH0.tar.gz) = 59763
SHA256 (mbrubeck-android-completion-c1b0656_GH0.tar.gz) = ca3311ba47a5edd56c929ac9aae57c02c2c3f1636519c5f67abb00b6e3ecd75c
Modified: head/devel/android-tools-fastboot/files/Makefile
==============================================================================
--- head/devel/android-tools-fastboot/files/Makefile Mon Oct 30 18:36:00 2017 (r453203)
+++ head/devel/android-tools-fastboot/files/Makefile Mon Oct 30 18:36:22 2017 (r453204)
@@ -88,7 +88,7 @@ SRCS+= output_file.c
SRCS+= sparse.c
SRCS+= sparse_crc32.c
SRCS+= sparse_err.c
-SRCS+= sparse_read.c
+SRCS+= sparse_read.cpp
# required by libziparchive
.PATH: ${.CURDIR}/../libutils
@@ -100,7 +100,7 @@ SRCS+= zip_archive.cc
REVISION?= $$(${GIT} rev-parse --short=12 HEAD 2>/dev/null || echo unknown)
-CPPFLAGS+= -DFASTBOOT_REVISION="\"${REVISION}-android\""
+CPPFLAGS+= -DFASTBOOT_VERSION="\"26.0.0 rc1-${REVISION}-android\""
CPPFLAGS+= -Doff64_t=off_t
CPPFLAGS+= -Dftruncate64=ftruncate
CPPFLAGS+= -Dlseek64=lseek
Copied and modified: head/devel/android-tools-fastboot/files/patch-libsparse_sparse__read.cpp (from r453203, head/devel/android-tools-fastboot-devel/files/patch-libsparse_sparse__read.cpp)
==============================================================================
More information about the svn-ports-head
mailing list