From 066d27181e9a797ad9f8fc43b49fc9a10ff2f707 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 3 Mar 2019 13:42:34 +0000 Subject: gentoo resync : 03.03.2019 --- .../dconf/files/0.30.1-bash-completion-dir.patch | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 gnome-base/dconf/files/0.30.1-bash-completion-dir.patch (limited to 'gnome-base/dconf/files') diff --git a/gnome-base/dconf/files/0.30.1-bash-completion-dir.patch b/gnome-base/dconf/files/0.30.1-bash-completion-dir.patch new file mode 100644 index 000000000000..5d256f7efec5 --- /dev/null +++ b/gnome-base/dconf/files/0.30.1-bash-completion-dir.patch @@ -0,0 +1,62 @@ +From 012b92b115ed96cc66818adbd31557765078be65 Mon Sep 17 00:00:00 2001 +From: Mart Raudsepp +Date: Fri, 22 Feb 2019 22:06:18 +0200 +Subject: [PATCH] build: Allow passing bash-completion dir and have a generic + fallback + +With autotools the installation path was just hardcoded to the usual +location. In meson it was made to always check the path from +bash-completion.pc, but some downstream might want to install the +file without a bash-completion build-dep. Allow installing the +completion file to a passed directory, and add back the fallback +path if an explicit directory isn't passed and bash-completion +package isn't found. This is also what the tracker project does. +--- + meson.build | 20 ++++++++++++++++---- + meson_options.txt | 2 +- + 2 files changed, 17 insertions(+), 5 deletions(-) + +diff --git a/meson.build b/meson.build +index aa87823..a74d5c7 100644 +--- a/meson.build ++++ b/meson.build +@@ -48,10 +48,22 @@ glib_dep = dependency('glib-2.0', version: '>= 2.44.0') + gio_module_dir = gio_dep.get_pkgconfig_variable('giomoduledir', define_variable: ['libdir', dconf_libdir]) + dbus_session_service_dir = dependency('dbus-1').get_pkgconfig_variable('session_bus_services_dir', define_variable: ['datadir', dconf_datadir]) + +-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]) ++enable_bash_completion = false ++if get_option('bash_completion_dir') == 'yes' or get_option('bash_completion_dir') == 'auto' ++ bash_completion_package = dependency('bash-completion', required: false) ++ if bash_completion_package.found() ++ # FIXME: the `.pc` file is wrong because `completionsdir` should be relative to `datadir`, not `prefix` ++ completions_dir = bash_completion_package.get_pkgconfig_variable('completionsdir', ++ define_variable: [ 'prefix', dconf_prefix ]) ++ else ++ completions_dir = join_paths(dconf_datadir, 'bash-completion', 'completions') ++ endif ++ enable_bash_completion = true ++elif get_option('bash_completion_dir') == 'no' or get_option('bash_completion_dir') == '' ++ enable_bash_completion = false ++else ++ enable_bash_completion = true ++ completions_dir = get_option('bash_completion_dir') + endif + + configure_file( +diff --git a/meson_options.txt b/meson_options.txt +index a2794ce..3ac4ede 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -1,4 +1,4 @@ +-option('bash_completion', type: 'boolean', value: true, description: 'install bash completion files') ++option('bash_completion_dir', type: 'string', value: 'yes', description: 'directory to install Bash completion files (or "yes" for default directory, "no" to disable installation)') + option('man', type: 'boolean', value: true, description: 'generate man pages') + option('gtk_doc', type: 'boolean', value: false, description: 'use gtk-doc to build documentation') + option('vapi', type: 'boolean', value: true, description: 'install dconf client vapi') +-- +2.17.0 + -- cgit v1.2.3