summaryrefslogtreecommitdiff
path: root/devel/android-tools-fastboot
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2017-08-22 13:01:20 +0000
committerJan Beich <jbeich@FreeBSD.org>2017-08-22 13:01:20 +0000
commit212056367b28056afc7702fbe11fef0d918cf928 (patch)
tree55352d2b91e51ca0f722cf9f1707bebdec74d38c /devel/android-tools-fastboot
parentUpdate 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')
-rw-r--r--devel/android-tools-fastboot/Makefile9
-rw-r--r--devel/android-tools-fastboot/distinfo8
-rw-r--r--devel/android-tools-fastboot/files/Makefile18
-rw-r--r--devel/android-tools-fastboot/files/patch-base_file.cpp47
-rw-r--r--devel/android-tools-fastboot/files/patch-base_logging.cpp50
5 files changed, 116 insertions, 16 deletions
diff --git a/devel/android-tools-fastboot/Makefile b/devel/android-tools-fastboot/Makefile
index 0bc631afddb0..10eae9df3720 100644
--- a/devel/android-tools-fastboot/Makefile
+++ b/devel/android-tools-fastboot/Makefile
@@ -2,7 +2,7 @@
PORTNAME= android-tools-fastboot
DISTVERSIONPREFIX= android-
-DISTVERSION?= 7.1.2_r17
+DISTVERSION?= 8.0.0_r4
PORTREVISION?= 0
CATEGORIES= devel sysutils
MASTER_SITES= https://anonscm.debian.org/cgit/android-tools/android-tools.git/plain/debian/:manpage
@@ -22,21 +22,18 @@ USE_GITHUB= yes
GH_ACCOUNT= android 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
# Emulate GH_COMMIT without causing desync
.ifdef DISTVERSIONSUFFIX
GH_REVISION= ${DISTVERSIONSUFFIX:S/-g//} # snapshot
.else
-GH_REVISION= 1346a4012db4 # generated by: make update-revision
+GH_REVISION= f6a78079a81a # generated by: make update-revision
.endif
CONFLICTS_INSTALL?= ${PORTNAME}-devel-*
-.ifndef EXTRA_PATCHES
-EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-base_file.cpp
-.endif
-
USES= compiler:c++11-lib pkgconfig uidfix
BUILD_WRKSRC= ${WRKSRC}/fastboot
INSTALL_WRKSRC= ${BUILD_WRKSRC}
diff --git a/devel/android-tools-fastboot/distinfo b/devel/android-tools-fastboot/distinfo
index b6d2b4192644..482481c07268 100644
--- a/devel/android-tools-fastboot/distinfo
+++ b/devel/android-tools-fastboot/distinfo
@@ -1,10 +1,10 @@
TIMESTAMP = 1495068953
SHA256 (fastboot.1?id=706e754) = 2af01b064440952a82f1602691a0fecc030302722a71444946fb70d9c423d283
SIZE (fastboot.1?id=706e754) = 5906
-SHA256 (android-platform_system_core-android-7.1.2_r17_GH0.tar.gz) = fb8d053d846f439951c651f205c9c914531d8dace86da60474f6675a92576449
-SIZE (android-platform_system_core-android-7.1.2_r17_GH0.tar.gz) = 1596372
-SHA256 (jbeich-platform_system_extras-android-7.1.2_r17_GH0.tar.gz) = ee97ae3df4eecc0d7fc16d3cb6f016ae1b1f81d7e450e678473c9b4618676b42
-SIZE (jbeich-platform_system_extras-android-7.1.2_r17_GH0.tar.gz) = 79621709
+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 (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 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
+ }
+