[dconf/wip/jtojnar/bash-completion-prefix] build: Install bash-completion relative to datadir
- From: Jan Tojnar <jtojnar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf/wip/jtojnar/bash-completion-prefix] build: Install bash-completion relative to datadir
- Date: Thu, 16 Apr 2020 14:11:38 +0000 (UTC)
commit ba4abea9605fde709fd700383791ca760b24f8b4
Author: Jan Tojnar <jtojnar gmail com>
Date: Thu Apr 16 11:21:06 2020 +0200
build: Install bash-completion relative to datadir
Since bash-completion 2.9, it was no longer possible to override
the completionsdir through prefix. [1] In 2.10, the overridability
was re-estabilished but this time through datadir variable. [2]
This should not really matter except for developers installing the project
into a custom prefix or distros using per-package prefixes like NixOS.
[1]: https://github.com/scop/bash-completion/commit/81ba2c7e7dfbaefbafa1e8615727c9612e5fb314
[2]: https://github.com/scop/bash-completion/pull/344
Co-Authored-By: Iñigo Martínez <inigomartinez gmail com>
meson.build | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/meson.build b/meson.build
index 6620112..b7114bf 100644
--- a/meson.build
+++ b/meson.build
@@ -50,8 +50,12 @@ dbus_session_service_dir = dependency('dbus-1').get_pkgconfig_variable('session_
enable_bash_completion = get_option('bash_completion')
if enable_bash_completion
- # FIXME: the `.pc` file is wrong because `completionsdir` should be relative to `datadir`, not `prefix`
- completions_dir = dependency('bash-completion').get_pkgconfig_variable('completionsdir', define_variable:
['prefix', dconf_prefix])
+ bash_completion_dep = dependency('bash-completion')
+ completions_dir = bash_completion_dep.get_pkgconfig_variable(
+ 'completionsdir',
+ # bash-completion 2.10 changed the substitutions
+ define_variable: bash_completion_dep.version().version_compare('>= 2.10') ? ['datadir', dconf_datadir] :
['prefix', dconf_prefix],
+ )
endif
configure_file(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]