Sun Jul 8 13:53:42 2018 UTC ()
Move definition of $GO to version.mk.

We have some packages, like mongodb-tools, that cannot include go-package.mk
but need to call the go tool.


(bsiegert)
diff -r1.13 -r1.14 pkgsrc/lang/go/go-package.mk
diff -r1.38 -r1.39 pkgsrc/lang/go/version.mk

cvs diff -r1.13 -r1.14 pkgsrc/lang/go/go-package.mk (expand / switch to unified diff)

--- pkgsrc/lang/go/go-package.mk 2018/07/08 12:55:00 1.13
+++ pkgsrc/lang/go/go-package.mk 2018/07/08 13:53:42 1.14
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: go-package.mk,v 1.13 2018/07/08 12:55:00 bsiegert Exp $ 1# $NetBSD: go-package.mk,v 1.14 2018/07/08 13:53:42 bsiegert Exp $
2# 2#
3# This file implements common logic for compiling Go programs in pkgsrc. 3# This file implements common logic for compiling Go programs in pkgsrc.
4# 4#
5# === Package-settable variables === 5# === Package-settable variables ===
6# 6#
7# GO_SRCPATH (required) 7# GO_SRCPATH (required)
8# The patch that can be used with "go get" to import the current 8# The patch that can be used with "go get" to import the current
9# package. This is usually the URL without the leading protocol. 9# package. This is usually the URL without the leading protocol.
10# 10#
11# Examples: 11# Examples:
12# github.com/username/repository 12# github.com/username/repository
13# gopkg.in/check.v1 13# gopkg.in/check.v1
14# 14#
@@ -41,31 +41,26 @@ @@ -41,31 +41,26 @@
41# 2. Install binaries into bin/. 41# 2. Install binaries into bin/.
42# 3. Install source code and packages into a separate gopkg tree. 42# 3. Install source code and packages into a separate gopkg tree.
43# 43#
44# In the future, we may implement buildlink by creating a separate tree during 44# In the future, we may implement buildlink by creating a separate tree during
45# the build and linking only the packages explicitly mentioned in dependencies 45# the build and linking only the packages explicitly mentioned in dependencies
46# there. 46# there.
47# 47#
48# All packages build-depend on the "master" Go release. Go packages 48# All packages build-depend on the "master" Go release. Go packages
49# need to be revbumped when lang/go is updated. 49# need to be revbumped when lang/go is updated.
50# 50#
51 51
52.include "../../lang/go/version.mk" 52.include "../../lang/go/version.mk"
53 53
54# How to find the Go tool. 
55GOVERSSUFFIX?= 
56GO= ${PREFIX}/go${GOVERSSUFFIX}/bin/go 
57 
58 
59_GO_DIST_BASE!= basename ${GO_SRCPATH} 54_GO_DIST_BASE!= basename ${GO_SRCPATH}
60GO_DIST_BASE?= ${_GO_DIST_BASE} 55GO_DIST_BASE?= ${_GO_DIST_BASE}
61GO_BUILD_PATTERN?= ${GO_SRCPATH}/... 56GO_BUILD_PATTERN?= ${GO_SRCPATH}/...
62 57
63WRKSRC= ${WRKDIR}/src/${GO_SRCPATH} 58WRKSRC= ${WRKDIR}/src/${GO_SRCPATH}
64 59
65BUILD_DEPENDS+= go-${GO_VERSION}*:../../lang/go 60BUILD_DEPENDS+= go-${GO_VERSION}*:../../lang/go
66 61
67MAKE_JOBS_SAFE= no 62MAKE_JOBS_SAFE= no
68INSTALLATION_DIRS+= bin gopkg 63INSTALLATION_DIRS+= bin gopkg
69USE_TOOLS+= pax 64USE_TOOLS+= pax
70 65
71GO_PLATFORM= ${LOWER_OPSYS}_${GOARCH} 66GO_PLATFORM= ${LOWER_OPSYS}_${GOARCH}

cvs diff -r1.38 -r1.39 pkgsrc/lang/go/version.mk (expand / switch to unified diff)

--- pkgsrc/lang/go/version.mk 2018/06/12 17:37:59 1.38
+++ pkgsrc/lang/go/version.mk 2018/07/08 13:53:42 1.39
@@ -1,22 +1,26 @@ @@ -1,22 +1,26 @@
1# $NetBSD: version.mk,v 1.38 2018/06/12 17:37:59 bsiegert Exp $ 1# $NetBSD: version.mk,v 1.39 2018/07/08 13:53:42 bsiegert Exp $
2 2
3SSP_SUPPORTED= no 3SSP_SUPPORTED= no
4 4
5.include "../../mk/bsd.prefs.mk" 5.include "../../mk/bsd.prefs.mk"
6 6
7GO_VERSION= 1.10.3 7GO_VERSION= 1.10.3
8GO14_VERSION= 1.4.3 8GO14_VERSION= 1.4.3
9 9
 10# How to find the Go tool
 11GOVERSSUFFIX?=
 12GO= ${PREFIX}/go${GOVERSSUFFIX}/bin/go
 13
10ONLY_FOR_PLATFORM= *-*-i386 *-*-x86_64 *-*-earmv[67]hf 14ONLY_FOR_PLATFORM= *-*-i386 *-*-x86_64 *-*-earmv[67]hf
11NOT_FOR_PLATFORM= SunOS-*-i386 15NOT_FOR_PLATFORM= SunOS-*-i386
12.if ${MACHINE_ARCH} == "i386" 16.if ${MACHINE_ARCH} == "i386"
13GOARCH= 386 17GOARCH= 386
14GOCHAR= 8 18GOCHAR= 8
15.elif ${MACHINE_ARCH} == "x86_64" 19.elif ${MACHINE_ARCH} == "x86_64"
16GOARCH= amd64 20GOARCH= amd64
17GOCHAR= 6 21GOCHAR= 6
18.elif ${MACHINE_ARCH} == "earmv6hf" || ${MACHINE_ARCH} == "earmv7hf" 22.elif ${MACHINE_ARCH} == "earmv6hf" || ${MACHINE_ARCH} == "earmv7hf"
19GOARCH= arm 23GOARCH= arm
20GOCHAR= 5 24GOCHAR= 5
21.endif 25.endif
22.if ${MACHINE_ARCH} == "earmv6hf" 26.if ${MACHINE_ARCH} == "earmv6hf"