meson: More build fixes

- Fix installing various data files
- Build translations
This commit is contained in:
Patrick Griffis 2016-12-06 08:07:03 -05:00 committed by Matthias Clasen
parent fe2a9887a8
commit a690e2a375
6 changed files with 178 additions and 12 deletions

View File

@ -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,

View File

@ -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')

View File

@ -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')

View File

@ -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

2
meson_options.txt Normal file
View File

@ -0,0 +1,2 @@
option('with-docs', type : 'boolean', value : false)
option('with-man', type : 'boolean', value : true)

129
po/meson.build Normal file
View File

@ -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')