# $FreeBSD: head/devel/android-tools-adb/Makefile 413758 2016-04-21 23:00:09Z jbeich $ PORTNAME= android-tools-adb DISTVERSIONPREFIX= android- DISTVERSION?= 6.0.1_r24 PORTREVISION?= 0 CATEGORIES= devel MAINTAINER= jbeich@FreeBSD.org COMMENT= Android debug bridge command line tool LICENSE= APACHE20 USE_GITHUB= yes GH_ACCOUNT= android GH_PROJECT= platform_system_core # Emulate GH_COMMIT without causing desync .ifdef DISTVERSIONSUFFIX GH_REVISION= ${DISTVERSIONSUFFIX:S/-g//} # snapshot .else GH_REVISION= 2a288d0f331c # generated by: make update-revision .endif CONFLICTS_INSTALL?= ${PORTNAME}-devel-* .ifndef EXTRA_PATCHES EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-base_include_base_logging.h EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-base_file__test.cpp EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-liblog_logd__write.c .endif USES= compiler:c++11-lib uidfix USE_OPENSSL= yes BUILD_WRKSRC= ${WRKSRC}/adb INSTALL_WRKSRC= ${BUILD_WRKSRC} TEST_WRKSRC= ${BUILD_WRKSRC} MAKEFILE= ${FILESDIR}/Makefile MAKE_ENV= BINDIR="${PREFIX}/bin" EXTRADIR="${FILESDIR}" \ FILESDIR="${DOCSDIR}" REVISION="${GH_REVISION}" ALL_TARGET= all TEST_TARGET= test PLIST_FILES= bin/adb PORTDOCS= * OPTIONS_DEFINE+=BASH DOCS TEST OPTIONS_SUB= yes .if make(makesum) # for optional distfiles .MAKEFLAGS: WITH="${OPTIONS_DEFINE}" .endif BASH_GH_ACCOUNT= mbrubeck:bashcomp BASH_GH_PROJECT= android-completion:bashcomp BASH_GH_TAGNAME= 3b0fabe:bashcomp BASH_PLIST_FILES= etc/bash_completion.d/adb BASH_VARS= LICENSE+=MIT LICENSE_COMB=multi DOCS_MAKE_ARGS_OFF= FILES="" FILESDIR="" TEST_BUILD_DEPENDS= googletest>=1.6.0:devel/googletest TEST_ALL_TARGET= adb_test pre-install-TEST-on: do-test post-patch: # XXX C++ exception with description "regex_error" thrown in the test body. @if [ ${OPSYS} = FreeBSD -a ${OSREL:R} -lt 10 ]; then \ ${REINPLACE_CMD} -Ee '/^TEST/\ s/ (LOG|PLOG|UNIMPLEMENTED)/ DISABLED_\1/' \ ${WRKSRC}/base/logging_test.cpp; \ fi # XXX Hidden by poudriere/tinderbox, see lindev(4) for FreeBSD < 11.0 @if [ ! -e /dev/full ]; then \ ${REINPLACE_CMD} -e '/TEST/s/[^ ]*ENOSPC/DISABLED_&/' \ ${WRKSRC}/adb/adb_io_test.cpp; \ fi post-install-BASH-on: ${MKDIR} ${STAGEDIR}${PREFIX}/${BASH_PLIST_FILES:H} ${INSTALL_DATA} ${WRKSRC_bashcomp}/android \ ${STAGEDIR}${PREFIX}/${BASH_PLIST_FILES} update-revision: # https://developer.github.com/v3/repos/commits/#get-a-single-commit # Pretend to be curl(1) for pretty-printed JSON to help parse with sed(1) @${REINPLACE_CMD} -i '' -e "/^GH_REVISION.*$@/s/=.*/= $$(\ ${SETENV} HTTP_USER_AGENT=curl ${FETCH_CMD} -qo- \ https://api.github.com/repos/${GH_ACCOUNT}/${GH_PROJECT}/commits/${GH_TAGNAME} | \ ${SED} -n '/sha/ { s/.*\"\([0-9a-f]\{12\}\).*/\1/p; q; }' \ ) # generated by: make $@/" \ ${.CURDIR}/Makefile .include # XXX Work around !target(makesum) .ifndef DISTVERSIONSUFFIX makesum: update-revision .endif