diff options
author | Simon Ser <contact@emersion.fr> | 2022-06-12 09:01:53 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2022-12-08 01:58:34 +0100 |
commit | 1ed513772016623707b9e4c9da5ca3eb8579e0eb (patch) | |
tree | e2b3639583a6d8f31fa0fca72003dca5881a3290 | |
parent | 037b21647b06957682ff8a0a1b24dcbc49e1c357 (diff) |
xwayland: remove find_program() fallback when dep is not found
The dep allows us to check dep variables to discover supported
features. With the binary we assume none of the features are
supported. If a user forgets to install the pkg-config file (e.g.
because it's in a split package) we end up incorrectly disabling
all features. Instead let's error out.
-rw-r--r-- | .builds/alpine.yml | 2 | ||||
-rw-r--r-- | .builds/freebsd.yml | 2 | ||||
-rw-r--r-- | xwayland/meson.build | 31 |
3 files changed, 7 insertions, 28 deletions
diff --git a/.builds/alpine.yml b/.builds/alpine.yml index 6028af00..9723f9c7 100644 --- a/.builds/alpine.yml +++ b/.builds/alpine.yml @@ -15,7 +15,7 @@ packages: - xcb-util-image-dev - xcb-util-renderutil-dev - xcb-util-wm-dev - - xwayland + - xwayland-dev - libseat-dev - hwdata sources: diff --git a/.builds/freebsd.yml b/.builds/freebsd.yml index 0f4007bb..a9650d64 100644 --- a/.builds/freebsd.yml +++ b/.builds/freebsd.yml @@ -22,7 +22,7 @@ packages: - x11/xcb-util-errors - x11/xcb-util-renderutil - x11/xcb-util-wm - - x11-servers/xwayland + - x11-servers/xwayland-devel - sysutils/seatd - gmake - hwdata diff --git a/xwayland/meson.build b/xwayland/meson.build index 5a8c732d..c21f4383 100644 --- a/xwayland/meson.build +++ b/xwayland/meson.build @@ -19,17 +19,9 @@ if not get_option('xwayland').disabled() msg += 'Required for Xwayland support.' endif -xwayland = dependency('xwayland', required: false) +xwayland = dependency('xwayland', required: get_option('xwayland')) if not xwayland.found() - # There's no Xwayland release with the pkg-config file shipped yet. - xwayland_prog = find_program('Xwayland', required: false) - if not xwayland_prog.found() - if get_option('xwayland').enabled() - error('\n'.join(msg).format('xwayland')) - else - subdir_done() - endif - endif + subdir_done() endif foreach lib : xwayland_required @@ -69,22 +61,9 @@ xwayland_feature_names = [ 'terminate_delay', ] -xwayland_features = {} -if xwayland.found() - xwayland_path = xwayland.get_variable('xwayland') - foreach name : xwayland_feature_names - have = xwayland.get_variable('have_' + name, default_value: 'false') == 'true' - xwayland_features += { name: have } - endforeach -else - xwayland_path = xwayland_prog.full_path() - foreach name : xwayland_feature_names - xwayland_features += { name: false } - endforeach -endif - -internal_config.set_quoted('XWAYLAND_PATH', xwayland_path) -foreach name, have : xwayland_features +internal_config.set_quoted('XWAYLAND_PATH', xwayland.get_variable('xwayland')) +foreach name : xwayland_feature_names + have = xwayland.get_variable('have_' + name, default_value: 'false') == 'true' internal_config.set10('HAVE_XWAYLAND_' + name.to_upper(), have) endforeach |