commit:     99e2fdb7cc1c5596eb365292d7090c403f539a11
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 18 21:19:47 2021 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu Nov 18 21:19:47 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99e2fdb7

app-office/gtg: fix build with meson-0.60

Closes: https://bugs.gentoo.org/821622
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 ...vert-meson-plugin-translation-apply-thing.patch | 52 ++++++++++++++++++++++
 app-office/gtg/gtg-0.5.ebuild                      |  1 +
 2 files changed, 53 insertions(+)

diff --git 
a/app-office/gtg/files/0.5-Revert-meson-plugin-translation-apply-thing.patch 
b/app-office/gtg/files/0.5-Revert-meson-plugin-translation-apply-thing.patch
new file mode 100644
index 000000000000..915e40cadfdc
--- /dev/null
+++ b/app-office/gtg/files/0.5-Revert-meson-plugin-translation-apply-thing.patch
@@ -0,0 +1,52 @@
+From 1809d10663ae3d8f69c04138b66f9b4e66ee14f6 Mon Sep 17 00:00:00 2001
+From: Neui <[email protected]>
+Date: Mon, 15 Nov 2021 01:53:40 +0100
+Subject: [PATCH] Revert meson plugin translation apply thing
+
+Since meson 0.60, the `build_always_stale` option was removed:
+https://github.com/mesonbuild/meson/commit/6b1a80024c79876dc3b75f2b525be24ca8fe671a
+
+However, meson doesn't make such files depend on the translation .po
+files, which is a known bug:
+https://github.com/mesonbuild/meson/issues/2621
+
+So with that option taken away, I tried passing a list to the input
+which includes all .po files, since I saw it only uses the first element
+for the translations, but that fails when trying to generate po files.
+
+Since it seems you can't dynamically add dependencies after the fact,
+this seems like a dead end, so I am reverting this for now to make it
+compile on meson 0.60.
+---
+ GTG/plugins/meson.build          | 4 +---
+ docs/contributors/translating.md | 3 +++
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/GTG/plugins/meson.build b/GTG/plugins/meson.build
+index eb20f0b85..556885280 100644
+--- a/GTG/plugins/meson.build
++++ b/GTG/plugins/meson.build
+@@ -24,9 +24,7 @@ foreach plugin : gtg_plugins
+     install_dir: plugin_install_dir,
+     type: 'desktop',
+     args: ['--keyword=name', '--keyword=short-description', 
'--keyword=description'],
+-    build_by_default: true,
+-    build_always_stale: true
+-    # build always because otherwise new translations won't be applied
++    build_by_default: true
+   )
+   subdir(plugin.underscorify())
+ endforeach
+diff --git a/docs/contributors/translating.md 
b/docs/contributors/translating.md
+index 0af3e5f19..184f98843 100644
+--- a/docs/contributors/translating.md
++++ b/docs/contributors/translating.md
+@@ -75,5 +75,8 @@ Make sure to this AFTER COMMITING YOUR CHANGES!
+ * During launching, it might complain about certain files not being found in 
[`po/POTFILES.in`][POTFILES.IN].
+   It is safe to remove the lines from that file and re-run until it works.
+   It would be useful to comment about that if you're submitting your 
translation, just in case.
++* Plugin related strings don't update after updating the translation.
++  The cause is unknown, but you can delete the plugin files to re-generate
++  them using the new translations: `rm -f 
.local_build/GTG/plugins/*.gtg-plugin`
+ 
+ [POTFILES.IN]: ../../po/POTFILES.in

diff --git a/app-office/gtg/gtg-0.5.ebuild b/app-office/gtg/gtg-0.5.ebuild
index 665f741c9650..c3ae9ba1ab10 100644
--- a/app-office/gtg/gtg-0.5.ebuild
+++ b/app-office/gtg/gtg-0.5.ebuild
@@ -49,6 +49,7 @@ BDEPEND="
 PATCHES=(
        # Fixes tests, and mouse cursor with some themes
        "${FILESDIR}"/${PV}-mouse-cursor-fixes{1,2,3}.patch
+       "${FILESDIR}"/0.5-Revert-meson-plugin-translation-apply-thing.patch
 )
 
 src_install() {

Reply via email to