From 67b2914c94de1d35f72fc43a8051056afc8d53e9 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 16 Feb 2026 13:17:56 +0900 Subject: internal/rosa: meson helper This is used by quite a few projects. Signed-off-by: Ophestra --- internal/rosa/fuse.go | 43 +++++++++++++++++-------------------------- 1 file changed, 17 insertions(+), 26 deletions(-) (limited to 'internal/rosa/fuse.go') diff --git a/internal/rosa/fuse.go b/internal/rosa/fuse.go index c80e6e4d..8ce07436 100644 --- a/internal/rosa/fuse.go +++ b/internal/rosa/fuse.go @@ -7,11 +7,23 @@ func (t Toolchain) newFuse() pkg.Artifact { version = "3.18.1" checksum = "COb-BgJRWXLbt9XUkNeuiroQizpMifXqxgieE1SlkMXhs_WGSyJStrmyewAw2hd6" ) - return t.New("fuse-"+version, 0, []pkg.Artifact{ - t.Load(Python), - t.Load(Meson), - t.Load(Ninja), + return t.NewViaMeson("fuse", version, pkg.NewHTTPGetTar( + nil, "https://github.com/libfuse/libfuse/releases/download/"+ + "fuse-"+version+"/fuse-"+version+".tar.gz", + mustDecode(checksum), + pkg.TarGzip, + ), &MesonAttr{ + Configure: [][2]string{ + {"Ddefault_library", "both"}, + {"Dtests", "true"}, + {"Duseroot", "false"}, + {"Dinitscriptdir", "/system/init.d"}, + }, + ScriptCompiled: "python3 -m pytest test/", + // this project uses pytest + SkipCheck: true, + }, t.Load(IniConfig), t.Load(Packaging), t.Load(Pluggy), @@ -19,27 +31,6 @@ func (t Toolchain) newFuse() pkg.Artifact { t.Load(PyTest), t.Load(KernelHeaders), - }, nil, nil, ` -cd "$(mktemp -d)" -meson setup \ - --reconfigure \ - --buildtype=release \ - --prefix=/system \ - --prefer-static \ - -Dtests=true \ - -Duseroot=false \ - -Dinitscriptdir=/system/init.d \ - -Ddefault_library=both \ - . /usr/src/fuse -meson compile -python3 -m pytest test/ -meson install \ - --destdir=/work -`, pkg.Path(AbsUsrSrc.Append("fuse"), false, pkg.NewHTTPGetTar( - nil, "https://github.com/libfuse/libfuse/releases/download/"+ - "fuse-"+version+"/fuse-"+version+".tar.gz", - mustDecode(checksum), - pkg.TarGzip, - ))) + ) } func init() { artifactsF[Fuse] = Toolchain.newFuse } -- cgit v1.3.1