From 5f386c32b7001f01d88f40bd9dc6c348c2715530 Mon Sep 17 00:00:00 2001 From: Dan Ponte Date: Sun, 24 Jul 2022 11:01:42 -0400 Subject: [PATCH] fix uses --- Mk/Uses/go.mk | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Mk/Uses/go.mk b/Mk/Uses/go.mk index 773b8f7..8fee0a0 100644 --- a/Mk/Uses/go.mk +++ b/Mk/Uses/go.mk @@ -63,8 +63,13 @@ _INCLUDE_USES_GO_MK= yes GO_VALID_VERSIONS= 1.17 1.18 1.19-devel # Check arguments sanity -. if !empty(go_ARGS:N[1-9].[0-9][0-9]:N*-devel:Nmodules:Nno_targets:Nrun) -IGNORE= USES=go has invalid arguments: ${go_ARGS:N[1-9].[0-9][0-9]:N*-devel:Nmodules:Nno_targets:Nrun} +. if !empty(go_ARGS:N[1-9].[0-9][0-9]:N*-devel:Nmodules:Nno_targets:Nrun:Nnovendor) +IGNORE= USES=go has invalid arguments: ${go_ARGS:N[1-9].[0-9][0-9]:N*-devel:Nmodules:Nno_targets:Nrun:Nnovendor} +. endif + +.if !empty(go_ARGS:Mnovendor) +. if empty(go_ARGS:Mmodules) +IGNORE= novendor requires go:modules . endif # Parse Go version @@ -122,7 +127,7 @@ GO_ENV+= CGO_ENABLED=${CGO_ENABLED} \ GOARM=${GOARM} . if ${go_ARGS:Mmodules} -. if !${go_ARGS:Mnovendor} +. if empty(go_ARGS:Mnovendor) GO_BUILDFLAGS+= -mod=vendor GO_TESTFLAGS+= -mod=vendor . endif @@ -197,7 +202,7 @@ _USES_extract+= 800:go-post-extract go-post-extract: @${MKDIR} ${GO_WRKSRC:H} @${LN} -sf ${WRKSRC} ${GO_WRKSRC} -. elif ${go_ARGS:Mmodules} && defined(GO_MODULE) +. elif ${go_ARGS:Mmodules} && defined(GO_MODULE) && empty(go_ARGS:Mnovendor) # Module-aware build mode. Although not strictly necessary (all build dependencies should be # already in MODCACHE), vendor them so we can patch them if needed. go-post-extract: