diff options
Diffstat (limited to 'development/google-go-lang')
-rw-r--r-- | development/google-go-lang/README | 77 | ||||
-rw-r--r-- | development/google-go-lang/google-go-lang.SlackBuild | 30 | ||||
-rw-r--r-- | development/google-go-lang/google-go-lang.info | 6 |
3 files changed, 70 insertions, 43 deletions
diff --git a/development/google-go-lang/README b/development/google-go-lang/README index cc9bd19d5b..0663187522 100644 --- a/development/google-go-lang/README +++ b/development/google-go-lang/README @@ -1,55 +1,58 @@ -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. +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. The tools are added to the path by putting go.sh and go.csh files in -/etc/profile.d and letting the system's /etc/profile or /etc/csh.login pick it -up. If you want to add any of Go's environment variables you can add them -there. +/etc/profile.d and letting the system's /etc/profile or /etc/csh.login +pick it up. If you want to add any of Go's environment variables you +can add them there. -Also, to easily setup a user-independent path for Go libraries to be installed -to and used, is the GOPATH environment variable. This variable can be colon -delimited. For example, once installing the built google-go-lang package, then -set in your user's ~/.bashrc something like: +Also, to easily setup a user-independent path for Go libraries to +be installed to and used, is the GOPATH environment variable. This +variable can be colon delimited. For example, once installing the +built google-go-lang package, then set in your user's ~/.bashrc +something like: export GOPATH="$HOME" -Then, you'll be able to use the `go` command to install an additional library -that will not need root permission and will be in the compiler's path. -Like so: +Then, you'll be able to use the `go` command to install an additional +library that will not need root permission and will be in the +compiler's path. Like so: go get golang.org/x/tools/cmd/godoc -Now in ~/src you'll have this source code checked-out, and a binary built at -~/bin/godoc +Now in ~/src you'll have this source code checked-out, and a binary +built at ~/bin/godoc -Since the golang idiom is very `go get'able as a limited user, installed -libraries from slackbuilds.org are located outside of GOROOT (which is only for -golang standard library), in /usr/share/gocode -By not setting a system-wide GOPATH defaulting to this location, then it is up -to the user of whether to include this system path as well, like: +Since the golang idiom is very `go get'able as a limited user, +installed libraries from slackbuilds.org are located outside of GOROOT +(which is only for golang standard library), in /usr/share/gocode By +not setting a system-wide GOPATH defaulting to this location, then +it is up to the user of whether to include this system path as well, +like: export GOPATH="$HOME:/usr/share/gocode" -This system source directory is primarly only for buildtime of slackbuilds. +This system source directory is primarly only for buildtime of +slackbuilds. -This is because `go get' iterates through the paths provided, looking for -matching imports. If a match is not found, then is cloned to the first path -provided. You would not want this to be a system path, as to need root -privilege to clone source. +This is because `go get' iterates through the paths provided, looking +for matching imports. If a match is not found, then is cloned to the +first path provided. You would not want this to be a system path, as +to need root 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.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`. +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. +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 45e3dfa362..1afff977d9 100644 --- a/development/google-go-lang/google-go-lang.SlackBuild +++ b/development/google-go-lang/google-go-lang.SlackBuild @@ -27,7 +27,7 @@ # SOFTWARE. PRGNAM=google-go-lang -VERSION=${VERSION:-1.11.9} +VERSION=${VERSION:-1.16.3} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -80,12 +80,28 @@ find -L . \ # 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 -export GOROOT_BOOTSTRAP="/usr" # gcc 5+ is go1.4 API, so we'll bootstrap with it +# 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 export GOROOT="$(pwd)" + +# The value of GOROOT once the package is installed export GOROOT_FINAL="/usr/lib${LIBDIRSUFFIX}/go${VERSION}/go" +if [ "$ARCH" = "i586" ]; then + export GO386="softfloat" +elif [ "$ARCH" = "i686" ]; then + export GO386="softfloat" +fi + cd src if [ "x${RUN_TEST}" = "xtrue" ] ; then @@ -101,6 +117,14 @@ $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 + # 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 d591c827a9..a4943b4624 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.11.9" +VERSION="1.16.3" HOMEPAGE="http://golang.org" -DOWNLOAD="https://storage.googleapis.com/golang/go1.11.9.src.tar.gz" -MD5SUM="bdefb722788dd2881713f7ad8a4c614d" +DOWNLOAD="https://storage.googleapis.com/golang/go1.16.3.src.tar.gz" +MD5SUM="48183a40d6522f1ea59b7d63377b7072" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" |