Index: head/devel/android-tools-adb-devel/files/patch-base_file.cpp =================================================================== --- head/devel/android-tools-adb-devel/files/patch-base_file.cpp (revision 444111) +++ head/devel/android-tools-adb-devel/files/patch-base_file.cpp (revision 444112) @@ -1,40 +1,41 @@ --- base/file.cpp.orig 2017-06-20 10:50:27 UTC +++ base/file.cpp -@@ -19,6 +19,9 @@ +@@ -19,6 +19,10 @@ #include #include #include +#include // PATH_MAX +#include // BUFSIZ ++#include // realpath +#include // strerror #include #include #include @@ -36,6 +39,9 @@ #if defined(__APPLE__) #include #endif +#if defined(__DragonFly__) || defined(__FreeBSD__) +#include +#endif #if defined(_WIN32) #include #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; +#elif defined(KERN_PROC_PATHNAME) + char path[PATH_MAX + 1]; + size_t path_len = sizeof(path); + int mib[] = { + CTL_KERN, + KERN_PROC, + KERN_PROC_PATHNAME, + getpid() + }; + int rc = sysctl(mib, arraysize(mib), path, &path_len, NULL, 0); + return rc ? "" : path; #else #error unknown OS #endif Index: head/devel/android-tools-fastboot/pkg-descr =================================================================== --- head/devel/android-tools-fastboot/pkg-descr (revision 444111) +++ head/devel/android-tools-fastboot/pkg-descr (revision 444112) @@ -1,4 +1,6 @@ -Fastboot is a diagnostic protocol primarily used to update the flash -filesystem of Android devices over USB. +Fastboot protocol is a mechanism for communicating with bootloaders +over USB or Ethernet. It is designed to be very straightforward to +implement, to allow it to be used across a wide range of devices and +from hosts running Linux, macOS, or Windows. -This package provides the fastboot command-line tool. +WWW: https://android.googlesource.com/platform/system/core/+/master/fastboot/README.md Index: head/devel/android-tools-fastboot-devel/Makefile =================================================================== --- head/devel/android-tools-fastboot-devel/Makefile (revision 444111) +++ head/devel/android-tools-fastboot-devel/Makefile (revision 444112) @@ -1,20 +1,20 @@ # $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 GH_MYTAG= ${DISTVERSIONPREFIX}${DISTVERSION:C/-[0-9]*$//} -GH_TAGNAME= ${GH_MYTAG}-907-g1a35848b34d6:extras \ +GH_TAGNAME= ${GH_MYTAG}-50-gebf42931:extras \ ${GH_MYTAG}-43-ga63b41e:libselinux CONFLICTS_INSTALL= ${PORTNAME}-[0-9]* MASTERDIR= ${.CURDIR}/../android-tools-fastboot DISTINFO_FILE= ${.CURDIR}/distinfo FILESDIR= ${.CURDIR}/files EXTRA_PATCHES= ${.CURDIR}/files/patch-* .include "${MASTERDIR}/Makefile" Index: head/devel/android-tools-fastboot-devel/distinfo =================================================================== --- head/devel/android-tools-fastboot-devel/distinfo (revision 444111) +++ head/devel/android-tools-fastboot-devel/distinfo (revision 444112) @@ -1,11 +1,11 @@ -TIMESTAMP = 1474960220 +TIMESTAMP = 1497955827 SHA256 (fastboot.1?id=706e754) = 2af01b064440952a82f1602691a0fecc030302722a71444946fb70d9c423d283 SIZE (fastboot.1?id=706e754) = 5906 -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 -SHA256 (jbeich-platform_system_extras-android-n-preview-5-907-g1a35848b34d6_GH0.tar.gz) = 76c5b258753e6168796a5eeff64b44376439aa793d34786d27a9a1ba3759e174 -SIZE (jbeich-platform_system_extras-android-n-preview-5-907-g1a35848b34d6_GH0.tar.gz) = 95573256 -SHA256 (jbeich-platform_external_libselinux-android-n-preview-5-43-ga63b41e_GH0.tar.gz) = eb85e6ea45fedb123a14a2326ba3e4a9a6ef2577b2ecd258be4097a4445f8f36 -SIZE (jbeich-platform_external_libselinux-android-n-preview-5-43-ga63b41e_GH0.tar.gz) = 63141 +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 (jbeich-platform_system_extras-android-o-preview-2-50-gebf42931_GH0.tar.gz) = fff9cb211ed96e0f898ed3738a9325be3c9b18f333cfff1562af668162b6c531 +SIZE (jbeich-platform_system_extras-android-o-preview-2-50-gebf42931_GH0.tar.gz) = 107631212 +SHA256 (jbeich-platform_external_libselinux-android-o-preview-2-43-ga63b41e_GH0.tar.gz) = 7b3198361574a22364a611015c772198f2ec06ba0f84bab061c03d41d2959b0b +SIZE (jbeich-platform_external_libselinux-android-o-preview-2-43-ga63b41e_GH0.tar.gz) = 63139 SHA256 (mbrubeck-android-completion-c1b0656_GH0.tar.gz) = ca3311ba47a5edd56c929ac9aae57c02c2c3f1636519c5f67abb00b6e3ecd75c SIZE (mbrubeck-android-completion-c1b0656_GH0.tar.gz) = 5967 Index: head/devel/android-tools-fastboot-devel/files/Makefile =================================================================== --- head/devel/android-tools-fastboot-devel/files/Makefile (revision 444111) +++ head/devel/android-tools-fastboot-devel/files/Makefile (revision 444112) @@ -1,137 +1,143 @@ # $FreeBSD$ PROG_CXX=fastboot BINDIR?=/usr/bin FILESDIR?=${DOCDIR}/${PROG} FILES= *.[Tt][Xx][Tt] 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 SRCS+= util_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+= 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 -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 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 SRCS+= regex.c CPPFLAGS.label_file.c+= -D_WITH_GETLINE # required by fastboot and ext4_utils .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.c +SRCS+= sparse_read.cpp # required by libziparchive .PATH: ${.CURDIR}/../libutils SRCS+= FileMap.cpp # required by fastboot .PATH: ${.CURDIR}/../libziparchive SRCS+= zip_archive.cc REVISION?= $$(${GIT} rev-parse --short=12 HEAD 2>/dev/null || echo unknown) -CPPFLAGS+= -DFASTBOOT_REVISION="\"${REVISION}-android\"" +CPPFLAGS+= -DFASTBOOT_VERSION="\"0.0.0-${REVISION}-android\"" 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}/../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 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} GIT?= git PKG_CONFIG?= pkg-config beforeinstall: ${INSTALL} -d ${DESTDIR}${FILESDIR} .include Index: head/devel/android-tools-fastboot-devel/files/patch-base_file.cpp =================================================================== --- head/devel/android-tools-fastboot-devel/files/patch-base_file.cpp (revision 444111) +++ head/devel/android-tools-fastboot-devel/files/patch-base_file.cpp (revision 444112) @@ -1,40 +1,41 @@ ---- 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,10 @@ #include #include + #include +#include // PATH_MAX +#include // BUFSIZ ++#include // realpath +#include // strerror #include #include #include -@@ -34,6 +37,9 @@ +@@ -36,6 +39,9 @@ #if defined(__APPLE__) #include #endif +#if defined(__DragonFly__) || defined(__FreeBSD__) +#include +#endif #if defined(_WIN32) #include - #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; +#elif defined(KERN_PROC_PATHNAME) + char path[PATH_MAX + 1]; + size_t path_len = sizeof(path); + int mib[] = { + CTL_KERN, + KERN_PROC, + KERN_PROC_PATHNAME, + getpid() + }; + int rc = sysctl(mib, arraysize(mib), path, &path_len, NULL, 0); + return rc ? "" : path; #else #error unknown OS #endif Index: head/devel/android-tools-fastboot-devel/files/patch-libsparse_sparse__read.cpp =================================================================== --- head/devel/android-tools-fastboot-devel/files/patch-libsparse_sparse__read.cpp (nonexistent) +++ head/devel/android-tools-fastboot-devel/files/patch-libsparse_sparse__read.cpp (revision 444112) @@ -0,0 +1,10 @@ +--- libsparse/sparse_read.cpp.orig 2017-06-20 10:50:27 UTC ++++ libsparse/sparse_read.cpp +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include // memset + #include + + #include Property changes on: head/devel/android-tools-fastboot-devel/files/patch-libsparse_sparse__read.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