[balsa] Better building with meson
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa] Better building with meson
- Date: Thu, 14 Sep 2017 01:05:44 +0000 (UTC)
commit 820b6cc96b6d92fb8f53982472b6f51848177e2f
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Wed Sep 13 21:01:12 2017 -0400
Better building with meson
* meson.build: make help files optional.
* meson_options.txt: add help file option; use combo options for
HTML widget and spell checker.
* po/LINGUAS: new file.
* po/meson.build: we no longer need 'langs'.
* sounds/meson.build: use a custom target to pass
'--keyword description' to msgfmt.
meson.build | 28 +++++++++++++++-------------
meson_options.txt | 33 +++++++++++++++------------------
po/ChangeLog | 6 ++++++
po/LINGUAS | 6 ++++++
po/meson.build | 9 +--------
sounds/meson.build | 31 ++++++++++++++++++++++++-------
6 files changed, 67 insertions(+), 46 deletions(-)
---
diff --git a/meson.build b/meson.build
index f345c9b..bef337a 100644
--- a/meson.build
+++ b/meson.build
@@ -50,8 +50,6 @@ endif
with_gnome = get_option('with-gnome')
gpgmecfg = get_option('with-gpgme')
-have_smime = get_option('enable-smime')
-gpgapp = get_option('with-gpg-app')
with_canberra = get_option('with-canberra')
with_compface = get_option('with-compface')
with_gss = get_option('with-gss')
@@ -67,6 +65,7 @@ with_sqlite = get_option('with-sqlite')
with_libsecret = get_option('with-libsecret')
with_gcr = get_option('with-gcr')
set_more_warnings = get_option('enable-more-warnings')
+make_help_files = get_option('enable-help-files')
# Documentation and Testing requirements for libnetclient
with_libnetclient_docs = get_option('with-libnetclient-docs')
@@ -102,11 +101,14 @@ glib_genmarshal = run_command('pkg-config',
# yelp
-yelptool = find_program('yelp-build', required : false)
-if not yelptool.found()
- message('*** The tools to build the documentation are not found.')
- message(' To build it, please install the yelp-tools package.')
- message(' Continuing with build. ****')
+if make_help_files
+ yelptool = find_program('yelp-build', required : false)
+ if not yelptool.found()
+ message('*** The tools to build the documentation are not found.')
+ message(' To build it, please install the yelp-tools package.')
+ message(' Continuing with build. ****')
+ make_help_files = false
+ endif
endif
# _NL_MEASUREMENT_MEASUREMENT is an enum and not a define
@@ -274,7 +276,6 @@ if gpgmecfg != 'no'
gpgmever = run_command(gpgmecfg, '--version').stdout().strip()
if gpgmever.version_compare('< 1.2.0')
gpgmecfg = 'no'
- have_smime = 'no'
message('Sorry, you need at least gpgme version 1.2.0')
else
if gpgmever.version_compare('< 1.8.0')
@@ -302,8 +303,6 @@ if gpgmecfg != 'no'
balsa_deps += gpgme_dep
gpgmecfg = 'yes'
endif
-else
- have_smime = 'no'
endif
# OpenLDAP configuration.
@@ -708,8 +707,8 @@ subdir('po')
desktop_files = ['balsa.desktop', 'balsa-mailto-handler.desktop']
foreach file : desktop_files
- file_in = configure_file(input : file + '.in.in',
- output : file + 'in',
+ file_in = configure_file(input : file + '.meson',
+ output : file + '.in',
configuration : conf)
i18n.merge_file(
input : file_in,
@@ -780,12 +779,15 @@ endif
subdirs = ['sounds',
'images',
- 'doc',
'libnetclient',
'libbalsa',
'libinit_balsa',
'src',
'ui']
+if make_help_files
+ subdirs += 'doc'
+endif
+
foreach dir : subdirs
subdir(dir)
endforeach
diff --git a/meson_options.txt b/meson_options.txt
index 386259a..b559eb3 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -21,17 +21,7 @@ option('enable-debug-threads',
option('with-gpgme',
type : 'string',
value : 'no',
- description : 'build with gpgme/GnuPG support (default=no, path to gpgme-config optional)')
-
-option('enable-smime',
- type : 'string',
- value : 'check',
- description : 'include S/MIME support (needs gpgme and gpgsm, experimental for gpg < 2.0.4)')
-
-option('with-gpg-app',
- type : 'string',
- value : 'no',
- description : 'use PATH as GnuPG application (default=gpg2 if >= 2.0.4, otherwise gpg 1.x)')
+ description : 'build with gpgme/GnuPG support (yes|no|path to gpgme-config, default=no)')
option('with-canberra',
type : 'boolean',
@@ -41,7 +31,7 @@ option('with-canberra',
option('with-compface',
type : 'string',
value : 'no',
- description : 'Enable Compface (default=no, path to compface installation optional)')
+ description : 'Enable Compface (yes|no|path to compface installation, default=no)')
option('with-gss',
type : 'boolean',
@@ -49,7 +39,8 @@ option('with-gss',
description : 'Enable GSS (default=false)')
option('with-html-widget',
- type : 'string',
+ type : 'combo',
+ choices : ['webkit2', 'webkit', 'gtkhtml4'],
value : 'webkit2',
description : 'select the HTML renderer (default webkit2)')
@@ -59,14 +50,15 @@ option('with-gtksourceview',
description : 'Use GtkSourceView-3 if available (default=false)')
option('with-spell-checker',
- type : 'string',
- value : 'no',
- description : 'select the external spell checker (default no)')
+ type : 'combo',
+ choices : ['internal', 'gspell', 'gtkspell'],
+ value : 'internal',
+ description : 'select the spell checker (default internal)')
option('with-ldap',
type : 'string',
value : 'no',
- description : 'Use OpenLDAP if available (default=no)')
+ description : 'Use OpenLDAP if available (yes|no|path to LDAP installation, default=no)')
option('with-libnotify',
type : 'boolean',
@@ -91,7 +83,7 @@ option('with-osmo',
option('with-sqlite',
type : 'string',
value : 'no',
- description : 'Use SQLite for GPE address books (default=no)')
+ description : 'Use SQLite for GPE address books (yes|no|path to SQLite installation, default=no)')
option('with-libsecret',
type : 'boolean',
@@ -108,6 +100,11 @@ option('enable-more-warnings',
value : true,
description : 'Enable maximum compiler warnings (default=true)')
+option('enable-help-files',
+ type : 'boolean',
+ value : false,
+ description : 'Install the help files (default=false)')
+
option('with-libnetclient-docs',
type : 'boolean',
value : false,
diff --git a/po/ChangeLog b/po/ChangeLog
index 9c1faf3..1fdfc54 100644
--- a/po/ChangeLog
+++ b/po/ChangeLog
@@ -1,3 +1,9 @@
+2017-09-13 Peter Bloomfield <pbloomfield bellsouth net>
+
+ reviewed by: <delete if not using a buddy>
+
+ * LINGUAS:
+
2015-06-07 Peter Bloomfield <pbloomfield bellsouth net>
Fix bgo #750515 (pachoramos1 at gmail dot com)
diff --git a/po/LINGUAS b/po/LINGUAS
new file mode 100644
index 0000000..aa1f423
--- /dev/null
+++ b/po/LINGUAS
@@ -0,0 +1,6 @@
+am ar az bg ca cs da de dz el
+en_CA en_GB es et eu fi fr ga gl
+he hi hr hu id it ja ko lt lv
+mk ml ms nb ne nl nn oc pa pl
+pt pt_BR ro ru rw sk sl sq sr sr@latin
+sv tr uk vi wa zh_CN zh_HK zh_TW
diff --git a/po/meson.build b/po/meson.build
index 1076a89..a224081 100644
--- a/po/meson.build
+++ b/po/meson.build
@@ -1,10 +1,3 @@
# po/meson.build
-langs = ['am', 'ar', 'az', 'bg', 'ca', 'cs', 'da', 'de', 'dz', 'el',
- 'en_CA', 'en_GB', 'es', 'et', 'eu', 'fi', 'fr', 'ga', 'gl',
- 'he', 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'lt', 'lv',
- 'mk', 'ml', 'ms', 'nb', 'ne', 'nl', 'nn', 'oc', 'pa', 'pl',
- 'pt', 'pt_BR', 'ro', 'ru', 'rw', 'sk', 'sl', 'sq', 'sr', 'sr@latin',
- 'sv', 'tr', 'uk', 'vi', 'wa', 'zh_CN', 'zh_HK', 'zh_TW']
-
-i18n.gettext(gettext_package, preset : 'glib', languages : langs)
+i18n.gettext(gettext_package, preset : 'glib')
diff --git a/sounds/meson.build b/sounds/meson.build
index abb4eb2..8512055 100644
--- a/sounds/meson.build
+++ b/sounds/meson.build
@@ -2,13 +2,30 @@
balsa_sounds = ['startup.wav', 'newmail.wav']
-balsasoundsdir = join_paths(get_option('datadir'), 'sounds', 'balsa')
-install_data(balsa_sounds, install_dir : balsasoundsdir)
+balsa_sounds_dir = join_paths(get_option('datadir'), 'sounds', 'balsa')
+install_data(balsa_sounds, install_dir : balsa_sounds_dir)
-soundlistdir = join_paths(get_option('sysconfdir'), 'sound', 'events')
-i18n.merge_file(input : 'balsa.soundlist.in',
+sound_list_dir = join_paths(get_option('sysconfdir'), 'sound', 'events')
+
+i18n_merge_knows_description = false
+if i18n_merge_knows_description
+ i18n.merge_file(input : 'balsa.soundlist.meson',
+ output : 'balsa.soundlist',
+ type : 'desktop',
+ po_dir : '../po',
+ install : true,
+ install_dir : sound_list_dir)
+else
+ custom_target('soundlist-file',
+ input : 'balsa.soundlist.meson',
output : 'balsa.soundlist',
- type : 'desktop',
- po_dir : '../po',
install : true,
- install_dir : soundlistdir)
+ install_dir : sound_list_dir,
+ command: [
+ 'msgfmt', '--desktop',
+ '--keyword', 'description',
+ '--template', '@INPUT@',
+ '-d', '../po',
+ '-o', '@OUTPUT@'
+ ])
+endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]