aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/package/muon
diff options
context:
space:
mode:
Diffstat (limited to 'internal/rosa/package/muon')
-rw-r--r--internal/rosa/package/muon/package.az66
-rw-r--r--internal/rosa/package/muon/remove-broken-tests.patch30
-rw-r--r--internal/rosa/package/muon/remove-cl.patch39
-rw-r--r--internal/rosa/package/muon/respect-colour.patch14
4 files changed, 149 insertions, 0 deletions
diff --git a/internal/rosa/package/muon/package.az b/internal/rosa/package/muon/package.az
new file mode 100644
index 00000000..3a5be8bd
--- /dev/null
+++ b/internal/rosa/package/muon/package.az
@@ -0,0 +1,66 @@
+package meson-tests {
+ description = "tests from meson/test cases, updated alongside muon";
+ website = "https://github.com/muon-build/meson-tests";
+ exclude = true;
+
+ version# = "38483b8cf5eb4f6e9df7a78d786ec111e0d6eb5d";
+ output = remoteTar {
+ url = "https://github.com/muon-build/meson-tests/archive/"+
+ version+".tar.gz";
+ checksum = "ikrJiczlObaLUMHRbzzWmGgAyZMymxxC3D9VFozD0sV3e5ckiHXk8qk0Zr8bBWvO";
+ compress = gzip;
+ };
+ patches = [ "remove-broken-tests.patch" ];
+}
+
+package muon {
+ description = "meson implementation in C";
+ website = "https://muon.build";
+ anitya = 391173;
+
+ version# = "0.7.0";
+ source = remoteTar {
+ url = "https://git.sr.ht/~lattis/muon/archive/"+version+".tar.gz";
+ checksum = "ackLkMhxutd7xvLAVU25qkM5CAztLaYf1dAC2vIvlRIZ8o6LjaNpH-3OyP1xGQTO";
+ compress = gzip;
+ };
+ patches = [
+ // for some reason, muon decides to use clang-cl on Rosa OS
+ "remove-cl.patch",
+
+ // equivalent to the meson patches
+ "respect-colour.patch",
+ ];
+ extra = [ meson-tests ];
+
+ writable = true;
+ early = `
+chmod +w subprojects
+cp -r ../extra/meson-tests subprojects
+chmod -R +w subprojects/meson-tests
+`;
+
+ exec = generic {
+ build = `
+(cd /usr/src/muon && CC=cc ./bootstrap.sh /boot)
+/boot/muon-bootstrap setup \
+ -Dprefix=/system \
+ -Dbuildtype=release \
+ -Dlibcurl=disabled \
+ -Dlibarchive=disabled \
+ -Dlibpkgconf=disabled \
+ -Dtracy=disabled \
+ -Dmeson-docs=disabled \
+ -Dmeson-tests=enabled \
+ -Dwebsite=disabled \
+ /usr/src/muon
+/boot/muon-bootstrap samu `+jobsFlagE+`
+`;
+ check = "./muon test "+jobsFlagE+" -Rv\n";
+ install = "./muon install -d /work\n";
+ };
+
+ tools = [ python-early ];
+ inputs = [ kernel-headers ];
+ runtime = [ pkg-config ];
+}
diff --git a/internal/rosa/package/muon/remove-broken-tests.patch b/internal/rosa/package/muon/remove-broken-tests.patch
new file mode 100644
index 00000000..d4f868be
--- /dev/null
+++ b/internal/rosa/package/muon/remove-broken-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/meson.build b/meson.build
+index ebcd241..30b4c57 100644
+--- a/meson.build
++++ b/meson.build
+@@ -213,7 +213,6 @@ foreach t : [
+ ['common/202 custom target build by default', {'python': true}],
+ ['common/203 find_library and headers'],
+ ['common/204 line continuation'],
+- ['common/205 native file path override', {'cpp': true}],
+ ['common/206 tap tests'],
+ ['common/207 warning level 0', {'cpp': true}],
+ ['common/208 link custom', {'python': true}],
+@@ -228,9 +227,7 @@ foreach t : [
+ ['common/217 test priorities', {'python': true}],
+ ['common/218 include_dir dot'],
+ ['common/219 include_type dependency', {'cpp': true}],
+- ['common/220 fs module'],
+ ['common/221 zlib'],
+- ['common/222 native prop'],
+ ['common/223 persubproject options', {'cpp': true}],
+ ['common/224 arithmetic operators'],
+ ['common/225 link language', {'cpp': true}],
+@@ -336,7 +333,6 @@ foreach t : [
+ ['common/280 pkgconfig override', {'python': true}],
+ ['common/281 pkgconfig-gen'],
+ ['common/282 -D_FORTIFY_SOURCE=2 and -O0'],
+- ['common/283 subproj options', {'options': {'b_lto': 'true'}}],
+ ['common/284 test args and depends in path'],
+ ['common/285 wrap override'],
+ ['common/286 pkgconfig subproject'],
diff --git a/internal/rosa/package/muon/remove-cl.patch b/internal/rosa/package/muon/remove-cl.patch
new file mode 100644
index 00000000..e421c25d
--- /dev/null
+++ b/internal/rosa/package/muon/remove-cl.patch
@@ -0,0 +1,39 @@
+diff --git a/src/script/runtime/toolchains.meson b/src/script/runtime/toolchains.meson
+index 97682251..bb49b041 100644
+--- a/src/script/runtime/toolchains.meson
++++ b/src/script/runtime/toolchains.meson
+@@ -1059,22 +1059,6 @@ toolchain.register_compiler(
+ },
+ )
+
+-toolchain.register_compiler(
+- 'clang-cl',
+- exe: {'c': 'clang-cl', 'cpp': 'clang-cl'},
+- inherit: 'msvc',
+- linker: 'lld-link',
+- archiver: 'llvm-lib',
+- detect: func(out str) -> int
+- return 'CL.EXE COMPATIBILITY' in out ? 100 : 0
+- endfunc,
+- handlers: {
+- 'force_language': func(_c compiler, s str) -> list[str]
+- return ['-x', s]
+- endfunc,
+- },
+-)
+-
+ toolchain.register_compiler(
+ 'nasm',
+ exe: {'nasm': 'nasm'},
+diff --git a/src/vsenv.c b/src/vsenv.c
+index f55541ec..c92e665a 100644
+--- a/src/vsenv.c
++++ b/src/vsenv.c
+@@ -73,7 +73,6 @@ vsenv_setup(struct workspace *wk, const char *cache_path, enum setup_platform_en
+ "cc",
+ "gcc",
+ "clang",
+- "clang-cl",
+ };
+ uint32_t i;
+ for (i = 0; i < ARRAY_LEN(comps); ++i) {
diff --git a/internal/rosa/package/muon/respect-colour.patch b/internal/rosa/package/muon/respect-colour.patch
new file mode 100644
index 00000000..a4da13d5
--- /dev/null
+++ b/internal/rosa/package/muon/respect-colour.patch
@@ -0,0 +1,14 @@
+diff --git a/src/log.c b/src/log.c
+index 34f11f19..22fe8f7d 100644
+--- a/src/log.c
++++ b/src/log.c
+@@ -506,6 +506,9 @@ log_set_file(struct workspace *wk, FILE *log_file)
+ log_cfg.tstr = 0;
+ log_cfg.tstr_wk = 0;
+ log_cfg.file_is_a_tty = log_file && fs_is_a_tty(wk, log_file);
++ if (getenv("CLICOLOR_FORCE") != NULL) {
++ log_cfg.file_is_a_tty = true;
++ }
+ }
+
+ void