diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-01-31 05:09:17 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-01-31 08:55:33 +0900 |
| commit | 8b4576bc5f6eaaf703886629f2dfa12ba38b574c (patch) | |
| tree | f347a2189841297be8c5bc96b02dfc610490b19d /internal/rosa/gnu.go | |
| parent | 29ebc52e26811b0a657bd1978b0c02284822462f (diff) | |
internal/rosa: migrate to make helper
This migrates artifacts that the helper cannot produce an identical instance of.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/gnu.go')
| -rw-r--r-- | internal/rosa/gnu.go | 44 |
1 files changed, 18 insertions, 26 deletions
diff --git a/internal/rosa/gnu.go b/internal/rosa/gnu.go index 6bb7004d..a3a42779 100644 --- a/internal/rosa/gnu.go +++ b/internal/rosa/gnu.go @@ -1,6 +1,11 @@ package rosa -import "hakurei.app/internal/pkg" +import ( + "runtime" + "strconv" + + "hakurei.app/internal/pkg" +) func (t Toolchain) newM4() pkg.Artifact { const ( @@ -43,30 +48,21 @@ func (t Toolchain) newAutoconf() pkg.Artifact { version = "2.72" checksum = "-c5blYkC-xLDer3TWEqJTyh1RLbOd1c5dnRLKsDnIrg_wWNOLBpaqMY8FvmUFJ33" ) - return t.New("autoconf-"+version, 0, []pkg.Artifact{ - t.Load(Make), - t.Load(M4), - t.Load(Perl), - t.Load(Bash), - t.Load(Gawk), - t.Load(Coreutils), - t.Load(Diffutils), - }, nil, nil, ` -cd "$(mktemp -d)" -/usr/src/autoconf/configure \ - --prefix=/system \ - --build="${ROSA_TRIPLE}" -make \ - "-j$(nproc)" \ - TESTSUITEFLAGS="-j$(nproc)" \ - check -make DESTDIR=/work install -`, pkg.Path(AbsUsrSrc.Append("autoconf"), false, pkg.NewHTTPGetTar( + return t.NewViaMake("autoconf", version, pkg.NewHTTPGetTar( nil, "https://ftp.gnu.org/gnu/autoconf/autoconf-"+version+".tar.gz", mustDecode(checksum), pkg.TarGzip, - ))) + ), &MakeAttr{ + Env: []string{ + "TESTSUITEFLAGS=" + strconv.Itoa(runtime.NumCPU()), + }, + }, + t.Load(M4), + t.Load(Perl), + t.Load(Bash), + t.Load(Diffutils), + ) } func init() { artifactsF[Autoconf] = Toolchain.newAutoconf } @@ -178,8 +174,6 @@ func (t Toolchain) newBash() pkg.Artifact { mustDecode(checksum), pkg.TarGzip, ), &MakeAttr{ - Writable: true, - Script: "ln -s bash /work/system/bin/sh\n", Configure: [][2]string{ {"without-bash-malloc"}, @@ -227,9 +221,7 @@ func (t Toolchain) newGperf() pkg.Artifact { nil, "https://ftp.gnu.org/pub/gnu/gperf/gperf-"+version+".tar.gz", mustDecode(checksum), pkg.TarGzip, - ), &MakeAttr{ - Writable: true, - }, + ), nil, t.Load(Diffutils), ) } |
