mirror of
https://git.freebsd.org/ports.git
synced 2025-06-03 20:06:29 -04:00
lang/gcc which have moved from GCC 4.9.4 to GCC 5.4 (at least under some circumstances such as versions of FreeBSD or platforms). This includes ports - with USE_GCC=yes or USE_GCC=any, - with USES=fortran, - using using Mk/bsd.octave.mk which in turn has USES=fortran, and - with USES=compiler specifying openmp, nestedfct, c++11-lib, c++14-lang, c++11-lang, c++0x, c11, or gcc-c++11-lib. PR: 216707
98 lines
2.7 KiB
Makefile
98 lines
2.7 KiB
Makefile
# $FreeBSD$
|
|
|
|
PORTNAME= android-tools-adb
|
|
DISTVERSIONPREFIX= android-
|
|
DISTVERSION?= 7.1.1_r4
|
|
PORTREVISION?= 1
|
|
CATEGORIES= devel comms
|
|
.ifndef EXTRA_PATCHES
|
|
PATCH_SITES= https://github.com/android/platform_system_core/commit/
|
|
PATCHFILES= b4cff495a1f9.patch:-p1
|
|
.endif
|
|
|
|
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= 5cf8bbd5b29d # generated by: make update-revision
|
|
.endif
|
|
|
|
CONFLICTS_INSTALL?= ${PORTNAME}-devel-*
|
|
|
|
.ifndef EXTRA_PATCHES
|
|
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-adb_sysdeps_mutex.h
|
|
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-base_file.cpp
|
|
.endif
|
|
|
|
USES= compiler:c++11-lib pkgconfig ssl uidfix
|
|
BUILD_WRKSRC= ${WRKSRC}/adb
|
|
INSTALL_WRKSRC= ${BUILD_WRKSRC}
|
|
TEST_WRKSRC= ${BUILD_WRKSRC}
|
|
CPPFLAGS+= -D_GLIBCXX_USE_C99 # XXX ports/193528
|
|
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= c1b0656: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+= googlemock>=1.6.0:devel/googlemock \
|
|
googletest>=1.6.0:devel/googletest
|
|
TEST_ALL_TARGET= adb_test
|
|
|
|
pre-install-TEST-on: do-test
|
|
|
|
post-patch:
|
|
# 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 <bsd.port.mk>
|
|
|
|
# XXX Work around !target(makesum)
|
|
.ifndef DISTVERSIONSUFFIX
|
|
makesum: update-revision
|
|
.endif
|