diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2017-08-22 13:01:20 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2017-08-22 13:01:20 +0000 |
commit | 212056367b28056afc7702fbe11fef0d918cf928 (patch) | |
tree | 55352d2b91e51ca0f722cf9f1707bebdec74d38c /devel/android-tools-fastboot/files | |
parent | Update to 4.0 (diff) |
devel/android-tools-{adb,fastboot}: update to 8.0.0.r4 (oreo)
Changes: https://android.googlesource.com/platform/system/core/+log/android-7.1.2_r17..android-8.0.0_r4/adb
Changes: https://android.googlesource.com/platform/system/core/+log/android-7.1.2_r17..android-8.0.0_r4/fastboot
Notes
Notes:
svn path=/head/; revision=448522
Diffstat (limited to 'devel/android-tools-fastboot/files')
-rw-r--r-- | devel/android-tools-fastboot/files/Makefile | 18 | ||||
-rw-r--r-- | devel/android-tools-fastboot/files/patch-base_file.cpp | 47 | ||||
-rw-r--r-- | devel/android-tools-fastboot/files/patch-base_logging.cpp | 50 |
3 files changed, 109 insertions, 6 deletions
diff --git a/devel/android-tools-fastboot/files/Makefile b/devel/android-tools-fastboot/files/Makefile index 35d91180ab89..380a6c2d1db2 100644 --- a/devel/android-tools-fastboot/files/Makefile +++ b/devel/android-tools-fastboot/files/Makefile @@ -4,7 +4,7 @@ PROG_CXX=fastboot BINDIR?=/usr/bin FILESDIR?=${DOCDIR}/${PROG} -FILES= *.[Tt][Xx][Tt] +FILES= *.md SRCS+= bootimg_utils.cpp SRCS+= engine.cpp @@ -18,7 +18,6 @@ SRCS+= util.cpp .PATH: ${EXTRADIR} SRCS+= usb_freebsd.cpp -SRCS+= util_freebsd.cpp # required by fastboot .PATH: ${.CURDIR}/../adb @@ -28,6 +27,7 @@ SRCS+= diagnose_usb.cpp .PATH: ${.CURDIR}/../base SRCS+= errors_unix.cpp SRCS+= file.cpp +SRCS+= logging.cpp SRCS+= parsenetaddress.cpp SRCS+= stringprintf.cpp SRCS+= strings.cpp @@ -48,6 +48,7 @@ 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 @@ -56,13 +57,17 @@ 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 -CPPFLAGS.config_write.c+= -DFAKE_LOG_DEVICE=1 +SRCS+= logprint.c +SRCS+= stderr_write.c +SRCS+= test_utils.cpp # required by ext4_utils .PATH: ${.CURDIR}/../libselinux/src @@ -101,12 +106,13 @@ 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}/../base/include -CPPFLAGS+= -I${.CURDIR}/../ext4_utils +CPPFLAGS+= -I${.CURDIR}/../ext4_utils/include CPPFLAGS+= -I${.CURDIR}/../f2fs_utils CPPFLAGS+= -I${.CURDIR}/../libselinux/include CPPFLAGS+= -I${.CURDIR}/../libsparse/include @@ -123,8 +129,8 @@ CXXFLAGS+= ${CPPFLAGS} LDADD+= $$(${PKG_CONFIG} libpcre --libs 2>/dev/null || echo -lpcre) LDADD+= $$(${PKG_CONFIG} libusb-1.0 --libs 2>/dev/null || echo -lusb) -LDADD+= -lz -DPADD+= ${LIBPCRE} ${LIBUSB} ${LIBZ} +LDADD+= -lz \-lpthread +DPADD+= ${LIBPCRE} ${LIBPTHREAD} ${LIBUSB} ${LIBZ} GIT?= git PKG_CONFIG?= pkg-config diff --git a/devel/android-tools-fastboot/files/patch-base_file.cpp b/devel/android-tools-fastboot/files/patch-base_file.cpp new file mode 100644 index 000000000000..ca20501150a6 --- /dev/null +++ b/devel/android-tools-fastboot/files/patch-base_file.cpp @@ -0,0 +1,47 @@ +--- base/file.cpp.orig 2017-06-20 10:50:27 UTC ++++ base/file.cpp +@@ -19,6 +19,10 @@ + #include <errno.h> + #include <fcntl.h> + #include <libgen.h> ++#include <limits.h> // PATH_MAX ++#include <stdio.h> // BUFSIZ ++#include <stdlib.h> // realpath ++#include <string.h> // strerror + #include <sys/stat.h> + #include <sys/types.h> + #include <unistd.h> +@@ -36,6 +39,9 @@ + #if defined(__APPLE__) + #include <mach-o/dyld.h> + #endif ++#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) ++#include <sys/sysctl.h> ++#endif + #if defined(_WIN32) + #include <windows.h> + #define O_CLOEXEC O_NOINHERIT +@@ -251,6 +258,23 @@ std::string GetExecutablePath() { + if (result == 0 || result == sizeof(path) - 1) return ""; + path[PATH_MAX - 1] = 0; + return path; ++#elif defined(KERN_PROC_PATHNAME) ++ char path[PATH_MAX + 1]; ++ size_t path_len = sizeof(path); ++ int mib[] = { ++ CTL_KERN, ++#if defined(__NetBSD__) ++ KERN_PROC_ARGS, ++ -1, ++ KERN_PROC_PATHNAME, ++#else ++ KERN_PROC, ++ KERN_PROC_PATHNAME, ++ -1, ++#endif ++ }; ++ int rc = sysctl(mib, arraysize(mib), path, &path_len, NULL, 0); ++ return rc ? "" : path; + #else + #error unknown OS + #endif diff --git a/devel/android-tools-fastboot/files/patch-base_logging.cpp b/devel/android-tools-fastboot/files/patch-base_logging.cpp new file mode 100644 index 000000000000..10b83f259680 --- /dev/null +++ b/devel/android-tools-fastboot/files/patch-base_logging.cpp @@ -0,0 +1,50 @@ +--- base/logging.cpp.orig 2016-08-08 21:10:17 UTC ++++ base/logging.cpp +@@ -25,7 +25,7 @@ + #include <time.h> + + // For getprogname(3) or program_invocation_short_name. +-#if defined(__ANDROID__) || defined(__APPLE__) ++#if !defined(_WIN32) && !defined(__GLIBC__) + #include <stdlib.h> + #elif defined(__GLIBC__) + #include <errno.h> +@@ -35,6 +35,8 @@ + #include <sys/uio.h> + #endif + ++#include <cstring> // strrchr ++#include <cstdio> // fprintf + #include <iostream> + #include <limits> + #include <sstream> +@@ -71,6 +72,14 @@ + #include <unistd.h> + #elif defined(_WIN32) + #include <windows.h> ++#elif defined(__DragonFly__) ++#include <unistd.h> ++#elif defined(__FreeBSD__) ++#include <pthread_np.h> ++#elif defined(__NetBSD__) ++#include <lwp.h> ++#else ++#include <stdint.h> + #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 ++ return (intptr_t) pthread_self(); + #endif + } + |