pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Add a "show-go-depends" target, similar to cargo.mk.
Module Name: pkgsrc-wip
Committed By: Benny Siegert <bsiegert%gmail.com@localhost>
Pushed By: bsiegert
Date: Sun May 19 21:18:51 2019 -0400
Changeset: a257497491e4132e964aab8c9df5664027f02ed6
Modified Files:
go/go-package.mk
Log Message:
Add a "show-go-depends" target, similar to cargo.mk.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=a257497491e4132e964aab8c9df5664027f02ed6
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
go/go-package.mk | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diffs:
diff --git a/go/go-package.mk b/go/go-package.mk
index 9156133e05..31f9ba8206 100644
--- a/go/go-package.mk
+++ b/go/go-package.mk
@@ -75,7 +75,7 @@ PRINT_PLIST_AWK+= /^@pkgdir bin$$/ { next; }
PRINT_PLIST_AWK+= /^@pkgdir gopkg$$/ { next; }
.if !empty(${GO_MODULE:M[Yy][Ee][Ss]})
-MAKE_ENV+= GO111MODULE=on GOPROXY=file://${WRKDIR}/.proxy
+MAKE_ENV+= GO111MODULE=on GOPATH=${WRKDIR}/.gopath GOPROXY=file://${WRKDIR}/.gopath/pkg/mod/
.else
MAKE_ENV+= GO111MODULE=off GOPATH=${WRKDIR}:${BUILDLINK_DIR}/gopkg
.endif
@@ -104,6 +104,13 @@ do-install:
${RUN} cd ${WRKDIR}; [ ! -d pkg ] || ${PAX} -rw src pkg ${DESTDIR}${PREFIX}/gopkg
.endif
+.if !empty(${GO_MODULE:M[Yy][Ee][Ss]})
+.PHONY: show-go-modules
+show-go-modules:
+ cd ${WRKSRC} && ${RUN} ${PKGSRC_SETENV} ${MAKE_ENV} ${GO} get -d
+ cd ${WRKDIR}/.gopath/pkg/mod && ${RUN} ${FIND} . | ${SED} -e 's/\.\//GO_MODULE_FILES+= /'
+.endif
+
_VARGROUPS+= go
_PKG_VARS.go= GO_SRCPATH GO_DIST_BASE GO_BUILD_PATTERN
_USER_VARS.go= GO_VERSION_DEFAULT
Home |
Main Index |
Thread Index |
Old Index