added go19

This commit is contained in:
2022-09-12 10:16:58 +02:00
parent 1546a6ec2c
commit fd4d4a18d4
6 changed files with 13523 additions and 0 deletions

93
lang/go19/Makefile Normal file
View File

@@ -0,0 +1,93 @@
# 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.19.1
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>
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|^if ulimit -T|false \&\& &|' ${WRKSRC}/src/run.bash
PLIST= pkg-plist.${ARCH}
do-build:
cd ${WRKSRC}/src ; ${SETENV} \
XDG_CACHE_HOME=${WRKDIR} \
GOROOT_BOOTSTRAP=${WRKDIR}/go-${OPSYS:tl}-${GOARCH}${GOARM}-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
# ${SH} 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/go19/distinfo Normal file
View File

@@ -0,0 +1,5 @@
TIMESTAMP = 1662968389
SHA256 (go1.19.1.src.tar.gz) = 27871baa490f3401414ad793fba49086f6c855b1c584385ed7771e1204c7e179
SIZE (go1.19.1.src.tar.gz) = 26527375
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.

View File

@@ -0,0 +1,55 @@
From 21a3e299aad894f744292d8cf1db4120efb3651f Mon Sep 17 00:00:00 2001
From: Yuval Pavel Zholkover <paulzhol@gmail.com>
Date: Sat, 30 Jul 2022 20:41:58 +0300
Subject: [PATCH] os: only add file descriptors which are set to non-blocking mode to the netpoller
Either ones where kind == kindNonBlock or those we've successfully called syscall.SetNonblock() on.
Restore blocking behavior if we detect an error registering with the netpoller and our flow was
successful in setting the inital syscall.SetNonblock().
Update #54100
Change-Id: I08934e4107c7fb36c15a7ca23ac880490b4df235
--- src/os/file_unix.go.orig 2022-08-01 22:45:57 UTC
+++ src/os/file_unix.go
@@ -168,18 +168,28 @@ func newFile(fd uintptr, name string, kind newFileKind
}
}
- if err := f.pfd.Init("file", pollable); err != nil {
- // An error here indicates a failure to register
- // with the netpoll system. That can happen for
- // a file descriptor that is not supported by
- // epoll/kqueue; for example, disk files on
- // Linux systems. We assume that any real error
- // will show up in later I/O.
- } else if pollable {
- // We successfully registered with netpoll, so put
- // the file into nonblocking mode.
- if err := syscall.SetNonblock(fdi, true); err == nil {
+ clearNonBlock := false
+ if pollable {
+ if kind == kindNonBlock {
f.nonblock = true
+ } else if err := syscall.SetNonblock(fdi, true); err == nil {
+ f.nonblock = true
+ clearNonBlock = true
+ } else {
+ pollable = false
+ }
+ }
+
+ // An error here indicates a failure to register
+ // with the netpoll system. That can happen for
+ // a file descriptor that is not supported by
+ // epoll/kqueue; for example, disk files on
+ // Linux systems. We assume that any real error
+ // will show up in later I/O.
+ // We do restore the blocking behavior if it was set by us.
+ if pollErr := f.pfd.Init("file", pollable); pollErr != nil && clearNonBlock {
+ if err := syscall.SetNonblock(fdi, false); err == nil {
+ f.nonblock = false
}
}

4
lang/go19/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

13355
lang/go19/pkg-plist.amd64 Normal file

File diff suppressed because it is too large Load Diff