added go20

This commit is contained in:
ziggi
2023-02-02 10:23:07 +02:00
parent bedfb10e1f
commit 10da2746fc
5 changed files with 13443 additions and 0 deletions

115
lang/go20/Makefile Normal file
View File

@@ -0,0 +1,115 @@
# Created by: Devon H. O'Dell <devon.odell@gmail.com>
# $FreeBSD: head/lang/go/Makefile 470619 2018-05-22 14:32:09Z jlaffaye $
PORTNAME= go
PORTVERSION= 1.20
CATEGORIES= lang
MASTER_SITES= https://golang.org/dl/
MASTER_SITES+= https://github.com/dmgk/go-bootstrap/releases/download/${BOOTSTRAP_TAG}/:bootstrap
MASTER_SITES+= LOCAL/dmgk:bootstrap
DISTFILES= go${PORTVERSION}.src.tar.gz
DISTFILES+= go-${OPSYS:tl}-${GOARCH}${GOARM}-${BOOTSTRAP_TAG}.tar.xz:bootstrap
.include <bsd.port.pre.mk>
DISTINFO_FILE = ${MASTERDIR}/distinfo.${ARCH}
BOOTSTRAP_TAG= go1.17.9
.if ${ARCH} == amd64
GOARCH=amd64
.elif ${ARCH} == i386
GOARCH=386
.elif ${ARCH} == armv6
GOARCH=arm
GOARM=6
.elif ${ARCH} == armv7
GOARCH=arm
GOARM=7
.elif ${ARCH} == aarch64
GOARCH=arm64
.else
IGNORE= unknown arch ${ARCH}
.endif
MAINTAINER= jlaffaye@FreeBSD.org
COMMENT= Go programming language
RUN_DEPENDS= bash:lang/bash
BUILD_DEPENDS= bash:lang/bash
USES= shebangfix
SHEBANG_LANG= sh perl
SHEBANG_FILES+= misc/wasm/go_js_wasm_exec
SHEBANG_FILES+= src/net/http/cgi/testdata/test.cgi
SHEBANG_GLOB= *.bash *.pl *.sh
sh_OLD_CMD= /bin/bash
sh_CMD= "/usr/bin/env bash"
WRKSRC= ${WRKDIR}/go
ONLY_FOR_ARCHS= i386 amd64 armv6 armv7 aarch64
USE_LOCALE= en_US.UTF-8
EXTRACT_CMD= ${SETENV} LC_ALL=en_US.UTF-8 ${TAR}
post-patch:
cd ${WRKSRC} && ${FIND} . -name '*.orig' -delete
${REINPLACE_CMD} -e 's|type -ap |type |' ${WRKSRC}/src/make.bash
${REINPLACE_CMD} -e 's|^if ulimit -T|false \&\& &|' ${WRKSRC}/src/run.bash
PLIST= pkg-plist.${ARCH}
GOROOT_BOOTSTRAP=${WRKDIR}/go-${OPSYS:tl}-${GOARCH}${GOARM}-bootstrap
#GOROOT_BOOTSTRAP=${LOCALBASE}/lib/go
do-build:
# cd ${WRKSRC}/src ; ${SETENV} \
# XDG_CACHE_HOME=${WRKDIR} \
# GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP} \
# GOROOT=${WRKSRC} \
# GOROOT_FINAL=${PREFIX}/go \
# GOBIN= \
# GOOS=${OPSYS:tl} \
# GOARCH=${GOARCH} \
# GO386=${GO386} \
# GOARM=${GOARM} \
# CC=${CC} \
# ${LOCALBASE}/bin/bash make.bash -v
cd ${WRKSRC}/src ; ${SETENV} \
XDG_CACHE_HOME=${WRKDIR} \
GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP} \
GOROOT=${WRKSRC} \
GOROOT_FINAL=${PREFIX}/go \
GOBIN=${GOROOT_BOOTSTRAP}/bin/go \
GOOS=${OPSYS:tl} \
GOARCH=${GOARCH} \
GO386=${GO386} \
GOARM=${GOARM} \
CC=${CC} \
GOMEMLIMIT=256KiB GOGC=30 \
${LOCALBASE}/bin/bash make.bash -v
${RM} -r ${WRKSRC}/pkg/obj \
${WRKSRC}/pkg/bootstrap \
${WRKSRC}/pkg/${OPSYS:tl}_${GOARCH}/cmd
do-install:
cd ${WRKSRC} && \
${RM} -r .gitattributes .gitignore .github favicon.ico robots.txt \
pkg/obj pkg/bootstrap pkg/${OPSYS:tl}_${GOARCH_${ARCH}}/cmd
${CP} -a ${WRKSRC} ${STAGEDIR}${PREFIX}/lib
.for f in go gofmt
${LN} -sf ../lib/go/bin/${f} ${STAGEDIR}${PREFIX}/bin/${f}
.endfor
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/go/bin/*
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/go/pkg/tool/*/*
.include <bsd.port.post.mk>
#EOF

5
lang/go20/distinfo.amd64 Normal file
View File

@@ -0,0 +1,5 @@
TIMESTAMP = 1675324651
SHA256 (go1.20.src.tar.gz) = 3a29ff0421beaf6329292b8a46311c9fbf06c800077ceddef5fb7f8d5b1ace33
SIZE (go1.20.src.tar.gz) = 26163076
SHA256 (go-freebsd-amd64-go1.17.9.tar.xz) = fd439ad091ed57d0ad728c05fc60465aad2e46e98da96e2d5b60b0c470f2efec
SIZE (go-freebsd-amd64-go1.17.9.tar.xz) = 41951936

View File

@@ -0,0 +1,11 @@
--- src/cmd/go/internal/modload/vendor.go.orig 2020-12-17 16:03:19 UTC
+++ src/cmd/go/internal/modload/vendor.go
@@ -133,7 +133,7 @@ func checkVendorConsistency() {
readVendorList()
pre114 := false
- if semver.Compare(index.goVersionV, "v1.14") < 0 {
+ if semver.Compare(index.goVersionV, "v1.14") < 0 || (os.Getenv("GO_NO_VENDOR_CHECKS") == "1" && len(vendorMeta) == 0) {
// Go versions before 1.14 did not include enough information in
// vendor/modules.txt to check for consistency.
// If we know that we're on an earlier version, relax the consistency check.

4
lang/go20/pkg-descr Normal file
View File

@@ -0,0 +1,4 @@
Go is an open source programming environment that makes it easy to build
simple, reliable, and efficient software.
WWW: http://golang.org

13308
lang/go20/pkg-plist.amd64 Normal file

File diff suppressed because it is too large Load Diff