novendor
This commit is contained in:
parent
b5078161a3
commit
3c58695ff8
1 changed files with 4 additions and 2 deletions
|
@ -122,8 +122,10 @@ GO_ENV+= CGO_ENABLED=${CGO_ENABLED} \
|
|||
GOARM=${GOARM}
|
||||
|
||||
. if ${go_ARGS:Mmodules}
|
||||
. if !${go_ARGS:Mnovendor}
|
||||
GO_BUILDFLAGS+= -mod=vendor
|
||||
GO_TESTFLAGS+= -mod=vendor
|
||||
. endif
|
||||
GO_GOPATH= ${DISTDIR}/go/${PKGORIGIN:S,/,_,g}
|
||||
GO_MODCACHE= file://${GO_GOPATH}/pkg/mod/cache/download
|
||||
GO_WRKSRC= ${WRKSRC}
|
||||
|
@ -214,7 +216,7 @@ do-build:
|
|||
pkg=$$(${ECHO_CMD} $${t} | \
|
||||
${SED} -Ee 's/^([^:]*).*$$/\1/' -e 's/^${PORTNAME}$$/./'); \
|
||||
${ECHO_MSG} "===> Building $${out} from $${pkg}"; \
|
||||
${SETENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=off ${GO_CMD} build ${GO_BUILDFLAGS} \
|
||||
${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} build ${GO_BUILDFLAGS} \
|
||||
-o ${GO_WRKDIR_BIN}/$${out} \
|
||||
$${pkg}; \
|
||||
done)
|
||||
|
@ -240,7 +242,7 @@ do-test:
|
|||
(cd ${GO_WRKSRC}; \
|
||||
for t in ${GO_TESTTARGET}; do \
|
||||
${ECHO_MSG} "===> Testing $${t}"; \
|
||||
${SETENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=off ${GO_CMD} test ${GO_TESTFLAGS} $${t}; \
|
||||
${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} test ${GO_TESTFLAGS} $${t}; \
|
||||
done)
|
||||
. endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue