internal/rosa: key metadata by string

For upcoming azalea integration. The API is quite ugly right now to ease migration.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-05-17 13:07:12 +09:00
parent c2ff9c9fa5
commit 30eb0d6a61
95 changed files with 1514 additions and 1567 deletions

View File

@@ -7,12 +7,12 @@ import (
"hakurei.app/internal/pkg"
)
func (t Toolchain) newMake() (pkg.Artifact, string) {
func (t Toolchain) newMake(s *S) (pkg.Artifact, string) {
const (
version = "4.4.1"
checksum = "YS_B07ZcAy9PbaK5_vKGj64SrxO2VMpnMKfc9I0Q9IC1rn0RwOH7802pJoj2Mq4a"
)
return t.New("make-"+version, TEarly, nil, nil, nil, `
return s.New(t, "make-"+version, TEarly, nil, nil, nil, `
cd "$(mktemp -d)"
/usr/src/make/configure \
--prefix=/system \
@@ -27,7 +27,7 @@ cd "$(mktemp -d)"
))), version
}
func init() {
artifactsM[Make] = Metadata{
native.MustRegister(&Artifact{
f: Toolchain.newMake,
Name: "make",
@@ -35,7 +35,7 @@ func init() {
Website: "https://www.gnu.org/software/make/",
ID: 1877,
}
})
}
// MakeHelper is the [Make] build system helper.
@@ -123,7 +123,7 @@ func (attr *MakeHelper) wantsDir() string {
}
// script generates the cure script.
func (attr *MakeHelper) script(name string) string {
func (attr *MakeHelper) script(s *S, name string) string {
if attr == nil {
attr = new(MakeHelper)
}
@@ -194,7 +194,7 @@ make \
}
scriptMake += "\n"
if !attr.SkipCheck && presetOpts&OptSkipCheck == 0 {
if !attr.SkipCheck && s.opts&OptSkipCheck == 0 {
scriptMake += attr.ScriptCheckEarly + `make \
` + jobsFlagE + ` \
`