Index: branches/2018Q3/devel/android-tools-adb/Makefile =================================================================== --- branches/2018Q3/devel/android-tools-adb/Makefile (revision 478188) +++ branches/2018Q3/devel/android-tools-adb/Makefile (revision 478189) @@ -1,109 +1,109 @@ # $FreeBSD$ PORTNAME= android-tools-adb DISTVERSIONPREFIX= android- -DISTVERSION?= 8.1.0_r2 -PORTREVISION?= 1 +DISTVERSION?= 9.0.0_r3 +PORTREVISION?= 0 CATEGORIES= devel comms MAINTAINER= jbeich@FreeBSD.org COMMENT= Android debug bridge command line tool LICENSE= APACHE20 USE_GITHUB= yes GH_ACCOUNT= aosp-mirror GH_PROJECT= platform_system_core CONFLICTS_INSTALL?= ${PORTNAME}-devel-* USES= compiler:c++14-lang pkgconfig ssl uidfix BUILD_WRKSRC= ${WRKSRC}/adb INSTALL_WRKSRC= ${BUILD_WRKSRC} TEST_WRKSRC= ${BUILD_WRKSRC} CPPFLAGS+= -D_GLIBCXX_USE_C99 # XXX ports/193528 MAKEFILE?= ${.CURDIR}/files/Makefile MAKE_ENV= BINDIR="${PREFIX}/bin" EXTRADIR="${FILESDIR}" \ FILESDIR="${DOCSDIR}" \ VERSION="${SDK_REVISION}-0 ${GH_REVISION}-android" ALL_TARGET= all TEST_TARGET= test PLIST_FILES= bin/adb PORTDOCS= * # Generated by "make update-revision" for "adb --version" -SDK_REVISION?= 27.0.0 -GH_REVISION= ${DISTVERSIONSUFFIX:U86c2b588a369:S/-g//} +SDK_REVISION?= 28.0.0 +GH_REVISION= ${DISTVERSIONSUFFIX:U0fac9018f238:S/-g//} OPTIONS_DEFINE+=MDNSRESPONDER BASH DOCS TEST TEST_PYTHON OPTIONS_DEFAULT=MDNSRESPONDER OPTIONS_SUB= yes .if make(makesum) # for optional distfiles .MAKEFLAGS: WITH="${OPTIONS_DEFINE}" .endif BASH_GH_ACCOUNT= mbrubeck:bashcomp BASH_GH_PROJECT= android-completion:bashcomp BASH_GH_TAGNAME= c1b0656:bashcomp BASH_PLIST_FILES= etc/bash_completion.d/adb BASH_VARS= LICENSE+=MIT LICENSE_COMB=multi DOCS_MAKE_ARGS_OFF= FILES="" FILESDIR="" MDNSRESPONDER_LIB_DEPENDS= libdns_sd.so:net/mDNSResponder MDNSRESPONDER_USES= localbase:ldflags MDNSRESPONDER_LDFLAGS= -ldns_sd MDNSRESPONDER_MAKE_ENV_OFF= MDNSEXT=_unsupported TEST_BUILD_DEPENDS+= googlemock>=1.6.0:devel/googlemock \ googletest>=1.6.0:devel/googletest TEST_ALL_TARGET= adb_test TEST_PYTHON_DESC= ${TEST_DESC:S/tests/python &/} TEST_PYTHON_GH_PROJECT= platform_development:development TEST_PYTHON_BUILD_DEPENDS=${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${PY_FLAVOR} TEST_PYTHON_USES= python:2.7,build post-patch: # XXX Hidden by poudriere/tinderbox, see lindev(4) for FreeBSD < 11.0 @if [ ! -e /dev/full ]; then \ ${REINPLACE_CMD} -e '/TEST/s/[^ ]*ENOSPC/DISABLED_&/' \ ${WRKSRC}/adb/adb_io_test.cpp; \ fi pre-install-TEST-on: do-test pre-install-TEST_PYTHON-on: # XXX python tests may leave behind running adb server ${SETENV} PATH=${BUILD_WRKSRC}:${PATH} \ PYTHONPATH=${WRKSRC_development}/python-packages \ ${PYTHON_CMD} -m unittest discover -vs ${BUILD_WRKSRC} post-install-BASH-on: ${MKDIR} ${STAGEDIR}${PREFIX}/${BASH_PLIST_FILES:H} ${INSTALL_DATA} ${WRKSRC_bashcomp}/android \ ${STAGEDIR}${PREFIX}/${BASH_PLIST_FILES} update-revision: @${REINPLACE_CMD} -i '' -e "/^SDK_REVISION?=/s/=.*/= $$(\ ${FETCH_CMD} -qo- \ https://github.com/${GH_ACCOUNT}/platform_build/raw/${GH_TAGNAME}/core/version_defaults.mk | \ ${SED} -n 's/^[[:space:]]*PLATFORM_SDK_VERSION := //p' \ ).0.0/" \ ${.CURDIR}/Makefile # https://developer.github.com/v3/repos/commits/#get-a-single-commit # Pretend to be curl(1) for pretty-printed JSON to help parse with sed(1) @${REINPLACE_CMD} -i '' -e "/^GH_REVISION=/s/:U[^}:]*/:U$$(\ ${SETENV} HTTP_USER_AGENT=curl ${FETCH_CMD} -qo- \ https://api.github.com/repos/${GH_ACCOUNT}/${GH_PROJECT}/commits/${GH_TAGNAME} | \ ${SED} -n '/sha/ { s/.*\"\([0-9a-f]\{12\}\).*/\1/p; q; }' \ )/" \ ${.CURDIR}/Makefile .include # XXX Work around !target(makesum) .ifndef DISTVERSIONSUFFIX makesum: update-revision .endif Index: branches/2018Q3/devel/android-tools-adb/distinfo =================================================================== --- branches/2018Q3/devel/android-tools-adb/distinfo (revision 478188) +++ branches/2018Q3/devel/android-tools-adb/distinfo (revision 478189) @@ -1,7 +1,7 @@ -TIMESTAMP = 1509048179 -SHA256 (aosp-mirror-platform_system_core-android-8.1.0_r2_GH0.tar.gz) = 29c58327e06c9c938f8f3c0d3e991339eb98c53026203fbafc564e85cb6538bc -SIZE (aosp-mirror-platform_system_core-android-8.1.0_r2_GH0.tar.gz) = 5227210 +TIMESTAMP = 1529542722 +SHA256 (aosp-mirror-platform_system_core-android-9.0.0_r3_GH0.tar.gz) = b9de23465b304432aa2b585aa66c6bf4841b177f2139b75ca5adc5d917e0ecd6 +SIZE (aosp-mirror-platform_system_core-android-9.0.0_r3_GH0.tar.gz) = 27484684 SHA256 (mbrubeck-android-completion-c1b0656_GH0.tar.gz) = ca3311ba47a5edd56c929ac9aae57c02c2c3f1636519c5f67abb00b6e3ecd75c SIZE (mbrubeck-android-completion-c1b0656_GH0.tar.gz) = 5967 -SHA256 (aosp-mirror-platform_development-android-8.1.0_r2_GH0.tar.gz) = bc9cdaf522147ce6a4d11e695394ce6044940172f8a19150e613adc4ae77279c -SIZE (aosp-mirror-platform_development-android-8.1.0_r2_GH0.tar.gz) = 93884716 +SHA256 (aosp-mirror-platform_development-android-9.0.0_r3_GH0.tar.gz) = f35f681e6fad873f3e94b5c2362939741f15f276022717e352bd21a74653704b +SIZE (aosp-mirror-platform_development-android-9.0.0_r3_GH0.tar.gz) = 59064522 Index: branches/2018Q3/devel/android-tools-adb/files/patch-libcutils_threads.c =================================================================== --- branches/2018Q3/devel/android-tools-adb/files/patch-libcutils_threads.c (revision 478188) +++ branches/2018Q3/devel/android-tools-adb/files/patch-libcutils_threads.c (nonexistent) @@ -1,32 +0,0 @@ ---- libcutils/threads.c.orig 2015-06-17 22:20:38 UTC -+++ libcutils/threads.c -@@ -29,6 +29,14 @@ - #include - #elif defined(_WIN32) - #include -+#elif defined(__DragonFly__) -+#include -+#elif defined(__FreeBSD__) -+#include -+#elif defined(__NetBSD__) -+#include -+#else -+#include - #endif - - // No definition needed for Android because we'll just pick up bionic's copy. -@@ -40,6 +48,14 @@ pid_t gettid() { - return syscall(__NR_gettid); - #elif defined(_WIN32) - return GetCurrentThreadId(); -+#elif defined(__DragonFly__) -+ return lwp_gettid(); -+#elif defined(__NetBSD__) -+ return _lwp_self(); -+#elif defined(__FreeBSD__) -+ return pthread_getthreadid_np(); -+#else -+ return (intptr_t) pthread_self(); - #endif - } - #endif // __ANDROID__ Property changes on: branches/2018Q3/devel/android-tools-adb/files/patch-libcutils_threads.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: branches/2018Q3/devel/android-tools-adb/files/extra-patch-base_include_android-base_logging.h =================================================================== --- branches/2018Q3/devel/android-tools-adb/files/extra-patch-base_include_android-base_logging.h (revision 478188) +++ branches/2018Q3/devel/android-tools-adb/files/extra-patch-base_include_android-base_logging.h (nonexistent) @@ -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) -+#if defined(NDEBUG) || !defined(__ANDROID__) - static constexpr bool kEnableDChecks = false; - #else - static constexpr bool kEnableDChecks = true; Property changes on: branches/2018Q3/devel/android-tools-adb/files/extra-patch-base_include_android-base_logging.h ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: branches/2018Q3/devel/android-tools-adb/files/Makefile =================================================================== --- branches/2018Q3/devel/android-tools-adb/files/Makefile (revision 478188) +++ branches/2018Q3/devel/android-tools-adb/files/Makefile (revision 478189) @@ -1,154 +1,150 @@ # $FreeBSD$ PROG_CXX=adb NO_MAN= BINDIR?=/usr/bin FILESDIR?=${DOCDIR}/${PROG} VERSION?= 0.0.0-0 FILES= *.[Tt][Xx][Tt] SRCS+= adb.cpp SRCS+= adb_auth_host.cpp SRCS+= adb_client.cpp SRCS+= adb_io.cpp SRCS+= adb_listeners.cpp SRCS+= adb_trace.cpp SRCS+= adb_utils.cpp SRCS+= bugreport.cpp SRCS+= commandline.cpp SRCS+= console.cpp SRCS+= diagnose_usb.cpp SRCS+= fdevent.cpp SRCS+= file_sync_client.cpp SRCS+= line_printer.cpp SRCS+= services.cpp SRCS+= shell_service_protocol.cpp SRCS+= socket_spec.cpp 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 TEST_SRCS+= adb_listeners_test.cpp TEST_SRCS+= adb_utils_test.cpp TEST_SRCS+= bugreport_test.cpp TEST_SRCS+= fdevent_test.cpp TEST_SRCS+= shell_service_protocol_test.cpp TEST_SRCS+= socket_spec_test.cpp TEST_SRCS+= socket_test.cpp TEST_SRCS+= sysdeps_test.cpp 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: ${.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 TEST_SRCS+= test_utils.cpp .PATH: ${.CURDIR}/../libcrypto_utils SRCS+= android_pubkey.c .PATH: ${.CURDIR}/../libcrypto_utils/tests TEST_SRCS+= android_pubkey_test.cpp .PATH: ${.CURDIR}/../libcutils -SRCS+= socket_inaddr_any_server_unix.c -SRCS+= socket_local_client_unix.c -SRCS+= socket_local_server_unix.c -SRCS+= socket_network_client_unix.c +SRCS+= socket_inaddr_any_server_unix.cpp +SRCS+= socket_local_client_unix.cpp +SRCS+= socket_local_server_unix.cpp +SRCS+= socket_network_client_unix.cpp SRCS+= ../libcutils/sockets.cpp -SRCS+= load_file.c -SRCS+= threads.c +SRCS+= load_file.cpp +SRCS+= threads.cpp # XXX Obsolete after 10.2 or r279980/r280329 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 SRCS+= logprint.c SRCS+= stderr_write.c CPPFLAGS+= -DADB_VERSION="\"${VERSION}\"" 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+= -Doff64_t=off_t CPPFLAGS+= -DFAKE_LOG_DEVICE=1 CPPFLAGS+= -I${.CURDIR} CPPFLAGS+= -I${.CURDIR}/../include CPPFLAGS+= -I${.CURDIR}/../base/include 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++14 .ifndef COMPILE.c CFLAGS+= ${CPPFLAGS} CXXFLAGS+= ${CPPFLAGS} .endif TEST_CPPFLAGS+= $$(${GTEST_CONFIG} --cppflags) TEST_CPPFLAGS+= $$(${GMOCK_CONFIG} --cppflags) .for f in ${TEST_SRCS} CPPFLAGS.${f}+= ${TEST_CPPFLAGS} .endfor LDADD+= $$(${PKG_CONFIG} libcrypto --libs 2>/dev/null || echo -lcrypto) LDADD+= $$(${PKG_CONFIG} libusb-1.0 --libs 2>/dev/null || echo -lusb) LDADD+= -lz \-lpthread DPADD+= ${LIBCRYPTO} ${LIBPTHREAD} ${LIBUSB} ${LIBZ} TEST_LDADD+= $$(${GTEST_CONFIG} --libs --ldflags) TEST_LDADD+= $$(${GMOCK_CONFIG} --libs --ldflags) TEST_OBJS+= ${TEST_SRCS:R:S/$/.o/} CLEANFILES+= ${PROG}_test ${TEST_OBJS} GTEST_CONFIG?= gtest-config GMOCK_CONFIG?= gmock-config PKG_CONFIG?= pkg-config beforeinstall: ${INSTALL} -d ${DESTDIR}${FILESDIR} .include test: ${PROG}_test @for f in ${.ALLSRC}; do ./$$f; done ${PROG}_test: ${OBJS:Nmain.o:Ncommandline.o} ${TEST_OBJS} ${CXX} ${CPPFLAGS} ${CXXFLAGS} ${LDFLAGS} -o $@ $> ${LDADD} ${TEST_LDADD} Index: branches/2018Q3/devel/android-tools-adb/files/patch-adb_client_usb__libusb.cpp =================================================================== --- branches/2018Q3/devel/android-tools-adb/files/patch-adb_client_usb__libusb.cpp (revision 478188) +++ branches/2018Q3/devel/android-tools-adb/files/patch-adb_client_usb__libusb.cpp (revision 478189) @@ -1,130 +1,131 @@ --- adb/client/usb_libusb.cpp.orig 2017-06-20 10:50:27 UTC +++ adb/client/usb_libusb.cpp -@@ -22,13 +22,14 @@ - - #include - #include -+#include - #include - #include - #include +@@ -30,7 +30,7 @@ #include #include -#include +#include #include #include +@@ -39,6 +39,7 @@ + + #include "adb.h" + #include "adb_utils.h" ++#include "sysdeps/chrono.h" + #include "transport.h" + #include "usb.h" + @@ -89,7 +89,11 @@ struct transfer_info { }; namespace libusb { -+#if defined(__linux__) || defined(__APPLE__) ++#if defined(__linux__) || defined(__APPLE__) || defined(_WIN32) 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,14 @@ struct usb_handle : public ::usb_handle { static auto& usb_handles = *new std::unordered_map>(); 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 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 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_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 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 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. Index: branches/2018Q3/devel/android-tools-adb/files/patch-adb_transport__usb.cpp =================================================================== --- branches/2018Q3/devel/android-tools-adb/files/patch-adb_transport__usb.cpp (revision 478188) +++ branches/2018Q3/devel/android-tools-adb/files/patch-adb_transport__usb.cpp (revision 478189) @@ -1,11 +1,11 @@ ---- adb/transport_usb.cpp.orig 2017-06-20 10:50:27 UTC +--- adb/transport_usb.cpp.orig 2018-06-21 00:58:42 UTC +++ adb/transport_usb.cpp -@@ -191,6 +191,8 @@ int is_adb_interface(int usb_class, int usb_subclass, +@@ -186,6 +186,8 @@ int is_adb_interface(int usb_class, int usb_subclass, bool should_use_libusb() { - #if defined(_WIN32) || !ADB_HOST + #if !ADB_HOST return false; -+#elif !defined(__linux__) && !defined(__APPLE__) ++#elif !defined(__linux__) && !defined(__APPLE__) && !defined(_WIN32) + return true; #else - static bool disable = getenv("ADB_LIBUSB") && strcmp(getenv("ADB_LIBUSB"), "0") == 0; - return !disable; + static bool enable = getenv("ADB_LIBUSB") && strcmp(getenv("ADB_LIBUSB"), "1") == 0; + return enable; Index: branches/2018Q3/devel/android-tools-adb/files/patch-adb_usb.h =================================================================== --- branches/2018Q3/devel/android-tools-adb/files/patch-adb_usb.h (revision 478188) +++ branches/2018Q3/devel/android-tools-adb/files/patch-adb_usb.h (revision 478189) @@ -1,20 +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__) ++#if defined(__linux__) || defined(__APPLE__) || defined(_WIN32) 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 Index: branches/2018Q3/devel/android-tools-adb/files/patch-base_logging.cpp =================================================================== --- branches/2018Q3/devel/android-tools-adb/files/patch-base_logging.cpp (revision 478188) +++ branches/2018Q3/devel/android-tools-adb/files/patch-base_logging.cpp (revision 478189) @@ -1,50 +1,50 @@ --- base/logging.cpp.orig 2016-08-08 21:10:17 UTC +++ base/logging.cpp @@ -25,7 +25,7 @@ #include // For getprogname(3) or program_invocation_short_name. -#if defined(__ANDROID__) || defined(__APPLE__) +#if !defined(_WIN32) && !defined(__GLIBC__) #include #elif defined(__GLIBC__) #include @@ -35,6 +35,8 @@ #include #endif +#include // strrchr +#include // fprintf #include #include #include @@ -71,6 +72,14 @@ #include #elif defined(_WIN32) #include +#elif defined(__DragonFly__) +#include +#elif defined(__FreeBSD__) +#include +#elif defined(__NetBSD__) +#include -+#else ++#else // OpenBSD, Solaris +#include #endif #if defined(_WIN32) @@ -88,6 +97,14 @@ static thread_id GetThreadId() { return syscall(__NR_gettid); #elif defined(_WIN32) return GetCurrentThreadId(); +#elif defined(__DragonFly__) + return lwp_gettid(); -+#elif defined(__NetBSD__) -+ return _lwp_self(); +#elif defined(__FreeBSD__) + return pthread_getthreadid_np(); -+#else ++#elif defined(__NetBSD__) ++ return _lwp_self(); ++#else // OpenBSD, Solaris + return (intptr_t) pthread_self(); #endif } Index: branches/2018Q3/devel/android-tools-adb/files/patch-libcutils_threads.cpp =================================================================== --- branches/2018Q3/devel/android-tools-adb/files/patch-libcutils_threads.cpp (nonexistent) +++ branches/2018Q3/devel/android-tools-adb/files/patch-libcutils_threads.cpp (revision 478189) @@ -0,0 +1,41 @@ +--- libcutils/threads.cpp.orig 2018-07-13 19:58:45 UTC ++++ libcutils/threads.cpp +@@ -24,11 +24,19 @@ + #include + #include + #include ++#elif defined(__DragonFly__) ++#include ++#elif defined(__FreeBSD__) ++#include ++#elif defined(__NetBSD__) ++#include + #elif defined(__linux__) && !defined(__ANDROID__) + #include + #include + #elif defined(_WIN32) + #include ++#else // OpenBSD, Solaris ++#include + #endif + + // No definition needed for Android because we'll just pick up bionic's copy. +@@ -38,10 +46,18 @@ pid_t gettid() { + uint64_t tid; + pthread_threadid_np(NULL, &tid); + return tid; ++#elif defined(__DragonFly__) ++ return lwp_gettid(); ++#elif defined(__FreeBSD__) ++ return pthread_getthreadid_np(); ++#elif defined(__NetBSD__) ++ return _lwp_self(); + #elif defined(__linux__) + return syscall(__NR_gettid); + #elif defined(_WIN32) + return GetCurrentThreadId(); ++#else // OpenBSD, Solaris ++ return (intptr_t) pthread_self(); + #endif + } + #endif // __ANDROID__ Property changes on: branches/2018Q3/devel/android-tools-adb/files/patch-libcutils_threads.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2018Q3/devel/android-tools-fastboot/Makefile =================================================================== --- branches/2018Q3/devel/android-tools-fastboot/Makefile (revision 478188) +++ branches/2018Q3/devel/android-tools-fastboot/Makefile (revision 478189) @@ -1,96 +1,89 @@ # $FreeBSD$ PORTNAME= android-tools-fastboot DISTVERSIONPREFIX= android- -DISTVERSION?= 8.1.0_r2 -PORTREVISION?= 1 +DISTVERSION?= 9.0.0_r3 +PORTREVISION?= 0 CATEGORIES= devel sysutils MASTER_SITES= https://salsa.debian.org/android-tools-team/android-tools/raw/706e754/debian/:manpage DISTFILES= fastboot.1:manpage EXTRACT_ONLY= ${DISTFILES:N*\:manpage:C/:.*//} MAINTAINER= jbeich@FreeBSD.org COMMENT= Android Fastboot protocol CLI tool -LICENSE= APACHE20 BSD2CLAUSE PD +LICENSE= APACHE20 BSD2CLAUSE LICENSE_COMB= multi -LICENSE_FILE_PD= ${WRKSRC}/libselinux/NOTICE -LIB_DEPENDS= libpcre.so:devel/pcre - USE_GITHUB= yes -GH_ACCOUNT= aosp-mirror jbeich:extras,libselinux -GH_PROJECT= platform_system_core platform_system_extras:extras \ - platform_external_libselinux:libselinux -GH_TAGNAME?= android-7.1.2_r17:libselinux -GH_SUBDIR= libselinux:libselinux +GH_ACCOUNT= aosp-mirror jbeich:extras +GH_PROJECT= platform_system_core platform_system_extras:extras 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}" \ VERSION="${SDK_REVISION}-0 ${GH_REVISION}-android" \ - MANDIR="${PREFIX}/man/man" \ - LIBPCRE="${LOCALBASE}/lib/libpcre.a" + MANDIR="${PREFIX}/man/man" PLIST_FILES= bin/fastboot \ man/man1/fastboot.1.gz PORTDOCS= * SUB_FILES= pkg-message # Generated by "make update-revision" for "fastboot --version" -SDK_REVISION?= 27.0.0 -GH_REVISION= ${DISTVERSIONSUFFIX:U86c2b588a369:S/-g//} +SDK_REVISION?= 28.0.0 +GH_REVISION= ${DISTVERSIONSUFFIX:U0fac9018f238:S/-g//} OPTIONS_DEFINE= BASH DOCS OPTIONS_SUB= yes .if make(makesum) # for optional distfiles .MAKEFLAGS: WITH="${OPTIONS_DEFINE}" .endif BASH_GH_ACCOUNT= mbrubeck:bashcomp BASH_GH_PROJECT= android-completion:bashcomp BASH_GH_TAGNAME= c1b0656:bashcomp BASH_PLIST_FILES= etc/bash_completion.d/fastboot BASH_VARS= LICENSE+=MIT DOCS_MAKE_ARGS_OFF= FILES="" FILESDIR="" post-extract: @${CP} ${_DISTDIR}/${DISTFILES:M*\:manpage:C/:.*//} \ ${BUILD_WRKSRC} # Adjust paths relative to core @(cd ${WRKSRC_extras} && ${COPYTREE_SHARE} . ${WRKSRC}) post-install-BASH-on: ${MKDIR} ${STAGEDIR}${PREFIX}/${BASH_PLIST_FILES:H} ${INSTALL_DATA} ${WRKSRC_bashcomp}/android \ ${STAGEDIR}${PREFIX}/${BASH_PLIST_FILES} update-revision: @${REINPLACE_CMD} -i '' -e "/^SDK_REVISION?=/s/=.*/= $$(\ ${FETCH_CMD} -qo- \ https://github.com/${GH_ACCOUNT}/platform_build/raw/${GH_TAGNAME}/core/version_defaults.mk | \ ${SED} -n 's/^[[:space:]]*PLATFORM_SDK_VERSION := //p' \ ).0.0/" \ ${.CURDIR}/Makefile # https://developer.github.com/v3/repos/commits/#get-a-single-commit # Pretend to be curl(1) for pretty-printed JSON to help parse with sed(1) @${REINPLACE_CMD} -i '' -e "/^GH_REVISION=/s/:U[^}:]*/:U$$(\ ${SETENV} HTTP_USER_AGENT=curl ${FETCH_CMD} -qo- \ https://api.github.com/repos/${GH_ACCOUNT}/${GH_PROJECT}/commits/${GH_TAGNAME} | \ ${SED} -n '/sha/ { s/.*\"\([0-9a-f]\{12\}\).*/\1/p; q; }' \ )/" \ ${.CURDIR}/Makefile .include # XXX Work around !target(makesum) .ifndef DISTVERSIONSUFFIX makesum: update-revision .endif Index: branches/2018Q3/devel/android-tools-fastboot/distinfo =================================================================== --- branches/2018Q3/devel/android-tools-fastboot/distinfo (revision 478188) +++ branches/2018Q3/devel/android-tools-fastboot/distinfo (revision 478189) @@ -1,11 +1,9 @@ -TIMESTAMP = 1509048179 +TIMESTAMP = 1529542722 SHA256 (fastboot.1) = 2af01b064440952a82f1602691a0fecc030302722a71444946fb70d9c423d283 SIZE (fastboot.1) = 5906 -SHA256 (aosp-mirror-platform_system_core-android-8.1.0_r2_GH0.tar.gz) = 29c58327e06c9c938f8f3c0d3e991339eb98c53026203fbafc564e85cb6538bc -SIZE (aosp-mirror-platform_system_core-android-8.1.0_r2_GH0.tar.gz) = 5227210 -SHA256 (jbeich-platform_system_extras-android-8.1.0_r2_GH0.tar.gz) = 3ffa650a11b546928ffd9cf9688aea379151cb71f90fa6ef3d7ab4bf56a9dc67 -SIZE (jbeich-platform_system_extras-android-8.1.0_r2_GH0.tar.gz) = 196070852 -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 (aosp-mirror-platform_system_core-android-9.0.0_r3_GH0.tar.gz) = b9de23465b304432aa2b585aa66c6bf4841b177f2139b75ca5adc5d917e0ecd6 +SIZE (aosp-mirror-platform_system_core-android-9.0.0_r3_GH0.tar.gz) = 27484684 +SHA256 (jbeich-platform_system_extras-android-9.0.0_r3_GH0.tar.gz) = d82c4576bed24bfe701bb8c781714fa70365c03aed93cf4777407215de4d672d +SIZE (jbeich-platform_system_extras-android-9.0.0_r3_GH0.tar.gz) = 211722695 SHA256 (mbrubeck-android-completion-c1b0656_GH0.tar.gz) = ca3311ba47a5edd56c929ac9aae57c02c2c3f1636519c5f67abb00b6e3ecd75c SIZE (mbrubeck-android-completion-c1b0656_GH0.tar.gz) = 5967 Index: branches/2018Q3/devel/android-tools-fastboot/files/patch-ext4__utils_ext4__utils.c =================================================================== --- branches/2018Q3/devel/android-tools-fastboot/files/patch-ext4__utils_ext4__utils.c (revision 478188) +++ branches/2018Q3/devel/android-tools-fastboot/files/patch-ext4__utils_ext4__utils.c (nonexistent) @@ -1,56 +0,0 @@ ---- ext4_utils/ext4_utils.c.orig 2012-12-18 23:27:26 UTC -+++ ext4_utils/ext4_utils.c -@@ -36,8 +36,16 @@ - - #if defined(__linux__) - #include --#elif defined(__APPLE__) && defined(__MACH__) -+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \ -+ || (defined(__APPLE__) && defined(__MACH__)) - #include -+#elif defined(__sun) -+#include -+#elif defined(__Bitrig__) || defined(__NetBSD__) || defined(__OpenBSD__) -+#include -+#include -+#elif defined(__DragonFly__) -+#include - #endif - - #include "ext4.h" -@@ -53,6 +61,8 @@ struct sparse_file *ext4_sparse_file; - jmp_buf setjmp_env; - - /* Definition from RFC-4122 */ -+/* XXX defines slightly different |struct uuid| */ -+#define uuid ext4_uuid - struct uuid { - u32 time_low; - u16 time_mid; -@@ -383,10 +391,24 @@ static u64 get_block_device_size(int fd) - u64 size = 0; - int ret; - --#if defined(__linux__) -+#if defined(BLKGETSIZE64) - ret = ioctl(fd, BLKGETSIZE64, &size); --#elif defined(__APPLE__) && defined(__MACH__) -+#elif defined(DKIOCGETBLOCKCOUNT) - ret = ioctl(fd, DKIOCGETBLOCKCOUNT, &size); -+#elif defined(DIOCGMEDIASIZE) -+ ret = ioctl(fd, DIOCGMEDIASIZE, &size); -+#elif defined(DKIOCGMEDIAINFO) -+ struct dk_minfo minfo; -+ ret = ioctl(fd, DKIOCGMEDIAINFO, &minfo); -+ size = minfo.dki_lbsize * minfo.dki_capacity; -+#elif defined(DIOCGDINFO) -+ struct disklabel dl; -+ ret = ioctl(fd, DIOCGDINFO, &dl); -+ size = dl.d_secsize * dl.d_nsectors * dl.d_ntracks * dl.d_ncylinders; -+#elif defined(DIOCGPART) -+ struct partinfo pi; -+ ret = ioctl(fd, DIOCGPART, &pi); -+ size = pi.media_size; - #else - close(fd); - return 0; Property changes on: branches/2018Q3/devel/android-tools-fastboot/files/patch-ext4__utils_ext4__utils.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: branches/2018Q3/devel/android-tools-fastboot/files/patch-libselinux_src_init.c =================================================================== --- branches/2018Q3/devel/android-tools-fastboot/files/patch-libselinux_src_init.c (revision 478188) +++ branches/2018Q3/devel/android-tools-fastboot/files/patch-libselinux_src_init.c (nonexistent) @@ -1,30 +0,0 @@ ---- libselinux/src/init.c.orig 2015-06-15 21:40:06 UTC -+++ libselinux/src/init.c -@@ -7,10 +7,7 @@ - #include - #include - --#ifdef DARWIN --#include --#include --#else -+#if defined(__linux__) - #include - #endif - -@@ -26,6 +23,7 @@ int selinux_page_size = 0; - - static void init_selinuxmnt(void) - { -+#if defined(__linux__) - char buf[BUFSIZ], *p; - FILE *fp=NULL; - struct statfs sfbuf; -@@ -94,6 +92,7 @@ static void init_selinuxmnt(void) - if (fp) - fclose(fp); - return; -+#endif - } - - void fini_selinuxmnt(void) Property changes on: branches/2018Q3/devel/android-tools-fastboot/files/patch-libselinux_src_init.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: branches/2018Q3/devel/android-tools-fastboot/files/extra-patch-base_file.cpp =================================================================== --- branches/2018Q3/devel/android-tools-fastboot/files/extra-patch-base_file.cpp (revision 478188) +++ branches/2018Q3/devel/android-tools-fastboot/files/extra-patch-base_file.cpp (nonexistent) @@ -1,11 +0,0 @@ ---- base/file.cpp.orig 2016-08-08 21:10:17 UTC -+++ base/file.cpp -@@ -21,6 +21,8 @@ - #include - #include - -+#include // BUFSIZ -+#include // strerror - #include - - #include "android-base/macros.h" // For TEMP_FAILURE_RETRY on Darwin. Property changes on: branches/2018Q3/devel/android-tools-fastboot/files/extra-patch-base_file.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: branches/2018Q3/devel/android-tools-fastboot/files/Makefile =================================================================== --- branches/2018Q3/devel/android-tools-fastboot/files/Makefile (revision 478188) +++ branches/2018Q3/devel/android-tools-fastboot/files/Makefile (revision 478189) @@ -1,140 +1,109 @@ # $FreeBSD$ PROG_CXX=fastboot BINDIR?=/usr/bin FILESDIR?=${DOCDIR}/${PROG} VERSION?=0.0.0-0 FILES= *.md SRCS+= bootimg_utils.cpp SRCS+= engine.cpp SRCS+= fastboot.cpp SRCS+= ../fastboot/fs.cpp SRCS+= protocol.cpp SRCS+= socket.cpp SRCS+= tcp.cpp SRCS+= udp.cpp SRCS+= util.cpp .PATH: ${EXTRADIR} SRCS+= usb_freebsd.cpp # required by fastboot .PATH: ${.CURDIR}/../adb SRCS+= diagnose_usb.cpp # required by fastboot, diagnose_usb and libziparchive .PATH: ${.CURDIR}/../base SRCS+= errors_unix.cpp SRCS+= file.cpp SRCS+= logging.cpp SRCS+= parsenetaddress.cpp SRCS+= stringprintf.cpp SRCS+= strings.cpp # required by fastboot -.PATH: ${.CURDIR}/../ext4_utils -SRCS+= allocate.c -SRCS+= contents.c -SRCS+= crc16.c -SRCS+= ext4_sb.c -SRCS+= ext4_utils.c -SRCS+= ext4fixup.c -SRCS+= extent.c -SRCS+= indirect.c -SRCS+= make_ext4fs.c -SRCS+= sha1.c -SRCS+= wipe.c - -# required by fastboot .PATH: ${.CURDIR}/../libcutils SRCS+= android_get_control_file.cpp SRCS+= ../libcutils/sockets.cpp -SRCS+= socket_inaddr_any_server_unix.c -SRCS+= socket_network_client_unix.c +SRCS+= socket_inaddr_any_server_unix.cpp +SRCS+= socket_network_client_unix.cpp SRCS+= sockets_unix.cpp CPPFLAGS.sockets.cpp+= -o ${.TARGET} # XXX pre-r279980 # required by base and libutils .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 SRCS+= logprint.c SRCS+= stderr_write.c SRCS+= test_utils.cpp -# required by ext4_utils -.PATH: ${.CURDIR}/../libselinux/src -SRCS+= callbacks.c -SRCS+= check_context.c -SRCS+= freecon.c -SRCS+= init.c -SRCS+= label.c -SRCS+= label_android_property.c -SRCS+= label_file.c -SRCS+= label_support.c -CPPFLAGS.label_file.c+= -D_WITH_GETLINE - -# required by fastboot and ext4_utils +# required by fastboot .PATH: ${.CURDIR}/../libsparse SRCS+= backed_block.c SRCS+= output_file.c SRCS+= sparse.c SRCS+= sparse_crc32.c SRCS+= sparse_err.c SRCS+= sparse_read.cpp # required by libziparchive .PATH: ${.CURDIR}/../libutils SRCS+= FileMap.cpp # required by fastboot .PATH: ${.CURDIR}/../libziparchive SRCS+= zip_archive.cc CPPFLAGS+= -DFASTBOOT_VERSION="\"${VERSION}\"" CPPFLAGS+= -Doff64_t=off_t CPPFLAGS+= -Dftruncate64=ftruncate CPPFLAGS+= -Dlseek64=lseek CPPFLAGS+= -Dmmap64=mmap CPPFLAGS+= -Dpread64=pread CPPFLAGS+= -DFAKE_LOG_DEVICE=1 CPPFLAGS+= -I${.CURDIR} CPPFLAGS+= -I${.CURDIR}/../include CPPFLAGS+= -I${.CURDIR}/../adb -CPPFLAGS+= -I${.CURDIR}/../mkbootimg +CPPFLAGS+= -I${.CURDIR}/../mkbootimg/include/bootimg CPPFLAGS+= -I${.CURDIR}/../base/include -CPPFLAGS+= -I${.CURDIR}/../ext4_utils/include -CPPFLAGS+= -I${.CURDIR}/../f2fs_utils -CPPFLAGS+= -I${.CURDIR}/../libselinux/include CPPFLAGS+= -I${.CURDIR}/../libsparse/include CPPFLAGS+= -I${.CURDIR}/../libziparchive/include CPPFLAGS+= ${CPPFLAGS.${.IMPSRC:T}} -CPPFLAGS+= $$(${PKG_CONFIG} libpcre --cflags 2>/dev/null) CPPFLAGS+= $$(${PKG_CONFIG} libusb-1.0 --cflags 2>/dev/null) CXXFLAGS+= -D__STDC_LIMIT_MACROS # DragonFly CXXFLAGS+= -std=gnu++11 .ifndef COMPILE.c CFLAGS+= ${CPPFLAGS} CXXFLAGS+= ${CPPFLAGS} .endif -LDADD+= $$(${PKG_CONFIG} libpcre --libs 2>/dev/null || echo -lpcre) LDADD+= $$(${PKG_CONFIG} libusb-1.0 --libs 2>/dev/null || echo -lusb) LDADD+= -lz \-lpthread -DPADD+= ${LIBPCRE} ${LIBPTHREAD} ${LIBUSB} ${LIBZ} +DPADD+= ${LIBPTHREAD} ${LIBUSB} ${LIBZ} PKG_CONFIG?= pkg-config beforeinstall: ${INSTALL} -d ${DESTDIR}${FILESDIR} .include Index: branches/2018Q3/devel/android-tools-fastboot/files/patch-base_logging.cpp =================================================================== --- branches/2018Q3/devel/android-tools-fastboot/files/patch-base_logging.cpp (revision 478188) +++ branches/2018Q3/devel/android-tools-fastboot/files/patch-base_logging.cpp (revision 478189) @@ -1,50 +1,50 @@ --- base/logging.cpp.orig 2016-08-08 21:10:17 UTC +++ base/logging.cpp @@ -25,7 +25,7 @@ #include // For getprogname(3) or program_invocation_short_name. -#if defined(__ANDROID__) || defined(__APPLE__) +#if !defined(_WIN32) && !defined(__GLIBC__) #include #elif defined(__GLIBC__) #include @@ -35,6 +35,8 @@ #include #endif +#include // strrchr +#include // fprintf #include #include #include @@ -71,6 +72,14 @@ #include #elif defined(_WIN32) #include +#elif defined(__DragonFly__) +#include +#elif defined(__FreeBSD__) +#include +#elif defined(__NetBSD__) +#include -+#else ++#else // OpenBSD, Solaris +#include #endif #if defined(_WIN32) @@ -88,6 +97,14 @@ static thread_id GetThreadId() { return syscall(__NR_gettid); #elif defined(_WIN32) return GetCurrentThreadId(); +#elif defined(__DragonFly__) + return lwp_gettid(); -+#elif defined(__NetBSD__) -+ return _lwp_self(); +#elif defined(__FreeBSD__) + return pthread_getthreadid_np(); -+#else ++#elif defined(__NetBSD__) ++ return _lwp_self(); ++#else // OpenBSD, Solaris + return (intptr_t) pthread_self(); #endif } Index: branches/2018Q3/devel/android-tools-fastboot/files/patch-libziparchive_zip__archive.cc =================================================================== --- branches/2018Q3/devel/android-tools-fastboot/files/patch-libziparchive_zip__archive.cc (nonexistent) +++ branches/2018Q3/devel/android-tools-fastboot/files/patch-libziparchive_zip__archive.cc (revision 478189) @@ -0,0 +1,29 @@ +--- libziparchive/zip_archive.cc.orig 2018-06-21 00:58:42 UTC ++++ libziparchive/zip_archive.cc +@@ -47,6 +47,17 @@ + #include "zip_archive_common.h" + #include "zip_archive_private.h" + ++#if !defined(_WIN32) ++#if __cplusplus >= 201703 || (defined(_LIBCPP_VERSION) && __has_include()) ++#include ++#elif __cplusplus >= 201402 ++#include ++namespace std { ++using std::experimental::string_view; ++} ++#endif // __cplusplus >= 201703 ++#endif // !defined(_WIN32) ++ + using android::base::get_unaligned; + + // Used to turn on crc checks - verify that the content CRC matches the values +@@ -100,7 +111,7 @@ static uint32_t RoundUpPower2(uint32_t val) { + } + + static uint32_t ComputeHash(const ZipString& name) { +-#if !defined(_WIN32) ++#if __cplusplus >= 201402 && !defined(_WIN32) + return std::hash{}( + std::string_view(reinterpret_cast(name.name), name.name_length)); + #else Property changes on: branches/2018Q3/devel/android-tools-fastboot/files/patch-libziparchive_zip__archive.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2018Q3 =================================================================== --- branches/2018Q3 (revision 478188) +++ branches/2018Q3 (revision 478189) Property changes on: branches/2018Q3 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r477244-477248