diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-01-31 03:38:16 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-01-31 05:01:22 +0900 |
| commit | 5f81aac0e23e0197b449373912aa995dd7bb004a (patch) | |
| tree | ec537ec178b0d3820d22754b18fe222a710d6212 /internal/rosa/libgd.go | |
| parent | 47490823be4d81643ed3895263feec1da64f751e (diff) | |
internal/rosa: make helper
This change only migrates artifacts that remain unchanged under the helper, so this change should not cause any rebuilds.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/libgd.go')
| -rw-r--r-- | internal/rosa/libgd.go | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/internal/rosa/libgd.go b/internal/rosa/libgd.go index d4e83d1c..f61e99b0 100644 --- a/internal/rosa/libgd.go +++ b/internal/rosa/libgd.go @@ -7,27 +7,26 @@ func (t Toolchain) newLibgd() pkg.Artifact { version = "2.3.3" checksum = "8T-sh1_FJT9K9aajgxzh8ot6vWIF-xxjcKAHvTak9MgGUcsFfzP8cAvvv44u2r36" ) - return t.New("libgd-"+version, 0, []pkg.Artifact{ - t.Load(Make), - - t.Load(Zlib), - }, nil, []string{ - "TMPDIR=/dev/shm/gd", - }, ` -mkdir /dev/shm/gd - -cd "$(mktemp -d)" -/usr/src/libgd/configure \ - --prefix=/system \ - --build="${ROSA_TRIPLE}" \ - --enable-static -make "-j$(nproc)" check -make DESTDIR=/work install -`, pkg.Path(AbsUsrSrc.Append("libgd"), true, pkg.NewHTTPGetTar( + return t.NewViaMake("libgd", version, pkg.NewHTTPGetTar( nil, "https://github.com/libgd/libgd/releases/download/"+ "gd-"+version+"/libgd-"+version+".tar.gz", mustDecode(checksum), pkg.TarGzip, - ))) + ), &MakeAttr{ + Writable: true, + + OmitDefaults: true, + Env: []string{ + "TMPDIR=/dev/shm/gd", + }, + ScriptEarly: ` +mkdir /dev/shm/gd +`, + Configure: [][2]string{ + {"enable-static"}, + }, + }, + t.Load(Zlib), + ) } func init() { artifactsF[Libgd] = Toolchain.newLibgd } |
