internal/rosa/package: migrate perl Module::Build
All checks were successful
Test / Create distribution (push) Successful in 1m4s
Test / Sandbox (push) Successful in 2m46s
Test / ShareFS (push) Successful in 3m40s
Test / Hakurei (push) Successful in 3m50s
Test / Sandbox (race detector) (push) Successful in 5m25s
Test / Hakurei (race detector) (push) Successful in 6m35s
Test / Flake checks (push) Successful in 1m19s

This is now possible via the generic helper.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-05-20 04:48:03 +09:00
parent 47f4e287fc
commit 1d3d621e2f
2 changed files with 31 additions and 35 deletions

View File

@@ -46,6 +46,37 @@ chmod +w /system/bin && rm -f /system/bin/ps # perl does not like toybox ps
}; };
} }
package perl-Module-Build {
description = "build and install Perl modules";
website = "https://metacpan.org/release/Module-Build";
anitya = 3077;
version* = "0.4234";
source = remoteCPAN {
author = "LEONT";
name = "Module-Build";
version = version;
checksum = "ZKxEFG4hE1rqZt52zBL2LRZBMkYzhjb5-cTBXcsyA52EbPeeYyVxU176yAea8-Di";
};
writable = true;
chmod = true;
exec = generic {
build = `
perl Build.PL --prefix=/system
./Build build`;
check = `
./Build test`;
install = `
./Build install --destdir=/work
`;
};
inputs = [ perl ];
runtime = [ perl ];
}
package perl-Locale-gettext { package perl-Locale-gettext {
description = "message handling functions"; description = "message handling functions";
website = "https://metacpan.org/release/Locale-gettext"; website = "https://metacpan.org/release/Locale-gettext";

View File

@@ -9,41 +9,6 @@ import (
// Perl is the perl interpreter used by [MakeMakerHelper]. // Perl is the perl interpreter used by [MakeMakerHelper].
var Perl = H("perl") var Perl = H("perl")
func init() {
const (
version = "0.4234"
checksum = "ZKxEFG4hE1rqZt52zBL2LRZBMkYzhjb5-cTBXcsyA52EbPeeYyVxU176yAea8-Di"
)
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,
)))
})
}
// MakeMakerHelper is the [Perl] MakeMaker helper. // MakeMakerHelper is the [Perl] MakeMaker helper.
type MakeMakerHelper struct { type MakeMakerHelper struct {
// Whether to skip the check target. // Whether to skip the check target.