aboutsummaryrefslogtreecommitdiff
path: root/development
diff options
context:
space:
mode:
authorVincent Batts <vbatts@hashbangbash.com>2016-02-29 17:18:42 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-03-22 22:52:29 +0700
commit4f1f5818531ed86611314371be91232819247009 (patch)
treeda72502b2d6451a3d198b61681e294d2d3e0bb58 /development
parent91f8f041698448bc3f886b741c1aa050843beb40 (diff)
development/google-go-lang: updated for version 1.6.
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development')
-rw-r--r--development/google-go-lang/README4
-rw-r--r--development/google-go-lang/google-go-lang.SlackBuild58
-rw-r--r--development/google-go-lang/google-go-lang.info6
3 files changed, 31 insertions, 37 deletions
diff --git a/development/google-go-lang/README b/development/google-go-lang/README
index 2675ac516685a..955f284b3f263 100644
--- a/development/google-go-lang/README
+++ b/development/google-go-lang/README
@@ -45,6 +45,10 @@ privilege to clone source.
As of go1.2, the 'go doc ...' command has been relocated to the go.tools
library (golang-googlecode-gotools), which provide `godoc`.
+As of go1.5, shared libraries are now supported. The flags to use linking are
+available for `go get`, `go install` and `go build`.
+To learn more see `go help buildmode`.
+
To elect to run the buildtime tests of this package, provide the environment
variable RUN_TEST=true at build time.
diff --git a/development/google-go-lang/google-go-lang.SlackBuild b/development/google-go-lang/google-go-lang.SlackBuild
index 1694323508072..264adf6f6830a 100644
--- a/development/google-go-lang/google-go-lang.SlackBuild
+++ b/development/google-go-lang/google-go-lang.SlackBuild
@@ -5,7 +5,7 @@
# Written by Eric Schultz eric at schultzter.ca
# Taken over by Vincent Batts vbatts@hashbangbash.com
-# Copyright (c) 2012, 2013, 2014, 2015 Vincent Batts
+# Copyright (c) 2012, 2013, 2014, 2015, 2016 Vincent Batts
# Copyright (c) 2012 Eric Schultz
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
@@ -27,7 +27,7 @@
# SOFTWARE.
PRGNAM=google-go-lang
-VERSION=${VERSION:-1.4.3}
+VERSION=${VERSION:-1.6}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -45,17 +45,17 @@ fi
if [ "$ARCH" = "i486" ]; then
LIBDIRSUFFIX=""
- GARCH="386"
+ GOARCH="386"
elif [ "$ARCH" = "x86_64" ]; then
LIBDIRSUFFIX="64"
- GARCH="amd64"
+ GOARCH="amd64"
elif [ "$ARCH" = "arm" ]; then
LIBDIRSUFFIX=""
- GARCH="arm"
+ GOARCH="arm"
export GOARM="6" # can be '5' as well, to use soft float instead of hardware
else
LIBDIRSUFFIX=""
- GARCH=386
+ GOARCH=386
fi
CWD=$(pwd)
@@ -66,9 +66,9 @@ OUTPUT=${OUTPUT:-/tmp}
set -e
rm -rf $PKG
-mkdir -p $TMP $PKG/usr/lib${LIBDIRSUFFIX} $OUTPUT
-cd $PKG/usr/lib${LIBDIRSUFFIX}
-tar xvf $CWD/go$VERSION.src.tar.gz
+mkdir -p $TMP $PKG/usr/lib${LIBDIRSUFFIX}/go${VERSION} $OUTPUT
+cd $PKG/usr/lib${LIBDIRSUFFIX}/go${VERSION}
+tar xvf $CWD/go${VERSION}.src.tar.gz
cd go
chown -R root:root .
find -L . \
@@ -77,16 +77,15 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-export GOSRC="$(pwd)"
-export GOROOT="$(pwd)"
-export GOROOT_FINAL="/usr/lib${LIBDIRSUFFIX}/go"
-export GOOS="linux"
-export GOBIN="${PKG}/usr/bin"
-export GOARCH="${GARCH}"
-
+# as of >= go1.5, the cross-compiler does not need to be bootstrap, so the
+# compiler need only be compiled for the host OS, which it detects
+unset GOBIN GOPATH GOOS GOARCH
unset BASH_ENV # Not sure why, but this causes run.bash to fail --rworkman
-mkdir -p "${GOBIN}"
+export GOROOT_BOOTSTRAP="/usr" # gcc 5+ is go1.4 API, so we'll bootstrap with it
+export GOROOT="$(pwd)"
+export GOROOT_FINAL="/usr/lib${LIBDIRSUFFIX}/go${VERSION}/go"
+
cd src
if [ "x${RUN_TEST}" = "xtrue" ] ; then
@@ -97,31 +96,22 @@ else
./make.bash
fi
-cd ..
-
-ln -sf /usr/lib${LIBDIRSUFFIX}/go/pkg/tool/linux_${GOARCH}/cgo $PKG/usr/bin/cgo
-ln -sf /usr/lib${LIBDIRSUFFIX}/go/pkg/tool/linux_${GOARCH}/ebnflint $PKG/usr/bin/ebnflint
+# As of go1.5, golang supports shared libraries, so generate them for use.
+$GOROOT/bin/go install -buildmode=shared std
-# we'll just check for all of their compilers :-)
-for tool in 8a 8c 8g 8l 6a 6c 6g 6l 5a 5c 5g 5l ; do
- if [ -x $PKG/usr/lib${LIBDIRSUFFIX}/go/pkg/tool/linux_${GOARCH}/${tool} ] ; then
- ln -sf /usr/lib${LIBDIRSUFFIX}/go/pkg/tool/linux_${GOARCH}/${tool} $PKG/usr/bin/${tool}
- fi
-done
+cd ..
# Put the profile scripts for setting PATH and env variables
mkdir -p $PKG/etc/profile.d
cat > $PKG/etc/profile.d/go.csh.new << EOF
#!/bin/csh
-setenv GOOS linux
-setenv GOARCH ${GOARCH}
-setenv GOROOT /usr/lib${LIBDIRSUFFIX}/go
+setenv GOROOT ${GOROOT_FINAL}
+export PATH="\${GOROOT}/bin:\${PATH}"
EOF
cat > $PKG/etc/profile.d/go.sh.new << EOF
#!/bin/sh
-export GOOS="linux"
-export GOARCH="${GOARCH}"
-export GOROOT="/usr/lib${LIBDIRSUFFIX}/go"
+export GOROOT="${GOROOT_FINAL}"
+export PATH="\${GOROOT}/bin:\${PATH}"
EOF
chmod 0755 $PKG/etc/profile.d/go.csh.new
@@ -129,7 +119,7 @@ chmod 0755 $PKG/etc/profile.d/go.sh.new
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- AUTHORS CONTRIBUTORS LICENSE PATENTS README VERSION \
+ AUTHORS CONTRIBUTING.md CONTRIBUTORS LICENSE PATENTS README.md VERSION \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
diff --git a/development/google-go-lang/google-go-lang.info b/development/google-go-lang/google-go-lang.info
index 33c77472af74f..6f608b676f229 100644
--- a/development/google-go-lang/google-go-lang.info
+++ b/development/google-go-lang/google-go-lang.info
@@ -1,8 +1,8 @@
PRGNAM="google-go-lang"
-VERSION="1.4.3"
+VERSION="1.6"
HOMEPAGE="http://golang.org"
-DOWNLOAD="https://storage.googleapis.com/golang/go1.4.3.src.tar.gz"
-MD5SUM="dfb604511115dd402a77a553a5923a04"
+DOWNLOAD="https://storage.googleapis.com/golang/go1.6.src.tar.gz"
+MD5SUM="e67833ea37fbc002fbe38efe6c1bcd98"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""