Fabian Raetz said:
> GOPATH is set via the lang/go MODULE.
> 
> grep GOPATH /usr/ports/lang/go/go.port.mk
> GOPATH ?=             "${WRKSRC}:${LOCALBASE}/go"
> 
> Do you set GOPATH in your .profile? if so, the lang/go MODULE won't
> override it and as a result, WRKSRC is indeed not part of GOPATH.

Sure, but that doesn't solve the issue.  Either lang/go module should be
fixed to set GOPATH reliably, or it should be set explicitly in port's
Makefile.  I don't think that fragility of this situation is acceptable.

P.S.:  One possible way to fix handling of GOPATH in lang/go modules is
shown in a diff below.

-- 
Dmitrij D. Czarkoff

Index: lang/go/go.port.mk
===================================================================
RCS file: /var/cvs/ports/lang/go/go.port.mk,v
retrieving revision 1.1
diff -u -p -r1.1 go.port.mk
--- lang/go/go.port.mk  15 May 2015 07:30:41 -0000      1.1
+++ lang/go/go.port.mk  25 May 2015 17:55:00 -0000
@@ -15,4 +15,4 @@ GO_PKG ?=             pkg/tool/openbsd_${MACHINE_AR
 
 SUBST_VARS +=          GO_PKG
 
-GOPATH ?=              "${WRKSRC}:${LOCALBASE}/go"
+GOPATH :=              "${GOPATH}:${WRKSRC}:${LOCALBASE}/go"

Reply via email to