forked from rosa/hakurei
internal/rosa/package: migrate perl interpreter
Packages will be migrated separtely. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -7,61 +7,6 @@ import (
|
||||
"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.
|
||||
func (t Toolchain) newViaPerlModuleBuild(
|
||||
name, version string,
|
||||
|
||||
Reference in New Issue
Block a user