summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Griffis <tingping@tingping.se>2016-12-06 08:07:03 -0500
committerMatthias Clasen <mclasen@redhat.com>2017-07-13 19:03:39 -0400
commita690e2a375ac0803412186b68eadf8723ee43a39 (patch)
tree5580471d84fccf1520fbed5d21c97ef4a6536dbf
parentfe2a9887a8ccb14f2386e01b14834e97a33bc2d7 (diff)
downloadglib-a690e2a375ac0803412186b68eadf8723ee43a39.tar.gz
meson: More build fixes
- Fix installing various data files - Build translations
-rw-r--r--gio/meson.build25
-rw-r--r--glib/meson.build13
-rw-r--r--gobject/meson.build11
-rw-r--r--meson.build10
-rw-r--r--meson_options.txt2
-rw-r--r--po/meson.build129
6 files changed, 178 insertions, 12 deletions
diff --git a/gio/meson.build b/gio/meson.build
index 1249cbb84..576b8fd4e 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 ac32637d4..d61c6e1c9 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 22a3f5154..717b6b4a3 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 3658e738c..1ecf6f062 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 000000000..0034ec07f
--- /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 000000000..4401ed117
--- /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')