diff options
Diffstat (limited to 'devel/android-tools-fastboot/files')
5 files changed, 71 insertions, 27 deletions
diff --git a/devel/android-tools-fastboot/files/Makefile b/devel/android-tools-fastboot/files/Makefile index be9029ea8d77..9aa93b8a07ba 100644 --- a/devel/android-tools-fastboot/files/Makefile +++ b/devel/android-tools-fastboot/files/Makefile @@ -59,15 +59,12 @@ CPPFLAGS.sockets.cpp+= -o ${.TARGET} # required by base and libutils .PATH: ${.CURDIR}/../liblog -SRCS+= config_read.cpp -SRCS+= config_write.cpp SRCS+= fake_log_device.cpp SRCS+= fake_writer.cpp SRCS+= logger_lock.cpp SRCS+= logger_name.cpp SRCS+= logger_write.cpp SRCS+= logprint.cpp -SRCS+= stderr_write.cpp # required by fastboot .PATH: ${.CURDIR}/../libsparse @@ -91,13 +88,14 @@ CPPFLAGS+= -Dpread64=pread CPPFLAGS+= -DFAKE_LOG_DEVICE=1 CPPFLAGS+= -I${.CURDIR} CPPFLAGS+= -I${.CURDIR}/../include -CPPFLAGS+= -I${.CURDIR}/../mkbootimg/include/bootimg +CPPFLAGS+= -I${.CURDIR}/../avb CPPFLAGS+= -I${.CURDIR}/../base/include CPPFLAGS+= -I${.CURDIR}/../diagnose_usb/include CPPFLAGS+= -I${.CURDIR}/../extras/ext4_utils/include CPPFLAGS+= -I${.CURDIR}/../fs_mgr/liblp/include CPPFLAGS+= -I${.CURDIR}/../libsparse/include CPPFLAGS+= -I${.CURDIR}/../libziparchive/include +CPPFLAGS+= -I${.CURDIR}/../mkbootimg/include/bootimg CPPFLAGS+= ${CPPFLAGS.${.IMPSRC:T}} CPPFLAGS+= $$(${PKG_CONFIG} libcrypto --cflags 2>/dev/null) CPPFLAGS+= $$(${PKG_CONFIG} libusb-1.0 --cflags 2>/dev/null) diff --git a/devel/android-tools-fastboot/files/patch-base_include_android-base_endian.h b/devel/android-tools-fastboot/files/patch-base_include_android-base_endian.h new file mode 100644 index 000000000000..5e6e51b671a7 --- /dev/null +++ b/devel/android-tools-fastboot/files/patch-base_include_android-base_endian.h @@ -0,0 +1,58 @@ +--- base/include/android-base/endian.h.orig 2019-10-18 00:22:21 UTC ++++ base/include/android-base/endian.h +@@ -50,6 +50,8 @@ + #if defined(__APPLE__) + /* macOS has some of the basics. */ + #include <sys/_endian.h> ++#elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) ++#include <sys/endian.h> + #else + /* Windows has some of the basics as well. */ + #include <sys/param.h> +@@ -71,22 +73,39 @@ + + #define ntohq(x) __builtin_bswap64(x) + ++#if !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) + #define htobe16(x) __builtin_bswap16(x) + #define htobe32(x) __builtin_bswap32(x) + #define htobe64(x) __builtin_bswap64(x) ++#endif + ++#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) ++#define betoh16(x) be16toh(x) ++#define betoh32(x) be32toh(x) ++#define betoh64(x) be64toh(x) ++#else + #define betoh16(x) __builtin_bswap16(x) + #define betoh32(x) __builtin_bswap32(x) + #define betoh64(x) __builtin_bswap64(x) ++#endif + ++#if !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) + #define htole16(x) (x) + #define htole32(x) (x) + #define htole64(x) (x) ++#endif + ++#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) ++#define letoh16(x) le16toh(x) ++#define letoh32(x) le32toh(x) ++#define letoh64(x) le64toh(x) ++#else + #define letoh16(x) (x) + #define letoh32(x) (x) + #define letoh64(x) (x) ++#endif + ++#if !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) + #define be16toh(x) __builtin_bswap16(x) + #define be32toh(x) __builtin_bswap32(x) + #define be64toh(x) __builtin_bswap64(x) +@@ -94,5 +113,6 @@ + #define le16toh(x) (x) + #define le32toh(x) (x) + #define le64toh(x) (x) ++#endif + + #endif diff --git a/devel/android-tools-fastboot/files/patch-fastboot_fastboot.cpp b/devel/android-tools-fastboot/files/patch-fastboot_fastboot.cpp index b0aba681ef38..4b8449b72656 100644 --- a/devel/android-tools-fastboot/files/patch-fastboot_fastboot.cpp +++ b/devel/android-tools-fastboot/files/patch-fastboot_fastboot.cpp @@ -1,6 +1,6 @@ ---- fastboot/fastboot.cpp.orig 2019-08-13 02:10:58 UTC +--- fastboot/fastboot.cpp.orig 2019-10-18 00:22:21 UTC +++ fastboot/fastboot.cpp -@@ -58,9 +58,20 @@ +@@ -59,10 +59,21 @@ #include <android-base/stringprintf.h> #include <android-base/strings.h> #include <android-base/unique_fd.h> @@ -15,10 +15,11 @@ +}}} +#else #include <build/version.h> --#include <liblp/liblp.h> - #include <platform_tools_version.h> ++#include <platform_tools_version.h> +#endif -+#include <liblp/liblp.h> + #include <libavb/libavb.h> + #include <liblp/liblp.h> +-#include <platform_tools_version.h> #include <sparse/sparse.h> #include <ziparchive/zip_archive.h> diff --git a/devel/android-tools-fastboot/files/patch-liblog_fake__writer.cpp b/devel/android-tools-fastboot/files/patch-liblog_fake__writer.cpp index e93327448dc3..ea76f483c4a8 100644 --- a/devel/android-tools-fastboot/files/patch-liblog_fake__writer.cpp +++ b/devel/android-tools-fastboot/files/patch-liblog_fake__writer.cpp @@ -1,12 +1,11 @@ ---- liblog/fake_writer.cpp.orig 2019-07-17 19:54:09 UTC +--- liblog/fake_writer.cpp.orig 2019-10-18 00:22:21 UTC +++ liblog/fake_writer.cpp -@@ -33,8 +33,8 @@ static int logFds[(int)LOG_ID_MAX] = {-1, -1, -1, -1, - +@@ -34,7 +34,7 @@ static int logFds[(int)LOG_ID_MAX] = {-1, -1, -1, -1, struct android_log_transport_write fakeLoggerWrite = { - .node = {&fakeLoggerWrite.node, &fakeLoggerWrite.node}, -- .context.priv = &logFds, .name = "fake", + .logMask = 0, +- .context.priv = &logFds, + .context = { .priv = &logFds }, // GCC - .available = NULL, + .available = fakeAvailable, .open = fakeOpen, .close = fakeClose, diff --git a/devel/android-tools-fastboot/files/patch-liblog_stderr__write.cpp b/devel/android-tools-fastboot/files/patch-liblog_stderr__write.cpp deleted file mode 100644 index 2da1354f365e..000000000000 --- a/devel/android-tools-fastboot/files/patch-liblog_stderr__write.cpp +++ /dev/null @@ -1,12 +0,0 @@ ---- liblog/stderr_write.cpp.orig 2019-08-13 02:10:58 UTC -+++ liblog/stderr_write.cpp -@@ -55,8 +55,8 @@ struct stderrContext { - - struct android_log_transport_write stderrLoggerWrite = { - .node = {&stderrLoggerWrite.node, &stderrLoggerWrite.node}, -- .context.priv = NULL, - .name = "stderr", -+ .context = { .priv = NULL }, // GCC - .available = stderrAvailable, - .open = stderrOpen, - .close = stderrClose, |