[cairo-commit] 2 commits - meson.build
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Mar 5 08:08:57 UTC 2021
meson.build | 25 ++++++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
New commits:
commit 7788000be0551c5cc77057db775f316f9f0e7f29
Merge: 71ece6d14 1bec56ea8
Author: Uli Schlachter <psychon at znc.in>
Date: Fri Mar 5 08:08:55 2021 +0000
Merge branch 'meson-allow-skipping-of-run-check-for-ipc-rmid-deferred-release-in-cross-build' into 'master'
meson: allow skipping of run check for IPC_RMID_DEFERRED_RELEASE
Closes #408
See merge request cairo/cairo!134
commit 1bec56ea8a931e1ae1c74cc740134497ec365267
Author: Tim-Philipp Müller <tim at centricular.com>
Date: Thu Feb 25 10:52:45 2021 +0000
meson: allow skipping of run check for IPC_RMID_DEFERRED_RELEASE
The run check is particularly annoying in cross-compile scenarios,
so allow bypassing the check by having the user provide the value
via a cross file or native file:
[properties]
ipc_rmid_deferred_release = true
Closes #408
diff --git a/meson.build b/meson.build
index b1759b5f3..6d5c7dc89 100644
--- a/meson.build
+++ b/meson.build
@@ -283,13 +283,28 @@ if x11_dep.found() and xext_dep.found()
['X11/extensions/shmstr.h', {'extra-headers': extra_headers}],
]
deps += [x11_dep, xext_dep]
- res = cc.run(files('meson-cc-tests/ipc_rmid_deferred_release.c'),
- dependencies: [x11_dep, xext_dep],
- name: 'shmctl IPC_RMID allowes subsequent attaches')
- if res.returncode() == 0
- conf.set('IPC_RMID_DEFERRED_RELEASE', 1)
+ # Can skip the run check by providing the result in a cross file or
+ # native file as bool property value.
+ prop = meson.get_external_property('ipc_rmid_deferred_release', 'auto')
+ # We don't know the type of prop (bool, string) but need to differentiate
+ # between a set value (bool) or the fallback value (string), so convert to
+ # a string and chec the string value.
+ prop_str = '@0@'.format(prop)
+ if prop_str in ['true', 'false']
+ ipc_rmid_deferred_release = (prop_str == 'true')
+ message('IPC_RMID_DEFERRED_RELEASE:', ipc_rmid_deferred_release)
+ elif prop_str == 'auto'
+ res = cc.run(files('meson-cc-tests/ipc_rmid_deferred_release.c'),
+ dependencies: [x11_dep, xext_dep],
+ name: 'shmctl IPC_RMID allowes subsequent attaches')
+
+ ipc_rmid_deferred_release = (res.returncode() == 0)
+ else
+ error('Unexpected value for external property ipc_rmid_deferred_release: @0@'.format(prop_str))
endif
+
+ conf.set10('IPC_RMID_DEFERRED_RELEASE', ipc_rmid_deferred_release)
endif
if feature_conf.get('CAIRO_HAS_XLIB_SURFACE', 0) == 1
More information about the cairo-commit
mailing list