golang: add recipe for version 1.18.2

tests mostly working on nightly.
This commit is contained in:
Jérôme Duval
2025-11-25 22:25:51 +01:00
parent 344c8f2d62
commit 9bcf6119a4

View File

@@ -0,0 +1,62 @@
SUMMARY="Reference compiler for the Go programming language"
DESCRIPTION="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."
HOMEPAGE="https://github.com/korli/go/"
COPYRIGHT="2009-2022 The Go Authors"
LICENSE="BSD (3-clause)"
REVISION="1"
srcGitRev="e5771a8f369716e8fc101d540fe2cf5b6c1dc8b9"
SOURCE_URI="https://github.com/korli/go/archive/$srcGitRev.tar.gz"
SOURCE_DIR="go-$srcGitRev"
SOURCE_FILENAME="golang-1.18.2-$srcGitRev.tar.gz"
CHECKSUM_SHA256="acea6f7296e68179d89ce9fe3e84d4234acdd91a41fbf038d8423c7bcac536fb"
SOURCE_URI_2="https://github.com/korli/go/releases/download/go1.18.2-haiku1/go-1.18.2-haiku-amd64-bootstrap.tbz"
CHECKSUM_SHA256_2="cee202d243ae76905c5b8572bf422182619b2bedfe9c9a44f5f505248adf34cd"
SOURCE_DIR_2="go-haiku-amd64-bootstrap"
ARCHITECTURES="x86_64"
PROVIDES="
golang = $portVersion
cmd:go$secondaryArchSuffix = $portVersion
cmd:gofmt$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
"
BUILD()
{
export GOROOT_BOOTSTRAP=$sourceDir2
export GOROOT_FINAL=$developLibDir/go
export GOCACHE=/tmp
cd src && ./make.bash
}
INSTALL()
{
mkdir -p $binDir $developLibDir/go/
cp -a bin src pkg lib misc api test doc $developLibDir/go/
ln -sf $developLibDir/go/bin/go $binDir/
ln -sf $developLibDir/go/bin/gofmt $binDir/
install -Dm644 VERSION $developLibDir/go/
}
TEST()
{
cd src && ./run.bash --no-rebuild -v -v -v
}