[gitg] build: Follow the new meson porting guidelines



commit d56af4d802014f6beef32508797e47b245cd5cd4
Author: Iñigo Martínez <inigomartinez gmail com>
Date:   Wed Nov 15 11:00:01 2017 +0100

    build: Follow the new meson porting guidelines
    
    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.
    - The character separator from multi-word options has been changed
      to underscore.
    
    The warning compiler options are also removed because meson's
    compiler related options should be used.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=788796

 data/meson.build        |    2 +-
 libgitg-ext/meson.build |    2 +-
 meson.build             |    8 +++-----
 meson_options.txt       |    8 ++++----
 meson_post_install.py   |    2 +-
 5 files changed, 10 insertions(+), 12 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index 4e780a0..9055183 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -50,7 +50,7 @@ install_data(
   install_dir: join_paths(gitg_mandir, 'man1')
 )
 
-enable_glade_catalog = get_option('enable-glade-catalog')
+enable_glade_catalog = get_option('glade_catalog')
 if enable_glade_catalog
   install_data(
     'gitg-glade.xml',
diff --git a/libgitg-ext/meson.build b/libgitg-ext/meson.build
index a29d3ce..d71c064 100644
--- a/libgitg-ext/meson.build
+++ b/libgitg-ext/meson.build
@@ -140,7 +140,7 @@ custom_target(
   install_dir: gitg_girepositorydir
 )
 
-enable_python = get_option('enable-python')
+enable_python = get_option('python')
 if enable_python
   python = import('python3')
 
diff --git a/meson.build b/meson.build
index c58968c..e7e9506 100644
--- a/meson.build
+++ b/meson.build
@@ -121,7 +121,7 @@ endforeach
 common_flags = ['-DHAVE_CONFIG_H']
 warn_flags = []
 
-if get_option('enable-deprecations')
+if get_option('deprecations')
   warn_flags += [
     '-DG_DISABLE_DEPRECATED',
     '-DGDK_DISABLE_DEPRECATED',
@@ -134,8 +134,6 @@ endif
 
 if gitg_debug
   test_cflags = [
-    '-w',
-    '-Werror',
     '-Werror=format=2',
     '-Werror=implicit-function-declaration',
     '-Werror=init-self',
@@ -220,7 +218,7 @@ config_h.set_quoted('PLATFORM_NAME', platform_name)
 
 g_ir_compiler = find_program('g-ir-compiler')
 
-enable_docs = get_option('enable-docs')
+enable_docs = get_option('docs')
 if enable_docs
   docs_dir = join_paths(meson.source_root(), 'docs')
   valadoc = find_program('valadoc')
@@ -257,7 +255,7 @@ configure_file(
 meson.add_install_script(
   'meson_post_install.py',
   gitg_datadir,
-  (enable_python ? 'enable-python' : ''),
+  (enable_python ? 'python' : ''),
   gitg_libdir
 )
 
diff --git a/meson_options.txt b/meson_options.txt
index 4c60a5a..f1973be 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,4 +1,4 @@
-option('enable-glade-catalog', type: 'boolean', value: true, description: 'Install a glade catalog file')
-option('enable-python', type: 'boolean', value: true, description: 'Build with python support')
-option('enable-deprecations', type: 'boolean', value: false, description: 'warn about deprecated usages')
-option('enable-docs', type: 'boolean', value: false, description: 'enable generating documentation')
+option('glade_catalog', type: 'boolean', value: true, description: 'Install a glade catalog file')
+option('python', type: 'boolean', value: true, description: 'Build with python support')
+option('deprecations', type: 'boolean', value: false, description: 'warn about deprecated usages')
+option('docs', type: 'boolean', value: false, description: 'enable generating documentation')
diff --git a/meson_post_install.py b/meson_post_install.py
index 64d4c79..967e9e2 100644
--- a/meson_post_install.py
+++ b/meson_post_install.py
@@ -25,7 +25,7 @@ if not os.environ.get('DESTDIR'):
   print('Compiling gsettings schemas...')
   subprocess.call(['glib-compile-schemas', schemadir])
 
-  if sys.argv[2] == 'enable-python':
+  if sys.argv[2] == 'python':
     print('Byte-compiling python modules...')
     subprocess.call(['python', '-m', 'compileall', '-f', '-q', sys.argv[3]])
 


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