aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/rosa/gnu.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/internal/rosa/gnu.go b/internal/rosa/gnu.go
index d114e96b..e944dd0e 100644
--- a/internal/rosa/gnu.go
+++ b/internal/rosa/gnu.go
@@ -72,3 +72,26 @@ make DESTDIR=/work install
pkg.TarGzip,
)))
}
+
+// NewGettext returns a [pkg.Artifact] containing an installation of GNU gettext.
+func (t Toolchain) NewGettext() pkg.Artifact {
+ const (
+ version = "0.26"
+ checksum = "IMu7yDZX7xL5UO1ZxXc-iBMbY9LLEUlOroyuSlHMZwg9MKtxG7HIm8F2LheDua0y"
+ )
+ return t.New("gettext-"+version, []pkg.Artifact{
+ t.NewMake(),
+ }, nil, nil, `
+cd "$(mktemp -d)"
+/usr/src/gettext/configure \
+ --prefix=/system \
+ --build="${ROSA_TRIPLE}"
+make "-j$(nproc)"
+make DESTDIR=/work install
+`, pkg.Path(AbsUsrSrc.Append("gettext"), false, pkg.NewHTTPGetTar(
+ nil,
+ "https://ftp.gnu.org/pub/gnu/gettext/gettext-"+version+".tar.gz",
+ mustDecode(checksum),
+ pkg.TarGzip,
+ )))
+}