internal/rosa/perl: various perl module artifacts
All checks were successful
Test / Create distribution (push) Successful in 1m0s
Test / Sandbox (push) Successful in 2m42s
Test / Hakurei (push) Successful in 3m56s
Test / Hpkg (push) Successful in 4m42s
Test / Sandbox (race detector) (push) Successful in 5m8s
Test / Hakurei (race detector) (push) Successful in 5m57s
Test / ShareFS (push) Successful in 2m53s
Test / Flake checks (push) Successful in 1m50s
All checks were successful
Test / Create distribution (push) Successful in 1m0s
Test / Sandbox (push) Successful in 2m42s
Test / Hakurei (push) Successful in 3m56s
Test / Hpkg (push) Successful in 4m42s
Test / Sandbox (race detector) (push) Successful in 5m8s
Test / Hakurei (race detector) (push) Successful in 5m57s
Test / ShareFS (push) Successful in 2m53s
Test / Flake checks (push) Successful in 1m50s
This change includes helpers for both Makefile.PL and Build.PL as well as various modules. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -73,6 +73,16 @@ const (
|
||||
Packaging
|
||||
Patch
|
||||
Perl
|
||||
PerlLocaleGettext
|
||||
PerlMIMECharset
|
||||
PerlModuleBuild
|
||||
PerlPodParser
|
||||
PerlSGMLS
|
||||
PerlTermReadKey
|
||||
PerlTextCharWidth
|
||||
PerlTextWrapI18N
|
||||
PerlUnicodeGCString
|
||||
PerlYAMLTiny
|
||||
PkgConfig
|
||||
Pluggy
|
||||
Procps
|
||||
@@ -199,6 +209,16 @@ func ResolveName(name string) (p PArtifact, ok bool) {
|
||||
"packaging": Packaging,
|
||||
"patch": Patch,
|
||||
"perl": Perl,
|
||||
"Locale::gettext": PerlLocaleGettext,
|
||||
"MIME::Charset": PerlMIMECharset,
|
||||
"Module::Build": PerlModuleBuild,
|
||||
"Pod::Parser": PerlPodParser,
|
||||
"SGMLS": PerlSGMLS,
|
||||
"Term::ReadKey": PerlTermReadKey,
|
||||
"Text::CharWidth": PerlTextCharWidth,
|
||||
"Text::WrapI18N": PerlTextWrapI18N,
|
||||
"Unicode::GCString": PerlUnicodeGCString,
|
||||
"YAML::Tiny": PerlYAMLTiny,
|
||||
"pkg-config": PkgConfig,
|
||||
"pluggy": Pluggy,
|
||||
"procps": Procps,
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
package rosa
|
||||
|
||||
import "hakurei.app/internal/pkg"
|
||||
import (
|
||||
"slices"
|
||||
|
||||
"hakurei.app/internal/pkg"
|
||||
)
|
||||
|
||||
func (t Toolchain) newPerl() pkg.Artifact {
|
||||
const (
|
||||
@@ -37,3 +41,195 @@ make \
|
||||
)))
|
||||
}
|
||||
func init() { artifactsF[Perl] = Toolchain.newPerl }
|
||||
|
||||
// newViaPerlModuleBuild installs a perl module via Build.PL.
|
||||
func (t Toolchain) newViaPerlModuleBuild(
|
||||
name, version string,
|
||||
source pkg.Artifact,
|
||||
patches [][2]string,
|
||||
extra ...pkg.Artifact,
|
||||
) pkg.Artifact {
|
||||
if name == "" || version == "" {
|
||||
panic("names must be non-empty")
|
||||
}
|
||||
return t.New("perl-"+name, 0, slices.Concat(extra, []pkg.Artifact{
|
||||
t.Load(Perl),
|
||||
}), 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 {
|
||||
const (
|
||||
version = "0.4234"
|
||||
checksum = "ZKxEFG4hE1rqZt52zBL2LRZBMkYzhjb5-cTBXcsyA52EbPeeYyVxU176yAea8-Di"
|
||||
)
|
||||
return t.newViaPerlModuleBuild("Module-Build", version, pkg.NewHTTPGetTar(
|
||||
nil, "https://cpan.metacpan.org/authors/id/L/LE/LEONT/"+
|
||||
"Module-Build-"+version+".tar.gz",
|
||||
mustDecode(checksum),
|
||||
pkg.TarGzip,
|
||||
), nil)
|
||||
}
|
||||
func init() { artifactsF[PerlModuleBuild] = Toolchain.newPerlModuleBuild }
|
||||
|
||||
// newViaPerlMakeMaker installs a perl module via Makefile.PL.
|
||||
func (t Toolchain) newViaPerlMakeMaker(
|
||||
name, version string,
|
||||
source pkg.Artifact,
|
||||
patches [][2]string,
|
||||
extra ...pkg.Artifact,
|
||||
) pkg.Artifact {
|
||||
return t.NewViaMake("perl-"+name, version, t.NewPatchedSource(
|
||||
"perl-"+name, version, source, false, patches...,
|
||||
), &MakeAttr{
|
||||
Writable: true,
|
||||
OmitDefaults: true,
|
||||
SkipConfigure: true,
|
||||
InPlace: true,
|
||||
|
||||
ScriptEarly: `
|
||||
cd /usr/src/perl-` + name + `
|
||||
perl Makefile.PL PREFIX=/system
|
||||
`,
|
||||
CheckName: "test",
|
||||
}, slices.Concat(extra, []pkg.Artifact{
|
||||
t.Load(Perl),
|
||||
})...)
|
||||
}
|
||||
|
||||
func (t Toolchain) newPerlLocaleGettext() pkg.Artifact {
|
||||
const (
|
||||
version = "1.07"
|
||||
checksum = "cFq4BKFD1MWSoa7lsrPjpdo9kzPqd0jlRcBFUyL1L1isw8m3D_Sge_ff0MAu_9J3"
|
||||
)
|
||||
return t.newViaPerlMakeMaker("Locale::gettext", version, pkg.NewHTTPGetTar(
|
||||
nil, "https://cpan.metacpan.org/authors/id/P/PV/PVANDRY/"+
|
||||
"Locale-gettext-"+version+".tar.gz",
|
||||
mustDecode(checksum),
|
||||
pkg.TarGzip,
|
||||
), nil)
|
||||
}
|
||||
func init() { artifactsF[PerlLocaleGettext] = Toolchain.newPerlLocaleGettext }
|
||||
|
||||
func (t Toolchain) newPerlPodParser() pkg.Artifact {
|
||||
const (
|
||||
version = "1.67"
|
||||
checksum = "RdURu9mOfExk_loCp6abxlcQV3FycSNbTqhRS9i6JUqnYfGGEgercK30g0gjYyqe"
|
||||
)
|
||||
return t.newViaPerlMakeMaker("Pod::Parser", version, pkg.NewHTTPGetTar(
|
||||
nil, "https://cpan.metacpan.org/authors/id/M/MA/MAREKR/"+
|
||||
"Pod-Parser-"+version+".tar.gz",
|
||||
mustDecode(checksum),
|
||||
pkg.TarGzip,
|
||||
), nil)
|
||||
}
|
||||
func init() { artifactsF[PerlPodParser] = Toolchain.newPerlPodParser }
|
||||
|
||||
func (t Toolchain) newPerlSGMLS() pkg.Artifact {
|
||||
const (
|
||||
version = "1.1"
|
||||
checksum = "aZijn4MUqD-wfyZgdcCruCwl4SgDdu25cNmJ4_UvdAk9a7uz4gzMQdoeB6DQ6QOy"
|
||||
)
|
||||
return t.newViaPerlMakeMaker("SGMLS", version, pkg.NewHTTPGetTar(
|
||||
nil, "https://cpan.metacpan.org/authors/id/R/RA/RAAB/"+
|
||||
"SGMLSpm-"+version+".tar.gz",
|
||||
mustDecode(checksum),
|
||||
pkg.TarGzip,
|
||||
), nil)
|
||||
}
|
||||
func init() { artifactsF[PerlSGMLS] = Toolchain.newPerlSGMLS }
|
||||
|
||||
func (t Toolchain) newPerlTermReadKey() pkg.Artifact {
|
||||
const (
|
||||
version = "2.38"
|
||||
checksum = "qerL8Xo7kD0f42PZoiEbmE8Roc_S9pOa27LXelY4DN_0UNy_u5wLrGHI8utNlaiI"
|
||||
)
|
||||
return t.newViaPerlMakeMaker("Term::ReadKey", version, pkg.NewHTTPGetTar(
|
||||
nil, "https://cpan.metacpan.org/authors/id/J/JS/JSTOWE/"+
|
||||
"TermReadKey-"+version+".tar.gz",
|
||||
mustDecode(checksum),
|
||||
pkg.TarGzip,
|
||||
), nil)
|
||||
}
|
||||
func init() { artifactsF[PerlTermReadKey] = Toolchain.newPerlTermReadKey }
|
||||
|
||||
func (t Toolchain) newPerlTextCharWidth() pkg.Artifact {
|
||||
const (
|
||||
version = "0.04"
|
||||
checksum = "G2p5RHU4_HiZ23ZusBA_enTlVMxz0J4esUx4CGcOPhY6xYTbp-aXWRN6lYZpzBw2"
|
||||
)
|
||||
return t.newViaPerlMakeMaker("Text::CharWidth", version, pkg.NewHTTPGetTar(
|
||||
nil, "https://cpan.metacpan.org/authors/id/K/KU/KUBOTA/"+
|
||||
"Text-CharWidth-"+version+".tar.gz",
|
||||
mustDecode(checksum),
|
||||
pkg.TarGzip,
|
||||
), nil)
|
||||
}
|
||||
func init() { artifactsF[PerlTextCharWidth] = Toolchain.newPerlTextCharWidth }
|
||||
|
||||
func (t Toolchain) newPerlTextWrapI18N() pkg.Artifact {
|
||||
const (
|
||||
version = "0.06"
|
||||
checksum = "Vmo89qLgxUqyQ6QmWJVqu60aQAUjrNKRjFQSXGnvClxofzRjiCa6idzPgJ4VkixM"
|
||||
)
|
||||
return t.newViaPerlMakeMaker("Text::WrapI18N", version, pkg.NewHTTPGetTar(
|
||||
nil, "https://cpan.metacpan.org/authors/id/K/KU/KUBOTA/"+
|
||||
"Text-WrapI18N-"+version+".tar.gz",
|
||||
mustDecode(checksum),
|
||||
pkg.TarGzip,
|
||||
), nil,
|
||||
t.Load(PerlTextCharWidth),
|
||||
)
|
||||
}
|
||||
func init() { artifactsF[PerlTextWrapI18N] = Toolchain.newPerlTextWrapI18N }
|
||||
|
||||
func (t Toolchain) newPerlMIMECharset() pkg.Artifact {
|
||||
const (
|
||||
version = "1.013.1"
|
||||
checksum = "Ou_ukcrOa1cgtE3mptinb-os3bdL1SXzbRDFZQF3prrJj-drc3rp_huay7iDLJol"
|
||||
)
|
||||
return t.newViaPerlMakeMaker("MIME::Charset", version, pkg.NewHTTPGetTar(
|
||||
nil, "https://cpan.metacpan.org/authors/id/N/NE/NEZUMI/"+
|
||||
"MIME-Charset-"+version+".tar.gz",
|
||||
mustDecode(checksum),
|
||||
pkg.TarGzip,
|
||||
), nil)
|
||||
}
|
||||
func init() { artifactsF[PerlMIMECharset] = Toolchain.newPerlMIMECharset }
|
||||
|
||||
func (t Toolchain) newPerlUnicodeGCString() pkg.Artifact {
|
||||
const (
|
||||
version = "2019.001"
|
||||
checksum = "ZHVkh7EDgAUHnTpvXsnPAuWpgNoBImtY_9_8TIbo2co_WgUwEb0MtXPhI8pAZ5OH"
|
||||
)
|
||||
return t.newViaPerlMakeMaker("Unicode::GCString", version, pkg.NewHTTPGetTar(
|
||||
nil, "https://cpan.metacpan.org/authors/id/N/NE/NEZUMI/"+
|
||||
"Unicode-LineBreak-"+version+".tar.gz",
|
||||
mustDecode(checksum),
|
||||
pkg.TarGzip,
|
||||
), nil,
|
||||
t.Load(PerlMIMECharset),
|
||||
)
|
||||
}
|
||||
func init() { artifactsF[PerlUnicodeGCString] = Toolchain.newPerlUnicodeGCString }
|
||||
|
||||
func (t Toolchain) newPerlYAMLTiny() pkg.Artifact {
|
||||
const (
|
||||
version = "1.76"
|
||||
checksum = "V1MV4KPym1LxSw8CRXqPR3K-l1hGHbT5Ob4t-9xju6R9X_CWyw6hI8wsMaNdHdBY"
|
||||
)
|
||||
return t.newViaPerlMakeMaker("YAML::Tiny", version, pkg.NewHTTPGetTar(
|
||||
nil, "https://cpan.metacpan.org/authors/id/E/ET/ETHER/"+
|
||||
"YAML-Tiny-"+version+".tar.gz",
|
||||
mustDecode(checksum),
|
||||
pkg.TarGzip,
|
||||
), nil)
|
||||
}
|
||||
func init() { artifactsF[PerlYAMLTiny] = Toolchain.newPerlYAMLTiny }
|
||||
|
||||
Reference in New Issue
Block a user