From 797e5672e64acd4f90cd52afca3bb192b28b4636 Mon Sep 17 00:00:00 2001 From: Julian Liu Date: Fri, 28 Apr 2017 18:09:20 +0800 Subject: [PATCH] Add polkit's ITS files as Ubuntu doesn't not ship with it. Call msgfmt with custom_target for now as data_dir kargs for i18n.merge_file() not merged into master yet. (https://github.com/mesonbuild/meson/issues/1565) --- its/polkit.its | 8 ++++++++ its/polkit.loc | 6 ++++++ policy/meson.build | 12 ++++++++---- 3 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 its/polkit.its create mode 100644 its/polkit.loc diff --git a/its/polkit.its b/its/polkit.its new file mode 100644 index 0000000..1c37e6b --- /dev/null +++ b/its/polkit.its @@ -0,0 +1,8 @@ + + + + + diff --git a/its/polkit.loc b/its/polkit.loc new file mode 100644 index 0000000..c7427ec --- /dev/null +++ b/its/polkit.loc @@ -0,0 +1,6 @@ + + + + + + diff --git a/policy/meson.build b/policy/meson.build index def8976..41da2db 100644 --- a/policy/meson.build +++ b/policy/meson.build @@ -1,11 +1,15 @@ install_data('org.freedesktop.fwupd.rules', install_dir : 'share/polkit-1/rules.d') -i18n.merge_file( - input: 'org.freedesktop.fwupd.policy.in', +envbin = find_program('env') +gettext_data_dir = 'GETTEXTDATADIRS=' + meson.source_root() +custom_target('org.freedesktop.fwupd.policy', output: 'org.freedesktop.fwupd.policy', - type: 'xml', - po_dir: join_paths(meson.source_root(), 'po'), + input: 'org.freedesktop.fwupd.policy.in', + command: [envbin, gettext_data_dir, 'msgfmt', '--xml', + '--template', '@INPUT@', + '-d', join_paths(meson.source_root(), 'po'), + '-o', '@OUTPUT@'], install: true, install_dir: join_paths(get_option('datadir'), 'polkit-1', 'actions') )