[bijiben] build: Migrate to new meson porting guidelines
- From: Isaque Galdino de Araujo <igaldino src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bijiben] build: Migrate to new meson porting guidelines
- Date: Tue, 14 Nov 2017 00:31:12 +0000 (UTC)
commit e7a096640ce818436464177a68e30b26b41d2c7a
Author: Iñigo Martínez <inigomartinez gmail com>
Date: Fri Nov 10 17:04:26 2017 +0100
build: Migrate to 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.
- Remove the with prefix from string options.
- The character separator from multi-word options has been changed
to underscore.
It also removes the -Werror option because it is already included in
meson's warning levels.
https://bugzilla.gnome.org/show_bug.cgi?id=790177
configure | 2 +-
meson.build | 3 +--
meson_options.txt | 4 ++--
meson_post_install.py | 2 +-
src/libbiji/meson.build | 2 +-
5 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/configure b/configure
index 720cb49..10e4c07 100755
--- a/configure
+++ b/configure
@@ -149,7 +149,7 @@ END
cmd_options=""
for key in "${!meson_options[@]}"; do
- cmd_options="$cmd_options -Denable-$key=${meson_options[$key]}"
+ cmd_options="$cmd_options -D${key/\-/_}=${meson_options[$key]}"
done
exec ${MESON} \
diff --git a/meson.build b/meson.build
index 72d73c3..0076a98 100644
--- a/meson.build
+++ b/meson.build
@@ -52,7 +52,6 @@ if get_option('buildtype').contains('debug')
'-fno-strict-aliasing',
'-Wcast-align',
'-Wdeclaration-after-statement',
- '-Werror',
'-Wformat=2',
'-Winit-self',
'-Winline',
@@ -142,7 +141,7 @@ configure_file(
meson.add_install_script(
'meson_post_install.py',
bijiben_datadir,
- get_option('enable-update-mimedb') ? 'update-mimedb' : ''
+ get_option('update_mimedb') ? 'update_mimedb' : ''
)
output = ' Version: ' + bijiben_version + '\n'
diff --git a/meson_options.txt b/meson_options.txt
index d1452c2..b3d88c4 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,2 +1,2 @@
-option('enable-zeitgeist', type: 'boolean', value: true, description: 'Enable Zeitgeist')
-option('enable-update-mimedb', type: 'boolean', value: true, description: 'update-mime-database after
install')
+option('zeitgeist', type: 'boolean', value: true, description: 'Enable Zeitgeist')
+option('update_mimedb', type: 'boolean', value: true, description: 'update-mime-database after install')
diff --git a/meson_post_install.py b/meson_post_install.py
index 8fea98b..955d508 100644
--- a/meson_post_install.py
+++ b/meson_post_install.py
@@ -19,7 +19,7 @@ if not os.environ.get('DESTDIR'):
print('Validate desktop file...')
subprocess.call(['desktop-file-validate', desktop_file])
- if sys.argv[2] == 'update-mimedb':
+ if sys.argv[2] == 'update_mimedb':
mimedir = os.path.join(datadir, 'mime')
print('Update mime database...')
subprocess.call(['update-mime-database', mimedir])
diff --git a/src/libbiji/meson.build b/src/libbiji/meson.build
index bb2cf44..12f2fdf 100644
--- a/src/libbiji/meson.build
+++ b/src/libbiji/meson.build
@@ -38,7 +38,7 @@ deps = bijiben_deps
cflags = []
-enable_zeitgeist = get_option('enable-zeitgeist')
+enable_zeitgeist = get_option('zeitgeist')
if enable_zeitgeist
deps += [dependency('zeitgeist-2.0')]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]