internal/rosa/package: migrate perl packages
All checks were successful
Test / Create distribution (push) Successful in 1m7s
Test / Sandbox (push) Successful in 2m50s
Test / ShareFS (push) Successful in 3m45s
Test / Hakurei (push) Successful in 3m50s
Test / Sandbox (race detector) (push) Successful in 5m26s
Test / Hakurei (race detector) (push) Successful in 6m35s
Test / Flake checks (push) Successful in 1m24s

Most of these are currently unused.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-05-19 04:08:22 +09:00
parent 4389df60ae
commit 23515f67c8
4 changed files with 233 additions and 260 deletions

View File

@@ -45,3 +45,186 @@ chmod +w /system/bin && rm -f /system/bin/ps # perl does not like toybox ps
install = `LD_LIBRARY_PATH="$PWD" ./perl -Ilib -I. installperl --destdir=/work`;
};
}
package perl-Locale-gettext {
description = "message handling functions";
website = "https://metacpan.org/release/Locale-gettext";
anitya = 7523;
version* = "1.07";
source = remoteCPAN {
author = "PVANDRY";
name = "Locale-gettext";
version = version;
checksum = "cFq4BKFD1MWSoa7lsrPjpdo9kzPqd0jlRcBFUyL1L1isw8m3D_Sge_ff0MAu_9J3";
};
exec = makeMaker {};
runtime = [ perl ];
}
package perl-Pod-Parser {
description = "base class for creating POD filters and translators";
website = "https://metacpan.org/release/Pod-Parser";
anitya = 3244;
version* = "1.67";
source = remoteCPAN {
author = "MAREKR";
name = "Pod-Parser";
version = version;
checksum = "RdURu9mOfExk_loCp6abxlcQV3FycSNbTqhRS9i6JUqnYfGGEgercK30g0gjYyqe";
};
exec = makeMaker {};
runtime = [ perl ];
}
package perl-SGMLS {
description = "class for postprocessing the output from the sgmls and nsgmls parsers";
website = "https://metacpan.org/release/RAAB/SGMLSpm-1.1";
anitya = 389576;
anityaLegacyCPAN = true;
version* = "1.1";
source = remoteCPAN {
author = "RAAB";
name = "SGMLSpm";
version = version;
checksum = "aZijn4MUqD-wfyZgdcCruCwl4SgDdu25cNmJ4_UvdAk9a7uz4gzMQdoeB6DQ6QOy";
};
exec = makeMaker {};
runtime = [ perl ];
}
package perl-Term-ReadKey {
description = "a perl module for simple terminal control";
website = "https://metacpan.org/release/TermReadKey";
anitya = 3372;
version* = "2.38";
source = remoteCPAN {
author = "JSTOWE";
name = "TermReadKey";
version = version;
checksum = "qerL8Xo7kD0f42PZoiEbmE8Roc_S9pOa27LXelY4DN_0UNy_u5wLrGHI8utNlaiI";
};
exec = makeMaker {};
runtime = [ perl ];
}
package perl-Text-CharWidth {
description = "get number of occupied columns of a string on terminal";
website = "https://metacpan.org/release/Text-CharWidth";
anitya = 14380;
version* = "0.04";
source = remoteCPAN {
author = "KUBOTA";
name = "Text-CharWidth";
version = version;
checksum = "G2p5RHU4_HiZ23ZusBA_enTlVMxz0J4esUx4CGcOPhY6xYTbp-aXWRN6lYZpzBw2";
};
exec = makeMaker {};
runtime = [ perl ];
}
package perl-Text-WrapI18N {
description = "line wrapping module";
website = "https://metacpan.org/release/Text-WrapI18N";
anitya = 14385;
version* = "0.06";
source = remoteCPAN {
author = "KUBOTA";
name = "Text-WrapI18N";
version = version;
checksum = "Vmo89qLgxUqyQ6QmWJVqu60aQAUjrNKRjFQSXGnvClxofzRjiCa6idzPgJ4VkixM";
};
exec = makeMaker {};
inputs = [ perl-Text-CharWidth ];
runtime = [ perl-Text-CharWidth ];
}
package perl-MIME-Charset {
description = "Charset Information for MIME";
website = "https://metacpan.org/release/MIME-Charset";
anitya = 3070;
version* = "1.013.1";
source = remoteCPAN {
author = "NEZUMI";
name = "MIME-Charset";
version = version;
checksum = "Ou_ukcrOa1cgtE3mptinb-os3bdL1SXzbRDFZQF3prrJj-drc3rp_huay7iDLJol";
};
exec = makeMaker {};
runtime = [ perl ];
}
package perl-Unicode-LineBreak {
description = "String as Sequence of UAX #29 Grapheme Clusters";
website = "https://metacpan.org/release/Unicode-LineBreak";
anitya = 6033;
version* = "2019.001";
source = remoteCPAN {
author = "NEZUMI";
name = "Unicode-LineBreak";
version = version;
checksum = "ZHVkh7EDgAUHnTpvXsnPAuWpgNoBImtY_9_8TIbo2co_WgUwEb0MtXPhI8pAZ5OH";
};
exec = makeMaker {};
inputs = [ perl-MIME-Charset ];
runtime = [ perl-MIME-Charset ];
}
package perl-YAML-Tiny {
description = "read/write YAML files with as little code as possible";
website = "https://metacpan.org/release/YAML-Tiny";
anitya = 3549;
version* = "1.76";
source = remoteCPAN {
author = "ETHER";
name = "YAML-Tiny";
version = version;
checksum = "V1MV4KPym1LxSw8CRXqPR3K-l1hGHbT5Ob4t-9xju6R9X_CWyw6hI8wsMaNdHdBY";
};
exec = makeMaker {};
runtime = [ perl ];
}
package perl-Test-Cmd {
description = "portable testing of commands and scripts";
website = "https://metacpan.org/release/Test-Cmd";
anitya = 6014;
version* = "1.09";
source = remoteCPAN {
author = "NEILB";
name = "Test-Cmd";
version = version;
checksum = "gpGUwyC9IozDiYSgW_kXARNfXsTPFa6cTowJmmCBbPqcs2-pONZca_SB06FGy-7H";
};
exec = makeMaker {};
runtime = [ perl ];
}

