diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-02-11 23:51:10 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-02-12 01:19:40 +0900 |
| commit | 1791b604b525cd67f3b6c393a1364688762aa2e0 (patch) | |
| tree | 84b622364fb5530d97edecb1beccfee9d59ed602 /internal/rosa/libucontext.go | |
| parent | 59ff6db7ec627bd8237b9508ef78c65204971cfc (diff) | |
internal/rosa/make: configurable configure and install
This makes the helper useful for non-autotools build systems.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/libucontext.go')
| -rw-r--r-- | internal/rosa/libucontext.go | 38 |
1 files changed, 14 insertions, 24 deletions
diff --git a/internal/rosa/libucontext.go b/internal/rosa/libucontext.go index 0dccbf65..838c2e41 100644 --- a/internal/rosa/libucontext.go +++ b/internal/rosa/libucontext.go @@ -7,34 +7,24 @@ func (t Toolchain) newLibucontext() pkg.Artifact { version = "1.5" checksum = "Ggk7FMmDNBdCx1Z9PcNWWW6LSpjGYssn2vU0GK5BLXJYw7ZxZbA2m_eSgT9TFnIG" ) - return t.New("libucontext", 0, []pkg.Artifact{ - t.Load(Make), - }, nil, []string{ - "ARCH=" + linuxArch(), - }, ` -cd /usr/src/libucontext -make check -make DESTDIR=/work install -`, pkg.Path(AbsUsrSrc.Append("libucontext"), true, - t.NewPatchedSource("libucontext", version, pkg.NewHTTPGetTar( + return t.NewViaMake("libucontext", version, t.NewPatchedSource( + "libucontext", version, pkg.NewHTTPGetTar( nil, "https://github.com/kaniini/libucontext/archive/refs/tags/"+ "libucontext-"+version+".tar.gz", mustDecode(checksum), pkg.TarGzip, - ), true, [2]string{"rosa-prefix", `diff --git a/Makefile b/Makefile -index c80e574..4a8c1d3 100644 ---- a/Makefile -+++ b/Makefile -@@ -17,7 +17,7 @@ ifeq ($(ARCH),$(filter $(ARCH),arm64)) - override ARCH = aarch64 - endif + ), false, + ), &MakeAttr{ + Writable: true, + OmitDefaults: true, + SkipConfigure: true, + InPlace: true, --prefix = /usr -+prefix = /system - libdir = ${prefix}/lib - shared_libdir = ${libdir} - static_libdir = ${libdir} -`}), - )) + ScriptEarly: "cd /usr/src/libucontext", + Make: []string{ + "ARCH=" + linuxArch(), + }, + ScriptInstall: "make prefix=/system DESTDIR=/work install", + }) } func init() { artifactsF[Libucontext] = Toolchain.newLibucontext } |
