forked from rosa/hakurei
internal/rosa/package/meson: respect CLICOLOR_FORCE
Upstream had ticket and patch available since 2017, still unmerged and refuses to support the environment variable, so patch it in. This also strips out the variable for test execution to work around buggy test suites like glib. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
package meson {
|
||||
description = "an open source build system";
|
||||
website = "https://mesonbuild.com";
|
||||
anitya = 6472;
|
||||
|
||||
version# = "1.11.2";
|
||||
source = remoteGitHub {
|
||||
suffix = "mesonbuild/meson";
|
||||
tag = version;
|
||||
checksum = "9AMilGxTOVqPA2DaGMASyuVs1BeTzgDZ0NH2oSYoRZk846ApvfOBa4cc18XEEK7M";
|
||||
};
|
||||
patches = [
|
||||
"respect-colour.patch",
|
||||
"test-strip-colour.patch",
|
||||
];
|
||||
|
||||
env = [
|
||||
"CMAKE_MAKE_PROGRAM=ninja",
|
||||
];
|
||||
|
||||
exec = pip {
|
||||
enterSource = true;
|
||||
check = `
|
||||
cd 'test cases'
|
||||
rm -rf \
|
||||
'common/32 has header' \
|
||||
'common/66 vcstag' \
|
||||
'common/153 wrap file should not failed' \
|
||||
'common/184 openmp' \
|
||||
'common/189 check header' \
|
||||
'linuxlike/6 subdir include order' \
|
||||
'linuxlike/9 compiler checks with dependencies' \
|
||||
'linuxlike/13 cmake dependency' \
|
||||
'frameworks/15 llvm' \
|
||||
'frameworks/29 blocks'
|
||||
cd ..
|
||||
|
||||
python3 ./run_project_tests.py \
|
||||
-v \
|
||||
` + jobsFlagE + ` \
|
||||
--failfast \
|
||||
--backend=ninja
|
||||
`;
|
||||
};
|
||||
|
||||
inputs = [
|
||||
python-setuptools,
|
||||
pkg-config,
|
||||
cmake,
|
||||
ninja,
|
||||
python-pytest,
|
||||
];
|
||||
|
||||
runtime = [
|
||||
python,
|
||||
pkg-config,
|
||||
cmake,
|
||||
ninja,
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/mesonbuild/mlog.py b/mesonbuild/mlog.py
|
||||
index e1d998a5d..83d6cf9d2 100644
|
||||
--- a/mesonbuild/mlog.py
|
||||
+++ b/mesonbuild/mlog.py
|
||||
@@ -404,6 +404,8 @@ class _Logger:
|
||||
_colorize_console = os.isatty(output.fileno()) and _windows_ansi()
|
||||
else:
|
||||
_colorize_console = os.isatty(output.fileno()) and os.environ.get('TERM', 'dumb') != 'dumb'
|
||||
+ if os.environ.get('CLICOLOR_FORCE', '') != '':
|
||||
+ _colorize_console = True
|
||||
except Exception:
|
||||
_colorize_console = False
|
||||
output.colorize_console = _colorize_console # type: ignore
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py
|
||||
index 0661fa529..34ab36aa9 100644
|
||||
--- a/mesonbuild/mtest.py
|
||||
+++ b/mesonbuild/mtest.py
|
||||
@@ -1817,6 +1817,8 @@ class TestHarness:
|
||||
test.exe_wrapper and test.exe_wrapper.found()):
|
||||
env['MESON_EXE_WRAPPER'] = join_args(test.exe_wrapper.get_command())
|
||||
env['MESON_TEST_ITERATION'] = str(iteration + 1)
|
||||
+ env.pop('CLICOLOR_FORCE')
|
||||
+ env.pop('FORCE_COLOR')
|
||||
return SingleTestRunner(test, env, name, options)
|
||||
|
||||
def process_test_result(self, result: TestRun) -> None:
|
||||
Reference in New Issue
Block a user