Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jun 2017 21:50:30 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r444004 - in head/devel: android-tools-adb android-tools-adb-devel android-tools-adb-devel/files
Message-ID:  <201706202150.v5KLoV5v059668@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Tue Jun 20 21:50:30 2017
New Revision: 444004
URL: https://svnweb.freebsd.org/changeset/ports/444004

Log:
  devel/android-tools-adb-devel: update to o.p.2.332
  
  - USB transport is no longer supported on DragonFly and FreeBSD < 11
    as probing outside of libusb hotplug API isn't implemented
  
  Changes:	https://android.googlesource.com/platform/system/core/+log/dfd30c4a169e..d1e9e7bc06f0/adb

Added:
  head/devel/android-tools-adb-devel/files/patch-adb_client_usb__libusb.cpp   (contents, props changed)
  head/devel/android-tools-adb-devel/files/patch-adb_sysdeps_posix_network.cpp   (contents, props changed)
  head/devel/android-tools-adb-devel/files/patch-adb_transport__usb.cpp   (contents, props changed)
  head/devel/android-tools-adb-devel/files/patch-adb_usb.h   (contents, props changed)
  head/devel/android-tools-adb-devel/files/patch-include_cutils_trace.h   (contents, props changed)
Deleted:
  head/devel/android-tools-adb-devel/files/patch-adb_mutex
  head/devel/android-tools-adb-devel/files/usb_libusb.cpp
Modified:
  head/devel/android-tools-adb-devel/Makefile   (contents, props changed)
  head/devel/android-tools-adb-devel/distinfo   (contents, props changed)
  head/devel/android-tools-adb-devel/files/Makefile   (contents, props changed)
  head/devel/android-tools-adb-devel/files/patch-base_file.cpp   (contents, props changed)
  head/devel/android-tools-adb/Makefile   (contents, props changed)

Modified: head/devel/android-tools-adb-devel/Makefile
==============================================================================
--- head/devel/android-tools-adb-devel/Makefile	Tue Jun 20 20:50:34 2017	(r444003)
+++ head/devel/android-tools-adb-devel/Makefile	Tue Jun 20 21:50:30 2017	(r444004)
@@ -1,8 +1,8 @@
 # $FreeBSD$
 
-# Hint: git describe --abbrev=12 --match android-n-preview-5
-DISTVERSION=	n-preview-5-3582
-DISTVERSIONSUFFIX=	-gdfd30c4a169e
+# Hint: git describe --abbrev=12 --match android-o-preview-2
+DISTVERSION=	o-preview-2-332
+DISTVERSIONSUFFIX=	-gd1e9e7bc06f0
 PORTREVISION=	0
 PKGNAMESUFFIX=	-devel
 
