[gvfs] build: Rename build options



commit cdc33bf54f501a8b4574f86945628ab6c2036d64
Author: Iñigo Martínez <inigomartinez gmail com>
Date:   Fri Nov 10 16:31:39 2017 +0100

    build: Rename build options
    
    Following the new meson porting guidelines, this patch renames the
    build options. The list of changes is as follows:
    
    - Remove the enable prefix from boolean options.
    - Remove the with prefix from string options.
    - The character separator from multi-word options has been changed
      to underscore.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=786149

 man/meson.build   |    2 +-
 meson.build       |   64 +++++++++++++++++++++++++---------------------------
 meson_options.txt |   62 +++++++++++++++++++++++++-------------------------
 3 files changed, 63 insertions(+), 65 deletions(-)
---
diff --git a/man/meson.build b/man/meson.build
index 870d16d..31f7fd3 100644
--- a/man/meson.build
+++ b/man/meson.build
@@ -1,5 +1,5 @@
 xsltproc = find_program('xsltproc', required: false)
-assert(xsltproc.found(), 'xsltproc is required for enable-man')
+assert(xsltproc.found(), 'xsltproc is required for man pages generation')
 
 xsltproc_cmd = [
   xsltproc,
diff --git a/meson.build b/meson.build
index 76bc132..9bdd198 100644
--- a/meson.build
+++ b/meson.build
@@ -249,7 +249,7 @@ libxml_dep = dependency('libxml-2.0', required: false)
 have_libxml = libxml_dep.found()
 
 # *** Check for libgcrypt ***
-enable_gcrypt = get_option('enable-gcrypt')
+enable_gcrypt = get_option('gcrypt')
 if enable_gcrypt
   libgcrypt_req_version = '>= 1.2.2'
 
@@ -270,7 +270,7 @@ endif
 config_h.set('HAVE_GCRYPT', enable_gcrypt)
 
 # *** Check for dbus service dir ***
-dbus_service_dir = get_option('with-dbus-service-dir')
+dbus_service_dir = get_option('dbus_service_dir')
 if dbus_service_dir == ''
   dbus_dep = dependency('dbus-1', required: false)
   assert(dbus_dep.found(), 'dbus-1 required but not found, please provide a valid D-Bus service dir')
@@ -279,16 +279,16 @@ endif
 
 dbus_service_in = files('dbus.service.in')
 
-gio_module_dir = get_option('with-gio-module-dir')
+gio_module_dir = get_option('gio_module_dir')
 if gio_module_dir == ''
   gio_module_dir = gio_dep.get_pkgconfig_variable('giomoduledir')
 endif
 
 # *** Check for systemd options ***
-systemd_user_unit_dir = get_option('with-systemduserunitdir')
+systemd_user_unit_dir = get_option('systemduserunitdir')
 install_systemd_user_unit_dir = (systemd_user_unit_dir != 'no')
 
-tmp_files_dir = get_option('with-tmpfilesdir')
+tmp_files_dir = get_option('tmpfilesdir')
 install_tmp_files_dir = (tmp_files_dir != 'no')
 
 if install_systemd_user_unit_dir or install_tmp_files_dir
@@ -308,27 +308,27 @@ if install_systemd_user_unit_dir or install_tmp_files_dir
 endif
 
 # *** Check for gcr ***
-enable_gcr = get_option('enable-gcr')
+enable_gcr = get_option('gcr')
 if enable_gcr
   gcr_dep = dependency('gcr-base-3')
 endif
 
 # *** Check if we should build with admin backend ***
-enable_admin = get_option('enable-admin')
+enable_admin = get_option('admin')
 if enable_admin
   libcap_dep = dependency('libcap')
   polkit_gobject_dep = dependency('polkit-gobject-1')
 endif
 
 # *** Check if we should build with http backend ***
-enable_http = get_option('enable-http')
+enable_http = get_option('http')
 if enable_http
   assert(have_libxml, 'http required but libxml-2.0 not found')
   libsoup_dep = dependency('libsoup-2.4', version: '>= 2.42.0')
 endif
 
 # *** Check if we should build with DNS-SD backend ***
-enable_dnssd = get_option('enable-dnssd')
+enable_dnssd = get_option('dnssd')
 if enable_dnssd
   avahi_client_dep = dependency('avahi-client', version: '>= 0.6')
   avahi_glib_dep = dependency('avahi-glib', version: '>= 0.6')
@@ -336,33 +336,33 @@ endif
 config_h.set('HAVE_AVAHI', enable_dnssd)
 
 # *** Check for gudev ***
-enable_gudev = get_option('enable-gudev')
+enable_gudev = get_option('gudev')
 if enable_gudev
   gudev_dep = dependency('gudev-1.0', version: '>= 147')
 endif
 config_h.set('HAVE_GUDEV', enable_gudev)
 
 # *** Check for FUSE ***
-enable_fuse = get_option('enable-fuse')
+enable_fuse = get_option('fuse')
 if enable_fuse
   fuse_dep = dependency('fuse', version: '>= 2.8.0')
 endif
 config_h.set('HAVE_FUSE', enable_fuse)
 
 # *** Check for gnome-disk-utility ***
-enable_gdu = get_option('enable-gdu')
+enable_gdu = get_option('gdu')
 if enable_gdu
   gdu_dep = dependency('gdu', version: '>= 3.0.2')
 endif
 
 # *** Check for udisks2 ***
-enable_udisks2 = get_option('enable-udisks2')
+enable_udisks2 = get_option('udisks2')
 if enable_udisks2
   udisks2_dep = dependency('udisks2', version: '>= 1.97')
 endif
 
 # *** Check for libsystemd-login ***
-enable_logind = get_option('enable-logind')
+enable_logind = get_option('logind')
 if enable_logind
   logind_dep = dependency('libsystemd', required: false)
   if not logind_dep.found()
@@ -374,53 +374,53 @@ endif
 config_h.set('HAVE_LOGIND', enable_logind)
 
 # *** Check if we should build with AFC backend ***
-enable_afc = get_option('enable-afc')
+enable_afc = get_option('afc')
 if enable_afc
   libimobiledevice_dep = dependency('libimobiledevice-1.0', version: '>= 1.2')
   libplist_dep = dependency('libplist', version: '>= 0.15')
 endif
 
 # *** Check if we should build with GOA volume monitor ***
-enable_goa = get_option('enable-goa')
+enable_goa = get_option('goa')
 if enable_goa
   goa_dep = dependency('goa-1.0', version: '>= 3.17.1')
 endif
 
 # *** Check for GNOME Keyring ***
-enable_keyring = get_option('enable-keyring')
+enable_keyring = get_option('keyring')
 if enable_keyring
   libsecret_dep = dependency('libsecret-unstable')
 endif
 config_h.set('HAVE_KEYRING', enable_keyring)
 
 # *** Check if we should build with libbluray ***
-enable_bluray = get_option('enable-bluray')
+enable_bluray = get_option('bluray')
 if enable_bluray
   libbluray_dep = dependency('libbluray')
 endif
 config_h.set('HAVE_BLURAY', enable_bluray)
 
 # *** Check if we should build with libusb-1.0 ***
-enable_libusb = get_option('enable-libusb')
+enable_libusb = get_option('libusb')
 if enable_libusb
   libusb_dep = dependency('libusb-1.0', version: '>= 1.0.21')
 endif
 config_h.set10('HAVE_LIBUSB', enable_libusb)
 
 # *** Check for samba ***
-enable_samba = get_option('enable-smb')
+enable_samba = get_option('smb')
 if enable_samba
   smbclient_dep = dependency('smbclient')
 endif
 
 # *** Check for libarchive ***
-enable_archive = get_option('enable-archive')
+enable_archive = get_option('archive')
 if enable_archive
   libarchive_dep = dependency('libarchive')
 endif
 
 # *** Check if we should build with CDDA backend ***
-enable_cdda = get_option('enable-cdda')
+enable_cdda = get_option('cdda')
 if enable_cdda
   assert(enable_gudev, 'CDDA backend requested but gudev is required')
 
@@ -429,7 +429,7 @@ if enable_cdda
 endif
 
 # *** Check if we should build with Google backend ***
-enable_google = get_option('enable-google')
+enable_google = get_option('google')
 if enable_google
   assert(enable_goa, 'Google backend requested but GOA is required')
 
@@ -439,7 +439,7 @@ if enable_google
 endif
 
 # *** Check for gphoto2 ***
-enable_gphoto2 = get_option('enable-gphoto2')
+enable_gphoto2 = get_option('gphoto2')
 if enable_gphoto2
   assert(enable_gudev, 'gphoto2 requested but gudev is required')
   assert(host_machine.system().contains('linux') or host_machine.system().contains('bsd'),
@@ -450,7 +450,7 @@ if enable_gphoto2
 endif
 
 # *** Check for libmtp ***
-enable_mtp = get_option('enable-mtp')
+enable_mtp = get_option('mtp')
 if enable_mtp
   assert(enable_gudev, 'libmtp requested but gudev is required')
 
@@ -463,17 +463,17 @@ endif
 config_h.set('HAVE_LIBMTP', enable_mtp)
 
 # *** AFP backend ***
-enable_afp = get_option('enable-afp')
+enable_afp = get_option('afp')
 
 # *** NFS backend ***
-enable_nfs = get_option('enable-nfs')
+enable_nfs = get_option('nfs')
 if enable_nfs
   libnfs_dep = dependency('libnfs', version: '>= 1.9.8')
 endif
 
 # *** Enable development utils ***
-enable_devel_utils = get_option('enable-devel-utils')
-enable_installed_tests = get_option('enable-installed-tests')
+enable_devel_utils = get_option('devel_utils')
+enable_installed_tests = get_option('installed_tests')
 
 gnome = import('gnome')
 i18n = import('i18n')
@@ -493,13 +493,11 @@ subdir('daemon')
 subdir('monitor')
 subdir('po')
 
-enable_programs = get_option('enable-programs')
-if enable_programs
+if get_option('deprecated_programs')
   subdir('programs')
 endif
 
-enable_man = get_option('enable-man')
-if enable_man
+if get_option('man')
   subdir('man')
 endif
 
diff --git a/meson_options.txt b/meson_options.txt
index 205bb61..de30b57 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,34 +1,34 @@
-option('with-dbus-service-dir', type: 'string', value: '', description: 'custom directory for dbus service 
files')
-option('with-gio-module-dir', type: 'string', value: '', description: 'custom directory for gio modules')
-option('with-systemduserunitdir', type: 'string', value: '', description: 'custom directory for systemd user 
units, or \'no\' to disable')
-option('with-tmpfilesdir', type: 'string', value: '', description: 'custom directory for tmpfiles.d config 
files, or \'no\' to disable')
+option('dbus_service_dir', type: 'string', value: '', description: 'custom directory for dbus service files')
+option('gio_module_dir', type: 'string', value: '', description: 'custom directory for gio modules')
+option('systemduserunitdir', type: 'string', value: '', description: 'custom directory for systemd user 
units, or \'no\' to disable')
+option('tmpfilesdir', type: 'string', value: '', description: 'custom directory for tmpfiles.d config files, 
or \'no\' to disable')
 
-option('enable-admin', type: 'boolean', value: true, description: 'build with admin backend')
-option('enable-afc', type: 'boolean', value: true, description: 'build with afc backend and volume monitor')
-option('enable-afp', type: 'boolean', value: true, description: 'build with afp backends')
-option('enable-archive', type: 'boolean', value: true, description: 'build with archive backend')
-option('enable-cdda', type: 'boolean', value: true, description: 'build with cdda backend')
-option('enable-dnssd', type: 'boolean', value: true, description: 'build with dnssd backend')
-option('enable-gdu', type: 'boolean', value: false, description: 'build with gdu volume monitor')
-option('enable-goa', type: 'boolean', value: true, description: 'build with goa volume monitor')
-option('enable-google', type: 'boolean', value: true, description: 'build with google backend')
-option('enable-gphoto2', type: 'boolean', value: true, description: 'build with gphoto2 backend and volume 
monitor')
-option('enable-http', type: 'boolean', value: true, description: 'build with http/dav backends')
-option('enable-mtp', type: 'boolean', value: true, description: 'build with mtp backend and volume monitor')
-option('enable-nfs', type: 'boolean', value: true, description: 'build with nfs backend')
-option('enable-smb', type: 'boolean', value: true, description: 'build with smb backends')
-option('enable-udisks2', type: 'boolean', value: true, description: 'build with udisks2 volume monitor')
+option('admin', type: 'boolean', value: true, description: 'build with admin backend')
+option('afc', type: 'boolean', value: true, description: 'build with afc backend and volume monitor')
+option('afp', type: 'boolean', value: true, description: 'build with afp backends')
+option('archive', type: 'boolean', value: true, description: 'build with archive backend')
+option('cdda', type: 'boolean', value: true, description: 'build with cdda backend')
+option('dnssd', type: 'boolean', value: true, description: 'build with dnssd backend')
+option('gdu', type: 'boolean', value: false, description: 'build with gdu volume monitor')
+option('goa', type: 'boolean', value: true, description: 'build with goa volume monitor')
+option('google', type: 'boolean', value: true, description: 'build with google backend')
+option('gphoto2', type: 'boolean', value: true, description: 'build with gphoto2 backend and volume monitor')
+option('http', type: 'boolean', value: true, description: 'build with http/dav backends')
+option('mtp', type: 'boolean', value: true, description: 'build with mtp backend and volume monitor')
+option('nfs', type: 'boolean', value: true, description: 'build with nfs backend')
+option('smb', type: 'boolean', value: true, description: 'build with smb backends')
+option('udisks2', type: 'boolean', value: true, description: 'build with udisks2 volume monitor')
 
-option('enable-bluray', type: 'boolean', value: true, description: 'build with bluray metadata support')
-option('enable-fuse', type: 'boolean', value: true, description: 'build with fuse support')
-option('enable-gcr', type: 'boolean', value: true, description: 'build with gcr certificate support')
-option('enable-gcrypt', type: 'boolean', value: true, description: 'build with gcrypt support')
-option('enable-gudev', type: 'boolean', value: true, description: 'build with gudev device support')
-option('enable-keyring', type: 'boolean', value: true, description: 'build with keyring support')
-option('enable-logind', type: 'boolean', value: true, description: 'build with logind support')
-option('enable-libusb', type: 'boolean', value: true, description: 'build with libusb interruption support')
+option('bluray', type: 'boolean', value: true, description: 'build with bluray metadata support')
+option('fuse', type: 'boolean', value: true, description: 'build with fuse support')
+option('gcr', type: 'boolean', value: true, description: 'build with gcr certificate support')
+option('gcrypt', type: 'boolean', value: true, description: 'build with gcrypt support')
+option('gudev', type: 'boolean', value: true, description: 'build with gudev device support')
+option('keyring', type: 'boolean', value: true, description: 'build with keyring support')
+option('logind', type: 'boolean', value: true, description: 'build with logind support')
+option('libusb', type: 'boolean', value: true, description: 'build with libusb interruption support')
 
-option('enable-devel-utils', type: 'boolean', value: false, description: 'build with development utility 
programs')
-option('enable-installed-tests', type: 'boolean', value: false, description: 'enable installed unit tests')
-option('enable-man', type: 'boolean', value: false, description: 'generate man pages')
-option('enable-programs', type: 'boolean', value: false, description: 'generate deprecated programs')
+option('devel_utils', type: 'boolean', value: false, description: 'build with development utility programs')
+option('installed_tests', type: 'boolean', value: false, description: 'enable installed unit tests')
+option('man', type: 'boolean', value: false, description: 'generate man pages')
+option('deprecated_programs', type: 'boolean', value: false, description: 'generate deprecated programs')


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