[glib/meson-for-merge] meson: More build fixes
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/meson-for-merge] meson: More build fixes
- Date: Fri, 14 Jul 2017 00:19:38 +0000 (UTC)
commit a690e2a375ac0803412186b68eadf8723ee43a39
Author: Patrick Griffis <tingping tingping se>
Date: Tue Dec 6 08:07:03 2016 -0500
meson: More build fixes
- Fix installing various data files
- Build translations
gio/meson.build | 25 ++++++----
glib/meson.build | 13 +++++
gobject/meson.build | 11 ++++
meson.build | 10 +++-
meson_options.txt | 2 +
po/meson.build | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 178 insertions(+), 12 deletions(-)
---
diff --git a/gio/meson.build b/gio/meson.build
index 1249cbb..576b8fd 100644
--- a/gio/meson.build
+++ b/gio/meson.build
@@ -4,6 +4,8 @@ gio_c_args = [
'-DGIO_MODULE_DIR="@0@"'.format(glib_giomodulesdir),
]
+# FIXME: Install empty glib_giomodulesdir
+
gnetworking_h_conf = configuration_data()
gnetworking_h_wspiapi_include = ''
@@ -503,14 +505,6 @@ gio.def: libgio-2.0.la
gio-2.0.lib: libgio-2.0.la gio.def
'$(AM_V_GEN) lib.exe -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll
-def:$(builddir)/gio.def -out:$@
-
-completiondir = $(datadir)/bash-completion/completions
-completion_DATA =',
- 'completion/gapplication',
- 'completion/gdbus',
- 'completion/gsettings',
- 'completion/gresource
-EXTRA_DIST += $(completion_DATA)
'''
gio_headers = [
@@ -670,6 +664,14 @@ endif
# subdir('fam')
#endif
+install_data([
+ 'completion/gapplication',
+ 'completion/gdbus',
+ 'completion/gsettings',
+ 'completion/gresource'
+],
+install_dir: get_option('datadir') + '/bash-completion/completions')
+
libgio = shared_library('gio-2.0',
gioenumtypes_h, gioenumtypes_c, gnetworking_h, gio_sources,
version : library_version,
@@ -741,8 +743,11 @@ executable('gsettings', 'gsettings-tool.c',
# intl.lib is not compatible with SAFESEH
link_args : noseh_link_args,
dependencies : [libintl, libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
-install_data(['gschema.dtd', 'gschema.loc', 'gschema.its'],
- install_dir : 'share/glib-2.0/schemas')
+install_data('gschema.dtd',
+ install_dir : get_option('datadir') + '/glib-2.0/schemas')
+
+install_data(['gschema.loc', 'gschema.its'],
+ install_dir : get_option('datadir') + '/gettext/its')
executable('gdbus', 'gdbus-tool.c',
install : true,
diff --git a/glib/meson.build b/glib/meson.build
index ac32637..d61c6e1 100644
--- a/glib/meson.build
+++ b/glib/meson.build
@@ -249,6 +249,19 @@ else
dependencies : [libglib_dep])
endif
+install_data('gtester-report', install_dir : get_option('bindir'))
+install_data('glib.py', install_dir : glib_pkgdatadir + '/gdb')
+
+gdb_conf = configuration_data()
+gdb_conf.set('datadir', glib_datadir)
+configure_file(
+ input: 'libglib-gdb.py.in',
+ output: 'libglib-2.0.so.@0 -gdb py'.format(library_version),
+ configuration: gdb_conf,
+ install: true,
+ install_dir: get_option('datadir') + '/gdb/auto-load/' + glib_libdir
+)
+
# gtester doesn't work on native windows
if cc.get_id() != 'msvc'
subdir('tests')
diff --git a/gobject/meson.build b/gobject/meson.build
index 22a3f51..717b6b4 100644
--- a/gobject/meson.build
+++ b/gobject/meson.build
@@ -83,4 +83,15 @@ glib_genmarshal = executable('glib-genmarshal',
c_args : ['-DHAVE_CONFIG_H=1'],
dependencies : [libglib_dep, libgobject_dep])
+install_data('gobject.py', install_dir : glib_pkgdatadir + '/gdb')
+gdb_conf = configuration_data()
+gdb_conf.set('datadir', glib_datadir)
+configure_file(
+ input: 'libgobject-gdb.py.in',
+ output: 'libgobject-2.0.so.@0 -gdb py'.format(library_version),
+ configuration: gdb_conf,
+ install: true,
+ install_dir: get_option('datadir') + '/gdb/auto-load/' + glib_libdir
+)
+
subdir('tests')
diff --git a/meson.build b/meson.build
index 3658e73..1ecf6f0 100644
--- a/meson.build
+++ b/meson.build
@@ -46,8 +46,9 @@ gioinc = include_directories('gio')
glib_prefix = get_option('prefix')
glib_libdir = glib_prefix + '/' + get_option('libdir')
-glib_datadir = glib_prefix + '/share'
-glib_includedir = glib_prefix + '/include'
+glib_datadir = glib_prefix + '/' + get_option('datadir')
+glib_pkgdatadir = glib_datadir + '/glib-2.0'
+glib_includedir = glib_prefix + '/' + get_option('includedir')
glib_giomodulesdir = glib_libdir + '/gio/modules'
glib_pkgconfigreldir = get_option('libdir') + '/pkgconfig'
@@ -1317,6 +1318,7 @@ subdir('gobject')
subdir('gthread')
subdir('gmodule')
subdir('gio')
+subdir('po')
# Configure and install pkg-config files
pc_files = [
@@ -1358,3 +1360,7 @@ install_data('m4macros/glib-2.0.m4', 'm4macros/glib-gettext.m4', 'm4macros/gsett
configure_file(input : 'config.h.meson',
output : 'config.h',
configuration : glib_conf)
+
+if get_option('with-docs')
+ subdir('docs/reference/glib')
+endif
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..0034ec0
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,2 @@
+option('with-docs', type : 'boolean', value : false)
+option('with-man', type : 'boolean', value : true)
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000..4401ed1
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1,129 @@
+i18n = import('i18n')
+
+i18n_langs = [
+ 'af',
+ 'am',
+ 'an',
+ 'ar',
+ 'as',
+ 'ast',
+ 'az',
+ 'be',
+ 'be@latin',
+ 'bg',
+ 'bn',
+ 'bn_IN',
+ 'bs',
+ 'ca',
+ 'ca@valencia',
+ 'cs',
+ 'cy',
+ 'da',
+ 'de',
+ 'dz',
+ 'el',
+ 'en_CA',
+ 'en_GB',
+ 'en@shaw',
+ 'eo',
+ 'es',
+ 'et',
+ 'eu',
+ 'fa',
+ 'fi',
+ 'fr',
+ 'ga',
+ 'gd',
+ 'gl',
+ 'gu',
+ 'he',
+ 'hi',
+ 'hr',
+ 'hu',
+ 'hy',
+ 'id',
+ 'is',
+ 'it',
+ 'ja',
+ 'ka',
+ 'kk',
+ 'kn',
+ 'ko',
+ 'ku',
+ 'lt',
+ 'lv',
+ 'mai',
+ 'mg',
+ 'mk',
+ 'ml',
+ 'mn',
+ 'mr',
+ 'ms',
+ 'nb',
+ 'nds',
+ 'ne',
+ 'nl',
+ 'nn',
+ 'oc',
+ 'or',
+ 'pa',
+ 'pl',
+ 'ps',
+ 'pt',
+ 'pt_BR',
+ 'ro',
+ 'ru',
+ 'rw',
+ 'si',
+ 'sk',
+ 'sl',
+ 'sq',
+ 'sr',
+ 'sr@latin',
+ 'sr@ije',
+ 'sv',
+ 'ta',
+ 'te',
+ 'tg',
+ 'th',
+ 'tl',
+ 'tr',
+ 'tt',
+ 'ug',
+ 'uk',
+ 'vi',
+ 'wa',
+ 'xh',
+ 'yi',
+ 'zh_CN',
+ 'zh_HK',
+ 'zh_TW'
+]
+
+i18n.gettext('glib20',
+ languages : i18n_langs,
+ args : [
+ '--from-code=UTF-8',
+ '--add-comments',
+
+ '--keyword=_',
+ '--keyword=N_',
+ '--keyword=C_:1c,2',
+ '--keyword=NC_:1c,2',
+ '--keyword=g_dcgettext:2',
+ '--keyword=g_dngettext:2,3',
+ '--keyword=g_dpgettext2:2c,3',
+
+ '--flag=N_:1:pass-c-format',
+ '--flag=C_:2:pass-c-format',
+ '--flag=NC_:2:pass-c-format',
+ '--flag=g_dngettext:2:pass-c-format',
+ '--flag=g_strdup_printf:1:c-format',
+ '--flag=g_string_printf:2:c-format',
+ '--flag=g_string_append_printf:2:c-format',
+ '--flag=g_error_new:3:c-format',
+ '--flag=g_set_error:4:c-format',
+ ]
+)
+
+install_data('Makefile.in.in', install_dir : glib_pkgdatadir + '/gettext/po')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]