| @@ -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. | | | |
55 | GOVERSSUFFIX?= | | | |
56 | GO= ${PREFIX}/go${GOVERSSUFFIX}/bin/go | | | |
57 | | | | |
58 | | | | |
59 | _GO_DIST_BASE!= basename ${GO_SRCPATH} | | 54 | _GO_DIST_BASE!= basename ${GO_SRCPATH} |
60 | GO_DIST_BASE?= ${_GO_DIST_BASE} | | 55 | GO_DIST_BASE?= ${_GO_DIST_BASE} |
61 | GO_BUILD_PATTERN?= ${GO_SRCPATH}/... | | 56 | GO_BUILD_PATTERN?= ${GO_SRCPATH}/... |
62 | | | 57 | |
63 | WRKSRC= ${WRKDIR}/src/${GO_SRCPATH} | | 58 | WRKSRC= ${WRKDIR}/src/${GO_SRCPATH} |
64 | | | 59 | |
65 | BUILD_DEPENDS+= go-${GO_VERSION}*:../../lang/go | | 60 | BUILD_DEPENDS+= go-${GO_VERSION}*:../../lang/go |
66 | | | 61 | |
67 | MAKE_JOBS_SAFE= no | | 62 | MAKE_JOBS_SAFE= no |
68 | INSTALLATION_DIRS+= bin gopkg | | 63 | INSTALLATION_DIRS+= bin gopkg |
69 | USE_TOOLS+= pax | | 64 | USE_TOOLS+= pax |
70 | | | 65 | |
71 | GO_PLATFORM= ${LOWER_OPSYS}_${GOARCH} | | 66 | GO_PLATFORM= ${LOWER_OPSYS}_${GOARCH} |