meson: Relocate bash_completion_dir to use the configured datadir

Suggested-by: Florian Müllner

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3897
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4235>
This commit is contained in:
Daniel van Vugt 2025-02-03 15:17:34 +08:00 committed by Marge Bot
parent f31539984d
commit 85cb10a4b4

View File

@ -6,7 +6,10 @@ install_data(
if have_bash_completion
bash_completion = dependency('bash-completion', required: false)
if bash_completion.found()
bash_completion_dir = bash_completion.get_variable(pkgconfig: 'completionsdir')
bash_completion_dir = bash_completion.get_variable(
pkgconfig: 'completionsdir',
pkgconfig_define: ['datadir', datadir],
)
else
bash_completion_dir = get_option('sysconfdir') / 'bash_completion.d'
endif