package rosa import "hakurei.app/internal/pkg" // NewMake returns a [pkg.Artifact] containing an installation of GNU Make. func (t Toolchain) NewMake() pkg.Artifact { const ( version = "4.4.1" checksum = "YS_B07ZcAy9PbaK5_vKGj64SrxO2VMpnMKfc9I0Q9IC1rn0RwOH7802pJoj2Mq4a" ) return t.New("make-"+version, nil, nil, nil, ` cd "$(mktemp -d)" /usr/src/make/configure \ --prefix=/system \ --build="${ROSA_TRIPLE}" \ --disable-dependency-tracking ./build.sh ./make DESTDIR=/work install check `, pkg.Path(AbsUsrSrc.Append("make"), false, pkg.NewHTTPGetTar( nil, "https://ftp.gnu.org/gnu/make/make-"+version+".tar.gz", 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)" check 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, ))) } // 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)" check 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, ))) } // 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, ))) }