From 2cd69d09deb7a5df225831b37dc5d299e20c7868 Mon Sep 17 00:00:00 2001 From: jlaffaye Date: Sat, 25 Aug 2018 17:26:16 +0000 Subject: Add GO_BUILDFLAGS variable to Uses/go.mk PR: 225812 Submitted by: David O'Rourke --- Mk/Uses/go.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Mk/Uses/go.mk b/Mk/Uses/go.mk index d526ee61a43d..c50eeac63761 100644 --- a/Mk/Uses/go.mk +++ b/Mk/Uses/go.mk @@ -24,6 +24,9 @@ # Addional LDFLAGS variables to be passed to the C compiler by the `go` # command # +# GO_BUILDFLAGS +# Additional build arguments to be passed to the `go install` command +# # MAINTAINER: jlaffaye@FreeBSD.org .if !defined(_INCLUDE_USES_GO_MK) @@ -40,6 +43,7 @@ GOOBJ= 6 # Settable variables GO_PKGNAME?= ${PORTNAME} GO_TARGET?= ${GO_PKGNAME} +GO_BUILDFLAGS+= -v CGO_CFLAGS+= -I${LOCALBASE}/include CGO_LDFLAGS+= -L${LOCALBASE}/lib @@ -76,7 +80,8 @@ post-extract: .if !target(do-build) do-build: - @(cd ${GO_WRKSRC}; ${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} install -v ${GO_TARGET}) + @(cd ${GO_WRKSRC}; \ + ${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} install ${GO_BUILDFLAGS} ${GO_TARGET}) .endif .if !target(do-install) -- cgit