head 1.10; access; symbols pkgsrc-2026Q3:1.10.0.2 pkgsrc-2026Q3-base:1.10 pkgsrc-2026Q2:1.9.0.2 pkgsrc-2026Q2-base:1.9 pkgsrc-2026Q1:1.8.0.10 pkgsrc-2026Q1-base:1.8 pkgsrc-2025Q4:1.8.0.8 pkgsrc-2025Q4-base:1.8 pkgsrc-2025Q3:1.8.0.6 pkgsrc-2025Q3-base:1.8 pkgsrc-2025Q2:1.8.0.4 pkgsrc-2025Q2-base:1.8 pkgsrc-2025Q1:1.8.0.2 pkgsrc-2025Q1-base:1.8 pkgsrc-2024Q4:1.5.0.2 pkgsrc-2024Q4-base:1.5 pkgsrc-2024Q3:1.1.0.2 pkgsrc-2024Q3-base:1.1; locks; strict; comment @# @; 1.10 date 2026.08.03.13.12.27; author wiz; state Exp; branches; next 1.9; commitid ofNvh6KsgZ3m2cQG; 1.9 date 2026.05.30.15.13.14; author gdt; state Exp; branches; next 1.8; commitid oQ5EdaTLNzUzNQHG; 1.8 date 2025.02.07.10.17.49; author bsiegert; state Exp; branches; next 1.7; commitid ywNJTsY2ed3luwIF; 1.7 date 2025.02.06.00.24.37; author riastradh; state Exp; branches; next 1.6; commitid uloEeOvXDqhkflIF; 1.6 date 2025.01.02.19.53.12; author bsiegert; state Exp; branches; next 1.5; commitid 90lA2FXY11NYPWDF; 1.5 date 2024.12.04.18.51.39; author bsiegert; state Exp; branches 1.5.2.1; next 1.4; commitid KUxSi1QX7YOlqdAF; 1.4 date 2024.11.22.10.50.38; author wiz; state Exp; branches; next 1.3; commitid 1saqPfXtUqgq9DyF; 1.3 date 2024.11.22.07.49.50; author wiz; state Exp; branches; next 1.2; commitid WjlIgCIFNykq9CyF; 1.2 date 2024.11.22.07.35.27; author wiz; state Exp; branches; next 1.1; commitid 5SlGJeWSY8ry4CyF; 1.1 date 2024.08.14.10.04.04; author bsiegert; state Exp; branches; next ; commitid jM4vGefbH1zv6MlF; 1.5.2.1 date 2025.01.07.07.54.34; author maya; state Exp; branches; next ; commitid 09HcvmlyuQFtHwEF; desc @@ 1.10 log @mk: switch the default for PATCH_DIST_STRIP from -p0 to -p1 adapt packages that didn't set PATCH_DIST_STRIP to use -p0, and remove the -p1 lines @ text @# $NetBSD: Makefile,v 1.9 2026/05/30 15:13:14 gdt Exp $ .include "../../lang/go/version.mk" GO_BOOTSTRAP_REQD= 120 .include "../../lang/go/bootstrap.mk" GOVERSSUFFIX= 123 DISTNAME= go${GO${GOVERSSUFFIX}_VERSION}.src PKGNAME= go${GOVERSSUFFIX}-${GO${GOVERSSUFFIX}_VERSION} CATEGORIES= lang MASTER_SITES= https://storage.googleapis.com/golang/ MAINTAINER= bsiegert@@NetBSD.org HOMEPAGE= https://golang.org/ COMMENT= The Go programming language LICENSE= modified-bsd WRKSRC= ${WRKDIR}/go USE_TOOLS+= bash perl pax # Patch to stop requiring /proc to be mounted on NetBSD PATCH_SITES= https://github.com/golang/go/commit/ PATCHFILES= 80344887818a2321296ce7fa71cca8ca2520611d.diff # cgo compiles under TMPDIR TMPDIR?= /tmp BUILDLINK_PASSTHRU_DIRS+= ${TMPDIR} INSTALLATION_DIRS= bin go${GOVERSSUFFIX} CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/lib/time/update.bash CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/misc/wasm/go_js_wasm_exec CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/misc/wasm/go_wasip1_wasm_exec CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/all.bash CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/bootstrap.bash CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/buildall.bash CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/clean.bash CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/cmd/compile/internal/ssa/_gen/cover.bash CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/cmd/vendor/golang.org/x/sys/plan9/mkall.sh CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/cmd/vendor/golang.org/x/sys/plan9/mkerrors.sh CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/cmd/vendor/golang.org/x/sys/unix/mkall.sh CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/cmd/vendor/golang.org/x/sys/unix/mkerrors.sh CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/cmd/vendor/golang.org/x/sys/windows/mkerrors.bash CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/cmd/vendor/golang.org/x/sys/windows/mkknownfolderids.bash CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/crypto/internal/boring/build.sh CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/crypto/internal/boring/build-boring.sh CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/crypto/internal/boring/build-goboring.sh CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/go/doc/comment/mkstd.sh CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/cmp.bash CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/make.bash CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/race.bash CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/run.bash CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/runtime/race/mkcgo.sh CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/syscall/mkall.sh CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/syscall/mkerrors.sh CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/syscall/mksysnum_plan9.sh CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/regexp/syntax/make_perl_groups.pl CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/syscall/*.pl # uses own linker, which does not support relro on NetBSD CHECK_RELRO_SKIP+= go${GOVERSSUFFIX}/bin/go CHECK_RELRO_SKIP+= go${GOVERSSUFFIX}/bin/gofmt CHECK_RELRO_SKIP+= go${GOVERSSUFFIX}/pkg/bootstrap/bin/asm CHECK_RELRO_SKIP+= go${GOVERSSUFFIX}/pkg/bootstrap/bin/compile CHECK_RELRO_SKIP+= go${GOVERSSUFFIX}/pkg/bootstrap/bin/link CHECK_RELRO_SKIP+= go${GOVERSSUFFIX}/pkg/bootstrap/bin/cgo # also does not support SSP at this time CHECK_SSP_SKIP= ${CHECK_RELRO_SKIP} # uses /bin/rc (for Plan 9) CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/include/plan9/mklibc.rc CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/all.rc CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/clean.rc CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/make.rc CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/run.rc SUBST_CLASSES+= paths SUBST_STAGE.paths= pre-configure SUBST_FILES.paths= src/crypto/x509/root_solaris.go SUBST_VARS.paths= PKG_SYSCONFDIR # Required until we bootstrap from a native illumos kit. This is obviously # terrible and should be fixed properly. .if ${OPSYS} == "SunOS" && ${OS_VARIANT} != "Solaris" SUBST_CLASSES+= grplist SUBST_STAGE.grplist= pre-configure SUBST_FILES.grplist= src/os/user/getgrouplist_unix.go SUBST_SED.grplist= -e 's,return getgrouplist.*,return 0;,' .endif PLIST_SUBST+= GOVERSSUFFIX=${GOVERSSUFFIX} PRINT_PLIST_AWK+= /^bin\/go${GOVERSSUFFIX}/ { print "bin/go$${GOVERSSUFFIX}"; next; } PRINT_PLIST_AWK+= /^bin\/gofmt${GOVERSSUFFIX}/ { print "bin/gofmt$${GOVERSSUFFIX}"; next; } post-extract: ${RM} -r -f ${WRKSRC}/test/fixedbugs/issue27836* post-patch: ${RM} -f ${WRKSRC}/src/os/*.orig_dist # By default, go build invokes unreasonable parallelism. Rather than # ${MAKE_JOBS} of 1 thread as with make, we run just "go build" (1 # job) and tell it to not exceed ${MAKE_JOBS} threads. This is sound # because there is no make with -jN args also. do-build: cd ${WRKSRC}/src && \ env \ GOMAXPROCS=${MAKE_JOBS:U1} \ GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:Q} \ ${GOOPT} \ GOCACHE=${WRKDIR}/.cache/go-build \ ${BASH} ./make.bash -v # for RELRO build: # cd ${WRKSRC}/src && env GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:Q} GO_LDFLAGS="-buildmode=pie" ${GOOPT} ${BASH} ./make.bash do-install: cd ${WRKSRC} && rm -rf pkg/obj pkg/bootstrap cd ${WRKSRC} && pax -rw . ${DESTDIR}${PREFIX}/go${GOVERSSUFFIX} find ${DESTDIR}${PREFIX}/go${GOVERSSUFFIX} -name \*.orig -exec rm {} \; .if ${USE_CROSS_COMPILE:tl} == "yes" cd ${DESTDIR}${PREFIX}/go${GOVERSSUFFIX} && \ ${RM} -rf pkg/tool/${NATIVE_GO_PLATFORM} .endif .for cmd in go gofmt . if ${USE_CROSS_COMPILE:tl} == "yes" ${MV} ${DESTDIR}${PREFIX}/go${GOVERSSUFFIX}/bin/${GO_PLATFORM}/${cmd} \ ${DESTDIR}${PREFIX}/go${GOVERSSUFFIX}/bin/${cmd} . endif ${LN} -sf ${PREFIX}/go${GOVERSSUFFIX}/bin/${cmd} ${DESTDIR}${PREFIX}/bin/${cmd}${GOVERSSUFFIX} .endfor do-test: cd ${WRKSRC}/src && GOROOT=${WRKSRC} PATH=${WRKSRC}/bin:${PATH} ${GOOPT} ${BASH} run.bash --no-rebuild --banner "" .include "../../mk/bsd.pkg.mk" @ 1.9 log @lang/go{118,120,123,124,125}: Respect MAKE_JOBS Fix copied from go126, as proposed on tech-pkg@@. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.8 2025/02/07 10:17:49 bsiegert Exp $ a24 1 PATCH_DIST_STRIP= -p1 @ 1.8 log @Update go122 to 1.22.12 and go123 to 1.23.6. This is a security update but it only applies on the ppc64le platform. These minor releases include 1 security fix following the security policy: - crypto/elliptic: timing sidechannel for P-256 on ppc64le Due to the usage of a variable time instruction in the assembly implementation of an internal function, a small number of bits of secret scalars are leaked on the ppc64le architecture. Due to the way this function is used, we do not believe this leakage is enough to allow recovery of the private key when P-256 is used in any well known protocols. This is CVE-2025-22866 and Go issue https://go.dev/issue/71383. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.7 2025/02/06 00:24:37 riastradh Exp $ d105 4 d112 1 @ 1.7 log @lang/go: Add cross-build support. This adds cross-build support for lang/go123 and for the Go-related infrastructure in pkgsrc. (We could do older versions of Go too with a little more work.) Noteworthy changes that are not conditional on USE_CROSS_COMPILE: 1. lang/go/version.mk is rearranged to be more data-driven than conditional-driven. Making it data-driven makes it easier to define both GOARCH and GOHOSTARCH from the same tables when MACHINE_ARCH and NATIVE_MACHINE_ARCH are not the same. This is a likely source of broken edge cases. I went through the old conditional logic and hand-checked all the conditions but I could have made a mistake. 2. go-module.mk and go-package.mk define GOPATH_BIN to be `bin' for native builds, and `bin/${GO_PLATFORM}' for cross builds -- this is the subdirectory of GOPATH where the Go toolchain puts binaries so that packages with custom do-install targets can avoid any need for USE_CROSS_COMPILE conditionals. The default do-install targets use pax slightly differently now to avoid the need for USE_CROSS_COMPILE conditionals. I think the logic is equivalent for native builds but this is worth reviewing. 3. lang/go123 no longer depends on bash and Perl at runtime. As far as I can tell, this was just a kludge to pacify check-interpreter complaints in the copy of the source code that Go ships under ${PREFIX}/go123/src. We don't need to replace the interpreter at build-time -- most of these scripts are not run at all during the build, and the handful that remain (make.bash, run.bash) are run with ${BASH}. Instead, we CHECK_INTERPRETER_SKIP them in the installed copy of the source code. Proposed on tech-pkg: https://mail-index.netbsd.org/tech-pkg/2025/01/19/msg030395.html @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.6 2025/01/02 19:53:12 bsiegert Exp $ a2 1 PKGREVISION= 1 @ 1.6 log @go123: stop requiring /proc on NetBSD This adds a patch (taken from Go 1.24 development) to use a sysctl instead of /proc to find the path of the executable, and thus the files for the standard library. Earlier versions of Go (including 1.22) had the directory where the standard library is installed baked in to the binaries as GOROOT_FINAL. In the interest of portability, this is now determined at runtime. In NetBSD, this used to use /proc/self/exe, however many build sandboxes do not have /proc mounted. With this change, /proc is no longer required for building Go code. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.5 2024/12/04 18:51:39 bsiegert Exp $ d21 1 a21 1 USE_TOOLS+= bash:run perl:run pax d34 26 a59 26 REPLACE_BASH+= lib/time/update.bash REPLACE_BASH+= misc/wasm/go_js_wasm_exec REPLACE_BASH+= misc/wasm/go_wasip1_wasm_exec REPLACE_BASH+= src/all.bash REPLACE_BASH+= src/bootstrap.bash REPLACE_BASH+= src/buildall.bash REPLACE_BASH+= src/clean.bash REPLACE_BASH+= src/cmd/compile/internal/ssa/_gen/cover.bash REPLACE_BASH+= src/cmd/vendor/golang.org/x/sys/plan9/mkall.sh REPLACE_BASH+= src/cmd/vendor/golang.org/x/sys/plan9/mkerrors.sh REPLACE_BASH+= src/cmd/vendor/golang.org/x/sys/unix/mkall.sh REPLACE_BASH+= src/cmd/vendor/golang.org/x/sys/unix/mkerrors.sh REPLACE_BASH+= src/cmd/vendor/golang.org/x/sys/windows/mkerrors.bash REPLACE_BASH+= src/cmd/vendor/golang.org/x/sys/windows/mkknownfolderids.bash REPLACE_BASH+= src/crypto/internal/boring/build.sh REPLACE_BASH+= src/crypto/internal/boring/build-boring.sh REPLACE_BASH+= src/crypto/internal/boring/build-goboring.sh REPLACE_BASH+= src/go/doc/comment/mkstd.sh REPLACE_BASH+= src/cmp.bash REPLACE_BASH+= src/make.bash REPLACE_BASH+= src/race.bash REPLACE_BASH+= src/run.bash REPLACE_BASH+= src/runtime/race/mkcgo.sh REPLACE_BASH+= src/syscall/mkall.sh REPLACE_BASH+= src/syscall/mkerrors.sh REPLACE_BASH+= src/syscall/mksysnum_plan9.sh d61 2 a62 2 REPLACE_PERL+= src/regexp/syntax/make_perl_groups.pl REPLACE_PERL+= src/syscall/*.pl d120 4 d125 4 @ 1.5 log @Update Go to 1.22.10, 1.23.4 go1.23.4 (released 2024-12-03) includes fixes to the compiler, the runtime, the trace command, and the syscall package. See the Go 1.23.4 milestone on our issue tracker for details. go1.22.10 (released 2024-12-03) includes fixes to the runtime and the syscall package. See the Go 1.22.10 milestone on our issue tracker for details. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.4 2024/11/22 10:50:38 wiz Exp $ d3 1 d23 5 d103 3 @ 1.5.2.1 log @Pullup ticket #6924 - requested by bsiegert lang/go123: build fix Revisions pulled up: - lang/go123/Makefile 1.6 - lang/go123/PLIST 1.5 - lang/go123/distinfo 1.6 --- Module Name: pkgsrc Committed By: bsiegert Date: Thu Jan 2 19:53:12 UTC 2025 Modified Files: pkgsrc/lang/go123: Makefile PLIST distinfo Log Message: go123: stop requiring /proc on NetBSD This adds a patch (taken from Go 1.24 development) to use a sysctl instead of /proc to find the path of the executable, and thus the files for the standard library. Earlier versions of Go (including 1.22) had the directory where the standard library is installed baked in to the binaries as GOROOT_FINAL. In the interest of portability, this is now determined at runtime. In NetBSD, this used to use /proc/self/exe, however many build sandboxes do not have /proc mounted. With this change, /proc is no longer required for building Go code. @ text @d1 1 a1 1 # $NetBSD$ a2 1 PKGREVISION= 1 a21 5 # Patch to stop requiring /proc to be mounted on NetBSD PATCH_SITES= https://github.com/golang/go/commit/ PATCHFILES= 80344887818a2321296ce7fa71cca8ca2520611d.diff PATCH_DIST_STRIP= -p1 a96 3 post-patch: ${RM} -f ${WRKSRC}/src/os/*.orig_dist @ 1.4 log @go123: remove traces of GOROOT_FINAL (didn't help after all, removed in 1.23) @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.3 2024/11/22 07:49:50 wiz Exp $ a10 1 PKGREVISION= 1 @ 1.3 log @go123: set GOROOT_FINAL Fixes binary for me on NetBSD 10. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.1 2024/08/14 10:04:04 bsiegert Exp $ a26 1 GOROOT_FINAL= ${PREFIX}/go${GOVERSSUFFIX} a101 1 GOROOT_FINAL=${GOROOT_FINAL:Q} \ d106 1 a106 1 # cd ${WRKSRC}/src && env GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:Q} GOROOT_FINAL=${GOROOT_FINAL:Q} GO_LDFLAGS="-buildmode=pie" ${GOOPT} ${BASH} ./make.bash @ 1.2 log @go123: remove reference to non-existent files @ text @d11 1 d103 1 @ 1.1 log @go123: add Go version 1.23.0. Not the default yet. The latest Go release, version 1.23, arrives six months after Go 1.22. Most of its changes are in the implementation of the toolchain, runtime, and libraries. As always, the release maintains the Go 1 promise of compatibility. We expect almost all Go programs to continue to compile and run as before. Go 1.23 makes the (Go 1.22) “range-over-func” experiment a part of the language. Starting in Go 1.23, the Go toolchain can collect usage and breakage statistics that help the Go team understand how the Go toolchain is used and how well it is working. We refer to these statistics as Go telemetry. Go telemetry is an opt-in system, controlled by the go telemetry command. By default, the toolchain programs collect statistics in counter files that can be inspected locally but are otherwise unused (go telemetry local). Setting the GOROOT_FINAL environment variable no longer has an effect. Distributions that install the go command to a location other than $GOROOT/bin/go should install a symlink instead of relocating or copying the go binary. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.1 2024/02/09 20:34:10 bsiegert Exp $ a46 2 REPLACE_BASH+= src/internal/trace/mkcanned.bash REPLACE_BASH+= src/internal/trace/v2/mkexp.bash @