internal/rosa/package: migrate perl interpreter
All checks were successful
Test / Create distribution (push) Successful in 1m4s
Test / Sandbox (push) Successful in 2m52s
Test / ShareFS (push) Successful in 3m46s
Test / Hakurei (push) Successful in 3m51s
Test / Sandbox (race detector) (push) Successful in 5m23s
Test / Hakurei (race detector) (push) Successful in 6m29s
Test / Flake checks (push) Successful in 1m23s
All checks were successful
Test / Create distribution (push) Successful in 1m4s
Test / Sandbox (push) Successful in 2m52s
Test / ShareFS (push) Successful in 3m46s
Test / Hakurei (push) Successful in 3m51s
Test / Sandbox (race detector) (push) Successful in 5m23s
Test / Hakurei (race detector) (push) Successful in 6m29s
Test / Flake checks (push) Successful in 1m23s
Packages will be migrated separtely. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
47
internal/rosa/package/perl.az
Normal file
47
internal/rosa/package/perl.az
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
package perl {
|
||||||
|
description = "The Perl Programming language";
|
||||||
|
website = "https://www.perl.org";
|
||||||
|
anitya = 13599;
|
||||||
|
// odd-even versioning
|
||||||
|
anityaFallback = true;
|
||||||
|
|
||||||
|
version* = "5.42.2";
|
||||||
|
source = remoteTar {
|
||||||
|
url = "https://www.cpan.org/src/5.0/perl-"+version+".tar.gz";
|
||||||
|
checksum = "Me_xFfgkRnVyG0sE6a74TktK2OUq9Z1LVJNEu_9RdZG3S2fbjfzNiuk2SJqHAgbm";
|
||||||
|
compress = gzip;
|
||||||
|
};
|
||||||
|
|
||||||
|
// uses source tree as scratch space
|
||||||
|
writable = true;
|
||||||
|
chmod = true;
|
||||||
|
early = `
|
||||||
|
echo 'print STDOUT "1..0 # Skip broken test\n";' > ext/Pod-Html/t/htmldir3.t
|
||||||
|
chmod +w /system/bin && rm -f /system/bin/ps # perl does not like toybox ps
|
||||||
|
`;
|
||||||
|
|
||||||
|
toyboxEarly = true;
|
||||||
|
exec = make {
|
||||||
|
omitDefaults = true;
|
||||||
|
inPlace = true;
|
||||||
|
|
||||||
|
configureName = "./Configure";
|
||||||
|
configure = {
|
||||||
|
"-des";
|
||||||
|
"Dprefix": "/system";
|
||||||
|
"Dcc": "clang";
|
||||||
|
"Dcflags": "--std=gnu99";
|
||||||
|
"Dldflags": `"${LDFLAGS:-''}"`;
|
||||||
|
"Doptimize": "'-O2 -fno-strict-aliasing'";
|
||||||
|
"Duseithreads";
|
||||||
|
"Duseshrplib";
|
||||||
|
};
|
||||||
|
|
||||||
|
check = [
|
||||||
|
"TEST_JOBS=" + jobsLE,
|
||||||
|
"test_harness",
|
||||||
|
];
|
||||||
|
|
||||||
|
install = `LD_LIBRARY_PATH="$PWD" ./perl -Ilib -I. installperl --destdir=/work`;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -7,61 +7,6 @@ import (
|
|||||||
"hakurei.app/internal/pkg"
|
"hakurei.app/internal/pkg"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (t Toolchain) newPerl() (pkg.Artifact, string) {
|
|
||||||
const (
|
|
||||||
version = "5.42.2"
|
|
||||||
checksum = "Me_xFfgkRnVyG0sE6a74TktK2OUq9Z1LVJNEu_9RdZG3S2fbjfzNiuk2SJqHAgbm"
|
|
||||||
)
|
|
||||||
return t.NewPackage("perl", version, newTar(
|
|
||||||
"https://www.cpan.org/src/5.0/perl-"+version+".tar.gz",
|
|
||||||
checksum,
|
|
||||||
pkg.TarGzip,
|
|
||||||
), &PackageAttr{
|
|
||||||
// uses source tree as scratch space
|
|
||||||
Writable: true,
|
|
||||||
Chmod: true,
|
|
||||||
|
|
||||||
ScriptEarly: `
|
|
||||||
echo 'print STDOUT "1..0 # Skip broken test\n";' > ext/Pod-Html/t/htmldir3.t
|
|
||||||
chmod +w /system/bin && rm -f /system/bin/ps # perl does not like toybox ps
|
|
||||||
`,
|
|
||||||
|
|
||||||
Flag: TEarly,
|
|
||||||
}, &MakeHelper{
|
|
||||||
OmitDefaults: true,
|
|
||||||
InPlace: true,
|
|
||||||
|
|
||||||
ConfigureName: "./Configure",
|
|
||||||
Configure: []KV{
|
|
||||||
{"-des"},
|
|
||||||
{"Dprefix", "/system"},
|
|
||||||
{"Dcc", "clang"},
|
|
||||||
{"Dcflags", "--std=gnu99"},
|
|
||||||
{"Dldflags", `"${LDFLAGS:-''}"`},
|
|
||||||
{"Doptimize", "'-O2 -fno-strict-aliasing'"},
|
|
||||||
{"Duseithreads"},
|
|
||||||
{"Duseshrplib"},
|
|
||||||
},
|
|
||||||
Check: []string{
|
|
||||||
"TEST_JOBS=" + jobsLE,
|
|
||||||
"test_harness",
|
|
||||||
},
|
|
||||||
Install: `LD_LIBRARY_PATH="$PWD" ./perl -Ilib -I. installperl --destdir=/work`,
|
|
||||||
}), version
|
|
||||||
}
|
|
||||||
func init() {
|
|
||||||
native.mustRegister(Toolchain.newPerl, &Metadata{
|
|
||||||
Name: "perl",
|
|
||||||
Description: "The Perl Programming language",
|
|
||||||
Website: "https://www.perl.org/",
|
|
||||||
|
|
||||||
ID: 13599,
|
|
||||||
|
|
||||||
// odd-even versioning
|
|
||||||
latest: (*Versions).getStable,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// newViaPerlModuleBuild installs a perl module via Build.PL.
|
// newViaPerlModuleBuild installs a perl module via Build.PL.
|
||||||
func (t Toolchain) newViaPerlModuleBuild(
|
func (t Toolchain) newViaPerlModuleBuild(
|
||||||
name, version string,
|
name, version string,
|
||||||
|
|||||||
@@ -678,6 +678,8 @@ func (ctx *evalContext) pf(
|
|||||||
helper Helper
|
helper Helper
|
||||||
|
|
||||||
inputs, runtimes azalea.Array
|
inputs, runtimes azalea.Array
|
||||||
|
|
||||||
|
anityaFallback bool
|
||||||
)
|
)
|
||||||
if err = args.Apply(map[unique.Handle[azalea.Ident]]any{
|
if err = args.Apply(map[unique.Handle[azalea.Ident]]any{
|
||||||
k("description"): &meta.Description,
|
k("description"): &meta.Description,
|
||||||
@@ -698,6 +700,8 @@ func (ctx *evalContext) pf(
|
|||||||
k("exec"): &helper,
|
k("exec"): &helper,
|
||||||
k("inputs"): &inputs,
|
k("inputs"): &inputs,
|
||||||
k("runtime"): &runtimes,
|
k("runtime"): &runtimes,
|
||||||
|
|
||||||
|
k("anityaFallback"): &anityaFallback,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -727,6 +731,9 @@ func (ctx *evalContext) pf(
|
|||||||
}
|
}
|
||||||
|
|
||||||
meta.ID = int(anitya)
|
meta.ID = int(anitya)
|
||||||
|
if anityaFallback {
|
||||||
|
meta.latest = (*Versions).getStable
|
||||||
|
}
|
||||||
var source pkg.Artifact
|
var source pkg.Artifact
|
||||||
switch p := sourceA.(type) {
|
switch p := sourceA.(type) {
|
||||||
case pkg.Artifact:
|
case pkg.Artifact:
|
||||||
|
|||||||
Reference in New Issue
Block a user