aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/perl.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-05-19 03:40:31 +0900
committerOphestra <cat@gensokyo.uk>2026-05-19 03:40:31 +0900
commit4389df60ae781cb12030d6dfc2e2cedc6c419eaf (patch)
treecc9580aed830339cd3cd078a20fc0afdea0566d4 /internal/rosa/perl.go
parent8092492018a520b997f688a617ccb0684cb82b4b (diff)
internal/rosa/perl: remove obsolete helper
This method predates the helper infrastructure. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/perl.go')
-rw-r--r--internal/rosa/perl.go54
1 files changed, 21 insertions, 33 deletions
diff --git a/internal/rosa/perl.go b/internal/rosa/perl.go
index 93dc0de1..f321b20d 100644
--- a/internal/rosa/perl.go
+++ b/internal/rosa/perl.go
@@ -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,
+ )))
})
}