Merge pull request #7797 from arthur-liberman/fix-go

go: add support for /usr/local host installations
This commit is contained in:
Rudi Heitbaum 2023-10-28 11:04:19 +11:00 committed by GitHub
commit b15bc650f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,14 +13,14 @@ PKG_LONGDESC="An programming language that makes it easy to build simple, reliab
PKG_TOOLCHAIN="manual"
configure_host() {
export GOOS=linux
export GOROOT_FINAL=${TOOLCHAIN}/lib/golang
if [ -x /usr/lib/go/bin/go ]; then
if [ -x /usr/local/go/bin/go ]; then
export GOROOT_BOOTSTRAP=/usr/local/go
elif [ -x /usr/lib/go/bin/go ]; then
export GOROOT_BOOTSTRAP=/usr/lib/go
else
export GOROOT_BOOTSTRAP=/usr/lib/golang
fi
export GOARCH=amd64
if [ ! -d ${GOROOT_BOOTSTRAP} ]; then
cat <<EOF