View File

@@ -2,7 +2,6 @@ package rosa
import (
"slices"
"strings"
"hakurei.app/internal/pkg"
)
@@ -103,249 +102,3 @@ func (t Toolchain) newViaPerlMakeMaker(
Perl,
})...)
}
func (t Toolchain) newPerlLocaleGettext() (pkg.Artifact, string) {
const (
version = "1.07"
checksum = "cFq4BKFD1MWSoa7lsrPjpdo9kzPqd0jlRcBFUyL1L1isw8m3D_Sge_ff0MAu_9J3"
)
return t.newViaPerlMakeMaker("Locale::gettext", version, newFromCPAN(
"PVANDRY",
"Locale-gettext",
version,
checksum,
), nil), version
}
func init() {
native.mustRegister(Toolchain.newPerlLocaleGettext, &Metadata{
Name: "perl-Locale::gettext",
Description: "message handling functions",
Website: "https://metacpan.org/release/Locale-gettext",
ID: 7523,
})
}
func (t Toolchain) newPerlPodParser() (pkg.Artifact, string) {
const (
version = "1.67"
checksum = "RdURu9mOfExk_loCp6abxlcQV3FycSNbTqhRS9i6JUqnYfGGEgercK30g0gjYyqe"
)
return t.newViaPerlMakeMaker("Pod::Parser", version, newFromCPAN(
"MAREKR",
"Pod-Parser",
version,
checksum,
), nil), version
}
func init() {
native.mustRegister(Toolchain.newPerlPodParser, &Metadata{
Name: "perl-Pod::Parser",
Description: "base class for creating POD filters and translators",
Website: "https://metacpan.org/release/Pod-Parser",
ID: 3244,
})
}
func (t Toolchain) newPerlSGMLS() (pkg.Artifact, string) {
const (
version = "1.1"
checksum = "aZijn4MUqD-wfyZgdcCruCwl4SgDdu25cNmJ4_UvdAk9a7uz4gzMQdoeB6DQ6QOy"
)
return t.newViaPerlMakeMaker("SGMLS", version, newFromCPAN(
"RAAB",
"SGMLSpm",
version,
checksum,
), nil), version
}
func init() {
native.mustRegister(Toolchain.newPerlSGMLS, &Metadata{
Name: "perl-SGMLS",
Description: "class for postprocessing the output from the sgmls and nsgmls parsers",
Website: "https://metacpan.org/release/RAAB/SGMLSpm-1.1",
ID: 389576,
latest: func(v *Versions) string {
for _, s := range v.Stable {
_, m, ok := strings.Cut(s, ".")
if !ok {
continue
}
if len(m) > 1 && m[0] == '0' {
continue
}
return s
}
return v.Latest
},
})
}
func (t Toolchain) newPerlTermReadKey() (pkg.Artifact, string) {
const (
version = "2.38"
checksum = "qerL8Xo7kD0f42PZoiEbmE8Roc_S9pOa27LXelY4DN_0UNy_u5wLrGHI8utNlaiI"
)
return t.newViaPerlMakeMaker("Term::ReadKey", version, newFromCPAN(
"JSTOWE",
"TermReadKey",
version,
checksum,
), nil), version
}
func init() {
native.mustRegister(Toolchain.newPerlTermReadKey, &Metadata{
Name: "perl-Term::ReadKey",
Description: "a perl module for simple terminal control",
Website: "https://metacpan.org/release/TermReadKey",
ID: 3372,
})
}
func (t Toolchain) newPerlTextCharWidth() (pkg.Artifact, string) {
const (
version = "0.04"
checksum = "G2p5RHU4_HiZ23ZusBA_enTlVMxz0J4esUx4CGcOPhY6xYTbp-aXWRN6lYZpzBw2"
)
return t.newViaPerlMakeMaker("Text::CharWidth", version, newFromCPAN(
"KUBOTA",
"Text-CharWidth",
version,
checksum,
), nil), version
}
func init() {
native.mustRegister(Toolchain.newPerlTextCharWidth, &Metadata{
Name: "perl-Text::CharWidth",
Description: "get number of occupied columns of a string on terminal",
Website: "https://metacpan.org/release/Text-CharWidth",
ID: 14380,
})
}
func (t Toolchain) newPerlTextWrapI18N() (pkg.Artifact, string) {
const (
version = "0.06"
checksum = "Vmo89qLgxUqyQ6QmWJVqu60aQAUjrNKRjFQSXGnvClxofzRjiCa6idzPgJ4VkixM"
)
return t.newViaPerlMakeMaker("Text::WrapI18N", version, newFromCPAN(
"KUBOTA",
"Text-WrapI18N",
version,
checksum,
), nil,
PerlTextCharWidth,
), version
}
func init() {
native.mustRegister(Toolchain.newPerlTextWrapI18N, &Metadata{
Name: "perl-Text::WrapI18N",
Description: "line wrapping module",
Website: "https://metacpan.org/release/Text-WrapI18N",
Dependencies: P{
PerlTextCharWidth,
},
ID: 14385,
})
}
func (t Toolchain) newPerlMIMECharset() (pkg.Artifact, string) {
const (
version = "1.013.1"
checksum = "Ou_ukcrOa1cgtE3mptinb-os3bdL1SXzbRDFZQF3prrJj-drc3rp_huay7iDLJol"
)
return t.newViaPerlMakeMaker("MIME::Charset", version, newFromCPAN(
"NEZUMI",
"MIME-Charset",
version,
checksum,
), nil), version
}
func init() {
native.mustRegister(Toolchain.newPerlMIMECharset, &Metadata{
Name: "perl-MIME::Charset",
Description: "Charset Information for MIME",
Website: "https://metacpan.org/release/MIME-Charset",
ID: 3070,
})
}
func (t Toolchain) newPerlUnicodeLineBreak() (pkg.Artifact, string) {
const (
version = "2019.001"
checksum = "ZHVkh7EDgAUHnTpvXsnPAuWpgNoBImtY_9_8TIbo2co_WgUwEb0MtXPhI8pAZ5OH"
)
return t.newViaPerlMakeMaker("Unicode::LineBreak", version, newFromCPAN(
"NEZUMI",
"Unicode-LineBreak",
version,
checksum,
), nil,
PerlMIMECharset,
), version
}
func init() {
native.mustRegister(Toolchain.newPerlUnicodeLineBreak, &Metadata{
Name: "perl-Unicode::LineBreak",
Description: "String as Sequence of UAX #29 Grapheme Clusters",
Website: "https://metacpan.org/release/Unicode-LineBreak",
Dependencies: P{
PerlMIMECharset,
},
ID: 6033,
})
}
func (t Toolchain) newPerlYAMLTiny() (pkg.Artifact, string) {
const (
version = "1.76"
checksum = "V1MV4KPym1LxSw8CRXqPR3K-l1hGHbT5Ob4t-9xju6R9X_CWyw6hI8wsMaNdHdBY"
)
return t.newViaPerlMakeMaker("YAML::Tiny", version, newFromCPAN(
"ETHER",
"YAML-Tiny",
version,
checksum,
), nil), version
}
func init() {
native.mustRegister(Toolchain.newPerlYAMLTiny, &Metadata{
Name: "perl-YAML::Tiny",
Description: "read/write YAML files with as little code as possible",
Website: "https://metacpan.org/release/YAML-Tiny",
ID: 3549,
})
}
func (t Toolchain) newPerlTestCmd() (pkg.Artifact, string) {
const (
version = "1.09"
checksum = "gpGUwyC9IozDiYSgW_kXARNfXsTPFa6cTowJmmCBbPqcs2-pONZca_SB06FGy-7H"
)
return t.newViaPerlMakeMaker("Test::Cmd", version, newFromCPAN(
"NEILB",
"Test-Cmd",
version,
checksum,
), nil), version
}
func init() {
native.mustRegister(Toolchain.newPerlTestCmd, &Metadata{
Name: "perl-Test::Cmd",
Description: "portable testing of commands and scripts",
Website: "https://metacpan.org/release/Test-Cmd",
ID: 6014,
})
}

