blob: 3c39005a8fc06f4a639987ba428b52f2b9f3a85f (
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
|
package rosa
import "hakurei.app/internal/pkg"
// NewLibffi returns a [pkg.Artifact] containing an installation of libffi.
func (t Toolchain) NewLibffi() pkg.Artifact {
const (
version = "3.4.5"
checksum = "apIJzypF4rDudeRoI_n3K7N-zCeBLTbQlHRn9NSAZqdLAWA80mR0gXPTpHsL7oMl"
)
return t.New("libffi-"+version, []pkg.Artifact{
t.NewMake(),
t.NewKernelHeaders(),
}, nil, nil, `
cd "$(mktemp -d)"
/usr/src/libffi/configure \
--prefix=/system \
--build="${ROSA_TRIPLE}"
make "-j$(nproc)" check
make DESTDIR=/work install
`, pkg.Path(AbsUsrSrc.Append("libffi"), false, pkg.NewHTTPGetTar(
nil,
"https://github.com/libffi/libffi/releases/download/"+
"v"+version+"/libffi-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
)))
}
|