2022-08-05 16:43:01 +03:00
|
|
|
distributable:
|
2022-12-06 20:18:20 +03:00
|
|
|
url: https://go.dev/dl/go{{version.raw}}.src.tar.gz
|
2022-08-05 16:43:01 +03:00
|
|
|
strip-components: 1
|
|
|
|
|
|
|
|
versions:
|
|
|
|
github: golang/go/tags
|
|
|
|
strip: /^go/
|
|
|
|
|
|
|
|
provides:
|
|
|
|
- bin/go
|
2023-01-16 19:26:37 +03:00
|
|
|
- bin/gofmt
|
2022-08-05 16:43:01 +03:00
|
|
|
|
|
|
|
interprets:
|
2022-11-25 19:03:11 +03:00
|
|
|
extensions: go
|
|
|
|
args: [go, run]
|
2022-08-05 16:43:01 +03:00
|
|
|
|
2022-10-18 17:18:36 +03:00
|
|
|
dependencies:
|
2022-10-19 18:37:30 +03:00
|
|
|
openssl.org: 1 # for ca-certificates
|
2022-10-18 17:18:36 +03:00
|
|
|
|
2022-12-12 18:27:20 +03:00
|
|
|
companions:
|
|
|
|
tea.xyz/gx/cc: c99 # for `cgo`
|
|
|
|
|
2022-08-05 16:43:01 +03:00
|
|
|
build:
|
|
|
|
dependencies:
|
|
|
|
gnu.org/m4: 1
|
|
|
|
tea.xyz/gx/make: '*'
|
|
|
|
tea.xyz/gx/cc: c99
|
2022-09-25 16:06:11 +03:00
|
|
|
go.dev: '*'
|
|
|
|
working-directory: src
|
2022-08-05 16:43:01 +03:00
|
|
|
script: |-
|
2022-11-25 19:03:11 +03:00
|
|
|
# `make.bash` complains about unset GOCACHE and HOME otherwise
|
|
|
|
export GOCACHE="$(pwd)/.gocache"
|
|
|
|
|
2022-08-05 16:43:01 +03:00
|
|
|
./make.bash
|
|
|
|
|
|
|
|
# cleanup
|
2022-09-21 09:35:03 +03:00
|
|
|
cd ..
|
2022-08-05 16:43:01 +03:00
|
|
|
rm src/*.{bash,bat,rc}
|
|
|
|
rm src/Make.dist
|
2023-03-02 01:10:44 +03:00
|
|
|
if test -d "{{prefix}}"; then
|
|
|
|
find "{{prefix}}" -mindepth 1 -delete
|
|
|
|
else
|
|
|
|
mkdir "{{prefix}}"
|
|
|
|
fi
|
2022-09-21 09:35:03 +03:00
|
|
|
mv * "{{prefix}}"
|
|
|
|
find "{{prefix}}" -mindepth 1 -maxdepth 1 -type f -delete -not -name build.sh
|
2022-09-25 16:06:11 +03:00
|
|
|
env:
|
|
|
|
GOROOT_FINAL: ${{ prefix }}
|
|
|
|
GOROOT_BOOTSTRAP: ${{ deps.go.dev.prefix }}
|
|
|
|
|
|
|
|
bootstrap:
|
|
|
|
dependencies:
|
|
|
|
curl.se: '*'
|
|
|
|
env:
|
|
|
|
'*/aarch64': {GOARCH: arm64}
|
|
|
|
'*/x86-64': {GOARCH: amd64}
|
|
|
|
script: |
|
|
|
|
curl -L "$URL" | tar xzf - -C "{{ prefix }}" --strip-components=1
|
2022-08-05 16:43:01 +03:00
|
|
|
|
|
|
|
test:
|
|
|
|
script: |
|
|
|
|
mv $FIXTURE $FIXTURE.go
|
|
|
|
OUTPUT=$(go run $FIXTURE.go)
|
|
|
|
test "Hello World" = "$OUTPUT"
|
|
|
|
fixture: |
|
|
|
|
package main
|
|
|
|
import "fmt"
|
|
|
|
func main() {
|
2022-09-02 18:00:33 +03:00
|
|
|
fmt.Println("Hello World")
|
|
|
|
}
|