aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorjbeich <jbeich@FreeBSD.org>2015-06-19 06:45:34 +0800
committerjbeich <jbeich@FreeBSD.org>2015-06-19 06:45:34 +0800
commitebf62b12832767f2e29c94376a9f6a181e7f643c (patch)
tree003f8714585df32697d9b6439421ce4e46848009 /devel
parentc44de1300cfbc9de4648de9299e6d78e9471df16 (diff)
downloadfreebsd-ports-gnome-ebf62b12832767f2e29c94376a9f6a181e7f643c.tar.gz
freebsd-ports-gnome-ebf62b12832767f2e29c94376a9f6a181e7f643c.tar.zst
freebsd-ports-gnome-ebf62b12832767f2e29c94376a9f6a181e7f643c.zip
devel/android-tools-fastboot-devel: add new slave port for git master
A temporary port to facilitate testing and updating master. Changes: https://android.googlesource.com/platform/system/core/+log/53d504f/fastboot
Diffstat (limited to 'devel')
-rw-r--r--devel/Makefile1
-rw-r--r--devel/android-tools-fastboot-devel/Makefile21
-rw-r--r--devel/android-tools-fastboot-devel/distinfo10
-rw-r--r--devel/android-tools-fastboot-devel/files/Makefile91
-rw-r--r--devel/android-tools-fastboot-devel/files/patch-base_file.cpp10
-rw-r--r--devel/android-tools-fastboot-devel/files/patch-liblog_logd__write.c12
-rw-r--r--devel/android-tools-fastboot/Makefile10
7 files changed, 151 insertions, 4 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 91c67d83f829..92626beb50b6 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -58,6 +58,7 @@
SUBDIR += amd64-xtoolchain-gcc
SUBDIR += android-tools-adb
SUBDIR += android-tools-fastboot
+ SUBDIR += android-tools-fastboot-devel
SUBDIR += anjuta
SUBDIR += anjuta-extras
SUBDIR += antlr
diff --git a/devel/android-tools-fastboot-devel/Makefile b/devel/android-tools-fastboot-devel/Makefile
new file mode 100644
index 000000000000..a029081b3841
--- /dev/null
+++ b/devel/android-tools-fastboot-devel/Makefile
@@ -0,0 +1,21 @@
+# $FreeBSD$
+
+DISTVERSION= m-preview-122
+DISTVERSIONSUFFIX= -g53d504f
+PORTREVISION= 0
+PKGNAMESUFFIX= -devel
+
+GH_TAGNAME= m-preview-36-gb9408ad:extras \
+ m-preview-1-g06d4551:libselinux
+
+CONFLICTS_INSTALL= ${PORTNAME}-[0-9]*
+
+MASTERDIR= ${.CURDIR}/../android-tools-fastboot
+DISTINFO_FILE= ${.CURDIR}/distinfo
+MAKEFILE= ${.CURDIR}/files/Makefile
+EXTRA_PATCHES+= ${.CURDIR}/files/patch-*
+
+USES= compiler:c++11-lib
+CFLAGS+= -DFASTBOOT_REVISION='\"${DISTVERSIONFULL}\"'
+
+.include "${MASTERDIR}/Makefile"
diff --git a/devel/android-tools-fastboot-devel/distinfo b/devel/android-tools-fastboot-devel/distinfo
new file mode 100644
index 000000000000..4bec375c6396
--- /dev/null
+++ b/devel/android-tools-fastboot-devel/distinfo
@@ -0,0 +1,10 @@
+SHA256 (bash_completion.d/fastboot?id=2b8cfec) = 12ef37bff8230e5e164e4ef5b9c1be1e5518cf066a04479f61e5ebf3761d4bc4
+SIZE (bash_completion.d/fastboot?id=2b8cfec) = 3051
+SHA256 (fastboot.1?id=706e754) = 2af01b064440952a82f1602691a0fecc030302722a71444946fb70d9c423d283
+SIZE (fastboot.1?id=706e754) = 5906
+SHA256 (android-platform_system_core-android-m-preview-122-g53d504f_GH0.tar.gz) = 8d49065aff063fb02cc175c634384eb1dc9ed87b85d16e85f0c70bff01415948
+SIZE (android-platform_system_core-android-m-preview-122-g53d504f_GH0.tar.gz) = 1182976
+SHA256 (jbeich-platform_system_extras-m-preview-36-gb9408ad_GH0.tar.gz) = 012a17d90652e91d886a3b9e9770390264232e383e7c6278dd3082528f73f3dd
+SIZE (jbeich-platform_system_extras-m-preview-36-gb9408ad_GH0.tar.gz) = 651518
+SHA256 (jbeich-platform_external_libselinux-m-preview-1-g06d4551_GH0.tar.gz) = 14a6193ee80f42752089232b766b3948f3ff0c321c770684163b845ed03b0a77
+SIZE (jbeich-platform_external_libselinux-m-preview-1-g06d4551_GH0.tar.gz) = 50973
diff --git a/devel/android-tools-fastboot-devel/files/Makefile b/devel/android-tools-fastboot-devel/files/Makefile
new file mode 100644
index 000000000000..64fcbb34940a
--- /dev/null
+++ b/devel/android-tools-fastboot-devel/files/Makefile
@@ -0,0 +1,91 @@
+# $FreeBSD$
+
+PROG_CXX=fastboot
+BINDIR?=/usr/bin
+
+SRCS+= bootimg_utils.cpp
+SRCS+= engine.c
+SRCS+= fastboot.cpp
+SRCS+= fs.c
+SRCS+= protocol.c
+SRCS+= util.c
+
+.PATH: ${FILESDIR}
+SRCS+= usb_freebsd.c
+SRCS+= util_freebsd.c
+
+# required by libziparchive
+.PATH: ${.CURDIR}/../base
+SRCS+= file.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 base and libutils
+.PATH: ${.CURDIR}/../liblog
+SRCS+= fake_log_device.c
+SRCS+= logd_write.c
+CFLAGS.logd_write.c+= -DFAKE_LOG_DEVICE=1
+
+# 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
+CFLAGS.init.c+= -DDARWIN # statfs
+
+# 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
+
+# required by libziparchive
+.PATH: ${.CURDIR}/../libutils
+SRCS+= FileMap.cpp
+
+# required by fastboot
+.PATH: ${.CURDIR}/../libziparchive
+SRCS+= zip_archive.cc
+
+CFLAGS+=-Doff64_t=off_t
+CFLAGS+=-Dftruncate64=ftruncate
+CFLAGS+=-Dlseek64=lseek
+CFLAGS+=-Dmmap64=mmap
+CFLAGS+=-Dpread64=pread
+CFLAGS+=-I${.CURDIR}
+CFLAGS+=-I${.CURDIR}/../include
+CFLAGS+=-I${.CURDIR}/../mkbootimg
+CFLAGS+=-I${.CURDIR}/../base/include
+CFLAGS+=-I${.CURDIR}/../ext4_utils
+CFLAGS+=-I${.CURDIR}/../f2fs_utils
+CFLAGS+=-I${.CURDIR}/../libselinux/include
+CFLAGS+=-I${.CURDIR}/../libsparse/include
+CFLAGS+=${CFLAGS.${.IMPSRC:T}}
+
+CXXFLAGS+=-D__STDC_LIMIT_MACROS # DragonFly
+CXXFLAGS+=-std=gnu++11
+CXXFLAGS+=${CFLAGS:N-std*}
+
+LDADD+= -lpcre -lusb -lz
+DPADD+= ${LIBPCRE} ${LIBUSB} ${LIBZ}
+
+.include <bsd.prog.mk>
diff --git a/devel/android-tools-fastboot-devel/files/patch-base_file.cpp b/devel/android-tools-fastboot-devel/files/patch-base_file.cpp
new file mode 100644
index 000000000000..29638851e71d
--- /dev/null
+++ b/devel/android-tools-fastboot-devel/files/patch-base_file.cpp
@@ -0,0 +1,10 @@
+--- base/file.cpp.orig 2015-05-27 20:24:08 UTC
++++ base/file.cpp
+@@ -21,6 +21,7 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+
++#include <cstring> // strerror
+ #include <string>
+
+ #include "base/macros.h" // For TEMP_FAILURE_RETRY on Darwin.
diff --git a/devel/android-tools-fastboot-devel/files/patch-liblog_logd__write.c b/devel/android-tools-fastboot-devel/files/patch-liblog_logd__write.c
new file mode 100644
index 000000000000..d9a8890325d4
--- /dev/null
+++ b/devel/android-tools-fastboot-devel/files/patch-liblog_logd__write.c
@@ -0,0 +1,12 @@
+--- liblog/logd_write.c.orig 2015-05-27 20:24:08 UTC
++++ liblog/logd_write.c
+@@ -22,7 +22,9 @@
+ #include <pthread.h>
+ #endif
+ #include <stdarg.h>
++#if (FAKE_LOG_DEVICE == 0)
+ #include <stdatomic.h>
++#endif
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
diff --git a/devel/android-tools-fastboot/Makefile b/devel/android-tools-fastboot/Makefile
index 1cb074b6f177..5ba2bdc2100a 100644
--- a/devel/android-tools-fastboot/Makefile
+++ b/devel/android-tools-fastboot/Makefile
@@ -2,8 +2,8 @@
PORTNAME= android-tools-fastboot
DISTVERSIONPREFIX= android-
-DISTVERSION= 5.1.1_r4
-PORTREVISION= 5
+DISTVERSION?= 5.1.1_r4
+PORTREVISION?= 5
CATEGORIES= devel
MASTER_SITES= https://anonscm.debian.org/cgit/android-tools/android-tools.git/plain/debian/:bashcomp,manpage
DISTFILES= bash_completion.d/fastboot?id=2b8cfec:bashcomp \
@@ -26,10 +26,12 @@ GH_ACCOUNT= android jbeich:extras,libselinux
GH_PROJECT= platform_system_core platform_system_extras:extras \
platform_external_libselinux:libselinux
-USES= uidfix
+CONFLICTS_INSTALL?= ${PORTNAME}-devel-*
+
+USES+= uidfix
BUILD_WRKSRC= ${WRKSRC}/fastboot
INSTALL_WRKSRC= ${BUILD_WRKSRC}
-MAKEFILE= ${FILESDIR}/Makefile
+MAKEFILE= ${.CURDIR}/files/Makefile # XXX ?= when bmake-only
MAKE_ENV= FILESDIR="${FILESDIR}" BINDIR="${PREFIX}/bin" \
MANDIR="${PREFIX}/man/man" \
LIBPCRE="${LOCALBASE}/lib/libpcre.a"