go: adopted, updated to version 1.6.2
This commit is contained in:
parent
472d58fb5c
commit
3b233947fd
4758
go/.footprint
4758
go/.footprint
File diff suppressed because it is too large
Load Diff
@ -1,2 +1,3 @@
|
||||
cdc1ff96c6c99b918402693a5cf0e1f3 go1.4.2.linux-amd64.tar.gz
|
||||
ab408290405125f0e8b179cc6bc6d637 golang.sh
|
||||
3fe2460e64c5703546a4c206dfe2e27b go-certpath.diff
|
||||
ebfb8b38330c8779b121c43433c4b9be go1.6.2.linux-amd64.tar.gz
|
||||
d1b50fa98d9a71eeee829051411e6207 go1.6.2.src.tar.gz
|
||||
|
72
go/Pkgfile
72
go/Pkgfile
@ -1,56 +1,38 @@
|
||||
# Description: The GO programming language
|
||||
# URL: http://golang.org/
|
||||
# Maintainer: James Mills, prologic at shortcircuit dot net dot au
|
||||
#
|
||||
# Depends on: git mercurial
|
||||
# Description: The Go Programming Language
|
||||
# URL: https://golang.org/
|
||||
# Maintainer: Matt Housh, jaeger at crux dot ninja
|
||||
|
||||
name=go
|
||||
version=1.4.2
|
||||
version=1.6.2
|
||||
release=1
|
||||
source=(
|
||||
https://storage.googleapis.com/golang/${name}${version}.linux-amd64.tar.gz
|
||||
golang.sh
|
||||
)
|
||||
source=(https://storage.googleapis.com/golang/${name}${version}.linux-amd64.tar.gz \
|
||||
https://storage.googleapis.com/golang/${name}${version}.src.tar.gz \
|
||||
$name-certpath.diff)
|
||||
|
||||
unpack_source() {
|
||||
install -d $SRC/go${version:0:3}
|
||||
bsdtar -xf $PKGMK_SOURCE_DIR/${name}${version}.linux-amd64.tar.gz \
|
||||
-C $SRC/go${version:0:3} --strip-components 1
|
||||
bsdtar -xf $PKGMK_SOURCE_DIR/${name}${version}.src.tar.gz \
|
||||
-C $SRC
|
||||
cp $name-certpath.diff $SRC
|
||||
}
|
||||
|
||||
build() {
|
||||
cd $SRC/$name/src
|
||||
|
||||
# build
|
||||
export GOROOT_BOOTSTRAP=${SRC}/go${version:0:3}
|
||||
export GOROOT_FINAL=/usr/lib/go
|
||||
export GOROOT=/tmp/go/
|
||||
export GOOS=linux
|
||||
export GOARCH=amd64
|
||||
|
||||
# compile all
|
||||
unset CC # The build fails with a customer C compiler (e.g: ccache)
|
||||
unset CXX # The build fails with a customer C++ compiler (e.g: ccache)
|
||||
./make.bash
|
||||
patch -p0 -i $SRC/$name-certpath.diff
|
||||
|
||||
# install
|
||||
install -d -m 755 $PKG/usr/lib
|
||||
install -d -m 755 $PKG/usr
|
||||
cd go/src
|
||||
bash make.bash --no-clean
|
||||
|
||||
# package
|
||||
mv $SRC/go $PKG/usr/lib/
|
||||
mv $PKG/usr/lib/go/bin $PKG/usr/
|
||||
install -D -m 644 $SRC/golang.sh $PKG/etc/profile.d/golang.sh
|
||||
|
||||
#
|
||||
# package godoc and vet (XXX: Temporary)
|
||||
#
|
||||
install -d $PKG/usr/lib
|
||||
cp -r $SRC/go $PKG/usr/lib/
|
||||
|
||||
export GOROOT=$PKG/usr/lib/go
|
||||
export GOPATH=/tmp/go
|
||||
|
||||
$PKG/usr/bin/go get -u golang.org/x/tools/cmd/godoc
|
||||
$PKG/usr/bin/go install golang.org/x/tools/cmd/godoc
|
||||
|
||||
$PKG/usr/bin/go get -u golang.org/x/tools/cmd/vet
|
||||
$PKG/usr/bin/go install golang.org/x/tools/cmd/godoc
|
||||
|
||||
# cleanup
|
||||
rm -rf $PKG/usr/lib/go/bin
|
||||
rm -rf $PKG/usr/lib/go/test
|
||||
find "$PKG/usr/lib/go/" -type f -name "*.o" -delete
|
||||
find "$PKG/usr/lib/go/" -type f -name "Makefile" -delete
|
||||
rm $PKG/usr/lib/go/{AUTHORS,README,LICENSE,CONTRIBUTORS,PATENTS,robots.txt}
|
||||
rm $PKG/usr/lib/go/src/{make.*,all.*,run.*,race.*,clean.*,Make.*,sudo.*}
|
||||
install -d $PKG/usr/bin
|
||||
ln -s /usr/lib/go/bin/go $PKG/usr/bin/
|
||||
ln -s /usr/lib/go/bin/gofmt $PKG/usr/bin/
|
||||
}
|
||||
|
16
go/README
16
go/README
@ -1,16 +0,0 @@
|
||||
Notes
|
||||
=====
|
||||
|
||||
You must have ``CONFIG_IP_MULTICAST`` enabled in your kernel
|
||||
for several of the go tests to pass and the buidl to
|
||||
succeed.
|
||||
|
||||
You probably want to ensure you have
|
||||
the following setup either temporarily
|
||||
in your ``$HOME/.bashrc`` or ``$HOME/.profile``
|
||||
or ``/etc/profile`` or similar.
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
export GOROOT=/usr/lib/go
|
||||
|
9
go/go-certpath.diff
Normal file
9
go/go-certpath.diff
Normal file
@ -0,0 +1,9 @@
|
||||
diff -urN go.orig/src/crypto/x509/root_linux.go go/src/crypto/x509/root_linux.go
|
||||
--- go.orig/src/crypto/x509/root_linux.go 2016-04-19 18:50:08.000000000 -0500
|
||||
+++ go/src/crypto/x509/root_linux.go 2016-05-17 17:23:51.449252229 -0500
|
||||
@@ -10,4 +10,5 @@
|
||||
"/etc/pki/tls/certs/ca-bundle.crt", // Fedora/RHEL
|
||||
"/etc/ssl/ca-bundle.pem", // OpenSUSE
|
||||
"/etc/pki/tls/cacert.pem", // OpenELEC
|
||||
+ "/etc/ssl/cert.pem",
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
export GOROOT=/usr/lib/go
|
Loading…
Reference in New Issue
Block a user