| @@ -1,109 +1,110 @@ | | | @@ -1,109 +1,110 @@ |
1 | # $NetBSD: Makefile,v 1.66 2018/08/27 15:01:09 bsiegert Exp $ | | 1 | # $NetBSD: Makefile,v 1.67 2018/09/14 09:24:30 fhajny Exp $ |
2 | | | 2 | |
3 | .include "version.mk" | | 3 | .include "version.mk" |
4 | | | 4 | |
5 | DISTNAME= go${GO_VERSION}.src | | 5 | DISTNAME= go${GO_VERSION}.src |
6 | PKGNAME= go-${GO_VERSION} | | 6 | PKGNAME= go-${GO_VERSION} |
| | | 7 | PKGREVISION= 1 |
7 | CATEGORIES= lang | | 8 | CATEGORIES= lang |
8 | MASTER_SITES= https://storage.googleapis.com/golang/ | | 9 | MASTER_SITES= https://storage.googleapis.com/golang/ |
9 | EXTRACT_USING= bsdtar | | 10 | EXTRACT_USING= bsdtar |
10 | | | 11 | |
11 | MAINTAINER= bsiegert@NetBSD.org | | 12 | MAINTAINER= bsiegert@NetBSD.org |
12 | HOMEPAGE= http://golang.org/ | | 13 | HOMEPAGE= http://golang.org/ |
13 | COMMENT= The Go programming language | | 14 | COMMENT= The Go programming language |
14 | LICENSE= modified-bsd | | 15 | LICENSE= modified-bsd |
15 | | | 16 | |
16 | WRKSRC= ${WRKDIR}/go | | 17 | WRKSRC= ${WRKDIR}/go |
17 | USE_TOOLS+= bash:run perl:run pax | | 18 | USE_TOOLS+= bash:run perl:run pax |
18 | | | 19 | |
19 | # uses ulimit -T | | 20 | # uses ulimit -T |
20 | # BUILD_DEPENDS+= bash>=4.2nb3:../../shells/bash | | 21 | # BUILD_DEPENDS+= bash>=4.2nb3:../../shells/bash |
21 | | | 22 | |
22 | # cgo compiles under TMPDIR | | 23 | # cgo compiles under TMPDIR |
23 | TMPDIR?= /tmp | | 24 | TMPDIR?= /tmp |
24 | BUILDLINK_PASSTHRU_DIRS+= ${TMPDIR} | | 25 | BUILDLINK_PASSTHRU_DIRS+= ${TMPDIR} |
25 | | | 26 | |
26 | GOROOT_FINAL= ${PREFIX}/go | | 27 | GOROOT_FINAL= ${PREFIX}/go |
27 | INSTALLATION_DIRS= bin | | 28 | INSTALLATION_DIRS= bin |
28 | | | 29 | |
29 | REPLACE_BASH+= doc/articles/wiki/test.bash | | 30 | REPLACE_BASH+= doc/articles/wiki/test.bash |
30 | REPLACE_BASH+= doc/codewalk/run | | 31 | REPLACE_BASH+= doc/codewalk/run |
31 | REPLACE_BASH+= lib/time/update.bash | | 32 | REPLACE_BASH+= lib/time/update.bash |
32 | REPLACE_BASH+= misc/arm/a | | 33 | REPLACE_BASH+= misc/arm/a |
33 | REPLACE_BASH+= misc/benchcmp | | 34 | REPLACE_BASH+= misc/benchcmp |
34 | REPLACE_BASH+= misc/cgo/fortran/test.bash | | 35 | REPLACE_BASH+= misc/cgo/fortran/test.bash |
35 | REPLACE_BASH+= misc/cgo/testgodefs/test.bash | | 36 | REPLACE_BASH+= misc/cgo/testgodefs/test.bash |
36 | REPLACE_BASH+= misc/cgo/testplugin/test.bash | | 37 | REPLACE_BASH+= misc/cgo/testplugin/test.bash |
37 | REPLACE_BASH+= misc/nacl/go_nacl_386_exec | | 38 | REPLACE_BASH+= misc/nacl/go_nacl_386_exec |
38 | REPLACE_BASH+= misc/nacl/go_nacl_amd64p32_exec | | 39 | REPLACE_BASH+= misc/nacl/go_nacl_amd64p32_exec |
39 | REPLACE_BASH+= misc/nacl/go_nacl_arm_exec | | 40 | REPLACE_BASH+= misc/nacl/go_nacl_arm_exec |
40 | REPLACE_BASH+= src/all.bash | | 41 | REPLACE_BASH+= src/all.bash |
41 | REPLACE_BASH+= src/androidtest.bash | | 42 | REPLACE_BASH+= src/androidtest.bash |
42 | REPLACE_BASH+= src/bootstrap.bash | | 43 | REPLACE_BASH+= src/bootstrap.bash |
43 | REPLACE_BASH+= src/buildall.bash | | 44 | REPLACE_BASH+= src/buildall.bash |
44 | REPLACE_BASH+= src/clean.bash | | 45 | REPLACE_BASH+= src/clean.bash |
45 | REPLACE_BASH+= src/cmd/go/mkalldocs.sh | | 46 | REPLACE_BASH+= src/cmd/go/mkalldocs.sh |
46 | REPLACE_BASH+= src/cmd/vendor/github.com/google/pprof/test.sh | | 47 | REPLACE_BASH+= src/cmd/vendor/github.com/google/pprof/test.sh |
47 | REPLACE_BASH+= src/internal/trace/mkcanned.bash | | 48 | REPLACE_BASH+= src/internal/trace/mkcanned.bash |
48 | REPLACE_BASH+= src/iostest.bash | | 49 | REPLACE_BASH+= src/iostest.bash |
49 | REPLACE_BASH+= src/make.bash | | 50 | REPLACE_BASH+= src/make.bash |
50 | REPLACE_BASH+= src/naclmake.bash | | 51 | REPLACE_BASH+= src/naclmake.bash |
51 | REPLACE_BASH+= src/nacltest.bash | | 52 | REPLACE_BASH+= src/nacltest.bash |
52 | REPLACE_BASH+= src/race.bash | | 53 | REPLACE_BASH+= src/race.bash |
53 | REPLACE_BASH+= src/run.bash | | 54 | REPLACE_BASH+= src/run.bash |
54 | REPLACE_BASH+= src/runtime/mknacl.sh | | 55 | REPLACE_BASH+= src/runtime/mknacl.sh |
55 | REPLACE_BASH+= src/syscall/mkall.sh | | 56 | REPLACE_BASH+= src/syscall/mkall.sh |
56 | REPLACE_BASH+= src/syscall/mkerrors.sh | | 57 | REPLACE_BASH+= src/syscall/mkerrors.sh |
57 | REPLACE_BASH+= src/syscall/mksysnum_plan9.sh | | 58 | REPLACE_BASH+= src/syscall/mksysnum_plan9.sh |
58 | | | 59 | |
59 | REPLACE_PERL+= src/net/http/cgi/testdata/test.cgi | | 60 | REPLACE_PERL+= src/net/http/cgi/testdata/test.cgi |
60 | REPLACE_PERL+= src/regexp/syntax/make_perl_groups.pl | | 61 | REPLACE_PERL+= src/regexp/syntax/make_perl_groups.pl |
61 | REPLACE_PERL+= src/syscall/*.pl | | 62 | REPLACE_PERL+= src/syscall/*.pl |
62 | REPLACE_PERL+= test/errchk | | 63 | REPLACE_PERL+= test/errchk |
63 | | | 64 | |
64 | # uses own linker, which does not support relro on NetBSD | | 65 | # uses own linker, which does not support relro on NetBSD |
65 | CHECK_RELRO_SKIP+= go/bin/go | | 66 | CHECK_RELRO_SKIP+= go/bin/go |
66 | CHECK_RELRO_SKIP+= go/bin/gofmt | | 67 | CHECK_RELRO_SKIP+= go/bin/gofmt |
67 | CHECK_RELRO_SKIP+= go/pkg/bootstrap/bin/asm | | 68 | CHECK_RELRO_SKIP+= go/pkg/bootstrap/bin/asm |
68 | CHECK_RELRO_SKIP+= go/pkg/bootstrap/bin/compile | | 69 | CHECK_RELRO_SKIP+= go/pkg/bootstrap/bin/compile |
69 | CHECK_RELRO_SKIP+= go/pkg/bootstrap/bin/link | | 70 | CHECK_RELRO_SKIP+= go/pkg/bootstrap/bin/link |
70 | CHECK_RELRO_SKIP+= go/pkg/bootstrap/bin/cgo | | 71 | CHECK_RELRO_SKIP+= go/pkg/bootstrap/bin/cgo |
71 | # also does not support SSP at this time | | 72 | # also does not support SSP at this time |
72 | CHECK_SSP_SKIP= ${CHECK_RELRO_SKIP} | | 73 | CHECK_SSP_SKIP= ${CHECK_RELRO_SKIP} |
73 | | | 74 | |
74 | # uses /bin/rc (for Plan 9) | | 75 | # uses /bin/rc (for Plan 9) |
75 | CHECK_INTERPRETER_SKIP+= go/include/plan9/mklibc.rc | | 76 | CHECK_INTERPRETER_SKIP+= go/include/plan9/mklibc.rc |
76 | CHECK_INTERPRETER_SKIP+= go/src/all.rc | | 77 | CHECK_INTERPRETER_SKIP+= go/src/all.rc |
77 | CHECK_INTERPRETER_SKIP+= go/src/clean.rc | | 78 | CHECK_INTERPRETER_SKIP+= go/src/clean.rc |
78 | CHECK_INTERPRETER_SKIP+= go/src/make.rc | | 79 | CHECK_INTERPRETER_SKIP+= go/src/make.rc |
79 | CHECK_INTERPRETER_SKIP+= go/src/run.rc | | 80 | CHECK_INTERPRETER_SKIP+= go/src/run.rc |
80 | | | 81 | |
81 | BUILD_DEPENDS+= go14-1.4*:../../lang/go14 | | 82 | BUILD_DEPENDS+= go14-1.4*:../../lang/go14 |
82 | GOROOT_BOOTSTRAP= ${PREFIX}/go14 | | 83 | GOROOT_BOOTSTRAP= ${PREFIX}/go14 |
83 | | | 84 | |
84 | .include "../../mk/bsd.prefs.mk" | | 85 | .include "../../mk/bsd.prefs.mk" |
85 | | | 86 | |
86 | PLIST_VARS+= pty route | | 87 | PLIST_VARS+= pty route |
87 | | | 88 | |
88 | .if ${OPSYS} != "SunOS" | | 89 | .if ${OPSYS} != "SunOS" |
89 | PLIST.pty= yes | | 90 | PLIST.pty= yes |
90 | .endif | | 91 | .endif |
91 | | | 92 | |
92 | .if ${OPSYS} != "Linux" && ${OPSYS} != "SunOS" | | 93 | .if ${OPSYS} != "Linux" && ${OPSYS} != "SunOS" |
93 | PLIST.route= yes | | 94 | PLIST.route= yes |
94 | .endif | | 95 | .endif |
95 | | | 96 | |
96 | do-build: | | 97 | do-build: |
97 | cd ${WRKSRC}/src && env GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:Q} GOROOT_FINAL=${GOROOT_FINAL:Q} ${GOOPT} ${BASH} ./make.bash | | 98 | cd ${WRKSRC}/src && env GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:Q} GOROOT_FINAL=${GOROOT_FINAL:Q} ${GOOPT} ${BASH} ./make.bash |
98 | # for RELRO build: | | 99 | # for RELRO build: |
99 | # cd ${WRKSRC}/src && env GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:Q} GOROOT_FINAL=${GOROOT_FINAL:Q} GO_LDFLAGS="-buildmode=pie" ${GOOPT} ${BASH} ./make.bash | | 100 | # cd ${WRKSRC}/src && env GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:Q} GOROOT_FINAL=${GOROOT_FINAL:Q} GO_LDFLAGS="-buildmode=pie" ${GOOPT} ${BASH} ./make.bash |
100 | | | 101 | |
101 | do-install: | | 102 | do-install: |
102 | cd ${WRKSRC} && rm -rf .hgignore .hgtags pkg/obj | | 103 | cd ${WRKSRC} && rm -rf .hgignore .hgtags pkg/obj |
103 | cd ${WRKDIR} && pax -rw go ${DESTDIR}${PREFIX} | | 104 | cd ${WRKDIR} && pax -rw go ${DESTDIR}${PREFIX} |
104 | find ${DESTDIR}${PREFIX}/go -name \*.orig -exec rm {} \; | | 105 | find ${DESTDIR}${PREFIX}/go -name \*.orig -exec rm {} \; |
105 | | | 106 | |
106 | do-test: | | 107 | do-test: |
107 | cd ${WRKSRC}/src && GOROOT=${WRKSRC} PATH=${WRKSRC}/bin:${PATH} ${GOOPT} ${BASH} run.bash --no-rebuild --banner "" | | 108 | cd ${WRKSRC}/src && GOROOT=${WRKSRC} PATH=${WRKSRC}/bin:${PATH} ${GOOPT} ${BASH} run.bash --no-rebuild --banner "" |
108 | | | 109 | |
109 | .include "../../mk/bsd.pkg.mk" | | 110 | .include "../../mk/bsd.pkg.mk" |