summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <mrgarnacho@gmail.com>2020-02-25 15:47:28 +0000
committerCarlos Garnacho <mrgarnacho@gmail.com>2020-02-25 15:47:28 +0000
commit030c48a475c664aaf9fe03a6b2fe26aa8204542b (patch)
tree5a764780c085e7b7213b01534ccd86a1c84901e7
parentb9e8a69ad1ebd94764e7903c283cb376c3c1b370 (diff)
parentd318ebeb5d4f984c61373b492d86ca50fbfd71dc (diff)
downloadtracker-030c48a475c664aaf9fe03a6b2fe26aa8204542b.tar.gz
Merge branch 'sam/meson-options-cleanup' into 'master'
Clean up Meson options Closes tracker-miners#49 See merge request GNOME/tracker!185
-rw-r--r--meson.build62
-rw-r--r--meson_options.txt16
-rw-r--r--src/libtracker-sparql-backend/meson.build1
-rw-r--r--src/tracker/meson.build2
4 files changed, 18 insertions, 63 deletions
diff --git a/meson.build b/meson.build
index 23d3c61b2..a8e1c4cfd 100644
--- a/meson.build
+++ b/meson.build
@@ -175,60 +175,21 @@ if unicode_library_name == ''
endif
####################################################################
-# D-Bus service files
-####################################################################
-
-if get_option('dbus_services') == ''
- dbus_services_dir = dbus.get_pkgconfig_variable('session_bus_services_dir',
- define_variable: [ 'datadir', datadir ])
-else
- dbus_services_dir = get_option('dbus_services')
-endif
-
-####################################################################
-# systemd user services
-####################################################################
-
-install_systemd_user_services = false
-if get_option('systemd_user_services') == 'yes' or get_option('systemd_user_services') == 'auto'
- systemd = dependency('systemd', required: false)
- if systemd.found()
- # FIXME: this would ideally use the systemduserunitdir pkgconfig variable, but
- # it does not depend on variables we can override to install within prefix.
- install_systemd_user_services = true
- systemd_user_services_dir = join_paths(libdir, 'systemd', 'user')
- else
- install_systemd_user_services = false
- systemd_user_services_dir = '(not found)'
- endif
-elif get_option('systemd_user_services') == 'no' or get_option('systemd_user_services') == ''
- install_systemd_user_services = false
- systemd_user_services_dir = '(disabled)'
-else
- install_systemd_user_services = true
- systemd_user_services_dir = get_option('systemd_user_services')
-endif
-
-####################################################################
# bash-completion
####################################################################
-install_bash_completion = false
-if get_option('bash_completion') == 'yes' or get_option('bash_completion') == 'auto'
- bash_completion_package = dependency('bash-completion', required: false)
- if bash_completion_package.found()
- bash_completion_dir = bash_completion_package.get_pkgconfig_variable('completionsdir',
- define_variable: [ 'prefix', get_option('prefix') ])
- else
- bash_completion_dir = join_paths(datadir, 'bash-completion', 'completions')
+if get_option('bash_completion')
+ bash_completion_dir = get_option('bash_completion_dir')
+
+ if bash_completion_dir == ''
+ bash_completion_package = dependency('bash-completion', required: false)
+ if bash_completion_package.found()
+ bash_completion_dir = bash_completion_package.get_pkgconfig_variable('completionsdir',
+ define_variable: [ 'prefix', get_option('prefix') ])
+ else
+ bash_completion_dir = join_paths(datadir, 'bash-completion', 'completions')
+ endif
endif
- install_bash_completion = true
-elif get_option('bash_completion') == 'no' or get_option('bash_completion') == ''
- install_bash_completion = false
- bash_completion_dir = '(disabled)'
-else
- install_bash_completion = true
- bash_completion_dir = get_option('bash_completion')
endif
conf = configuration_data()
@@ -354,7 +315,6 @@ summary = [
'\nFeature Support:',
' Support for network status detection: ' + have_network_manager.to_string(),
' Unicode support library: ' + unicode_library_name,
- ' Build with Journal support: ' + get_option('journal').to_string(),
' Build with SQLite FTS support: @0@ (built-in FTS: @1@)'.format(
get_option('fts'), sqlite3_has_builtin_fts5),
' Build with Stemming support: ' + have_libstemmer.to_string(),
diff --git a/meson_options.txt b/meson_options.txt
index 3d01836ab..e29aaaa84 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,10 +1,8 @@
-option('docs', type: 'boolean', value: false,
+option('docs', type: 'boolean', value: false, yield: true,
description: 'Generate API documentation with gtk-doc')
option('fts', type: 'boolean', value: true,
description: 'Enable the Tracker full-text search feature')
-option('journal', type: 'boolean', value: true,
- description: 'Enable database journal backup mechanism')
-option('man', type: 'boolean', value: true,
+option('man', type: 'boolean', value: true, yield: true,
description: 'Install man pages')
option('override_sqlite_version_check', type: 'boolean', value: false,
description: 'Override checks for broken sqlite versions')
@@ -16,12 +14,10 @@ option('stemmer', type: 'feature', value: 'auto',
option('unicode_support', type: 'combo', choices: ['icu', 'unistring', 'auto'], value: 'auto',
description: 'Unicode support library to use')
-option('bash_completion', type: 'string', value: 'yes',
- description: 'Directory to install Bash completion files (or "yes" for default directory, "no" to disable installation')
-option('dbus_services', type: 'string', value: '',
- description: 'Directory to install D-Bus .service files (leave blank to use the value from dbus-1.pc)')
-option('systemd_user_services', type: 'string', value: 'yes',
- description: 'Directory to install systemd user .service files (or "yes" for default directory, "no" to disable installation)')
+option('bash_completion', type: 'boolean', value: true,
+ description: 'Whether to install Bash completion files')
+option('bash_completion_dir', type: 'string',
+ description: 'Directory to install Bash completion files')
option('test_utils', type: 'boolean', value: true,
description: 'Whether to install the trackertestutils Python package')
option('test_utils_dir', type: 'string', value: '',
diff --git a/src/libtracker-sparql-backend/meson.build b/src/libtracker-sparql-backend/meson.build
index 504f77fa8..59384d42c 100644
--- a/src/libtracker-sparql-backend/meson.build
+++ b/src/libtracker-sparql-backend/meson.build
@@ -41,7 +41,6 @@ pkg.generate(libtracker_sparql,
'tracker_datadir=${datadir}' / 'tracker',
'ontologies_dir=' + tracker_ontologies_dir,
'domain_ontologies_dir=${tracker_datadir}' / 'domain-ontologies',
- 'dbus_services_dir=' + dbus_services_dir,
],
)
diff --git a/src/tracker/meson.build b/src/tracker/meson.build
index 7b7161c05..650d5155d 100644
--- a/src/tracker/meson.build
+++ b/src/tracker/meson.build
@@ -30,7 +30,7 @@ executable('tracker', sources,
meson.add_install_script('make-subcommand-links.sh', modules)
-if install_bash_completion
+if get_option('bash_completion')
install_data(
sources: 'bash-completion/tracker',
install_dir: bash_completion_dir)