diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-01-31 05:09:17 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-01-31 08:55:33 +0900 |
| commit | 8b4576bc5f6eaaf703886629f2dfa12ba38b574c (patch) | |
| tree | f347a2189841297be8c5bc96b02dfc610490b19d /internal/rosa/libxml2.go | |
| parent | 29ebc52e26811b0a657bd1978b0c02284822462f (diff) | |
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>
Diffstat (limited to 'internal/rosa/libxml2.go')
| -rw-r--r-- | internal/rosa/libxml2.go | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/internal/rosa/libxml2.go b/internal/rosa/libxml2.go index e2dcc4b8..12013e52 100644 --- a/internal/rosa/libxml2.go +++ b/internal/rosa/libxml2.go @@ -11,29 +11,24 @@ func (t Toolchain) newLibxml2() pkg.Artifact { version = "2.15.1" checksum = "pYzAR3cNrEHezhEMirgiq7jbboLzwMj5GD7SQp0jhSIMdgoU4G9oU9Gxun3zzUIU" ) - return t.New("libxml2-"+version, 0, []pkg.Artifact{ - t.Load(Make), - t.Load(Gawk), - t.Load(Coreutils), - t.Load(Diffutils), - t.Load(XZ), - }, nil, nil, ` -cd /usr/src/ -tar xf libxml2.tar.xz -mv libxml2-`+version+` libxml2 - -cd "$(mktemp -d)" -/usr/src/libxml2/configure \ - --prefix=/system \ - --build="${ROSA_TRIPLE}" \ - --enable-static -make "-j$(nproc)" check -make DESTDIR=/work install -`, pkg.Path(AbsUsrSrc.Append("libxml2.tar.xz"), false, pkg.NewHTTPGet( + return t.NewViaMake("libxml2", version, pkg.NewHTTPGet( nil, "https://download.gnome.org/sources/libxml2/"+ strings.Join(strings.Split(version, ".")[:2], ".")+ "/libxml2-"+version+".tar.xz", mustDecode(checksum), - ))) + ), &MakeAttr{ + ScriptEarly: ` +cd /usr/src/ +tar xf libxml2.tar.xz +mv libxml2-` + version + ` libxml2 +`, + Configure: [][2]string{ + {"enable-static"}, + }, + SourceSuffix: ".tar.xz", + }, + t.Load(Diffutils), + t.Load(XZ), + ) } func init() { artifactsF[Libxml2] = Toolchain.newLibxml2 } |
