View | Details | Raw Unified | Return to bug 264336 | Differences between
and this patch

Collapse All | Expand All

(-)b/Mk/Uses/go.mk (-14 / +25 lines)
Lines 3-11 Link Here
3
#
3
#
4
# Feature:	go
4
# Feature:	go
5
# Usage:	USES=go
5
# Usage:	USES=go
6
# Valid ARGS:	(none), modules, no_targets, run
6
# Valid ARGS:	(none), N.NN, devel, modules, no_targets, run
7
#
7
#
8
# (none)	Setup GOPATH and build in GOPATH mode.
8
# (none)	Setup GOPATH and build in GOPATH mode using default Go version.
9
# N.NN | devel	Specify Go version
9
# modules	If the upstream uses Go modules, this can be set to build
10
# modules	If the upstream uses Go modules, this can be set to build
10
#		in modules-aware mode.
11
#		in modules-aware mode.
11
# no_targets	Indicates that Go is needed at build time as a part of
12
# no_targets	Indicates that Go is needed at build time as a part of
Lines 52-76 Link Here
52
# GO_TESTFLAGS
53
# GO_TESTFLAGS
53
#	Additional build arguments to be passed to the `go test` command
54
#	Additional build arguments to be passed to the `go test` command
54
#
55
#
55
# GO_PORT
56
#	The Go port to use.  By default this is lang/go but can be set
57
#	to lang/go-devel in make.conf for testing with future Go versions.
58
#
59
#	This variable must not be set by individual ports!
60
#
61
# MAINTAINER: ports@FreeBSD.org
56
# MAINTAINER: ports@FreeBSD.org
62
57
63
.if !defined(_INCLUDE_USES_GO_MK)
58
.if !defined(_INCLUDE_USES_GO_MK)
64
_INCLUDE_USES_GO_MK=	yes
59
_INCLUDE_USES_GO_MK=	yes
65
60
66
.  if !empty(go_ARGS:Nmodules:Nno_targets:Nrun)
61
# When adding a version, please keep the comment in
67
IGNORE=	USES=go has invalid arguments: ${go_ARGS:Nmodules:Nno_targets:Nrun}
62
# Mk/bsd.default-versions.mk in sync.
63
GO_VALID_VERSIONS=	1.17 1.18 devel
64
65
# Check arguments sanity
66
.  if !empty(go_ARGS:N[1-9].[0-9][0-9]:Ndevel:Nmodules:Nno_targets:Nrun)
67
IGNORE=	USES=go has invalid arguments: ${go_ARGS:N[1-9].[0-9][0-9]:Ndevel:Nmodules:Nno_targets:Nrun}
68
.  endif
68
.  endif
69
69
70
# Parse Go version
71
GO_VERSION=	${go_ARGS:Nmodules:Nno_targets:Nrun:C/^$/${GO_DEFAULT}/}
72
.  if empty(GO_VALID_VERSIONS:M${GO_VERSION})
73
IGNORE?= USES=go has invalid version number
74
.  endif
75
.  if ${GO_VERSION} == devel
76
GO_SUFFIX=	-devel
77
.  else
78
GO_SUFFIX=	${GO_VERSION:S/.//}
79
.  endif
80
GO_PORT=	lang/go${GO_SUFFIX}
81
70
# Settable variables
82
# Settable variables
71
83
72
GO_PORT?=	lang/go
73
74
.  if empty(GO_PKGNAME)
84
.  if empty(GO_PKGNAME)
75
.    if !empty(GH_SUBDIR)
85
.    if !empty(GH_SUBDIR)
76
GO_PKGNAME=	${GH_SUBDIR:S|^src/||}
86
GO_PKGNAME=	${GH_SUBDIR:S|^src/||}
Lines 89-95 GO_BUILDFLAGS+= -v -buildmode=exe -trimpath Link Here
89
GO_BUILDFLAGS+=	-ldflags=-s
99
GO_BUILDFLAGS+=	-ldflags=-s
90
.  endif
100
.  endif
91
GO_TESTFLAGS+=	-v
101
GO_TESTFLAGS+=	-v
92
.  if ${GO_PORT} != lang/go117
102
.  if ${GO_VERSION} != 1.17
93
GO_BUILDFLAGS+=	-buildvcs=false
103
GO_BUILDFLAGS+=	-buildvcs=false
94
GO_TESTFLAGS+=	-buildvcs=false
104
GO_TESTFLAGS+=	-buildvcs=false
95
.  endif
105
.  endif
Lines 107-113 GO_GOSUMDB?= sum.golang.org Link Here
107
117
108
# Read-only variables
118
# Read-only variables
109
119
110
GO_CMD=		${LOCALBASE}/bin/go
120
GO_CMD=		${LOCALBASE}/bin/go${GO_SUFFIX}
111
GO_WRKDIR_BIN=	${WRKDIR}/bin
121
GO_WRKDIR_BIN=	${WRKDIR}/bin
112
GO_ENV+=	CGO_ENABLED=${CGO_ENABLED} \
122
GO_ENV+=	CGO_ENABLED=${CGO_ENABLED} \
113
		CGO_CFLAGS="${CGO_CFLAGS}" \
123
		CGO_CFLAGS="${CGO_CFLAGS}" \
Lines 154-159 GO_ENV+= GOPATH="${GO_GOPATH}" \ Link Here
154
.  endif
164
.  endif
155
165
156
BUILD_DEPENDS+=	${GO_CMD}:${GO_PORT}
166
BUILD_DEPENDS+=	${GO_CMD}:${GO_PORT}
167
BINARY_ALIAS+=	go=go${GO_SUFFIX} gofmt=gofmt${GO_SUFFIX}
157
.  if ${go_ARGS:Mrun}
168
.  if ${go_ARGS:Mrun}
158
RUN_DEPENDS+=	${GO_CMD}:${GO_PORT}
169
RUN_DEPENDS+=	${GO_CMD}:${GO_PORT}
159
.  endif
170
.  endif
(-)b/Mk/bsd.default-versions.mk (+2 lines)
Lines 56-61 GCC_DEFAULT?= 10 Link Here
56
GL_DEFAULT?=		mesa-libs
56
GL_DEFAULT?=		mesa-libs
57
# Possible values: 7, 8, 9, agpl
57
# Possible values: 7, 8, 9, agpl
58
GHOSTSCRIPT_DEFAULT?=	agpl
58
GHOSTSCRIPT_DEFAULT?=	agpl
59
# Possible values: 1.17, 1.18, devel
60
GO_DEFAULT?=		1.18
59
# Possible values: 6, 6-nox11, 7, 7-nox11
61
# Possible values: 6, 6-nox11, 7, 7-nox11
60
IMAGEMAGICK_DEFAULT?=	7
62
IMAGEMAGICK_DEFAULT?=	7
61
# Possible values: 7, 8, 11, 17, 18
63
# Possible values: 7, 8, 11, 17, 18
(-)b/biology/ncbi-entrez-direct/Makefile (-1 / +1 lines)
Lines 75-81 pre-configure: Link Here
75
do-build:
75
do-build:
76
	@${CP} ${FILESDIR}/modules.txt ${WRKSRC}/cmd/vendor
76
	@${CP} ${FILESDIR}/modules.txt ${WRKSRC}/cmd/vendor
77
	@${CP} -R ${WRKSRC}/eutils ${WRKSRC}/cmd/vendor
77
	@${CP} -R ${WRKSRC}/eutils ${WRKSRC}/cmd/vendor
78
	@cd ${WRKSRC}/cmd && ${FILESDIR}/build-cmd
78
	@cd ${WRKSRC}/cmd && ${SETENV} ${MAKE_ENV} ${FILESDIR}/build-cmd
79
79
80
do-install:
80
do-install:
81
	cd ${WRKSRC} && ${INSTALL_SCRIPT} ${SCRIPTS} ${STAGEDIR}${PREFIX}/bin
81
	cd ${WRKSRC} && ${INSTALL_SCRIPT} ${SCRIPTS} ${STAGEDIR}${PREFIX}/bin
(-)b/devel/gocheese/Makefile (-1 / +1 lines)
Lines 18-24 PLIST_FILES= ${DOCSDIR}/README \ Link Here
18
		bin/pyshop2packages.sh
18
		bin/pyshop2packages.sh
19
19
20
do-build:
20
do-build:
21
	@cd ${WRKSRC} ; ${ENV} GOPATH=${WRKSRC} GO111MODULE=off go build -ldflags="-s -w" -o gocheese go.cypherpunks.ru/gocheese/v2
21
	@cd ${WRKSRC} ; ${SETENV} ${MAKE_ENV} GOPATH=${WRKSRC} GO111MODULE=off ${GO_CMD} build -ldflags="-s -w" -o gocheese go.cypherpunks.ru/gocheese/v2
22
22
23
do-install:
23
do-install:
24
	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
24
	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
(-)b/devel/please/Makefile (-2 / +1 lines)
Lines 11-18 COMMENT= High-performance extensible build system for reproducible builds Link Here
11
LICENSE=	APACHE20
11
LICENSE=	APACHE20
12
LICENSE_FILE=	${WRKSRC}/LICENSE
12
LICENSE_FILE=	${WRKSRC}/LICENSE
13
13
14
BUILD_DEPENDS=	${LOCALBASE}/bin/go:lang/go \
14
BUILD_DEPENDS=	bash:shells/bash \
15
		bash:shells/bash \
16
		ca_root_nss>0:security/ca_root_nss \
15
		ca_root_nss>0:security/ca_root_nss \
17
		git:devel/git \
16
		git:devel/git \
18
		protoc:devel/protobuf
17
		protoc:devel/protobuf
(-)b/lang/Makefile (+1 lines)
Lines 115-120 Link Here
115
    SUBDIR += go
115
    SUBDIR += go
116
    SUBDIR += go-devel
116
    SUBDIR += go-devel
117
    SUBDIR += go117
117
    SUBDIR += go117
118
    SUBDIR += go118
118
    SUBDIR += gomacro
119
    SUBDIR += gomacro
119
    SUBDIR += gprolog
120
    SUBDIR += gprolog
120
    SUBDIR += gravity
121
    SUBDIR += gravity
(-)b/lang/go-devel/Makefile (-15 / +113 lines)
Lines 1-30 Link Here
1
# Created by: Devon H. O'Dell <devon.odell@gmail.com>
1
# Created by: Devon H. O'Dell <devon.odell@gmail.com>
2
2
3
PORTVERSION=	g20220319
3
PORTNAME?=	go-devel
4
# Always set PORTREVISION and PORTEPOCH explicitly as otherwise they are inherited from lang/go
4
DISTVERSION?=	g20220319
5
PORTREVISION=	0
5
PORTREVISION?=	0
6
PORTEPOCH=	0
6
CATEGORIES=	lang
7
MASTER_SITES=	https://github.com/dmgk/go-bootstrap/releases/download/${BOOTSTRAP_TAG}/:bootstrap \
7
MASTER_SITES?=	https://github.com/dmgk/go-bootstrap/releases/download/${BOOTSTRAP_TAG}/:bootstrap \
8
		LOCAL/dmgk:bootstrap
8
		LOCAL/dmgk:bootstrap
9
PKGNAMESUFFIX=	-devel
9
DISTFILES?=	go-${OPSYS:tl}-${GOARCH_${ARCH}}${GOARM_${ARCH}}-${BOOTSTRAP_TAG}.tar.xz:bootstrap
10
DISTFILES=	go-${OPSYS:tl}-${GOARCH_${ARCH}}${GOARM_${ARCH}}-${BOOTSTRAP_TAG}.tar.xz:bootstrap
11
10
12
# Avoid conflicting patch files
11
MAINTAINER=	ygy@FreeBSD.org
13
PATCHFILES=
12
COMMENT?=	Go programming language (development version)
14
13
15
COMMENT=	Go programming language (development version)
14
LICENSE=	BSD3CLAUSE
15
LICENSE_FILE=	${WRKSRC}/LICENSE
16
16
17
.ifdef QEMU_EMULATING
18
IGNORE=		fails to build with qemu-user-static
19
.endif
20
21
ONLY_FOR_ARCHS=	aarch64 amd64 armv6 armv7 i386
22
23
RUN_DEPENDS=	${RUN_DEPENDS_${ARCH}}
24
# ld.bfd from devel/binutils is needed for working cgo on aarch64
25
RUN_DEPENDS_aarch64=	binutils>0:devel/binutils
26
27
TEST_DEPENDS=	${TEST_DEPENDS_${ARCH}}
28
# ld.bfd from devel/binutils is needed for working cgo on aarch64
29
TEST_DEPENDS_aarch64=	binutils>0:devel/binutils
30
31
USES=		cpe shebangfix
32
33
CPE_VENDOR=	golang
34
35
.ifndef MASTERDIR
17
USE_GITHUB=	yes
36
USE_GITHUB=	yes
18
GH_ACCOUNT=	golang
37
GH_ACCOUNT=	golang
38
GH_PROJECT=	go
19
GH_TAGNAME=	4aa1efed4853ea067d665a952eee77c52faac774
39
GH_TAGNAME=	4aa1efed4853ea067d665a952eee77c52faac774
40
.endif
20
41
21
CONFLICTS_INSTALL=	go
42
SHEBANG_FILES=	misc/wasm/go_js_wasm_exec \
43
		src/net/http/cgi/testdata/test.cgi
44
SHEBANG_GLOB=	*.bash *.pl *.sh
22
45
23
MASTERDIR=	${.CURDIR}/../go
46
# Upstream archive contains files with UTF-8 names
24
PATCHDIR=	${.CURDIR}/files
47
EXTRACT_CMD=	${SETENV} LC_ALL=en_US.UTF-8 ${TAR}
25
DISTINFO_FILE=	${.CURDIR}/distinfo
48
49
.ifndef GH_TAGNAME
50
.endif
51
52
OPTIONS_DEFINE_i386=	SOFTFLOAT
53
SOFTFLOAT_DESC=	Use soft float on non-SSE2 processors (Pentium 4 and older)
54
SOFTFLOAT_VARS=	GO386=softfloat
55
56
BOOTSTRAP_TAG=	go1.17.9
57
GO_SUFFIX=	${PORTNAME:S/go//}
58
59
GOARCH_aarch64=	arm64
60
GOARCH_amd64=	amd64
61
GOARCH_armv6=	arm
62
GOARCH_armv7=	arm
63
GOARCH_i386=	386
64
GOARM_armv6=	6
65
GOARM_armv7=	7
26
66
27
post-extract:
67
post-extract:
28
	@[ -f ${WRKSRC}/VERSION ] || ${ECHO_CMD} "devel +${GH_TAGNAME}" > ${WRKSRC}/VERSION
68
	@[ -f ${WRKSRC}/VERSION ] || ${ECHO_CMD} "devel +${GH_TAGNAME}" > ${WRKSRC}/VERSION
29
69
30
.include "${MASTERDIR}/Makefile"
70
post-patch:
71
	@${REINPLACE_CMD} -e 's|type -ap |type |' ${WRKSRC}/src/make.bash
72
	@${REINPLACE_CMD} -e 's|^if ulimit -T|false \&\& &|' ${WRKSRC}/src/run.bash
73
74
pre-build:
75
	# Check that the running kernel has COMPAT_FREEBSD11 required by lang/go{,-devel} post-ino64
76
	@${SETENV} CC="${CC}" OPSYS="${OPSYS}" OSVERSION="${OSVERSION}" WRKDIR="${WRKDIR}" \
77
		${SH} ${SCRIPTSDIR}/rust-compat11-canary.sh
78
79
do-build:
80
	cd ${WRKSRC}/src ; ${SETENV} \
81
		XDG_CACHE_HOME=${WRKDIR} \
82
		GOROOT_BOOTSTRAP=${WRKDIR}/go-${OPSYS:tl}-${GOARCH_${ARCH}}${GOARM_${ARCH}}-bootstrap \
83
		GOROOT=${WRKSRC} \
84
		GOROOT_FINAL=${PREFIX}/go${GO_SUFFIX} \
85
		GOBIN= \
86
		GOOS=${OPSYS:tl} \
87
		GOARCH=${GOARCH_${ARCH}} \
88
		GO386=${GO386} \
89
		GOARM=${GOARM_${ARCH}} \
90
		CC=${CC} \
91
		${SH} make.bash -v
92
93
do-install:
94
	@cd ${WRKSRC} ; \
95
		${RM} -r .gitattributes .gitignore .github favicon.ico robots.txt \
96
		pkg/obj pkg/bootstrap pkg/${OPSYS:tl}_${GOARCH_${ARCH}}/cmd
97
	@${MKDIR} ${STAGEDIR}${PREFIX}/go${GO_SUFFIX}
98
	@${CP} -a ${WRKSRC}/* ${STAGEDIR}${PREFIX}/go${GO_SUFFIX}
99
.for f in go gofmt
100
	${LN} -sf ../go${GO_SUFFIX}/bin/${f} ${STAGEDIR}${PREFIX}/bin/${f}${GO_SUFFIX}
101
	@${ECHO_CMD} bin/${f}${GO_SUFFIX} >> ${TMPPLIST}
102
.endfor
103
	@cd ${STAGEDIR}${PREFIX} && ${FIND} go${GO_SUFFIX} -type f >> ${TMPPLIST}
104
105
do-test:
106
	cd ${WRKSRC}/src && ${SETENV} \
107
		GOROOT=${WRKSRC} \
108
		PATH=${WRKSRC}/bin:${PATH} \
109
		GOOS=${OPSYS:tl} \
110
		GOARCH=${GOARCH_${ARCH}} \
111
		GO386=${GO386} \
112
		GOARM=${GOARM_${ARCH}} \
113
		CC=${CC} \
114
		${SH} run.bash -no-rebuild
115
116
.if !defined(_GO_MAKESUM_GUARD)
117
makesum:
118
	${MAKE} -D_GO_MAKESUM_GUARD makesum ARCH=${ONLY_FOR_ARCHS:O:[1]} DISTINFO_FILE=${DISTINFO_FILE}.tmp
119
.for arch in ${ONLY_FOR_ARCHS:O:[2..-1]}
120
	${MAKE} -D_GO_MAKESUM_GUARD makesum ARCH=${arch} DISTINFO_FILE=${DISTINFO_FILE}.${arch}
121
	${SED} 1d ${DISTINFO_FILE}.${arch} >> ${DISTINFO_FILE}.tmp
122
	${RM} ${DISTINFO_FILE}.${arch}
123
.endfor
124
	${AWK} '!seen[$$0]++' ${DISTINFO_FILE}.tmp > ${DISTINFO_FILE}
125
	${RM} ${DISTINFO_FILE}.tmp
126
.endif
127
128
.include <bsd.port.mk>
(-)b/lang/go-devel/distinfo (-1 / +1 lines)
Lines 1-4 Link Here
1
TIMESTAMP = 1651499500
1
TIMESTAMP = 1653843435
2
SHA256 (go-freebsd-arm64-go1.17.9.tar.xz) = d9e9180bdc5ad0eec1654679a50084ebb31ecbe9bef24f0bd8ba917db8d1830c
2
SHA256 (go-freebsd-arm64-go1.17.9.tar.xz) = d9e9180bdc5ad0eec1654679a50084ebb31ecbe9bef24f0bd8ba917db8d1830c
3
SIZE (go-freebsd-arm64-go1.17.9.tar.xz) = 38572776
3
SIZE (go-freebsd-arm64-go1.17.9.tar.xz) = 38572776
4
SHA256 (golang-go-g20220319-4aa1efed4853ea067d665a952eee77c52faac774_GH0.tar.gz) = bd684cf4c64f62131754b0f44ad0ee57c0e2109eee41cd560b0d48346a859b60
4
SHA256 (golang-go-g20220319-4aa1efed4853ea067d665a952eee77c52faac774_GH0.tar.gz) = bd684cf4c64f62131754b0f44ad0ee57c0e2109eee41cd560b0d48346a859b60
(-)b/lang/go-devel/pkg-descr (+4 lines)
Added Link Here
1
Go is an open source programming environment that makes it easy to build
2
simple, reliable, and efficient software.
3
4
WWW: https://golang.org
(-)b/lang/go/Makefile (-113 / +18 lines)
Lines 1-125 Link Here
1
# Created by: Devon H. O'Dell <devon.odell@gmail.com>
2
3
PORTNAME=	go
1
PORTNAME=	go
4
PORTVERSION?=	1.18.2
2
DISTVERSION=	${GO_DEFAULT}
5
PORTREVISION?=	0
3
PORTEPOCH=	2
6
PORTEPOCH?=	1
7
CATEGORIES=	lang
4
CATEGORIES=	lang
8
MASTER_SITES?=	https://golang.org/dl/ \
5
MASTER_SITES=	# not applicable
9
		https://github.com/dmgk/go-bootstrap/releases/download/${BOOTSTRAP_TAG}/:bootstrap \
6
DISTFILES=	# not applicable
10
		LOCAL/dmgk:bootstrap
11
DISTFILES?=	go${PORTVERSION}.src.tar.gz \
12
		go-${OPSYS:tl}-${GOARCH_${ARCH}}${GOARM_${ARCH}}-${BOOTSTRAP_TAG}.tar.xz:bootstrap
13
7
14
MAINTAINER=	ygy@FreeBSD.org
8
MAINTAINER=	dmgk@FreeBSD.org
15
COMMENT?=	Go programming language
9
COMMENT=	Meta-port for the default version of the Go programming language
16
10
17
LICENSE=	BSD3CLAUSE
11
RUN_DEPENDS=	go${GO_SUFFIX}:lang/go${GO_SUFFIX}
18
LICENSE_FILE=	${WRKSRC}/LICENSE
19
12
20
.ifdef QEMU_EMULATING
13
NO_ARCH=	yes
21
IGNORE=		fails to build with qemu-user-static
14
NO_BUILD=	yes
22
.endif
23
24
ONLY_FOR_ARCHS=	aarch64 amd64 armv6 armv7 i386
25
26
RUN_DEPENDS=	${RUN_DEPENDS_${ARCH}}
27
# ld.bfd from devel/binutils is needed for working cgo on aarch64
28
RUN_DEPENDS_aarch64=	binutils>0:devel/binutils
29
30
TEST_DEPENDS=	${TEST_DEPENDS_${ARCH}}
31
TEST_DEPENDS_aarch64=	binutils>0:devel/binutils
32
33
USES=		cpe shebangfix
34
15
35
CPE_VENDOR=	golang
16
PLIST_FILES=	bin/go bin/gofmt
36
17
37
SHEBANG_FILES=	misc/wasm/go_js_wasm_exec \
18
.include <bsd.port.pre.mk>
38
		src/net/http/cgi/testdata/test.cgi
19
.if ${GO_DEFAULT} == devel
39
SHEBANG_GLOB=	*.bash *.pl *.sh
20
GO_SUFFIX=	-devel
40
21
.else
41
CONFLICTS_INSTALL?=	go-devel
22
GO_SUFFIX=	${GO_DEFAULT:S/.//}
42
43
# Upstream archive contains files with UTF-8 names
44
EXTRACT_CMD=	${SETENV} LC_ALL=en_US.UTF-8 ${TAR}
45
46
.ifndef MASTERDIR
47
WRKSRC=		${WRKDIR}/go
48
.endif
23
.endif
49
24
50
OPTIONS_DEFINE_i386=	SOFTFLOAT
51
52
SOFTFLOAT_DESC=	Use soft float on non-SSE2 processors (Pentium 4 and older)
53
54
SOFTFLOAT_VARS=	GO386=softfloat
55
56
BINARIES=	go gofmt
57
BOOTSTRAP_TAG=	go1.17.9
58
59
GOARCH_aarch64=	arm64
60
GOARCH_amd64=	amd64
61
GOARCH_armv6=	arm
62
GOARCH_armv7=	arm
63
GOARCH_i386=	386
64
65
GOARM_armv6=	6
66
GOARM_armv7=	7
67
68
post-patch:
69
	@${REINPLACE_CMD} -e 's|^if ulimit -T|false \&\& &|' ${WRKSRC}/src/run.bash
70
71
pre-build:
72
	# Check that the running kernel has COMPAT_FREEBSD11 required by lang/go{,-devel} post-ino64
73
	@${SETENV} CC="${CC}" OPSYS="${OPSYS}" OSVERSION="${OSVERSION}" WRKDIR="${WRKDIR}" \
74
		${SH} ${SCRIPTSDIR}/rust-compat11-canary.sh
75
76
do-build:
77
	cd ${WRKSRC}/src ; ${SETENV} \
78
		XDG_CACHE_HOME=${WRKDIR} \
79
		GOROOT_BOOTSTRAP=${WRKDIR}/go-${OPSYS:tl}-${GOARCH_${ARCH}}${GOARM_${ARCH}}-bootstrap \
80
		GOROOT=${WRKSRC} \
81
		GOROOT_FINAL=${PREFIX}/go \
82
		GOBIN= \
83
		GOOS=${OPSYS:tl} \
84
		GOARCH=${GOARCH_${ARCH}} \
85
		GO386=${GO386} \
86
		GOARM=${GOARM_${ARCH}} \
87
		CC=${CC} \
88
		${SH} make.bash -v
89
90
do-install:
25
do-install:
91
	@cd ${WRKSRC} ; \
26
.for f in go gofmt
92
		${RM} -r .gitattributes .gitignore .github favicon.ico robots.txt \
27
	@${LN} -sf ${f}${GO_SUFFIX} ${STAGEDIR}${PREFIX}/bin/${f}
93
		pkg/obj pkg/bootstrap pkg/${OPSYS:tl}_${GOARCH_${ARCH}}/cmd
94
	@${MKDIR} ${STAGEDIR}${PREFIX}/go
95
	@${CP} -a ${WRKSRC}/* ${STAGEDIR}${PREFIX}/go
96
.for file in ${BINARIES}
97
	@${LN} -sf ../go/bin/${file} ${STAGEDIR}${PREFIX}/bin/${file}
98
	@${ECHO_CMD} bin/${file} >> ${TMPPLIST}
99
.endfor
28
.endfor
100
	@cd ${STAGEDIR}${PREFIX} && ${FIND} go -type f >> ${TMPPLIST}
101
29
102
do-test:
30
.include <bsd.port.post.mk>
103
	cd ${WRKSRC}/src && ${SETENV} \
104
		GOROOT=${WRKSRC} \
105
		PATH=${WRKSRC}/bin:${PATH} \
106
		GOOS=${OPSYS:tl} \
107
		GOARCH=${GOARCH_${ARCH}} \
108
		GO386=${GO386} \
109
		GOARM=${GOARM_${ARCH}} \
110
		CC=${CC} \
111
		${SH} run.bash -no-rebuild
112
113
.if !defined(_GO_MAKESUM_GUARD)
114
makesum:
115
	${MAKE} -D_GO_MAKESUM_GUARD makesum ARCH=${ONLY_FOR_ARCHS:O:[1]} DISTINFO_FILE=${DISTINFO_FILE}.tmp
116
.for arch in ${ONLY_FOR_ARCHS:O:[2..-1]}
117
	${MAKE} -D_GO_MAKESUM_GUARD makesum ARCH=${arch} DISTINFO_FILE=${DISTINFO_FILE}.${arch}
118
	${SED} 1d ${DISTINFO_FILE}.${arch} >> ${DISTINFO_FILE}.tmp
119
	${RM} ${DISTINFO_FILE}.${arch}
120
.endfor
121
	${AWK} '!seen[$$0]++' ${DISTINFO_FILE}.tmp > ${DISTINFO_FILE}
122
	${RM} ${DISTINFO_FILE}.tmp
123
.endif
124
125
.include <bsd.port.mk>
(-)b/lang/go/pkg-descr (+5 lines)
Lines 1-4 Link Here
1
Go is an open source programming environment that makes it easy to build
1
Go is an open source programming environment that makes it easy to build
2
simple, reliable, and efficient software.
2
simple, reliable, and efficient software.
3
3
4
This is a meta port for the default version of Go, it provides symbolic links
5
called go and gofmt.
6
7
Do not depend on this port.
8
4
WWW: https://golang.org
9
WWW: https://golang.org
(-)b/lang/go117/Makefile (-17 / +12 lines)
Lines 1-28 Link Here
1
PORTVERSION=	1.17.10
1
# Created by: Devon H. O'Dell <devon.odell@gmail.com>
2
# Always set PORTREVISION and PORTEPOCH explicitly as otherwise they are inherited from lang/go
2
3
PORTNAME=	go117
4
DISTVERSION=	1.17.10
5
# Always set PORTREVISION explicitly as otherwise they are inherited from lang/go-devel
3
PORTREVISION=	0
6
PORTREVISION=	0
4
PORTEPOCH=	0
7
MASTER_SITES=	https://golang.org/dl/ \
5
MASTER_SITES=	https://github.com/dmgk/go-bootstrap/releases/download/${BOOTSTRAP_TAG}/:bootstrap \
8
		https://github.com/dmgk/go-bootstrap/releases/download/${BOOTSTRAP_TAG}/:bootstrap \
6
		LOCAL/dmgk:bootstrap
9
		LOCAL/dmgk:bootstrap
7
PKGNAMESUFFIX=	117
10
DISTFILES=	go${DISTVERSION}.src.tar.gz \
8
DISTFILES=	go-${OPSYS:tl}-${GOARCH_${ARCH}}${GOARM_${ARCH}}-${BOOTSTRAP_TAG}.tar.xz:bootstrap
11
		go-${OPSYS:tl}-${GOARCH_${ARCH}}${GOARM_${ARCH}}-${BOOTSTRAP_TAG}.tar.xz:bootstrap
9
12
10
# Avoid conflicting patch files
13
# Avoid conflicting patch files
11
PATCHFILES=
14
PATCHFILES=
12
15
13
COMMENT=	Go programming language (development version)
16
COMMENT=	Go programming language
14
17
15
USE_GITHUB=	yes
18
MASTERDIR=	${.CURDIR}/../go-devel
16
GH_ACCOUNT=	golang
17
GH_TAGNAME=	7dd10d4ce20e64d96a10cb67794851a58d96a2aa
18
19
CONFLICTS_INSTALL=	go
20
21
MASTERDIR=	${.CURDIR}/../go
22
PATCHDIR=	${.CURDIR}/files
19
PATCHDIR=	${.CURDIR}/files
20
WRKSRC=		${WRKDIR}/go
23
DISTINFO_FILE=	${.CURDIR}/distinfo
21
DISTINFO_FILE=	${.CURDIR}/distinfo
24
22
25
post-extract:
26
	@[ -f ${WRKSRC}/VERSION ] || ${ECHO_CMD} "${PORTVERSION} +${GH_TAGNAME}" > ${WRKSRC}/VERSION
27
28
.include "${MASTERDIR}/Makefile"
23
.include "${MASTERDIR}/Makefile"
(-)b/lang/go117/distinfo (-3 / +3 lines)
Lines 1-8 Link Here
1
TIMESTAMP = 1652618409
1
TIMESTAMP = 1653843983
2
SHA256 (go1.17.10.src.tar.gz) = 299e55af30f15691b015d8dcf8ecae72412412569e5b2ece20361753a456f2f9
3
SIZE (go1.17.10.src.tar.gz) = 22196380
2
SHA256 (go-freebsd-arm64-go1.17.9.tar.xz) = d9e9180bdc5ad0eec1654679a50084ebb31ecbe9bef24f0bd8ba917db8d1830c
4
SHA256 (go-freebsd-arm64-go1.17.9.tar.xz) = d9e9180bdc5ad0eec1654679a50084ebb31ecbe9bef24f0bd8ba917db8d1830c
3
SIZE (go-freebsd-arm64-go1.17.9.tar.xz) = 38572776
5
SIZE (go-freebsd-arm64-go1.17.9.tar.xz) = 38572776
4
SHA256 (golang-go-1.17.10-7dd10d4ce20e64d96a10cb67794851a58d96a2aa_GH0.tar.gz) = 903cb4363af9a1c9a6c9d08ea0525983634862a5cb1f893b0b6156e3b99f847c
5
SIZE (golang-go-1.17.10-7dd10d4ce20e64d96a10cb67794851a58d96a2aa_GH0.tar.gz) = 22176903
6
SHA256 (go-freebsd-amd64-go1.17.9.tar.xz) = fd439ad091ed57d0ad728c05fc60465aad2e46e98da96e2d5b60b0c470f2efec
6
SHA256 (go-freebsd-amd64-go1.17.9.tar.xz) = fd439ad091ed57d0ad728c05fc60465aad2e46e98da96e2d5b60b0c470f2efec
7
SIZE (go-freebsd-amd64-go1.17.9.tar.xz) = 41951936
7
SIZE (go-freebsd-amd64-go1.17.9.tar.xz) = 41951936
8
SHA256 (go-freebsd-arm6-go1.17.9.tar.xz) = ba24590b8cec761207eafc5a39c71b5b5041320c6fb0c95d35c123f6054f8d1c
8
SHA256 (go-freebsd-arm6-go1.17.9.tar.xz) = ba24590b8cec761207eafc5a39c71b5b5041320c6fb0c95d35c123f6054f8d1c
(-)b/lang/go118/Makefile (+23 lines)
Added Link Here
1
# Created by: Devon H. O'Dell <devon.odell@gmail.com>
2
3
PORTNAME=	go118
4
DISTVERSION=	1.18.2
5
# Always set PORTREVISION explicitly as otherwise they are inherited from lang/go-devel
6
PORTREVISION=	0
7
MASTER_SITES=	https://golang.org/dl/ \
8
		https://github.com/dmgk/go-bootstrap/releases/download/${BOOTSTRAP_TAG}/:bootstrap \
9
		LOCAL/dmgk:bootstrap
10
DISTFILES=	go${DISTVERSION}.src.tar.gz \
11
		go-${OPSYS:tl}-${GOARCH_${ARCH}}${GOARM_${ARCH}}-${BOOTSTRAP_TAG}.tar.xz:bootstrap
12
13
# Avoid conflicting patch files
14
PATCHFILES=
15
16
COMMENT=	Go programming language
17
18
MASTERDIR=	${.CURDIR}/../go-devel
19
PATCHDIR=	${.CURDIR}/files
20
WRKSRC=		${WRKDIR}/go
21
DISTINFO_FILE=	${.CURDIR}/distinfo
22
23
.include "${MASTERDIR}/Makefile"
(-)b/lang/go118/distinfo (-1 / +1 lines)
Lines 1-4 Link Here
1
TIMESTAMP = 1652618333
1
TIMESTAMP = 1653843300
2
SHA256 (go1.18.2.src.tar.gz) = 2c44d03ea2c34092137ab919ba602f2c261a038d08eb468528a3f3a28e5667e2
2
SHA256 (go1.18.2.src.tar.gz) = 2c44d03ea2c34092137ab919ba602f2c261a038d08eb468528a3f3a28e5667e2
3
SIZE (go1.18.2.src.tar.gz) = 22837686
3
SIZE (go1.18.2.src.tar.gz) = 22837686
4
SHA256 (go-freebsd-arm64-go1.17.9.tar.xz) = d9e9180bdc5ad0eec1654679a50084ebb31ecbe9bef24f0bd8ba917db8d1830c
4
SHA256 (go-freebsd-arm64-go1.17.9.tar.xz) = d9e9180bdc5ad0eec1654679a50084ebb31ecbe9bef24f0bd8ba917db8d1830c
(-)b/net-im/gotosocial/Makefile (-1 / +1 lines)
Lines 38-44 post-patch: Link Here
38
.endif
38
.endif
39
39
40
do-build:
40
do-build:
41
	@(cd ${WRKSRC} && ${SETENV} \
41
	@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
42
		VERSION=${DISTVERSION} COMMIT=${GH_TAGNAME} scripts/build.sh )
42
		VERSION=${DISTVERSION} COMMIT=${GH_TAGNAME} scripts/build.sh )
43
43
44
do-install:
44
do-install:
(-)b/net-mgmt/chronograf/Makefile (-1 / +1 lines)
Lines 91-96 pre-build: Link Here
91
		npm_config_tarball=${DISTDIR}/${DIST_SUBDIR}/node-v${NODEJS_VERSION}-headers.tar.gz \
91
		npm_config_tarball=${DISTDIR}/${DIST_SUBDIR}/node-v${NODEJS_VERSION}-headers.tar.gz \
92
		yarn --frozen-lockfile --offline --no-progress --no-emoji
92
		yarn --frozen-lockfile --offline --no-progress --no-emoji
93
	cd ${WRKSRC}/ui && ${SETENV} ${YARN_ENV} yarn run build
93
	cd ${WRKSRC}/ui && ${SETENV} ${YARN_ENV} yarn run build
94
	cd ${WRKSRC} && ${GMAKE} .bindata
94
	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} .bindata
95
95
96
.include <bsd.port.post.mk>
96
.include <bsd.port.post.mk>
(-)b/net/ooni-probe-cli/Makefile (-1 / +1 lines)
Lines 12-18 LICENSE_FILE= ${WRKSRC}/LICENSE Link Here
12
12
13
RUN_DEPENDS=	ca_root_nss>=0:security/ca_root_nss
13
RUN_DEPENDS=	ca_root_nss>=0:security/ca_root_nss
14
14
15
USES=		go:modules
15
USES=		go:1.17,modules
16
USE_GITHUB=	yes
16
USE_GITHUB=	yes
17
USE_GITLAB=	nodefault
17
USE_GITLAB=	nodefault
18
18
(-)b/sysutils/chezmoi/Makefile (-1 / +1 lines)
Lines 147-153 SOURCE_DATE_EPOCH_CMD= date -ur $$(grep TIMESTAMP ${DISTINFO_FILE} | ${SED} -e ' Link Here
147
147
148
do-build-DOCS-on:
148
do-build-DOCS-on:
149
	@${CP} ${_DISTDIR}/mermaid@8.8.0/dist/mermaid.min.js ${WRKSRC}/assets/chezmoi.io
149
	@${CP} ${_DISTDIR}/mermaid@8.8.0/dist/mermaid.min.js ${WRKSRC}/assets/chezmoi.io
150
	(cd ${WRKSRC}/assets/chezmoi.io && mkdocs build)
150
	(cd ${WRKSRC}/assets/chezmoi.io && ${SETENV} ${MAKE_ENV} mkdocs build)
151
151
152
post-extract:
152
post-extract:
153
	@${MKDIR} ${WRKSRC}/vendor/github.com/chris-ramon
153
	@${MKDIR} ${WRKSRC}/vendor/github.com/chris-ramon
(-)b/sysutils/datadog-agent/Makefile (-5 / +5 lines)
Lines 359-378 pre-build: Link Here
359
		${MAKE_CMD} -C .)
359
		${MAKE_CMD} -C .)
360
360
361
# Generate go source from templates
361
# Generate go source from templates
362
	${SETENV} ${GO_ENV} GOCACHE=${TMPDIR} GO111MODULE=off GOFLAGS="-mod=vendor" ${GO_CMD} generate ${WRKSRC}/pkg/status/render.go
362
	${SETENV} ${MAKE_ENV} ${GO_ENV} GOCACHE=${TMPDIR} GO111MODULE=off GOFLAGS="-mod=vendor" ${GO_CMD} generate ${WRKSRC}/pkg/status/render.go
363
	${SETENV} ${GO_ENV} GOCACHE=${TMPDIR} GO111MODULE=off GOFLAGS="-mod=vendor" ${GO_CMD} generate ${WRKSRC}/cmd/agent/gui/gui.go
363
	${SETENV} ${MAKE_ENV} ${GO_ENV} GOCACHE=${TMPDIR} GO111MODULE=off GOFLAGS="-mod=vendor" ${GO_CMD} generate ${WRKSRC}/cmd/agent/gui/gui.go
364
364
365
post-build:
365
post-build:
366
# Generate config files
366
# Generate config files
367
	${SETENV} ${GO_ENV} GOCACHE=${TMPDIR} ${GO_CMD} run ${WRKSRC}/pkg/config/render_config.go agent-py3 \
367
	${SETENV} ${MAKE_ENV} ${GO_ENV} GOCACHE=${TMPDIR} ${GO_CMD} run ${WRKSRC}/pkg/config/render_config.go agent-py3 \
368
		${WRKSRC}/pkg/config/config_template.yaml \
368
		${WRKSRC}/pkg/config/config_template.yaml \
369
		${WRKSRC}/cmd/agent/dist/datadog.yaml
369
		${WRKSRC}/cmd/agent/dist/datadog.yaml
370
370
371
	${SETENV} ${GO_ENV} GOCACHE=${TMPDIR} ${GO_CMD} run ${WRKSRC}/pkg/config/render_config.go system-probe \
371
	${SETENV} ${MAKE_ENV} ${GO_ENV} GOCACHE=${TMPDIR} ${GO_CMD} run ${WRKSRC}/pkg/config/render_config.go system-probe \
372
		${WRKSRC}/pkg/config/config_template.yaml \
372
		${WRKSRC}/pkg/config/config_template.yaml \
373
		${WRKSRC}/cmd/agent/dist/system-probe.yaml
373
		${WRKSRC}/cmd/agent/dist/system-probe.yaml
374
374
375
	${SETENV} ${GO_ENV} GOCACHE=${TMPDIR} ${GO_CMD} run ${WRKSRC}/pkg/config/render_config.go dogstatsd \
375
	${SETENV} ${MAKE_ENV} ${GO_ENV} GOCACHE=${TMPDIR} ${GO_CMD} run ${WRKSRC}/pkg/config/render_config.go dogstatsd \
376
		${WRKSRC}/pkg/config/config_template.yaml \
376
		${WRKSRC}/pkg/config/config_template.yaml \
377
		${WRKSRC}/cmd/agent/dist/dogstatsd.yaml
377
		${WRKSRC}/cmd/agent/dist/dogstatsd.yaml
378
378
(-)b/sysutils/ipfs-go/Makefile (-2 / +1 lines)
Lines 15-26 LICENSE_COMB= dual Link Here
15
LICENSE_FILE_MIT=	${WRKSRC}/LICENSE-MIT
15
LICENSE_FILE_MIT=	${WRKSRC}/LICENSE-MIT
16
LICENSE_FILE_APACHE20=	${WRKSRC}/LICENSE-APACHE
16
LICENSE_FILE_APACHE20=	${WRKSRC}/LICENSE-APACHE
17
17
18
USES=		cpe go:modules
18
USES=		cpe go:1.17,modules
19
19
20
CPE_VENDOR=	protocol
20
CPE_VENDOR=	protocol
21
21
22
GO_TARGET=	./cmd/ipfs:ipfs-go
22
GO_TARGET=	./cmd/ipfs:ipfs-go
23
GO_PORT=	lang/go117 # quic-go does not build on Go 1.18 yet
24
23
25
NO_WRKSUBDIR=	yes
24
NO_WRKSUBDIR=	yes
26
25
(-)b/sysutils/ipget/Makefile (-1 / +1 lines)
Lines 10-16 COMMENT= Retrieve files over IPFS and save them locally Link Here
10
LICENSE=	MIT
10
LICENSE=	MIT
11
LICENSE_FILE=	${WRKSRC}/LICENSE
11
LICENSE_FILE=	${WRKSRC}/LICENSE
12
12
13
USES=		go:modules
13
USES=		go:1.17,modules
14
USE_GITHUB=	yes
14
USE_GITHUB=	yes
15
GH_ACCOUNT=	ipfs
15
GH_ACCOUNT=	ipfs
16
16
(-)b/sysutils/minikube/Makefile (-1 / +1 lines)
Lines 243-248 pre-build: Link Here
243
		-o pkg/minikube/assets/assets.go -pkg assets deploy/addons/... && \
243
		-o pkg/minikube/assets/assets.go -pkg assets deploy/addons/... && \
244
		${LOCALBASE}/bin/go-bindata -nomemcopy \
244
		${LOCALBASE}/bin/go-bindata -nomemcopy \
245
		-o pkg/minikube/translate/translations.go -pkg translate translations/... && \
245
		-o pkg/minikube/translate/translations.go -pkg translate translations/... && \
246
		${LOCALBASE}/bin/gofmt -s -w pkg/minikube/translate/translations.go
246
		${LOCALBASE}/bin/gofmt${GO_SUFFIX} -s -w pkg/minikube/translate/translations.go
247
247
248
.include <bsd.port.mk>
248
.include <bsd.port.mk>
(-)b/www/adguardhome/Makefile (-2 / +1 lines)
Lines 10-19 COMMENT= Network-wide ads & trackers blocking DNS server Link Here
10
LICENSE=	GPLv3
10
LICENSE=	GPLv3
11
LICENSE_FILE=	${WRKSRC}/LICENSE.txt
11
LICENSE_FILE=	${WRKSRC}/LICENSE.txt
12
12
13
USES=		cpe go:modules
13
USES=		cpe go:1.17,modules
14
14
15
GO_MODULE=	github.com/AdguardTeam/AdGuardHome
15
GO_MODULE=	github.com/AdguardTeam/AdGuardHome
16
GO_PORT=	lang/go117 # quic-go does not build on Go 1.18 yet
17
16
18
# to rebuild the deps archives:
17
# to rebuild the deps archives:
19
#   1. set DEV_UPDATE_MODE=yes
18
#   1. set DEV_UPDATE_MODE=yes
(-)b/www/grafana8/Makefile (-1 / +1 lines)
Lines 80-86 pre-build: Link Here
80
	${SETENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=off ${GO_CMD} build \
80
	${SETENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=off ${GO_CMD} build \
81
		-o wire ./vendor/github.com/google/wire/cmd/wire/main.go; \
81
		-o wire ./vendor/github.com/google/wire/cmd/wire/main.go; \
82
	${ECHO_MSG} "===>  Generating wire_gen.go"; \
82
	${ECHO_MSG} "===>  Generating wire_gen.go"; \
83
	${SETENV} XDG_CACHE_HOME=${WRKDIR}/.cache ${GO_ENV} ./wire gen -tags "oss" ./pkg/server ./pkg/cmd/grafana-cli/runner )
83
	${SETENV} ${MAKE_ENV} ${GO_ENV} ./wire gen -tags "oss" ./pkg/server ./pkg/cmd/grafana-cli/runner )
84
84
85
post-install:
85
post-install:
86
	${MKDIR} ${STAGEDIR}${GRAFANA_HOMEDIR}
86
	${MKDIR} ${STAGEDIR}${GRAFANA_HOMEDIR}

Return to bug 264336