Index: head/devel/android-tools-fastboot/Makefile =================================================================== --- head/devel/android-tools-fastboot/Makefile (revision 511885) +++ head/devel/android-tools-fastboot/Makefile (revision 511886) @@ -1,63 +1,60 @@ # $FreeBSD$ PORTNAME= android-tools-fastboot DISTVERSIONPREFIX= platform-tools- DISTVERSION?= 29.0.3 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 LICENSE_COMB= multi USE_GITHUB= yes GH_TUPLE= aosp-mirror:platform_system_core:${DISTVERSIONFULL} \ jbeich:platform_system_extras:${DISTVERSIONFULL}:extras/extras \ jbeich:platform_system_tools_mkbootimg:${DISTVERSIONFULL}:mkbootimg/mkbootimg CONFLICTS_INSTALL?= ${PORTNAME}-devel-* USES= compiler:c++17-lang pkgconfig ssl uidfix BUILD_WRKSRC= ${WRKSRC}/fastboot INSTALL_WRKSRC= ${BUILD_WRKSRC} MAKEFILE?= ${.CURDIR}/files/Makefile MAKE_ENV= BINDIR="${PREFIX}/bin" EXTRADIR="${FILESDIR}" \ FILESDIR="${DOCSDIR}" \ VERSION="${DISTVERSION}${DISTVERSIONSUFFIX}" \ MANDIR="${PREFIX}/man/man" PLIST_FILES= bin/fastboot \ man/man1/fastboot.1.gz PORTDOCS= * SUB_FILES= pkg-message OPTIONS_DEFINE= BASH DOCS OPTIONS_SUB= yes .if make(makesum) # for optional distfiles .MAKEFLAGS: WITH="${OPTIONS_DEFINE}" .endif BASH_GH_TUPLE= mbrubeck:android-completion: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}) - @(cd ${WRKSRC_mkbootimg} && ${COPYTREE_SHARE} . ${WRKSRC}) post-install-BASH-on: ${MKDIR} ${STAGEDIR}${PREFIX}/${BASH_PLIST_FILES:H} ${INSTALL_DATA} ${WRKSRC_bashcomp}/android \ ${STAGEDIR}${PREFIX}/${BASH_PLIST_FILES} .include Index: head/devel/android-tools-fastboot/files/patch-ext4__utils_ext4__utils.cpp =================================================================== --- head/devel/android-tools-fastboot/files/patch-ext4__utils_ext4__utils.cpp (revision 511885) +++ head/devel/android-tools-fastboot/files/patch-ext4__utils_ext4__utils.cpp (nonexistent) @@ -1,47 +0,0 @@ ---- ext4_utils/ext4_utils.cpp.orig 2019-08-13 02:10:50 UTC -+++ ext4_utils/ext4_utils.cpp -@@ -32,8 +32,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 - - int force = 0; -@@ -206,10 +214,24 @@ 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: head/devel/android-tools-fastboot/files/patch-ext4__utils_ext4__utils.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: head/devel/android-tools-fastboot/files/Makefile =================================================================== --- head/devel/android-tools-fastboot/files/Makefile (revision 511885) +++ head/devel/android-tools-fastboot/files/Makefile (revision 511886) @@ -1,122 +1,122 @@ # $FreeBSD$ PROG_CXX=fastboot BINDIR?=/usr/bin FILESDIR?=${DOCDIR}/${PROG} FILES= README.md SRCS+= bootimg_utils.cpp SRCS+= fastboot.cpp SRCS+= fastboot_driver.cpp SRCS+= ../fastboot/fs.cpp SRCS+= main.cpp SRCS+= socket.cpp SRCS+= tcp.cpp SRCS+= udp.cpp SRCS+= util.cpp .PATH: ${EXTRADIR} SRCS+= usb_freebsd.cpp # required by fastboot, diagnose_usb and libziparchive .PATH: ${.CURDIR}/../base SRCS+= errors_unix.cpp SRCS+= file.cpp SRCS+= logging.cpp SRCS+= mapped_file.cpp SRCS+= parsenetaddress.cpp SRCS+= stringprintf.cpp SRCS+= strings.cpp SRCS+= threads.cpp # required by fastboot .PATH: ${.CURDIR}/../diagnose_usb SRCS+= diagnose_usb.cpp # required by fs_mgr/liblp -.PATH: ${.CURDIR}/../ext4_utils +.PATH: ${.CURDIR}/../extras/ext4_utils SRCS+= ext4_sb.cpp SRCS+= ext4_utils.cpp # required by fastboot .PATH: ${.CURDIR}/../fs_mgr/liblp SRCS+= images.cpp SRCS+= partition_opener.cpp SRCS+= reader.cpp SRCS+= utility.cpp SRCS+= writer.cpp # required by fastboot .PATH: ${.CURDIR}/../libcutils SRCS+= android_get_control_file.cpp SRCS+= ../libcutils/sockets.cpp SRCS+= socket_inaddr_any_server_unix.cpp SRCS+= socket_network_client_unix.cpp SRCS+= sockets_unix.cpp # DragonFly, NetBSD, OpenBSD 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 SRCS+= backed_block.cpp SRCS+= output_file.cpp SRCS+= sparse.cpp SRCS+= sparse_crc32.cpp SRCS+= sparse_err.cpp SRCS+= sparse_read.cpp # required by fastboot .PATH: ${.CURDIR}/../libziparchive SRCS+= zip_archive.cc CPPFLAGS+= -DPLATFORM_TOOLS_VERSION="\"${VERSION:U0.0.0}\"" 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}/../include/bootimg +CPPFLAGS+= -I${.CURDIR}/../mkbootimg/include/bootimg CPPFLAGS+= -I${.CURDIR}/../base/include CPPFLAGS+= -I${.CURDIR}/../diagnose_usb/include -CPPFLAGS+= -I${.CURDIR}/../ext4_utils/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+= ${CPPFLAGS.${.IMPSRC:T}} CPPFLAGS+= $$(${PKG_CONFIG} libcrypto --cflags 2>/dev/null) CPPFLAGS+= $$(${PKG_CONFIG} libusb-1.0 --cflags 2>/dev/null) CXXFLAGS+= -D__STDC_LIMIT_MACROS # DragonFly CXXFLAGS+= -std=gnu++17 .ifndef COMPILE.c CFLAGS+= ${CPPFLAGS} CXXFLAGS+= ${CPPFLAGS} .endif 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+= ${LIBPTHREAD} ${LIBUSB} ${LIBZ} PKG_CONFIG?= pkg-config beforeinstall: ${INSTALL} -d ${DESTDIR}${FILESDIR} .include Index: head/devel/android-tools-fastboot/files/patch-extras_ext4__utils_ext4__utils.cpp =================================================================== --- head/devel/android-tools-fastboot/files/patch-extras_ext4__utils_ext4__utils.cpp (nonexistent) +++ head/devel/android-tools-fastboot/files/patch-extras_ext4__utils_ext4__utils.cpp (revision 511886) @@ -0,0 +1,47 @@ +--- extras/ext4_utils/ext4_utils.cpp.orig 2019-08-13 02:10:50 UTC ++++ extras/ext4_utils/ext4_utils.cpp +@@ -32,8 +32,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 + + int force = 0; +@@ -206,10 +214,24 @@ 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: head/devel/android-tools-fastboot/files/patch-extras_ext4__utils_ext4__utils.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