diff --git a/Mk/Uses/go.mk b/Mk/Uses/go.mk index 97d3703..773b8f7 100644 --- a/Mk/Uses/go.mk +++ b/Mk/Uses/go.mk @@ -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