]> git.pld-linux.org Git - packages/fwupd.git/blame - fwupd-its.patch
- enable efi on x32 again
[packages/fwupd.git] / fwupd-its.patch
CommitLineData
bd3466ff
JB
1From 797e5672e64acd4f90cd52afca3bb192b28b4636 Mon Sep 17 00:00:00 2001
2From: Julian Liu <liu.julian@gmail.com>
3Date: Fri, 28 Apr 2017 18:09:20 +0800
4Subject: [PATCH] Add polkit's ITS files as Ubuntu doesn't not ship with it.
5
6Call msgfmt with custom_target for now as data_dir kargs for i18n.merge_file() not merged into master yet.
7(https://github.com/mesonbuild/meson/issues/1565)
8---
9 its/polkit.its | 8 ++++++++
10 its/polkit.loc | 6 ++++++
11 policy/meson.build | 12 ++++++++----
12 3 files changed, 22 insertions(+), 4 deletions(-)
13 create mode 100644 its/polkit.its
14 create mode 100644 its/polkit.loc
15
16diff --git a/its/polkit.its b/its/polkit.its
17new file mode 100644
18index 0000000..1c37e6b
19--- /dev/null
20+++ b/its/polkit.its
21@@ -0,0 +1,8 @@
22+<?xml version="1.0"?>
23+<its:rules xmlns:its="http://www.w3.org/2005/11/its"
24+ version="2.0">
25+ <its:translateRule selector="//*" translate="no"/>
26+ <its:translateRule selector="//action/description |
27+ //action/message"
28+ translate="yes"/>
29+</its:rules>
30diff --git a/its/polkit.loc b/its/polkit.loc
31new file mode 100644
32index 0000000..c7427ec
33--- /dev/null
34+++ b/its/polkit.loc
35@@ -0,0 +1,6 @@
36+<?xml version="1.0"?>
37+<locatingRules>
38+ <locatingRule name="polkit policy" pattern="*.policy">
39+ <documentRule localName="policyconfig" target="polkit.its"/>
40+ </locatingRule>
41+</locatingRules>
42diff --git a/policy/meson.build b/policy/meson.build
43index def8976..41da2db 100644
44--- a/policy/meson.build
45+++ b/policy/meson.build
46@@ -1,11 +1,15 @@
47 install_data('org.freedesktop.fwupd.rules',
48 install_dir : 'share/polkit-1/rules.d')
49
50-i18n.merge_file(
51- input: 'org.freedesktop.fwupd.policy.in',
52+envbin = find_program('env')
53+gettext_data_dir = 'GETTEXTDATADIRS=' + meson.source_root()
54+custom_target('org.freedesktop.fwupd.policy',
55 output: 'org.freedesktop.fwupd.policy',
56- type: 'xml',
57- po_dir: join_paths(meson.source_root(), 'po'),
58+ input: 'org.freedesktop.fwupd.policy.in',
59+ command: [envbin, gettext_data_dir, 'msgfmt', '--xml',
60+ '--template', '@INPUT@',
61+ '-d', join_paths(meson.source_root(), 'po'),
62+ '-o', '@OUTPUT@'],
63 install: true,
64 install_dir: join_paths(get_option('datadir'), 'polkit-1', 'actions')
65 )
This page took 0.035162 seconds and 4 git commands to generate.