pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/go lang/go/go-package: Honor MAKE_ENV and set GOC...
details: https://anonhg.NetBSD.org/pkgsrc/rev/788f1caca4d1
branches: trunk
changeset: 384617:788f1caca4d1
user: leot <leot%pkgsrc.org@localhost>
date: Wed Aug 29 10:11:57 2018 +0000
description:
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!
diffstat:
lang/go/go-package.mk | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (34 lines):
diff -r e59cfe1c74ad -r 788f1caca4d1 lang/go/go-package.mk
--- a/lang/go/go-package.mk Wed Aug 29 08:03:50 2018 +0000
+++ b/lang/go/go-package.mk Wed Aug 29 10:11:57 2018 +0000
@@ -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 @@
"$${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 @@
.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