pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/go



Module Name:    pkgsrc
Committed By:   leot
Date:           Wed Aug 29 10:11:57 UTC 2018

Modified Files:
        pkgsrc/lang/go: go-package.mk

Log Message:
lang/go/go-package: Honor MAKE_ENV and set GOCACHE under WRKDIR

Previously GOCACHE was not passed as environment variable and hence
during the build of packages the cache was stored in `${GO} env
GOCACHE' (${XDG_CACHE_HOME} if defined or ${HOME}/.cache).

Pass GOCACHE so that all cached file will ends up under ${WRKDIR}.

While here also pass both GOPATH and GOCACHE via MAKE_ENV.

Thanks to Antonio Huete Jimenez for spotting this problem!

Discussed and ok by <bsiegert>, thanks!


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 pkgsrc/lang/go/go-package.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/go/go-package.mk
diff -u pkgsrc/lang/go/go-package.mk:1.14 pkgsrc/lang/go/go-package.mk:1.15
--- pkgsrc/lang/go/go-package.mk:1.14   Sun Jul  8 13:53:42 2018
+++ pkgsrc/lang/go/go-package.mk        Wed Aug 29 10:11:57 2018
@@ -1,4 +1,4 @@
-# $NetBSD: go-package.mk,v 1.14 2018/07/08 13:53:42 bsiegert Exp $
+# $NetBSD: go-package.mk,v 1.15 2018/08/29 10:11:57 leot Exp $
 #
 # This file implements common logic for compiling Go programs in pkgsrc.
 #
@@ -70,6 +70,9 @@ PRINT_PLIST_AWK+=     /${GO_PLATFORM}/ { gsu
                        "$${GO_PLATFORM}"); \
                        print; next; }
 
+MAKE_ENV+=     GOPATH=${WRKDIR}:${BUILDLINK_DIR}/gopkg 
+MAKE_ENV+=     GOCACHE=${WRKDIR}/.cache/go-build
+
 .if !target(post-extract)
 post-extract:
        ${RUN} ${MKDIR} ${WRKSRC}
@@ -79,12 +82,12 @@ post-extract:
 
 .if !target(do-build)
 do-build:
-       ${RUN} env GOPATH=${WRKDIR}:${BUILDLINK_DIR}/gopkg ${GO} install -v ${GO_BUILD_PATTERN}
+       ${RUN} ${PKGSRC_SETENV} ${MAKE_ENV} ${GO} install -v ${GO_BUILD_PATTERN}
 .endif
 
 .if !target(do-test)
 do-test:
-       ${RUN} env GOPATH=${WRKDIR}:${BUILDLINK_DIR}/gopkg ${GO} test -v ${GO_BUILD_PATTERN}
+       ${RUN} ${PKGSRC_SETENV} ${TEST_ENV} ${MAKE_ENV} ${GO} test -v ${GO_BUILD_PATTERN}
 .endif
 
 .if !target(do-install)



Home | Main Index | Thread Index | Old Index