| @@ -1,108 +1,107 @@ | | | @@ -1,108 +1,107 @@ |
1 | # $NetBSD: Makefile,v 1.2 2020/08/31 18:09:50 wiz Exp $ | | 1 | # $NetBSD: Makefile,v 1.3 2020/09/03 06:47:21 bsiegert Exp $ |
2 | | | 2 | |
3 | PKGREVISION= 1 | | | |
4 | .include "../../lang/go/version.mk" | | 3 | .include "../../lang/go/version.mk" |
5 | .include "../../lang/go/bootstrap.mk" | | 4 | .include "../../lang/go/bootstrap.mk" |
6 | | | 5 | |
7 | DISTNAME= go${GO115_VERSION}.src | | 6 | DISTNAME= go${GO115_VERSION}.src |
8 | PKGNAME= go115-${GO115_VERSION} | | 7 | PKGNAME= go115-${GO115_VERSION} |
9 | CATEGORIES= lang | | 8 | CATEGORIES= lang |
10 | MASTER_SITES= https://storage.googleapis.com/golang/ | | 9 | MASTER_SITES= https://storage.googleapis.com/golang/ |
11 | EXTRACT_USING= gtar | | 10 | EXTRACT_USING= gtar |
12 | | | 11 | |
13 | MAINTAINER= bsiegert@NetBSD.org | | 12 | MAINTAINER= bsiegert@NetBSD.org |
14 | HOMEPAGE= https://golang.org/ | | 13 | HOMEPAGE= https://golang.org/ |
15 | COMMENT= The Go programming language | | 14 | COMMENT= The Go programming language |
16 | LICENSE= modified-bsd | | 15 | LICENSE= modified-bsd |
17 | | | 16 | |
18 | GOVERSSUFFIX= 115 | | 17 | GOVERSSUFFIX= 115 |
19 | WRKSRC= ${WRKDIR}/go | | 18 | WRKSRC= ${WRKDIR}/go |
20 | USE_TOOLS+= bash:run perl:run pax | | 19 | USE_TOOLS+= bash:run perl:run pax |
21 | | | 20 | |
22 | # cgo compiles under TMPDIR | | 21 | # cgo compiles under TMPDIR |
23 | TMPDIR?= /tmp | | 22 | TMPDIR?= /tmp |
24 | BUILDLINK_PASSTHRU_DIRS+= ${TMPDIR} | | 23 | BUILDLINK_PASSTHRU_DIRS+= ${TMPDIR} |
25 | | | 24 | |
26 | GOROOT_FINAL= ${PREFIX}/go${GOVERSSUFFIX} | | 25 | GOROOT_FINAL= ${PREFIX}/go${GOVERSSUFFIX} |
27 | INSTALLATION_DIRS= bin go${GOVERSSUFFIX} | | 26 | INSTALLATION_DIRS= bin go${GOVERSSUFFIX} |
28 | | | 27 | |
29 | REPLACE_BASH+= lib/time/update.bash | | 28 | REPLACE_BASH+= lib/time/update.bash |
30 | REPLACE_BASH+= misc/arm/a | | 29 | REPLACE_BASH+= misc/arm/a |
31 | REPLACE_BASH+= misc/cgo/fortran/test.bash | | 30 | REPLACE_BASH+= misc/cgo/fortran/test.bash |
32 | REPLACE_BASH+= misc/wasm/go_js_wasm_exec | | 31 | REPLACE_BASH+= misc/wasm/go_js_wasm_exec |
33 | REPLACE_BASH+= src/all.bash | | 32 | REPLACE_BASH+= src/all.bash |
34 | REPLACE_BASH+= src/bootstrap.bash | | 33 | REPLACE_BASH+= src/bootstrap.bash |
35 | REPLACE_BASH+= src/buildall.bash | | 34 | REPLACE_BASH+= src/buildall.bash |
36 | REPLACE_BASH+= src/clean.bash | | 35 | REPLACE_BASH+= src/clean.bash |
37 | REPLACE_BASH+= src/cmd/compile/internal/ssa/gen/cover.bash | | 36 | REPLACE_BASH+= src/cmd/compile/internal/ssa/gen/cover.bash |
38 | REPLACE_BASH+= src/cmd/go/mkalldocs.sh | | 37 | REPLACE_BASH+= src/cmd/go/mkalldocs.sh |
39 | REPLACE_BASH+= src/cmd/vendor/golang.org/x/sys/unix/mkall.sh | | 38 | REPLACE_BASH+= src/cmd/vendor/golang.org/x/sys/unix/mkall.sh |
40 | REPLACE_BASH+= src/cmd/vendor/golang.org/x/sys/unix/mkerrors.sh | | 39 | REPLACE_BASH+= src/cmd/vendor/golang.org/x/sys/unix/mkerrors.sh |
41 | REPLACE_BASH+= src/internal/trace/mkcanned.bash | | 40 | REPLACE_BASH+= src/internal/trace/mkcanned.bash |
42 | REPLACE_BASH+= src/iostest.bash | | 41 | REPLACE_BASH+= src/iostest.bash |
43 | REPLACE_BASH+= src/make.bash | | 42 | REPLACE_BASH+= src/make.bash |
44 | REPLACE_BASH+= src/race.bash | | 43 | REPLACE_BASH+= src/race.bash |
45 | REPLACE_BASH+= src/run.bash | | 44 | REPLACE_BASH+= src/run.bash |
46 | REPLACE_BASH+= src/syscall/mkall.sh | | 45 | REPLACE_BASH+= src/syscall/mkall.sh |
47 | REPLACE_BASH+= src/syscall/mkerrors.sh | | 46 | REPLACE_BASH+= src/syscall/mkerrors.sh |
48 | REPLACE_BASH+= src/syscall/mksysnum_plan9.sh | | 47 | REPLACE_BASH+= src/syscall/mksysnum_plan9.sh |
49 | | | 48 | |
50 | REPLACE_PERL+= src/net/http/cgi/testdata/test.cgi | | 49 | REPLACE_PERL+= src/net/http/cgi/testdata/test.cgi |
51 | REPLACE_PERL+= src/regexp/syntax/make_perl_groups.pl | | 50 | REPLACE_PERL+= src/regexp/syntax/make_perl_groups.pl |
52 | REPLACE_PERL+= src/syscall/*.pl | | 51 | REPLACE_PERL+= src/syscall/*.pl |
53 | | | 52 | |
54 | # uses own linker, which does not support relro on NetBSD | | 53 | # uses own linker, which does not support relro on NetBSD |
55 | CHECK_RELRO_SKIP+= go${GOVERSSUFFIX}/bin/go | | 54 | CHECK_RELRO_SKIP+= go${GOVERSSUFFIX}/bin/go |
56 | CHECK_RELRO_SKIP+= go${GOVERSSUFFIX}/bin/gofmt | | 55 | CHECK_RELRO_SKIP+= go${GOVERSSUFFIX}/bin/gofmt |
57 | CHECK_RELRO_SKIP+= go${GOVERSSUFFIX}/pkg/bootstrap/bin/asm | | 56 | CHECK_RELRO_SKIP+= go${GOVERSSUFFIX}/pkg/bootstrap/bin/asm |
58 | CHECK_RELRO_SKIP+= go${GOVERSSUFFIX}/pkg/bootstrap/bin/compile | | 57 | CHECK_RELRO_SKIP+= go${GOVERSSUFFIX}/pkg/bootstrap/bin/compile |
59 | CHECK_RELRO_SKIP+= go${GOVERSSUFFIX}/pkg/bootstrap/bin/link | | 58 | CHECK_RELRO_SKIP+= go${GOVERSSUFFIX}/pkg/bootstrap/bin/link |
60 | CHECK_RELRO_SKIP+= go${GOVERSSUFFIX}/pkg/bootstrap/bin/cgo | | 59 | CHECK_RELRO_SKIP+= go${GOVERSSUFFIX}/pkg/bootstrap/bin/cgo |
61 | # also does not support SSP at this time | | 60 | # also does not support SSP at this time |
62 | CHECK_SSP_SKIP= ${CHECK_RELRO_SKIP} | | 61 | CHECK_SSP_SKIP= ${CHECK_RELRO_SKIP} |
63 | | | 62 | |
64 | # uses /bin/rc (for Plan 9) | | 63 | # uses /bin/rc (for Plan 9) |
65 | CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/include/plan9/mklibc.rc | | 64 | CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/include/plan9/mklibc.rc |
66 | CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/all.rc | | 65 | CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/all.rc |
67 | CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/clean.rc | | 66 | CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/clean.rc |
68 | CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/make.rc | | 67 | CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/make.rc |
69 | CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/run.rc | | 68 | CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/run.rc |
70 | | | 69 | |
71 | PLIST_SUBST+= GOVERSSUFFIX=${GOVERSSUFFIX} | | 70 | PLIST_SUBST+= GOVERSSUFFIX=${GOVERSSUFFIX} |
72 | | | 71 | |
73 | PLIST_VARS+= pty route | | 72 | PLIST_VARS+= pty route |
74 | | | 73 | |
75 | .if ${OPSYS} != "SunOS" | | 74 | .if ${OPSYS} != "SunOS" |
76 | PLIST.pty= yes | | 75 | PLIST.pty= yes |
77 | .endif | | 76 | .endif |
78 | | | 77 | |
79 | .if ${OPSYS} != "Linux" && ${OPSYS} != "SunOS" | | 78 | .if ${OPSYS} != "Linux" && ${OPSYS} != "SunOS" |
80 | PLIST.route= yes | | 79 | PLIST.route= yes |
81 | .endif | | 80 | .endif |
82 | | | 81 | |
83 | post-extract: | | 82 | post-extract: |
84 | ${RM} -r -f ${WRKSRC}/test/fixedbugs/issue27836* | | 83 | ${RM} -r -f ${WRKSRC}/test/fixedbugs/issue27836* |
85 | | | 84 | |
86 | do-build: | | 85 | do-build: |
87 | cd ${WRKSRC}/src && \ | | 86 | cd ${WRKSRC}/src && \ |
88 | env \ | | 87 | env \ |
89 | GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:Q} \ | | 88 | GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:Q} \ |
90 | GOROOT_FINAL=${GOROOT_FINAL:Q} \ | | 89 | GOROOT_FINAL=${GOROOT_FINAL:Q} \ |
91 | ${GOOPT} \ | | 90 | ${GOOPT} \ |
92 | GOCACHE=${WRKDIR}/.cache/go-build \ | | 91 | GOCACHE=${WRKDIR}/.cache/go-build \ |
93 | ${BASH} ./make.bash | | 92 | ${BASH} ./make.bash |
94 | # for RELRO build: | | 93 | # for RELRO build: |
95 | # cd ${WRKSRC}/src && env GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:Q} GOROOT_FINAL=${GOROOT_FINAL:Q} GO_LDFLAGS="-buildmode=pie" ${GOOPT} ${BASH} ./make.bash | | 94 | # cd ${WRKSRC}/src && env GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:Q} GOROOT_FINAL=${GOROOT_FINAL:Q} GO_LDFLAGS="-buildmode=pie" ${GOOPT} ${BASH} ./make.bash |
96 | | | 95 | |
97 | do-install: | | 96 | do-install: |
98 | cd ${WRKSRC} && rm -rf pkg/obj pkg/bootstrap | | 97 | cd ${WRKSRC} && rm -rf pkg/obj pkg/bootstrap |
99 | cd ${WRKSRC} && pax -rw . ${DESTDIR}${PREFIX}/go${GOVERSSUFFIX} | | 98 | cd ${WRKSRC} && pax -rw . ${DESTDIR}${PREFIX}/go${GOVERSSUFFIX} |
100 | find ${DESTDIR}${PREFIX}/go${GOVERSSUFFIX} -name \*.orig -exec rm {} \; | | 99 | find ${DESTDIR}${PREFIX}/go${GOVERSSUFFIX} -name \*.orig -exec rm {} \; |
101 | .for cmd in go gofmt | | 100 | .for cmd in go gofmt |
102 | ${LN} -sf ${PREFIX}/go${GOVERSSUFFIX}/bin/${cmd} ${DESTDIR}${PREFIX}/bin/${cmd}${GOVERSSUFFIX} | | 101 | ${LN} -sf ${PREFIX}/go${GOVERSSUFFIX}/bin/${cmd} ${DESTDIR}${PREFIX}/bin/${cmd}${GOVERSSUFFIX} |
103 | .endfor | | 102 | .endfor |
104 | | | 103 | |
105 | do-test: | | 104 | do-test: |
106 | cd ${WRKSRC}/src && GOROOT=${WRKSRC} PATH=${WRKSRC}/bin:${PATH} ${GOOPT} ${BASH} run.bash --no-rebuild --banner "" | | 105 | cd ${WRKSRC}/src && GOROOT=${WRKSRC} PATH=${WRKSRC}/bin:${PATH} ${GOOPT} ${BASH} run.bash --no-rebuild --banner "" |
107 | | | 106 | |
108 | .include "../../mk/bsd.pkg.mk" | | 107 | .include "../../mk/bsd.pkg.mk" |