internal/rosa: remove unused helpers
Test / Create distribution (push) Successful in 1m34s
Test / Sandbox (push) Successful in 2m45s
Test / ShareFS (push) Successful in 3m42s
Test / Hakurei (push) Successful in 3m54s
Test / Flake checks (push) Has been cancelled
Test / Sandbox (race detector) (push) Has been cancelled
Test / Hakurei (race detector) (push) Has been cancelled

These are no longer needed after migration.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-05-23 13:55:17 +09:00
parent 410c4f8bb0
commit b29031ca06
6 changed files with 7 additions and 57 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ func (a busyboxBin) Params(*pkg.IContext) {}
// IsExclusive returns false: Cure performs a trivial filesystem write. // IsExclusive returns false: Cure performs a trivial filesystem write.
func (busyboxBin) IsExclusive() bool { return false } func (busyboxBin) IsExclusive() bool { return false }
// Dependencies returns the underlying busybox [pkg.File]. // Dependencies returns the underlying busybox [pkg.FileArtifact].
func (a busyboxBin) Dependencies() []pkg.Artifact { func (a busyboxBin) Dependencies() []pkg.Artifact {
return []pkg.Artifact{a.bin} return []pkg.Artifact{a.bin}
} }
+2 -2
View File
@@ -11,7 +11,7 @@ var (
_ninja = H("ninja") _ninja = H("ninja")
) )
// CMakeHelper is the [CMake] build system helper. // CMakeHelper builds and tests a CMake project with specified CACHE entries.
type CMakeHelper struct { type CMakeHelper struct {
// Path elements joined with source. // Path elements joined with source.
Append []string Append []string
@@ -34,7 +34,7 @@ type CMakeHelper struct {
var _ Helper = new(CMakeHelper) var _ Helper = new(CMakeHelper)
// extra returns a hardcoded slice of [CMake] and [Ninja]. // extra returns the cmake handle alongside either ninja or make.
func (attr *CMakeHelper) extra(int) P { func (attr *CMakeHelper) extra(int) P {
if attr != nil && attr.Make { if attr != nil && attr.Make {
return P{_cmake, _make} return P{_cmake, _make}
+1 -1
View File
@@ -7,7 +7,7 @@ import (
var _make = H("make") var _make = H("make")
// MakeHelper is the [Make] build system helper. // MakeHelper wraps the make program and its surrounding build system.
type MakeHelper struct { type MakeHelper struct {
// Do not include default extras. // Do not include default extras.
OmitDefaults bool OmitDefaults bool
+1 -1
View File
@@ -7,7 +7,7 @@ import (
var _meson = H("meson") var _meson = H("meson")
// MesonHelper is the [Meson] build system helper. // MesonHelper builds and tests a meson project.
type MesonHelper struct { type MesonHelper struct {
// Runs after setup. // Runs after setup.
ScriptCompileEarly string ScriptCompileEarly string
+1 -21
View File
@@ -1,14 +1,8 @@
package rosa package rosa
import (
"slices"
"hakurei.app/internal/pkg"
)
var _perl = H("perl") var _perl = H("perl")
// MakeMakerHelper is the [Perl] MakeMaker helper. // MakeMakerHelper builds projects using the included MakeMaker script.
type MakeMakerHelper struct { type MakeMakerHelper struct {
// Whether to skip the check target. // Whether to skip the check target.
SkipCheck bool SkipCheck bool
@@ -49,17 +43,3 @@ make \
script += "make DESTDIR=/work install\n" script += "make DESTDIR=/work install\n"
return script return script
} }
// newViaPerlMakeMaker installs a perl module via Makefile.PL.
func (t Toolchain) newViaPerlMakeMaker(
name, version string,
source pkg.Artifact,
patches []KV,
extra ...ArtifactH,
) pkg.Artifact {
return t.NewPackage("perl-"+name, version, source, &PackageAttr{
Patches: patches,
}, (*MakeMakerHelper)(nil), slices.Concat(extra, P{
_perl,
})...)
}
+1 -31
View File
@@ -1,17 +1,11 @@
package rosa package rosa
import (
"slices"
"hakurei.app/internal/pkg"
)
var ( var (
_python = H("python") _python = H("python")
_pythonPyTest = H("python-pytest") _pythonPyTest = H("python-pytest")
) )
// PipHelper is the [Python] pip packaging helper. // PipHelper installs python packages from source using pip.
type PipHelper struct { type PipHelper struct {
// Path elements joined with source. // Path elements joined with source.
Append []string Append []string
@@ -94,27 +88,3 @@ pip3 install \
'` + sourcePath.String() + `' '` + sourcePath.String() + `'
` + script ` + script
} }
// newPythonPackage registers a new [Python] package.
func (s *S) newPythonPackage(
name string, id int, description, website, version string,
source pkg.Artifact, attrP *PackageAttr, attr *PipHelper,
build P, extra ...ArtifactH,
) {
name = "python-" + name
s.MustRegister(name, func(t Toolchain) (*Metadata, pkg.Artifact) {
return &Metadata{
Name: name,
Description: description,
Website: website,
Version: version,
Dependencies: slices.Concat(P{_python}, extra),
ID: id,
}, t.NewPackage(name, version, source, attrP, attr, slices.Concat(
extra,
build,
)...)
})
}