aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-01-21 21:42:25 +0900
committerOphestra <cat@gensokyo.uk>2026-01-21 21:42:25 +0900
commit0e08254595483c03320c3dae515089394748a626 (patch)
tree67a9bb26ae8c4ed02b50cfcc3add7d0b0b57b1cf
parent349d8693bf696c37c33bd50dd201614741ad5b8a (diff)
internal/rosa: m4 artifact
Autotools dependency. Signed-off-by: Ophestra <cat@gensokyo.uk>
-rw-r--r--internal/rosa/gnu.go26
1 files changed, 25 insertions, 1 deletions
diff --git a/internal/rosa/gnu.go b/internal/rosa/gnu.go
index 8fe5b8a6..d31996f8 100644
--- a/internal/rosa/gnu.go
+++ b/internal/rosa/gnu.go
@@ -10,7 +10,8 @@ func (t Toolchain) NewMake() pkg.Artifact {
)
return t.New("make-"+version, nil, nil, nil, `
cd "$(mktemp -d)"
-/usr/src/make/configure --prefix=/system \
+/usr/src/make/configure \
+ --prefix=/system \
--build="${ROSA_TRIPLE}" \
--disable-dependency-tracking
./build.sh
@@ -21,5 +22,28 @@ cd "$(mktemp -d)"
mustDecode(checksum),
pkg.TarGzip,
)))
+}
+
+// NewM4 returns a [pkg.Artifact] containing an installation of GNU M4.
+func (t Toolchain) NewM4() pkg.Artifact {
+ const (
+ version = "1.4.20"
+ checksum = "RT0_L3m4Co86bVBY3lCFAEs040yI1WdeNmRylFpah8IZovTm6O4wI7qiHJN3qsW9"
+ )
+ return t.New("m4-"+version, []pkg.Artifact{
+ t.NewMake(),
+ }, nil, nil, `
+cd "$(mktemp -d)"
+/usr/src/m4/configure \
+ --prefix=/system \
+ --build="${ROSA_TRIPLE}"
+make "-j$(nproc)"
+make DESTDIR=/work install
+`, pkg.Path(AbsUsrSrc.Append("m4"), false, pkg.NewHTTPGetTar(
+ nil,
+ "https://ftp.gnu.org/gnu/m4/m4-"+version+".tar.bz2",
+ mustDecode(checksum),
+ pkg.TarBzip2,
+ )))
}