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) newMeson() (pkg.Artifact, string) {
func (t Toolchain) newMeson(s *S) (pkg.Artifact, string) {
const (
version = "1.11.1"
checksum = "uvILRxdopwc6Dy17UbIeClcQr0qHqyTaqyk1M9OqWKN9PwB9N6UVAiyN8kSSz3r2"
)
return t.NewPackage("meson", version, newFromGitHub(
return s.NewPackage(t, "meson", version, newFromGitHub(
"mesonbuild/meson",
version,
checksum,
@@ -52,7 +52,7 @@ python3 ./run_project_tests.py \
), version
}
func init() {
artifactsM[Meson] = Metadata{
native.MustRegister(&Artifact{
f: Toolchain.newMeson,
Name: "meson",
@@ -67,7 +67,7 @@ func init() {
},
ID: 6472,
}
})
}
// MesonHelper is the [Meson] build system helper.
@@ -106,7 +106,7 @@ func (*MesonHelper) createDir() bool { return false }
func (*MesonHelper) wantsDir() string { return `"$(mktemp -d)"` }
// script generates the cure script.
func (attr *MesonHelper) script(name string) string {
func (attr *MesonHelper) script(s *S, name string) string {
if attr == nil {
attr = new(MesonHelper)
}
@@ -117,7 +117,7 @@ func (attr *MesonHelper) script(name string) string {
}
var scriptTest string
if !attr.SkipTest && presetOpts&OptSkipCheck == 0 {
if !attr.SkipTest && s.opts&OptSkipCheck == 0 {
scriptTest = `
meson test \
--print-errorlogs`