diff --git a/meta-oe/recipes-printing/cups/cups-pk-helper/dont-localize-org.opensuse.CupsPkHelper.Mechanism.service.patch b/meta-oe/recipes-printing/cups/cups-pk-helper/dont-localize-org.opensuse.CupsPkHelper.Mechanism.service.patch deleted file mode 100644 index 371ce01181..0000000000 --- a/meta-oe/recipes-printing/cups/cups-pk-helper/dont-localize-org.opensuse.CupsPkHelper.Mechanism.service.patch +++ /dev/null @@ -1,26 +0,0 @@ -Upstream-Status: Pending - ---- a/src/meson.build 2023-01-24 09:22:59.874074134 +0100 -+++ b/src/meson.build 2023-01-24 09:27:00.494627305 +0100 -@@ -73,12 +73,12 @@ - - - # Translate and install policy file --i18n.merge_file ( -- input: 'org.opensuse.cupspkhelper.mechanism.policy.in', -- output: 'org.opensuse.cupspkhelper.mechanism.policy', -- type: 'xml', -- data_dirs: join_paths (meson.source_root (), 'src'), -- po_dir: join_paths (meson.source_root (), 'po'), -- install: true, -- install_dir: join_paths (prefix, datadir, 'polkit-1', 'actions') --) -+#i18n.merge_file ( -+# input: 'org.opensuse.cupspkhelper.mechanism.policy.in', -+# output: 'org.opensuse.cupspkhelper.mechanism.policy', -+# type: 'xml', -+# data_dirs: join_paths (meson.source_root (), 'src'), -+# po_dir: join_paths (meson.source_root (), 'po'), -+# install: true, -+# install_dir: join_paths (prefix, datadir, 'polkit-1', 'actions') -+#) diff --git a/meta-oe/recipes-printing/cups/cups-pk-helper/dont-override-gettextdatadirs.patch b/meta-oe/recipes-printing/cups/cups-pk-helper/dont-override-gettextdatadirs.patch new file mode 100644 index 0000000000..0926b302e4 --- /dev/null +++ b/meta-oe/recipes-printing/cups/cups-pk-helper/dont-override-gettextdatadirs.patch @@ -0,0 +1,28 @@ +meson: don't override GETTEXTDATADIRS for the policy file + +The translatable strings of a polkit policy file are described by ITS +rules that polkit installs as gettext data, so msgfmt only finds them +when GETTEXTDATADIRS points at the directory holding polkit.its. In a +cross build that directory lives in the target sysroot, and +gettext.bbclass exports GETTEXTDATADIRS accordingly. + +meson passes the data_dirs argument of i18n.merge_file() to its +msgfmthelper script, which replaces GETTEXTDATADIRS instead of +extending it. cups-pk-helper ships no ITS rules of its own, so the +argument only serves to hide polkit.its from msgfmt and make the merge +fail. Drop it and rely on the environment. + +Upstream-Status: Pending +AI-Generated: Uses Claude Code (Claude Opus 5) +Signed-off-by: Markus Volk + +--- a/src/meson.build ++++ b/src/meson.build +@@ -77,7 +77,6 @@ + input: 'org.opensuse.cupspkhelper.mechanism.policy.in', + output: 'org.opensuse.cupspkhelper.mechanism.policy', + type: 'xml', +- data_dirs: join_paths (meson.source_root (), 'src'), + po_dir: join_paths (meson.source_root (), 'po'), + install: true, + install_dir: join_paths (prefix, datadir, 'polkit-1', 'actions') diff --git a/meta-oe/recipes-printing/cups/cups-pk-helper_0.2.7.bb b/meta-oe/recipes-printing/cups/cups-pk-helper_0.2.7.bb index 81fdf2a7fb..8b2be55354 100644 --- a/meta-oe/recipes-printing/cups/cups-pk-helper_0.2.7.bb +++ b/meta-oe/recipes-printing/cups/cups-pk-helper_0.2.7.bb @@ -11,13 +11,8 @@ REQUIRED_DISTRO_FEATURES = "polkit" SRC_URI = " \ https://www.freedesktop.org/software/cups-pk-helper/releases/cups-pk-helper-${PV}.tar.xz \ - file://dont-localize-org.opensuse.CupsPkHelper.Mechanism.service.patch \ + file://dont-override-gettextdatadirs.patch \ " SRC_URI[sha256sum] = "66070ddb448fe9fcee76aa26be2ede5a80f85563e3a4afd59d2bfd79fbe2e831" -do_install:append() { - install -d ${D}${datadir}/polkit-1/actions - install -m 644 ${S}/src/org.opensuse.cupspkhelper.mechanism.policy.in ${D}${datadir}/polkit-1/actions/org.opensuse.cupspkhelper.mechanism.policy -} - FILES:${PN} += "${datadir}"