Import go-1.1.1 as lang/go, packaged by Benny Siegert for wip.

The Go programming language is an open source project to make
programmers more productive.

Go is expressive, concise, clean, and efficient. Its concurrency
mechanisms make it easy to write programs that get the most out of
multicore and networked machines, while its novel type system enables
flexible and modular program construction. Go compiles quickly to
machine code yet has the convenience of garbage collection and the power
of run-time reflection. It's a fast, statically typed, compiled language
that feels like a dynamically typed, interpreted language.
This commit is contained in:
wiz 2013-07-07 08:10:14 +00:00
parent ad8367a228
commit 5a6966d0fb
6 changed files with 4079 additions and 0 deletions

10
lang/go/DESCR Normal file
View file

@ -0,0 +1,10 @@
The Go programming language is an open source project to make
programmers more productive.
Go is expressive, concise, clean, and efficient. Its concurrency
mechanisms make it easy to write programs that get the most out of
multicore and networked machines, while its novel type system enables
flexible and modular program construction. Go compiles quickly to
machine code yet has the convenience of garbage collection and the power
of run-time reflection. It's a fast, statically typed, compiled language
that feels like a dynamically typed, interpreted language.

93
lang/go/Makefile Normal file
View file

@ -0,0 +1,93 @@
# $NetBSD: Makefile,v 1.1 2013/07/07 08:10:14 wiz Exp $
DISTNAME= go1.1.1.src
PKGNAME= go-1.1.1
CATEGORIES= lang
MASTER_SITES= https://go.googlecode.com/files/
MAINTAINER= bsiegert@NetBSD.org
HOMEPAGE= http://golang.org/
COMMENT= The Go programming language
LICENSE= modified-bsd
WRKSRC= ${WRKDIR}/go
USE_TOOLS+= bash:run perl:run pax
# uses ulimit -T
BUILD_DEPENDS+= bash>=4.2nb3:../../shells/bash
# TODO: other arm platforms?
ONLY_FOR_PLATFORM= *-*-i386 *-*-x86_64 *-*-evbarm
.if ${MACHINE_ARCH} == "i386"
GOARCH= 386
.elif ${MACHINE_ARCH} == "x86_64"
GOARCH= amd64
.elif ${MACHINE_ARCH} == "evbarm"
GOARCH= arm
.endif
PLIST_SUBST+= GO_PLATFORM=${LOWER_OPSYS:Q}_${GOARCH:Q}
# cgo compiles under TMPDIR
TMPDIR?= /tmp
BUILDLINK_PASSTHRU_DIRS+= ${TMPDIR}
# bash script may use unportable bash constructs
CHECK_PORTABILITY_SKIP= lib/time/update.bash
GOROOT_FINAL= ${PREFIX}/go
INSTALLATION_DIRS= bin
REPLACE_BASH+= doc/articles/wiki/test.bash
REPLACE_BASH+= doc/progs/run
REPLACE_BASH+= doc/progs/update.bash
REPLACE_BASH+= misc/arm/a
REPLACE_BASH+= misc/dist/darwin/scripts/postinstall
REPLACE_BASH+= misc/dist/darwin/scripts/preinstall
REPLACE_BASH+= misc/vim/ftplugin/go/test.sh
REPLACE_BASH+= misc/xcode/4/go4xcode.sh
REPLACE_BASH+= src/all.bash
REPLACE_BASH+= src/clean.bash
REPLACE_BASH+= src/cmd/go/test.bash
REPLACE_BASH+= src/cmd/godoc/setup-godoc-app.bash
REPLACE_BASH+= src/make.bash
REPLACE_BASH+= src/pkg/syscall/mkall.sh
REPLACE_BASH+= src/pkg/syscall/mkerrors.sh
REPLACE_BASH+= src/pkg/syscall/mkerrors_windows.sh
REPLACE_BASH+= src/race.bash
REPLACE_BASH+= src/run.bash
REPLACE_BASH+= src/run.bash.orig
REPLACE_BASH+= src/sudo.bash
REPLACE_BASH+= test/bench/shootout/timing.sh
REPLACE_BASH+= test/run
REPLACE_PERL+= misc/pprof
REPLACE_PERL+= misc/xcode/4/go4xcode.sh
REPLACE_PERL+= src/pkg/net/http/cgi/testdata/test.cgi
REPLACE_PERL+= src/pkg/regexp/syntax/make_perl_groups.pl
REPLACE_PERL+= src/pkg/syscall/mksyscall.pl
REPLACE_PERL+= src/pkg/syscall/mksyscall_windows.pl
REPLACE_PERL+= src/pkg/syscall/mksysctl_openbsd.pl
REPLACE_PERL+= src/pkg/syscall/mksysnum_darwin.pl
REPLACE_PERL+= src/pkg/syscall/mksysnum_freebsd.pl
REPLACE_PERL+= src/pkg/syscall/mksysnum_linux.pl
REPLACE_PERL+= src/pkg/syscall/mksysnum_netbsd.pl
REPLACE_PERL+= src/pkg/syscall/mksysnum_openbsd.pl
REPLACE_PERL+= test/errchk
# uses /bin/rc (for Plan 9)
CHECK_INTERPRETER_SKIP+= go/src/all.rc
CHECK_INTERPRETER_SKIP+= go/src/clean.rc
CHECK_INTERPRETER_SKIP+= go/src/make.rc
CHECK_INTERPRETER_SKIP+= go/src/run.rc
do-build:
cd ${WRKSRC}/src && env GOROOT_FINAL=${GOROOT_FINAL:Q} ${BASH} ./all.bash
do-install:
cd ${WRKSRC} && rm -f .hgignore .hgtags
cd ${WRKDIR} && pax -rw go ${DESTDIR}${PREFIX}
.for cmd in go godoc gofmt
cd ${DESTDIR}${PREFIX}/bin && ln -sf ../go/bin/${cmd} ${cmd}
.endfor
.include "../../mk/bsd.pkg.mk"

