aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-01-26 04:20:11 +0900
committerOphestra <cat@gensokyo.uk>2026-01-26 04:20:11 +0900
commit9a74d5273d8b8b9f1d2df0ab30081d8f59fd4731 (patch)
tree48bed8d01c67ddcf2f8f586dd647f3987b9cface
parent2abc8c454e96c00f167862197cdd408b6537def6 (diff)
internal/rosa: libgd artifact
Required by graphviz which is required by wayland. Signed-off-by: Ophestra <cat@gensokyo.uk>
-rw-r--r--cmd/mbf/main.go2
-rw-r--r--internal/rosa/all.go1
-rw-r--r--internal/rosa/libgd.go32
3 files changed, 35 insertions, 0 deletions
diff --git a/cmd/mbf/main.go b/cmd/mbf/main.go
index 26974925..1b35f673 100644
--- a/cmd/mbf/main.go
+++ b/cmd/mbf/main.go
@@ -174,6 +174,8 @@ func main() {
p = rosa.Libxml2
case "libffi":
p = rosa.Libffi
+ case "libgd":
+ p = rosa.Libgd
case "m4":
p = rosa.M4
case "make":
diff --git a/internal/rosa/all.go b/internal/rosa/all.go
index 330d25a0..116dd1b2 100644
--- a/internal/rosa/all.go
+++ b/internal/rosa/all.go
@@ -22,6 +22,7 @@ const (
KernelHeaders
Libexpat
Libffi
+ Libgd
Libxml2
M4
Make
diff --git a/internal/rosa/libgd.go b/internal/rosa/libgd.go
new file mode 100644
index 00000000..330159ac
--- /dev/null
+++ b/internal/rosa/libgd.go
@@ -0,0 +1,32 @@
+package rosa
+
+import "hakurei.app/internal/pkg"
+
+func (t Toolchain) newLibgd() pkg.Artifact {
+ const (
+ version = "2.3.3"
+ checksum = "8T-sh1_FJT9K9aajgxzh8ot6vWIF-xxjcKAHvTak9MgGUcsFfzP8cAvvv44u2r36"
+ )
+ return t.New("libgd-"+version, []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}"
+make "-j$(nproc)" check
+make DESTDIR=/work install
+`, pkg.Path(AbsUsrSrc.Append("libgd"), true, pkg.NewHTTPGetTar(
+ nil, "https://github.com/libgd/libgd/releases/download/"+
+ "gd-"+version+"/libgd-"+version+".tar.gz",
+ mustDecode(checksum),
+ pkg.TarGzip,
+ )))
+}
+func init() { artifactsF[Libgd] = Toolchain.newLibgd }