@@ -15,13 +15,21 @@ EXTRA_PATCHES=	${.CURDIR}/files/patch-*
 
 GH_MYTAG=	${DISTVERSIONPREFIX}${DISTVERSION:C/-[0-9]*$//}
 
-OPTIONS_DEFINE=	TEST_PYTHON
+USES=		compiler:c++14-lang
 
+OPTIONS_DEFAULT=MDNSRESPONDER
+OPTIONS_DEFINE=	MDNSRESPONDER TEST_PYTHON
+
+MDNSRESPONDER_LIB_DEPENDS=	libdns_sd.so:net/mDNSResponder
+MDNSRESPONDER_USES=		localbase:ldflags
+MDNSRESPONDER_LDFLAGS=		-ldns_sd
+MDNSRESPONDER_MAKE_ENV_OFF=	MDNSEXT=_unsupported
+
 TEST_BROKEN=	logging.* tests always fail after 4e5fd111d84d
 
 TEST_PYTHON_DESC=	${TEST_DESC:S/tests/python &/}
 TEST_PYTHON_GH_PROJECT=	platform_development:development
-TEST_PYTHON_GH_TAGNAME=	${GH_MYTAG}-14-g735aab1:development
+TEST_PYTHON_GH_TAGNAME=	${GH_MYTAG}-83-gc5efdcc74:development
 TEST_PYTHON_BUILD_DEPENDS=${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock
 TEST_PYTHON_USES=	python:2.7,build
 

Modified: head/devel/android-tools-adb-devel/distinfo
==============================================================================
--- head/devel/android-tools-adb-devel/distinfo	Tue Jun 20 20:50:34 2017	(r444003)
+++ head/devel/android-tools-adb-devel/distinfo	Tue Jun 20 21:50:30 2017	(r444004)
@@ -1,7 +1,7 @@
-TIMESTAMP = 1474960220
-SHA256 (android-platform_system_core-android-n-preview-5-3582-gdfd30c4a169e_GH0.tar.gz) = 2a4530432d51797fcc426b737d66b411d7ba4635afabe32b0c89cb581b19bc34
-SIZE (android-platform_system_core-android-n-preview-5-3582-gdfd30c4a169e_GH0.tar.gz) = 1464524
+TIMESTAMP = 1497955827
+SHA256 (android-platform_system_core-android-o-preview-2-332-gd1e9e7bc06f0_GH0.tar.gz) = 212dd9cbca65a167b3833e5077b1a9f2db3a50a04e637da3e0db7814f60cf9fd
+SIZE (android-platform_system_core-android-o-preview-2-332-gd1e9e7bc06f0_GH0.tar.gz) = 5188822
 SHA256 (mbrubeck-android-completion-c1b0656_GH0.tar.gz) = ca3311ba47a5edd56c929ac9aae57c02c2c3f1636519c5f67abb00b6e3ecd75c
 SIZE (mbrubeck-android-completion-c1b0656_GH0.tar.gz) = 5967
-SHA256 (android-platform_development-android-n-preview-5-14-g735aab1_GH0.tar.gz) = e3559503f88e0dc3f0fa3e04cd11b0666538c64a24275fc39af951b74e50f32c
-SIZE (android-platform_development-android-n-preview-5-14-g735aab1_GH0.tar.gz) = 149193336
+SHA256 (android-platform_development-android-o-preview-2-83-gc5efdcc74_GH0.tar.gz) = d04393be7996dab127ede5f63b1722bead796a41f116ecb44f8367f8270ffe4c
+SIZE (android-platform_development-android-o-preview-2-83-gc5efdcc74_GH0.tar.gz) = 93000818

Modified: head/devel/android-tools-adb-devel/files/Makefile
==============================================================================
--- head/devel/android-tools-adb-devel/files/Makefile	Tue Jun 20 20:50:34 2017	(r444003)
+++ head/devel/android-tools-adb-devel/files/Makefile	Tue Jun 20 21:50:30 2017	(r444004)
@@ -8,7 +8,6 @@ FILESDIR?=${DOCDIR}/${PROG}
 FILES= *.[Tt][Xx][Tt]
 
 SRCS+= adb.cpp
-SRCS+= adb_auth.cpp
 SRCS+= adb_auth_host.cpp
 SRCS+= adb_client.cpp
 SRCS+= adb_io.cpp
@@ -29,6 +28,7 @@ SRCS+= ../adb/sockets.cpp
 SRCS+= sysdeps_unix.cpp
 SRCS+= transport.cpp
 SRCS+= transport_local.cpp
+SRCS+= transport_mdns${MDNSEXT}.cpp
 SRCS+= transport_usb.cpp
 
 TEST_SRCS+= adb_io_test.cpp
@@ -44,22 +44,26 @@ TEST_SRCS+= transport_test.cpp
 
 .PATH: ${.CURDIR}/client
 SRCS+= main.cpp
+SRCS+= usb_libusb.cpp
 
 .PATH: ${.CURDIR}/sysdeps
+SRCS+= errno.cpp
 TEST_SRCS+= stat_test.cpp
 
-.PATH: ${EXTRADIR}
-SRCS+= usb_libusb.cpp
+.PATH: ${.CURDIR}/sysdeps/posix
+SRCS+= network.cpp
 
 .PATH: ${.CURDIR}/../base
 SRCS+= file.cpp
 SRCS+= logging.cpp
 SRCS+= parsenetaddress.cpp
+SRCS+= quick_exit.cpp
 SRCS+= stringprintf.cpp
 SRCS+= strings.cpp
 TEST_SRCS+= file_test.cpp
 TEST_SRCS+= logging_test.cpp
 TEST_SRCS+= parsenetaddress_test.cpp
+TEST_SRCS+= quick_exit_test.cpp
 TEST_SRCS+= stringprintf_test.cpp
 TEST_SRCS+= strings_test.cpp
 TEST_SRCS+= test_main.cpp
@@ -75,8 +79,6 @@ TEST_SRCS+= android_pubkey_test.cpp
 SRCS+= socket_inaddr_any_server_unix.c
 SRCS+= socket_local_client_unix.c
 SRCS+= socket_local_server_unix.c
-SRCS+= socket_loopback_client_unix.c
-SRCS+= socket_loopback_server_unix.c
 SRCS+= socket_network_client_unix.c
 SRCS+= ../libcutils/sockets.cpp
 SRCS+= load_file.c
@@ -86,23 +88,27 @@ CPPFLAGS.sockets.cpp+= -o ${.TARGET}
 
 # required by base/file.cpp
 .PATH: ${.CURDIR}/../liblog
+SRCS+= config_read.c
 SRCS+= config_write.c
 SRCS+= fake_log_device.c
 SRCS+= fake_writer.c
+SRCS+= local_logger.c
 SRCS+= logger_lock.c
 SRCS+= logger_name.c
 SRCS+= logger_write.c
-CPPFLAGS.config_write.c+= -DFAKE_LOG_DEVICE=1
+SRCS+= logprint.c
+SRCS+= stderr_write.c
 
 REVISION?= $$(${GIT} rev-parse --short=12 HEAD 2>/dev/null || echo unknown)
 
-CPPFLAGS+= -DADB_REVISION="\"${REVISION}-android\""
+CPPFLAGS+= -DADB_VERSION="\"0.0.0-${REVISION}-android\""
 CPPFLAGS+= -DADB_HOST=1
 CPPFLAGS+= -DHAVE_FORKEXEC=1
 CPPFLAGS+= -DHAVE_SYMLINKS
 CPPFLAGS+= -DHAVE_TERMIO_H
 CPPFLAGS+= -DHAVE_SYS_SOCKET_H
 CPPFLAGS+= -D_FILE_OFFSET_BITS=64
+CPPFLAGS+= -DFAKE_LOG_DEVICE=1
 CPPFLAGS+= -I${.CURDIR}
 CPPFLAGS+= -I${.CURDIR}/../include
 CPPFLAGS+= -I${.CURDIR}/../base/include
@@ -110,7 +116,7 @@ CPPFLAGS+= -I${.CURDIR}/../libcrypto_utils/include
 CPPFLAGS+= ${CPPFLAGS.${.IMPSRC:T}}
 CPPFLAGS+= $$(${PKG_CONFIG} libcrypto --cflags 2>/dev/null)
 CPPFLAGS+= $$(${PKG_CONFIG} libusb-1.0 --cflags 2>/dev/null)
-CXXFLAGS+= -std=gnu++11
+CXXFLAGS+= -std=gnu++14
 
 .ifndef COMPILE.c
 CFLAGS+= ${CPPFLAGS}

Added: head/devel/android-tools-adb-devel/files/patch-adb_client_usb__libusb.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/android-tools-adb-devel/files/patch-adb_client_usb__libusb.cpp	Tue Jun 20 21:50:30 2017	(r444004)
@@ -0,0 +1,77 @@
+--- adb/client/usb_libusb.cpp.orig	2017-06-20 10:50:27 UTC
++++ adb/client/usb_libusb.cpp
+@@ -28,7 +28,7 @@
+ #include <thread>
+ #include <unordered_map>
+ 
+-#include <libusb/libusb.h>
++#include <libusb.h>
+ 
+ #include <android-base/file.h>
+ #include <android-base/logging.h>
+@@ -89,7 +89,11 @@ struct transfer_info {
+ };
+ 
+ namespace libusb {
++#if defined(__linux__) || defined(__APPLE__)
+ struct usb_handle : public ::usb_handle {
++#else
++struct usb_handle {
++#endif
+     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,9 @@ 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;
++#endif
+ 
+ static std::string get_device_address(libusb_device* device) {
+     return StringPrintf("usb:%d:%d", libusb_get_bus_number(device),
+@@ -420,6 +426,7 @@ static void device_disconnected(libusb_device* device)
+     }
+ }
+ 
++#if defined(LIBUSB_API_VERSION) && LIBUSB_API_VERSION >= 0x01000102
+ static auto& hotplug_queue = *new BlockingQueue<std::pair<libusb_hotplug_event, libusb_device*>>();
+ static void hotplug_thread() {
+     adb_thread_setname("libusb hotplug");
+@@ -449,6 +456,7 @@ static int hotplug_callback(libusb_context*, libusb_de
+     hotplug_queue.Push({event, device});
+     return 0;
+ }
++#endif
+ 
+ void usb_init() {
+     LOG(DEBUG) << "initializing libusb...";
+@@ -457,6 +465,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 +476,9 @@ void usb_init() {
+     if (rc != LIBUSB_SUCCESS) {
+         LOG(FATAL) << "failed to register libusb hotplug callback";
+     }
++#else
++    LOG(FATAL) << "libusb doesn't support hotplug but scanning isn't implemented";
++#endif
+ 
+     // Spawn a thread for libusb_handle_events.
+     std::thread([]() {
+@@ -478,7 +490,9 @@ void usb_init() {
+ }
+ 
+ void usb_cleanup() {
++#if defined(LIBUSB_API_VERSION) && LIBUSB_API_VERSION >= 0x01000102
+     libusb_hotplug_deregister_callback(nullptr, hotplug_handle);
++#endif
+ }
+ 
+ // Dispatch a libusb transfer, unlock |device_lock|, and then wait for the result.

Added: head/devel/android-tools-adb-devel/files/patch-adb_sysdeps_posix_network.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/android-tools-adb-devel/files/patch-adb_sysdeps_posix_network.cpp	Tue Jun 20 21:50:30 2017	(r444004)
@@ -0,0 +1,10 @@
+--- adb/sysdeps/posix/network.cpp.orig	2017-06-20 10:50:27 UTC
++++ adb/sysdeps/posix/network.cpp
+@@ -17,6 +17,7 @@
+ #include "sysdeps/network.h"
+ 
+ #include <errno.h>
++#include <string.h> // strerror
+ #include <netinet/in.h>
+ #include <sys/socket.h>
+ 

Added: head/devel/android-tools-adb-devel/files/patch-adb_transport__usb.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/android-tools-adb-devel/files/patch-adb_transport__usb.cpp	Tue Jun 20 21:50:30 2017	(r444004)
@@ -0,0 +1,11 @@
+--- adb/transport_usb.cpp.orig	2017-06-20 10:50:27 UTC
++++ adb/transport_usb.cpp
+@@ -191,6 +191,8 @@ int is_adb_interface(int usb_class, int usb_subclass, 
+ bool should_use_libusb() {
+ #if defined(_WIN32) || !ADB_HOST
+     return false;
++#elif !defined(__linux__) && !defined(__APPLE__)
++    return true;
+ #else
+     static bool disable = getenv("ADB_LIBUSB") && strcmp(getenv("ADB_LIBUSB"), "0") == 0;
+     return !disable;

Added: head/devel/android-tools-adb-devel/files/patch-adb_usb.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/android-tools-adb-devel/files/patch-adb_usb.h	Tue Jun 20 21:50:30 2017	(r444004)
@@ -0,0 +1,20 @@
+--- adb/usb.h.orig	2017-06-20 10:50:27 UTC
++++ adb/usb.h
+@@ -43,6 +43,7 @@ namespace libusb {
+     ADB_USB_INTERFACE(libusb::usb_handle*);
+ }
+ 
++#if defined(__linux__) || defined(__APPLE__)
+ namespace native {
+     struct usb_handle;
+     ADB_USB_INTERFACE(native::usb_handle*);
+@@ -53,6 +54,9 @@ struct usb_handle {
+ };
+ 
+ ADB_USB_INTERFACE(::usb_handle*);
++#else
++using namespace libusb;
++#endif
+ 
+ #endif // linux host || darwin
+ 

Modified: head/devel/android-tools-adb-devel/files/patch-base_file.cpp
==============================================================================
--- head/devel/android-tools-adb-devel/files/patch-base_file.cpp	Tue Jun 20 20:50:34 2017	(r444003)
+++ head/devel/android-tools-adb-devel/files/patch-base_file.cpp	Tue Jun 20 21:50:30 2017	(r444004)
@@ -1,16 +1,16 @@
---- base/file.cpp.orig	2016-09-28 18:07:09 UTC
+--- base/file.cpp.orig	2017-06-20 10:50:27 UTC
 +++ base/file.cpp
-@@ -18,6 +18,9 @@
- 
+@@ -19,6 +19,9 @@
  #include <errno.h>
  #include <fcntl.h>
+ #include <libgen.h>
 +#include <limits.h> // PATH_MAX
 +#include <stdio.h> // BUFSIZ
 +#include <string.h> // strerror
  #include <sys/stat.h>
  #include <sys/types.h>
  #include <unistd.h>
-@@ -34,6 +37,9 @@
+@@ -36,6 +39,9 @@
  #if defined(__APPLE__)
  #include <mach-o/dyld.h>
  #endif
@@ -19,8 +19,8 @@
 +#endif
  #if defined(_WIN32)
  #include <windows.h>
- #endif
-@@ -231,6 +237,17 @@ std::string GetExecutablePath() {
+ #define O_CLOEXEC O_NOINHERIT
+@@ -251,6 +257,17 @@ std::string GetExecutablePath() {
    if (result == 0 || result == sizeof(path) - 1) return "";
    path[PATH_MAX - 1] = 0;
    return path;

Added: head/devel/android-tools-adb-devel/files/patch-include_cutils_trace.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/android-tools-adb-devel/files/patch-include_cutils_trace.h	Tue Jun 20 21:50:30 2017	(r444004)
@@ -0,0 +1,17 @@
+--- include/cutils/trace.h.orig	2017-06-20 10:50:27 UTC
++++ include/cutils/trace.h
+@@ -18,8 +18,14 @@
+ #define _LIBS_CUTILS_TRACE_H
+ 
+ #include <inttypes.h>
++#ifdef __cplusplus
++#include <atomic>
++using std::atomic_bool;
++using std::memory_order_acquire;
++#else
+ #include <stdatomic.h>
+ #include <stdbool.h>
++#endif
+ #include <stdint.h>
+ #include <stdio.h>
+ #include <sys/cdefs.h>

Modified: head/devel/android-tools-adb/Makefile
==============================================================================
--- head/devel/android-tools-adb/Makefile	Tue Jun 20 20:50:34 2017	(r444003)
+++ head/devel/android-tools-adb/Makefile	Tue Jun 20 21:50:30 2017	(r444004)
@@ -33,7 +33,7 @@ EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-adb_sysdeps_mu
 EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-base_file.cpp
 .endif
 
-USES=		compiler:c++11-lib pkgconfig ssl uidfix
+USES+=		compiler:c++11-lib pkgconfig ssl uidfix
 BUILD_WRKSRC=	${WRKSRC}/adb
 INSTALL_WRKSRC=	${BUILD_WRKSRC}
 TEST_WRKSRC=	${BUILD_WRKSRC}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706202150.v5KLoV5v059668>