diff options
Diffstat (limited to 'extra/go')
-rwxr-xr-x | extra/go/build | 16 | ||||
-rw-r--r-- | extra/go/checksums | 7 | ||||
-rw-r--r-- | extra/go/meta | 3 | ||||
-rw-r--r-- | extra/go/patches/no-bash.patch | 20 | ||||
-rw-r--r-- | extra/go/sources | 2 | ||||
-rw-r--r-- | extra/go/version | 2 |
6 files changed, 26 insertions, 24 deletions
diff --git a/extra/go/build b/extra/go/build index c051bc2d..db14aea2 100755 --- a/extra/go/build +++ b/extra/go/build @@ -7,13 +7,19 @@ patch -p1 < no-bash.patch # This breaks Go. :> nostrip +case $3 in + x86_64) export GOARCH=amd64 ;; + i?86) export GOARCH=386 ;; + *) printf 'unsupported architecture: %s\n' "$3" + exit 1 +esac + export CC="${CC:-cc}" -export GOARCH=amd64 export GO_LDFLAGS="-w -s" [ -f "$CPT_ROOT/var/db/cpt/installed/go/manifest" ] || { - export GOROOT=$PWD/go1.4-bootstrap - export GOROOT_FINAL=$PWD/lib/go-bootstrap + export GOROOT="$PWD/go1.4-bootstrap" + export GOROOT_FINAL="$PWD/lib/go-bootstrap" mkdir -p lib/go-bootstrap @@ -29,10 +35,10 @@ export GOROOT_FINAL=/usr/lib/go if [ -f "$CPT_ROOT/var/db/cpt/go/manifest" ]; then export GOROOT_BOOTSTRAP=/usr/lib/go else - export GOROOT_BOOTSTRAP=$PWD/lib/go-bootstrap + export GOROOT_BOOTSTRAP="$PWD/lib/go-bootstrap" fi -export GOROOT=$PWD/go-current +export GOROOT="$PWD/go-current" ( cd "$GOROOT/src" diff --git a/extra/go/checksums b/extra/go/checksums index c4ca311f..effbc333 100644 --- a/extra/go/checksums +++ b/extra/go/checksums @@ -1,3 +1,4 @@ -7bfa7e5908c7cc9e75da5ddf3066d7cbcf3fd9fa51945851325eebc17f50ba80 go1.16.5.src.tar.gz -f4ff5b5eb3a3cae1c993723f3eab519c5bae18866b5e5f96fe1102f0cb5c3e52 go1.4-bootstrap-20171003.tar.gz -07daf0ad276a320586ff13a16ddb071879bc2c88168b2191b7b97aa9591f4c2e no-bash.patch +%BLAKE3 +73c20a7e31308d081283c9cc02cfe49621f6faca0de6ff4b26cd8860d1572d92 go1.21.3.src.tar.gz +e38b036986f4969980664342af2e0b14c503bf4222b980f2bfdcb32fd62fde14 go1.4-bootstrap-20171003.tar.gz +66e10eadbc4e5ccc4db017cc58fb359eaa182ae74f2b5773463935b25343e537 no-bash.patch diff --git a/extra/go/meta b/extra/go/meta new file mode 100644 index 00000000..fd56b524 --- /dev/null +++ b/extra/go/meta @@ -0,0 +1,3 @@ +description: Go programming language +license: BSD-3-Clause +maintainer: Cem Keylan <cem@carbslinux.org> diff --git a/extra/go/patches/no-bash.patch b/extra/go/patches/no-bash.patch index 56177f16..a40844e7 100644 --- a/extra/go/patches/no-bash.patch +++ b/extra/go/patches/no-bash.patch @@ -1,6 +1,6 @@ diff -ur a/go-current/src/make.bash b/go-current/src/make.bash ---- a/go-current/src/make.bash 2021-02-16 21:12:04.000000000 +0300 -+++ b/go-current/src/make.bash 2021-02-17 00:42:09.963840381 +0300 +--- a/go-current/src/make.bash Tue Mar 15 15:08:16 2022 ++++ b/go-current/src/make.bash Wed Mar 23 13:56:11 2022 @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh @@ -16,26 +16,18 @@ diff -ur a/go-current/src/make.bash b/go-current/src/make.bash if ! cat $se_mount/booleans/allow_execstack | grep -c '^1 1$' >> /dev/null ; then echo "WARNING: the default SELinux policy on, at least, Fedora 12 breaks " echo "Go. You can enable the features that Go needs via the following " -@@ -154,14 +154,14 @@ +@@ -164,7 +164,7 @@ + export GOROOT_BOOTSTRAP - export GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:-$HOME/go1.4} export GOROOT="$(cd .. && pwd)" -IFS=$'\n'; for go_exe in $(type -ap go); do +for go_exe in $(command -v go); do if [ ! -x "$GOROOT_BOOTSTRAP/bin/go" ]; then goroot=$(GOROOT='' GOOS='' GOARCH='' "$go_exe" env GOROOT) if [ "$goroot" != "$GOROOT" ]; then - GOROOT_BOOTSTRAP=$goroot - fi - fi --done; unset IFS -+done - if [ ! -x "$GOROOT_BOOTSTRAP/bin/go" ]; then - echo "ERROR: Cannot find $GOROOT_BOOTSTRAP/bin/go." >&2 - echo "Set \$GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4." >&2 diff -ur a/go1.4-bootstrap/src/make.bash b/go1.4-bootstrap/src/make.bash ---- a/go1.4-bootstrap/src/make.bash 2017-11-22 04:33:58.000000000 +0300 -+++ b/go1.4-bootstrap/src/make.bash 2021-02-17 00:40:52.245631282 +0300 +--- a/go1.4-bootstrap/src/make.bash Wed Nov 22 02:33:58 2017 ++++ b/go1.4-bootstrap/src/make.bash Wed Mar 23 13:53:56 2022 @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh diff --git a/extra/go/sources b/extra/go/sources index 1c1c0021..deed1de5 100644 --- a/extra/go/sources +++ b/extra/go/sources @@ -1,3 +1,3 @@ -https://golang.org/dl/go1.16.5.src.tar.gz go-current +https://golang.org/dl/go1.21.3.src.tar.gz go-current https://dl.google.com/go/go1.4-bootstrap-20171003.tar.gz go1.4-bootstrap patches/no-bash.patch diff --git a/extra/go/version b/extra/go/version index 67bd00ae..1eaf51c8 100644 --- a/extra/go/version +++ b/extra/go/version @@ -1 +1 @@ -1.16.5 1 +1.21.3 1 |