freebsd-ports/devel/go-tools/Makefile
Tobias Kortkamp 3726f94254 Convert all Go ports to USES=go
This allows for port testing with lang/go-devel via GO_PORT, setting
up the Go build environment in a single place, and is step one in
simplifying Go ports that often define too complicated do-build
targets themselves.

USES=go gains new arguments 'run' to add lang/go to RUN_DEPENDS and
'no_targets' for ports with composite builds that call 'go' themselves
and do not need the do-build/do-install targets of USES=go.

PR:		238849
Submitted by:	dg@syrec.org (also D20745)
Reviewed by:	mat, tobik
Exp-run by:	antoine
Differential Revision:	https://reviews.freebsd.org/D20746
2019-06-29 03:51:13 +00:00

39 lines
1,021 B
Makefile

# Created by: Carlo Strub <cs@FreeBSD.org>
# $FreeBSD$
PORTNAME= tools
DISTVERSION= 20180726
CATEGORIES= devel
PKGNAMEPREFIX= go-
MAINTAINER= cs@FreeBSD.org
COMMENT= Go Tools
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= go
USE_GITHUB= yes
GH_TUPLE= golang:tools:bfb5194:DEFAULT/src/golang.org/x/tools \
golang:crypto:3cb0727:crypto/src/golang.org/x/crypto \
golang:net:b6d7b13:net/src/golang.org/x/net
TARGETS= benchcmp bundle callgraph compilebench cover digraph eg fiximports \
getgo go-contrib-init godex godoc goimports gomvpkg gorename gotype \
goyacc guru heapview html2article present ssadump stress stringer \
tip toolstash
do-build:
.for TARGET in ${TARGETS}
cd ${WRKSRC}/cmd/${TARGET} ; \
${SETENV} ${MAKE_ENV} GOPATH=${WRKSRC} go build golang.org/x/tools/cmd/${TARGET}
.endfor
do-install:
.for TARGET in ${TARGETS}
${STRIP_CMD} ${WRKSRC}/cmd/${TARGET}/${TARGET}
${INSTALL_PROGRAM} ${WRKSRC}/cmd/${TARGET}/${TARGET} ${STAGEDIR}${PREFIX}/bin/
.endfor
.include <bsd.port.mk>