summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorbsiegert <bsiegert>2017-03-15 19:48:40 +0000
committerbsiegert <bsiegert>2017-03-15 19:48:40 +0000
commitf5073ac1eff3daf9d8f6a0a48eb5bfe16e939767 (patch)
tree8ef50022a1be72b47cf8df72c541fbb97cd27f72 /lang
parent83b0746a84feb90a8b37c54a02088f711a724d84 (diff)
downloadpkgsrc-f5073ac1eff3daf9d8f6a0a48eb5bfe16e939767.tar.gz
Add more ".if !target" guards around targets defined by go-package.mk,
to allow overriding.
Diffstat (limited to 'lang')
-rw-r--r--lang/go/go-package.mk8
1 files changed, 7 insertions, 1 deletions
diff --git a/lang/go/go-package.mk b/lang/go/go-package.mk
index e6766cf7ae7..e95a0ebddfc 100644
--- a/lang/go/go-package.mk
+++ b/lang/go/go-package.mk
@@ -1,4 +1,4 @@
-# $NetBSD: go-package.mk,v 1.8 2016/01/23 12:42:57 rillig Exp $
+# $NetBSD: go-package.mk,v 1.9 2017/03/15 19:48:40 bsiegert Exp $
#
# This file implements common logic for compiling Go programs in pkgsrc.
# The compiled Go code is tied to a specific compiler version, and the
@@ -55,19 +55,25 @@ PRINT_PLIST_AWK+= { gsub(/${GO_PLATFORM}/, \
"$${GO_PLATFORM}"); \
print; next; }
+.if !target(post-extract)
post-extract:
${RUN} ${MKDIR} ${WRKSRC}
${RUN} ${RM} -fr ${WRKDIR}/`basename ${GO_DIST_BASE}`/.hg
${RUN} ${MV} ${WRKDIR}/`basename ${GO_DIST_BASE}`/* ${WRKSRC}
+.endif
+.if !target(do-build)
do-build:
${RUN} env GOPATH=${WRKDIR}:${BUILDLINK_DIR}/gopkg 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}
.endif
+.if !target(do-install)
do-install:
${RUN} cd ${WRKDIR}; [ ! -d bin ] || ${PAX} -rw bin ${DESTDIR}${PREFIX}
${RUN} cd ${WRKDIR}; [ ! -d pkg ] || ${PAX} -rw src pkg ${DESTDIR}${PREFIX}/gopkg
+.endif