3936
lang/go/PLIST Normal file

File diff suppressed because it is too large Load diff

7
lang/go/distinfo Normal file
View file

@ -0,0 +1,7 @@
$NetBSD: distinfo,v 1.1 2013/07/07 08:10:14 wiz Exp $
SHA1 (go1.1.1.src.tar.gz) = f365aed8183e487a48a66ace7bf36e5974dffbb3
RMD160 (go1.1.1.src.tar.gz) = ad1f043583b4eda92d10088ba4d51afb1688f77d
Size (go1.1.1.src.tar.gz) = 9045336 bytes
SHA1 (patch-src_pkg_os_signal_signal__test.go) = f2f24f8a1d5ed0417ab24223ad5828e4894df93c
SHA1 (patch-src_run.bash) = c69fee7d696deb8e60f012eec1695312a2f3c59c

View file

@ -0,0 +1,15 @@
$NetBSD: patch-src_pkg_os_signal_signal__test.go,v 1.1 2013/07/07 08:10:14 wiz Exp $
This test fails when Go is built in pkgsrc, but it succeeds on the command
line (at least on NetBSD/amd64).
--- src/pkg/os/signal/signal_test.go.orig 2013-05-02 12:07:05.000000000 +0000
+++ src/pkg/os/signal/signal_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin freebsd linux netbsd openbsd
+// +build ignore
package signal

View file

@ -0,0 +1,18 @@
$NetBSD: patch-src_run.bash,v 1.1 2013/07/07 08:10:14 wiz Exp $
See https://codereview.appspot.com/10078047
--- src/run.bash.orig 2013-06-13 03:08:11.000000000 +0000
+++ src/run.bash
@@ -20,6 +20,11 @@ ulimit -c 0
[ "$(ulimit -H -n)" == "unlimited" ] || ulimit -S -n $(ulimit -H -n)
[ "$(ulimit -H -d)" == "unlimited" ] || ulimit -S -d $(ulimit -H -d)
+# Thread count limit on NetBSD 7.
+if ulimit -T &> /dev/null; then
+ [ "$(ulimit -H -T)" == "unlimited" ] || ulimit -S -T $(ulimit -H -T)
+fi
+
# allow all.bash to avoid double-build of everything
rebuild=true
if [ "$1" = "--no-rebuild" ]; then