aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-10-23 14:21:42 +0900
committerOphestra <cat@gensokyo.uk>2026-10-23 14:21:42 +0900
commit555273b15f369d1c32e04a79417fff2f96fcfd3c (patch)
treeeae77765d43296ce727de2f2d5e729e8fd7ea416
parentb04cb706de8d0829cc8d94071f13e740cb5fc3f2 (diff)
internal/rosa/make: optionally omit --with-sysroot
Similar to the other autoconf-specific flags, this makes some configure scripts pretending to be autoconf unhappy. Signed-off-by: Ophestra <cat@gensokyo.uk>
-rw-r--r--internal/rosa/make.go4
-rw-r--r--internal/rosa/package/qemu/package.az1
-rw-r--r--internal/rosa/state.go4
3 files changed, 7 insertions, 2 deletions
diff --git a/internal/rosa/make.go b/internal/rosa/make.go
index e127fe02..d8ff9a13 100644
--- a/internal/rosa/make.go
+++ b/internal/rosa/make.go
@@ -41,6 +41,8 @@ type MakeHelper struct {
Build string
// Do not clear program prefix/suffix.
DefaultName bool
+ // Do not pass sysroot to autoconf configure script.
+ OmitSysroot bool
// Omit the target argument.
AutoTarget bool
@@ -153,7 +155,7 @@ export PKG_CONFIG_LIBDIR='` + sysroot + `/system/lib/pkgconfig:` + sysroot + `/s
--program-prefix='' \
--program-suffix=''`
}
- if cross {
+ if !attr.OmitSysroot && cross {
configure += ` \
--with-sysroot='/system/` + arch + `'`
}
diff --git a/internal/rosa/package/qemu/package.az b/internal/rosa/package/qemu/package.az
index 5d8e364b..d09bf352 100644
--- a/internal/rosa/package/qemu/package.az
+++ b/internal/rosa/package/qemu/package.az
@@ -40,6 +40,7 @@ sed -i \
exec = make {
defaultName = true;
autoTarget = true;
+ sysroot = false;
configure = {
"disable-download";
"disable-docs";
diff --git a/internal/rosa/state.go b/internal/rosa/state.go
index aba5c312..c8163ca2 100644
--- a/internal/rosa/state.go
+++ b/internal/rosa/state.go
@@ -874,7 +874,7 @@ func (s *S) getFrame() azalea.Frame {
args azalea.FArgs,
) (v any, set bool, err error) {
var attr MakeHelper
- defaults, chdir, checkEarly := true, true, true
+ defaults, chdir, checkEarly, sysroot := true, true, true, true
attr.Configure, attr.Check = []KV{}, []string{}
if err = args.Apply(map[unique.Handle[azalea.Ident]]any{
k("early"): &attr.Early,
@@ -887,6 +887,7 @@ func (s *S) getFrame() azalea.Frame {
k("configureName"): &attr.ConfigureName,
k("forceAutoconf"): &attr.ForceAutoconf,
k("defaultName"): &attr.DefaultName,
+ k("sysroot"): &sysroot,
k("autoTarget"): &attr.AutoTarget,
k("configure"): &attr.Configure,
k("host"): &attr.Host,
@@ -903,6 +904,7 @@ func (s *S) getFrame() azalea.Frame {
attr.SkipConfigure = attr.Configure == nil
attr.SkipCheck = attr.Check == nil
attr.SkipCheckEarly = !checkEarly
+ attr.OmitSysroot = !sysroot
v = &attr
set = true