diff options
Diffstat (limited to 'development')
-rw-r--r-- | development/google-go-lang/google-go-lang.SlackBuild | 81 | ||||
-rw-r--r-- | development/google-go-lang/google-go-lang.info | 8 |
2 files changed, 77 insertions, 12 deletions
diff --git a/development/google-go-lang/google-go-lang.SlackBuild b/development/google-go-lang/google-go-lang.SlackBuild index 28e15bef54bc..1fd3bc550563 100644 --- a/development/google-go-lang/google-go-lang.SlackBuild +++ b/development/google-go-lang/google-go-lang.SlackBuild @@ -29,7 +29,8 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=google-go-lang -VERSION=${VERSION:-1.19.7} +VERSION=${VERSION:-1.20.5} +BOOTSTRAP_VERSION=${BOOTSTRAP_VERSION:-1.19.11} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -76,7 +77,65 @@ OUTPUT=${OUTPUT:-/tmp} set -e rm -rf $PKG -mkdir -p $TMP $PKG/usr/lib${LIBDIRSUFFIX}/go${VERSION} $OUTPUT +mkdir -p $TMP $PKG/usr/lib${LIBDIRSUFFIX}/go${BOOTSTRAP_VERSION} $OUTPUT +cd $PKG/usr/lib${LIBDIRSUFFIX}/go${BOOTSTRAP_VERSION} +tar xvf $CWD/go${BOOTSTRAP_VERSION}.src.tar.gz +cd go +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# 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 + +# Not sure why, but this causes run.bash to fail --rworkman +unset BASH_ENV + +# gcc 5+ is go1.4 API, so we'll bootstrap with it +export GOROOT_BOOTSTRAP="/usr" + +# Default GOROOT is the parent directory of all.bash, +# which is the current directory we're in. +# Defining it here means we can use it below when building +# shared libraries +GOROOT="$(pwd)" +export GOROOT + +# The value of GOROOT once the package is installed +export GOROOT_FINAL="/usr/lib${LIBDIRSUFFIX}/go${BOOTSTRAP_VERSION}/go" + +case "$ARCH" in + arm|i?86) export GOMAXPROCS=1 ;; +esac + +cd src + +if [[ "${RUN_TEST}" = "true" ]] ; then + LC_ALL=C \ + ./all.bash +else + LC_ALL=C \ + ./make.bash +fi + +# As of go1.5, golang supports shared libraries, so generate them for use. +$GOROOT/bin/go install -buildmode=shared std + +cd .. + +# remove Go build cache +rm -rf pkg/obj/go-build/* + +# remove the doc Makefile +rm -f doc/Makefile + +mkdir -p $PKG$GOROOT_FINAL + +mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/go${VERSION} $OUTPUT cd $PKG/usr/lib${LIBDIRSUFFIX}/go${VERSION} tar xvf $CWD/go${VERSION}.src.tar.gz cd go @@ -95,13 +154,14 @@ unset GOBIN GOPATH GOOS GOARCH unset BASH_ENV # gcc 5+ is go1.4 API, so we'll bootstrap with it -export GOROOT_BOOTSTRAP="/usr" +export GOROOT_BOOTSTRAP="$PKG/usr/lib${LIBDIRSUFFIX}/go${BOOTSTRAP_VERSION}/go" # Default GOROOT is the parent directory of all.bash, # which is the current directory we're in. # Defining it here means we can use it below when building # shared libraries -export GOROOT="$(pwd)" +GOROOT="$(pwd)" +export GOROOT # The value of GOROOT once the package is installed export GOROOT_FINAL="/usr/lib${LIBDIRSUFFIX}/go${VERSION}/go" @@ -112,12 +172,12 @@ esac cd src -if [ "x${RUN_TEST}" = "xtrue" ] ; then - LC_ALL=C \ - ./all.bash +if [[ "${RUN_TEST}" = "true" ]] ; then + LC_ALL=C \ + ./all.bash else - LC_ALL=C \ - ./make.bash + LC_ALL=C \ + ./make.bash fi # As of go1.5, golang supports shared libraries, so generate them for use. @@ -133,6 +193,9 @@ rm -f doc/Makefile mkdir -p $PKG$GOROOT_FINAL +# remove bootstrap +rm -rf $PKG/usr/lib$LIBDIRSUFFIX/go$BOOTSTRAP_VERSION + # Put the profile scripts for setting PATH and env variables mkdir -p $PKG/etc/profile.d cat > $PKG/etc/profile.d/go.csh << EOF diff --git a/development/google-go-lang/google-go-lang.info b/development/google-go-lang/google-go-lang.info index 4826a2c4ceaa..b83defa8f47c 100644 --- a/development/google-go-lang/google-go-lang.info +++ b/development/google-go-lang/google-go-lang.info @@ -1,8 +1,10 @@ PRGNAM="google-go-lang" -VERSION="1.19.7" +VERSION="1.20.5" HOMEPAGE="http://golang.org" -DOWNLOAD="https://storage.googleapis.com/golang/go1.19.7.src.tar.gz" -MD5SUM="f05481ea2e7fe5b6576ea79fa60b1dfe" +DOWNLOAD="https://storage.googleapis.com/golang/go1.20.5.src.tar.gz \ + https://storage.googleapis.com/golang/go1.19.11.src.tar.gz" +MD5SUM="336cae9b3afcfd3e60e41cae5401c4c2 \ + 271724863ec8842c76c3aa2b988650df" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" |