commit:     2e65f87613b699434752c4f96cd9e6d2d7075bef
Author:     Yuan Liao <liaoyuan <AT> gmail <DOT> com>
AuthorDate: Wed Dec 21 20:29:34 2022 +0000
Commit:     Yuan Liao <liaoyuan <AT> gmail <DOT> com>
CommitDate: Wed Dec 21 20:30:11 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=2e65f876

gui-libs/text-engine: Add patch to fix -Wreturn-type errors

Closes: https://bugs.gentoo.org/887649
Signed-off-by: Yuan Liao <liaoyuan <AT> gmail.com>

 .../files/text-engine-0.1.1-fix-Wreturn-type.patch | 31 ++++++++++++++++++++++
 ...0.1.1-r1.ebuild => text-engine-0.1.1-r2.ebuild} |  1 +
 2 files changed, 32 insertions(+)

diff --git 
a/gui-libs/text-engine/files/text-engine-0.1.1-fix-Wreturn-type.patch 
b/gui-libs/text-engine/files/text-engine-0.1.1-fix-Wreturn-type.patch
new file mode 100644
index 000000000..7afa7ff7a
--- /dev/null
+++ b/gui-libs/text-engine/files/text-engine-0.1.1-fix-Wreturn-type.patch
@@ -0,0 +1,31 @@
+Judging from the commit message, the main intention of this commit,
+which is already staged in the upstream repository for the next release,
+did not seem to be to eliminate compiler errors with -Wreturn-type.
+However, it _is_ a resolution of the bug.
+
+Bug: https://bugs.gentoo.org/887649
+
+From 749c94d853c0b0e29e79a1b270ec61947b65c319 Mon Sep 17 00:00:00 2001
+From: Matthew Jakeman <[email protected]>
+Date: Mon, 6 Jun 2022 16:11:32 +1200
+Subject: [PATCH] fix: Support building on macos
+
+---
+ src/layout/layout.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/layout/layout.c b/src/layout/layout.c
+index dbeb690..32d1845 100644
+--- a/src/layout/layout.c
++++ b/src/layout/layout.c
+@@ -129,8 +129,8 @@ text_layout_build_layout_tree (TextLayout   *self,
+                                TextFrame    *frame,
+                                int           width)
+ {
+-    g_return_if_fail (TEXT_IS_LAYOUT (self));
+-    g_return_if_fail (TEXT_IS_FRAME (frame));
++    g_return_val_if_fail (TEXT_IS_LAYOUT (self), NULL);
++    g_return_val_if_fail (TEXT_IS_FRAME (frame), NULL);
+ 
+     TextLayoutBox *root = text_layout_box_new ();
+     do_layout_recursive (self, root, context, cursor, TEXT_ITEM (frame), 
width);

diff --git a/gui-libs/text-engine/text-engine-0.1.1-r1.ebuild 
b/gui-libs/text-engine/text-engine-0.1.1-r2.ebuild
similarity index 95%
rename from gui-libs/text-engine/text-engine-0.1.1-r1.ebuild
rename to gui-libs/text-engine/text-engine-0.1.1-r2.ebuild
index d4e525e9c..bd3411bfe 100644
--- a/gui-libs/text-engine/text-engine-0.1.1-r1.ebuild
+++ b/gui-libs/text-engine/text-engine-0.1.1-r2.ebuild
@@ -41,6 +41,7 @@ RDEPEND="
 
 PATCHES=(
        "${FILESDIR}/${P}-fix-package-version.patch"
+       "${FILESDIR}/${P}-fix-Wreturn-type.patch"
 )
 
 src_prepare() {

Reply via email to