diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-05-17 13:07:12 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-05-17 15:56:53 +0900 |
| commit | 30eb0d6a613ad268f6805ccbcdcabf158e7f526f (patch) | |
| tree | 07e55baa52748fd139e183017eeb43f5f64cee59 /internal/rosa/cmake.go | |
| parent | c2ff9c9fa55ea569a5e70ee90d2eb0b2ee2a0540 (diff) | |
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>
Diffstat (limited to 'internal/rosa/cmake.go')
| -rw-r--r-- | internal/rosa/cmake.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/rosa/cmake.go b/internal/rosa/cmake.go index b1499037..3fe610a0 100644 --- a/internal/rosa/cmake.go +++ b/internal/rosa/cmake.go @@ -8,12 +8,12 @@ import ( "hakurei.app/internal/pkg" ) -func (t Toolchain) newCMake() (pkg.Artifact, string) { +func (t Toolchain) newCMake(s *S) (pkg.Artifact, string) { const ( version = "4.3.2" checksum = "6QylwRVKletndTSkZTV2YBRwgd_9rUVgav_QW23HpjUgV21AVYZOUOal8tdBDmO7" ) - return t.NewPackage("cmake", version, newFromGitHubRelease( + return s.NewPackage(t, "cmake", version, newFromGitHubRelease( "Kitware/CMake", "v"+version, "cmake-"+version+".tar.gz", @@ -106,7 +106,7 @@ index 2ead810437..f85cbb8b1c 100644 ), version } func init() { - artifactsM[CMake] = Metadata{ + native.MustRegister(&Artifact{ f: Toolchain.newCMake, Name: "cmake", @@ -114,7 +114,7 @@ func init() { Website: "https://cmake.org/", ID: 306, - } + }) } // CMakeHelper is the [CMake] build system helper. @@ -164,7 +164,7 @@ func (*CMakeHelper) createDir() bool { return true } func (*CMakeHelper) wantsDir() string { return "/cure/" } // script generates the cure script. -func (attr *CMakeHelper) script(name string) string { +func (attr *CMakeHelper) script(s *S, name string) string { if attr == nil { attr = new(CMakeHelper) } @@ -180,7 +180,7 @@ func (attr *CMakeHelper) script(name string) string { } script := attr.Script - if !attr.SkipTest && presetOpts&OptSkipCheck == 0 { + if !attr.SkipTest && s.opts&OptSkipCheck == 0 { script += "\n" + test } |
