aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-01-19 01:48:27 +0900
committerOphestra <cat@gensokyo.uk>2026-01-19 01:48:27 +0900
commit85d27229fd4d73399badb1014f9363c15dd4451e (patch)
tree0eb7d34f0b5bb212c715569ae8dfe990c0a767d7 /internal/rosa
parent83fb80d710b19756a4679a8edf89feb0853aaa32 (diff)
internal/rosa: zlib artifact
Dependency of llvm build scripts. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa')
-rw-r--r--internal/rosa/zlib.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/internal/rosa/zlib.go b/internal/rosa/zlib.go
new file mode 100644
index 00000000..203514a4
--- /dev/null
+++ b/internal/rosa/zlib.go
@@ -0,0 +1,25 @@
+package rosa
+
+import "hakurei.app/internal/pkg"
+
+// NewZlib returns a new [pkg.Artifact] containing an installation of zlib.
+func (t Toolchain) NewZlib() pkg.Artifact {
+ const (
+ version = "1.3.1"
+ checksum = "E-eIpNzE8oJ5DsqH4UuA_0GDKuQF5csqI8ooDx2w7Vx-woJ2mb-YtSbEyIMN44mH"
+ )
+ return t.New("zlib-"+version, []pkg.Artifact{
+ t.NewMake(),
+ }, nil, nil, `
+cd "$(mktemp -d)"
+CFLAGS="${CFLAGS} -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,
+ )))
+}