blob: 169a64d1782633cefed3fc24cfcf95e51e8e0fa1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
package rosa
import "hakurei.app/internal/pkg"
// NewPerl returns a [pkg.Artifact] containing an installation of perl.
func (t Toolchain) NewPerl() pkg.Artifact {
const (
version = "5.42.0"
checksum = "2KR7Jbpk-ZVn1a30LQRwbgUvg2AXlPQZfzrqCr31qD5-yEsTwVQ_W76eZH-EdxM9"
)
return t.New("perl-"+version, []pkg.Artifact{
t.NewMake(),
}, nil, nil, `
chmod -R +w /usr/src/perl && cd /usr/src/perl
./Configure \
-des \
-Dprefix=/system \
-Dcc="${CC}" \
-Dcflags='--std=gnu99' \
-Dldflags="${LDFLAGS}" \
-Doptimize='-O2 -fno-strict-aliasing' \
-Duseithreads
make "-j$(nproc)" # test
make DESTDIR=/work install
`, pkg.Path(AbsUsrSrc.Append("perl"), true, pkg.NewHTTPGetTar(
nil,
"https://www.cpan.org/src/5.0/perl-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
)))
}
|