diff --git a/internal/rosa/gnu.go b/internal/rosa/gnu.go index d31996f..d114e96 100644 --- a/internal/rosa/gnu.go +++ b/internal/rosa/gnu.go @@ -47,3 +47,28 @@ make DESTDIR=/work install ))) } + +// NewAutoconf returns a [pkg.Artifact] containing an installation of GNU Autoconf. +func (t Toolchain) NewAutoconf() pkg.Artifact { + const ( + version = "2.72" + checksum = "-c5blYkC-xLDer3TWEqJTyh1RLbOd1c5dnRLKsDnIrg_wWNOLBpaqMY8FvmUFJ33" + ) + return t.New("autoconf-"+version, []pkg.Artifact{ + t.NewMake(), + t.NewM4(), + t.NewPerl(), + }, nil, nil, ` +cd "$(mktemp -d)" +/usr/src/autoconf/configure \ + --prefix=/system \ + --build="${ROSA_TRIPLE}" +make "-j$(nproc)" +make DESTDIR=/work install +`, pkg.Path(AbsUsrSrc.Append("autoconf"), false, pkg.NewHTTPGetTar( + nil, + "https://ftp.gnu.org/gnu/autoconf/autoconf-"+version+".tar.gz", + mustDecode(checksum), + pkg.TarGzip, + ))) +}