View File

@@ -544,6 +544,23 @@ func (s *S) getFrame() azalea.Frame {
return
}},
k("remoteCPAN"): {F: func(
args azalea.FArgs,
) (v any, set bool, err error) {
var author, name, version, checksum string
if err = args.Apply(map[unique.Handle[azalea.Ident]]any{
k("author"): &author,
k("name"): &name,
k("version"): &version,
k("checksum"): &checksum,
}); err != nil {
return
}
v = newFromCPAN(author, name, version, checksum)
set = true
return
}},
k("remoteGitHub"): {F: func(
args azalea.FArgs,
) (v any, set bool, err error) {
@@ -592,6 +609,20 @@ func (s *S) getFrame() azalea.Frame {
return
}},
k("makeMaker"): {F: func(
args azalea.FArgs,
) (v any, set bool, err error) {
var attr MakeMakerHelper
if err = args.Apply(map[unique.Handle[azalea.Ident]]any{
k("skipCheck"): &attr.SkipCheck,
}); err != nil {
return
}
v = &attr
set = true
return
}},
k("pip"): {F: func(
args azalea.FArgs,
) (v any, set bool, err error) {
@@ -680,6 +711,7 @@ func (ctx *evalContext) pf(
inputs, runtimes azalea.Array
anityaFallback bool
anityaLegacyCPAN bool
)
if err = args.Apply(map[unique.Handle[azalea.Ident]]any{
k("description"): &meta.Description,
@@ -702,6 +734,7 @@ func (ctx *evalContext) pf(
k("runtime"): &runtimes,
k("anityaFallback"): &anityaFallback,
k("anityaLegacyCPAN"): &anityaLegacyCPAN,
}); err != nil {
return
}
@@ -733,6 +766,20 @@ func (ctx *evalContext) pf(
meta.ID = int(anitya)
if anityaFallback {
meta.latest = (*Versions).getStable
} else if anityaLegacyCPAN {
meta.latest = func(v *Versions) string {
for _, s := range v.Stable {
_, m, ok := strings.Cut(s, ".")
if !ok {
continue
}
if len(m) > 1 && m[0] == '0' {
continue
}
return s
}
return v.Latest
}
}
var source pkg.Artifact
switch p := sourceA.(type) {

View File

@@ -118,17 +118,7 @@ var (
PCRE2 = H("pcre2")
Parallel = H("parallel")
Patch = H("patch")
PerlLocaleGettext = H("perl-Locale::gettext")
PerlMIMECharset = H("perl-MIME::Charset")
PerlModuleBuild = H("perl-Module::Build")
PerlPodParser = H("perl-Pod::Parser")
PerlSGMLS = H("perl-SGMLS")
PerlTermReadKey = H("perl-Term::ReadKey")
PerlTestCmd = H("perl-Test::Cmd")
PerlTextCharWidth = H("perl-Text::CharWidth")
PerlTextWrapI18N = H("perl-Text::WrapI18N")
PerlUnicodeLineBreak = H("perl-Unicode::LineBreak")
PerlYAMLTiny = H("perl-YAML::Tiny")
PerlTestCmd = H("perl-Test-Cmd")
Pixman = H("pixman")
PkgConfig = H("pkg-config")
Procps = H("procps")