internal/rosa: migrate to make helper

This migrates artifacts that the helper cannot produce an identical instance of.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-01-31 05:09:17 +09:00
parent 29ebc52e26
commit 8b4576bc5f
15 changed files with 262 additions and 263 deletions

View File

@@ -7,19 +7,16 @@ func (t Toolchain) newZlib() pkg.Artifact {
version = "1.3.1"
checksum = "E-eIpNzE8oJ5DsqH4UuA_0GDKuQF5csqI8ooDx2w7Vx-woJ2mb-YtSbEyIMN44mH"
)
return t.New("zlib-"+version, 0, []pkg.Artifact{
t.Load(Make),
}, nil, nil, `
cd "$(mktemp -d)"
CC="clang -fPIC" /usr/src/zlib/configure \
--prefix /system
make "-j$(nproc)" test
make DESTDIR=/work install
`, pkg.Path(AbsUsrSrc.Append("zlib"), true,
pkg.NewHTTPGetTar(
nil, "https://zlib.net/zlib-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
)))
return t.NewViaMake("zlib", version, pkg.NewHTTPGetTar(
nil, "https://zlib.net/zlib-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
), &MakeAttr{
OmitDefaults: true,
Env: []string{
"CC=clang -fPIC",
},
Build: `""`,
})
}
func init() { artifactsF[Zlib] = Toolchain.newZlib }