summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--devel/android-tools-adb-devel/Makefile1
-rw-r--r--devel/android-tools-adb-devel/files/patch-adb_client_usb__libusb.cpp102
-rw-r--r--devel/android-tools-adb-devel/files/patch-base_include_android-base_logging.h11
-rw-r--r--devel/android-tools-adb/Makefile16
-rw-r--r--devel/android-tools-adb/distinfo10
-rw-r--r--devel/android-tools-adb/files/Makefile2
-rw-r--r--devel/android-tools-adb/files/patch-adb_client_usb__libusb.cpp100
-rw-r--r--devel/android-tools-adb/files/patch-base_include_android-base_logging.h9
-rw-r--r--devel/android-tools-fastboot-devel/Makefile1
-rw-r--r--devel/android-tools-fastboot/Makefile7
-rw-r--r--devel/android-tools-fastboot/distinfo10
-rw-r--r--devel/android-tools-fastboot/files/Makefile4
-rw-r--r--devel/android-tools-fastboot/files/patch-libsparse_sparse__read.cpp (renamed from devel/android-tools-fastboot-devel/files/patch-libsparse_sparse__read.cpp)0
13 files changed, 129 insertions, 144 deletions
diff --git a/devel/android-tools-adb-devel/Makefile b/devel/android-tools-adb-devel/Makefile
index f56d1bb88e1c..18b99a5e6be1 100644
--- a/devel/android-tools-adb-devel/Makefile
+++ b/devel/android-tools-adb-devel/Makefile
@@ -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]*$//}
diff --git a/devel/android-tools-adb-devel/files/patch-adb_client_usb__libusb.cpp b/devel/android-tools-adb-devel/files/patch-adb_client_usb__libusb.cpp
deleted file mode 100644
index 3f3d30c3a003..000000000000
--- a/devel/android-tools-adb-devel/files/patch-adb_client_usb__libusb.cpp
+++ /dev/null
@@ -1,102 +0,0 @@
---- adb/client/usb_libusb.cpp.orig 2017-06-20 10:50:27 UTC
-+++ adb/client/usb_libusb.cpp
-@@ -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.
diff --git a/devel/android-tools-adb-devel/files/patch-base_include_android-base_logging.h b/devel/android-tools-adb-devel/files/patch-base_include_android-base_logging.h
deleted file mode 100644
index c4d3811a48b5..000000000000
--- a/devel/android-tools-adb-devel/files/patch-base_include_android-base_logging.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- base/include/android-base/logging.h.orig 2015-09-29 18:07:07 UTC
-+++ base/include/android-base/logging.h
-@@ -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;
diff --git a/devel/android-tools-adb/Makefile b/devel/android-tools-adb/Makefile
index 6d8f2ba11e5a..e5a2163485c3 100644
--- a/devel/android-tools-adb/Makefile
+++ b/devel/android-tools-adb/Makefile
@@ -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@FreeBSD.org
COMMENT= Android debug bridge command line tool
@@ -25,15 +19,11 @@ 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
INSTALL_WRKSRC= ${BUILD_WRKSRC}
diff --git a/devel/android-tools-adb/distinfo b/devel/android-tools-adb/distinfo
index 0c0e5504e65c..5ffd71488b24 100644
--- a/devel/android-tools-adb/distinfo
+++ b/devel/android-tools-adb/distinfo
@@ -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
diff --git a/devel/android-tools-adb/files/Makefile b/devel/android-tools-adb/files/Makefile
index 015102eb24b5..df2c0985117f 100644
--- a/devel/android-tools-adb/files/Makefile
+++ b/devel/android-tools-adb/files/Makefile
@@ -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
diff --git a/devel/android-tools-adb/files/patch-adb_client_usb__libusb.cpp b/devel/android-tools-adb/files/patch-adb_client_usb__libusb.cpp
index 438930e32b32..dba0da73601d 100644
--- a/devel/android-tools-adb/files/patch-adb_client_usb__libusb.cpp
+++ b/devel/android-tools-adb/files/patch-adb_client_usb__libusb.cpp
@@ -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.
diff --git a/devel/android-tools-adb/files/patch-base_include_android-base_logging.h b/devel/android-tools-adb/files/patch-base_include_android-base_logging.h
index 7f170c3f521b..55a6b47c6301 100644
--- a/devel/android-tools-adb/files/patch-base_include_android-base_logging.h
+++ b/devel/android-tools-adb/files/patch-base_include_android-base_logging.h
@@ -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;
diff --git a/devel/android-tools-fastboot-devel/Makefile b/devel/android-tools-fastboot-devel/Makefile
index 2deae98def1f..77447408c283 100644
--- a/devel/android-tools-fastboot-devel/Makefile
+++ b/devel/android-tools-fastboot-devel/Makefile
@@ -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"
diff --git a/devel/android-tools-fastboot/Makefile b/devel/android-tools-fastboot/Makefile
index 2d50d1bf2832..137c21b53fd6 100644
--- a/devel/android-tools-fastboot/Makefile
+++ b/devel/android-tools-fastboot/Makefile
@@ -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}" \
diff --git a/devel/android-tools-fastboot/distinfo b/devel/android-tools-fastboot/distinfo
index 482481c07268..852dba28f065 100644
--- a/devel/android-tools-fastboot/distinfo
+++ b/devel/android-tools-fastboot/distinfo
@@ -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
diff --git a/devel/android-tools-fastboot/files/Makefile b/devel/android-tools-fastboot/files/Makefile
index 380a6c2d1db2..62bccd06c932 100644
--- a/devel/android-tools-fastboot/files/Makefile
+++ b/devel/android-tools-fastboot/files/Makefile
@@ -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
diff --git a/devel/android-tools-fastboot-devel/files/patch-libsparse_sparse__read.cpp b/devel/android-tools-fastboot/files/patch-libsparse_sparse__read.cpp
index 30753c5b96cd..30753c5b96cd 100644
--- a/devel/android-tools-fastboot-devel/files/patch-libsparse_sparse__read.cpp
+++ b/devel/android-tools-fastboot/files/patch-libsparse_sparse__read.cpp