[gedit] build: Reintroduce enable-gvfs-metadata option



commit 64cc3b8534eeb524d129cd1adc5725b0e9bacab1
Author: Andrea Azzarone <andrea azzarone canonical com>
Date:   Mon Apr 1 18:52:43 2019 +0100

    build: Reintroduce enable-gvfs-metadata option
    
    Gedit used to have an enable-gvfs-metadata to enable using gvfs to store
    metadata. This option was removed with the port to meson. Reintroduce it and set
    the default to 'auto' (defaults to 'yes' when running in linux, to 'no'
    otherwise).
    
    Closes: https://gitlab.gnome.org/GNOME/gedit/issues/141

 meson.build       | 12 ++++++++++++
 meson_options.txt |  4 ++++
 2 files changed, 16 insertions(+)
---
diff --git a/meson.build b/meson.build
index 237c2caf5..cb9170581 100644
--- a/meson.build
+++ b/meson.build
@@ -119,6 +119,17 @@ config_h.set_quoted('LIBDIR', libdir)
 config_h.set_quoted('DATADIR', datadir)
 config_h.set_quoted('VERSION', version)
 
+enable_gvfs_metadata = get_option('enable-gvfs-metadata')
+if enable_gvfs_metadata == 'yes' or (enable_gvfs_metadata == 'auto' and host_machine.system() == 'linux')
+  enable_gvfs_metadata = true
+else
+  enable_gvfs_metadata = false
+endif
+
+if enable_gvfs_metadata
+  config_h.set('ENABLE_GVFS_METADATA', 1)
+endif
+
 config_h.set('GEDIT_MAJOR_VERSION', version_major)
 config_h.set('GEDIT_MINOR_VERSION', version_minor)
 config_h.set('GEDIT_MICRO_VERSION', version_micro)
@@ -178,6 +189,7 @@ summary = [
   '  Introspection: @0@'.format(generate_gir),
   '        Plugins: @0@'.format(build_plugins),
   '       Vala API: @0@'.format(generate_vapi),
+  '  Gvfs metadata: @0@'.format(enable_gvfs_metadata),
   '',
   'Directories:',
   '         prefix: @0@'.format(prefix),
diff --git a/meson_options.txt b/meson_options.txt
index 9a387f428..90803fae7 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -12,3 +12,7 @@ option('plugins',
 option('documentation',
        type: 'boolean', value: false,
        description: 'Build reference manual (requires gtk-doc)')
+
+option('enable-gvfs-metadata',
+        type: 'combo', choices : ['yes', 'no', 'auto'], value : 'auto',
+        description: 'Enable using gvfs to store metadata')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]