internal/rosa/perl: remove obsolete helper
All checks were successful
Test / Create distribution (push) Successful in 1m5s
Test / Sandbox (push) Successful in 2m56s
Test / Hakurei (push) Successful in 3m45s
Test / ShareFS (push) Successful in 3m48s
Test / Sandbox (race detector) (push) Successful in 5m26s
Test / Hakurei (race detector) (push) Successful in 6m33s
Test / Flake checks (push) Successful in 1m22s

This method predates the helper infrastructure.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-05-19 03:40:31 +09:00
parent 8092492018
commit 4389df60ae

View File

@@ -10,50 +10,38 @@ import (
// Perl is the perl interpreter used by [MakeMakerHelper].
var Perl = H("perl")
// newViaPerlModuleBuild installs a perl module via Build.PL.
func (t Toolchain) newViaPerlModuleBuild(
name, version string,
source pkg.Artifact,
patches []KV,
extra ...ArtifactH,
) pkg.Artifact {
if name == "" || version == "" {
panic("names must be non-empty")
}
return t.New("perl-"+name, 0, t.Append(nil,
slices.Concat(P{Perl}, extra)...,
), nil, nil, `
cd /usr/src/`+name+`
perl Build.PL --prefix=/system
./Build build
./Build test
./Build install --destdir=/work
`, pkg.Path(AbsUsrSrc.Append(name), true, t.NewPatchedSource(
"perl-"+name, version, source, false, patches...,
)))
}
func (t Toolchain) newPerlModuleBuild() (pkg.Artifact, string) {
func init() {
const (
version = "0.4234"
checksum = "ZKxEFG4hE1rqZt52zBL2LRZBMkYzhjb5-cTBXcsyA52EbPeeYyVxU176yAea8-Di"
)
return t.newViaPerlModuleBuild("Module-Build", version, newTar(
"https://cpan.metacpan.org/authors/id/L/LE/LEONT/"+
"Module-Build-"+version+".tar.gz",
checksum,
pkg.TarGzip,
), nil), version
}
func init() {
native.mustRegister(Toolchain.newPerlModuleBuild, &Metadata{
meta := Metadata{
Name: "perl-Module::Build",
Description: "build and install Perl modules",
Website: "https://metacpan.org/release/Module-Build",
Version: version,
Dependencies: P{
Perl,
},
}
native.MustRegister(meta.Name, func(t Toolchain) (*Metadata, pkg.Artifact) {
return &meta, t.New(meta.Name, 0, t.Append(nil,
Perl,
), nil, nil, `
cd /usr/src/Module-Build
perl Build.PL --prefix=/system
./Build build
./Build test
./Build install --destdir=/work
`, pkg.Path(AbsUsrSrc.Append("Module-Build"), true, t.NewPatchedSource(
meta.Name, version, newFromCPAN(
"LEONT",
"Module-Build",
version,
checksum,
), false,
)))
})
}