commit:     4f79cdcc9f9f1d131994a0764d0dc3e1d9a5fbad
Author:     Holger Hoffstätte <holger <AT> applied-asynchrony <DOT> com>
AuthorDate: Thu Sep 12 14:07:13 2024 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sun Sep 15 12:24:59 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f79cdcc

x11-libs/gtksourceview: fix compilation of 2.10.5 with gcc-14

Also use consistent patch names.

Closes: https://bugs.gentoo.org/937626
Signed-off-by: Holger Hoffstätte <holger <AT> applied-asynchrony.com>
Closes: https://github.com/gentoo/gentoo/pull/38579
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>

 ...NST_RETURN.patch => 2.10.5-G_CONST_RETURN.patch} |  0
 x11-libs/gtksourceview/files/2.10.5-gcc14.patch     | 21 +++++++++++++++++++++
 .../gtksourceview/gtksourceview-2.10.5-r3.ebuild    |  5 ++++-
 3 files changed, 25 insertions(+), 1 deletion(-)

diff --git 
a/x11-libs/gtksourceview/files/gtksourceview-2.10.5-G_CONST_RETURN.patch 
b/x11-libs/gtksourceview/files/2.10.5-G_CONST_RETURN.patch
similarity index 100%
rename from 
x11-libs/gtksourceview/files/gtksourceview-2.10.5-G_CONST_RETURN.patch
rename to x11-libs/gtksourceview/files/2.10.5-G_CONST_RETURN.patch

diff --git a/x11-libs/gtksourceview/files/2.10.5-gcc14.patch 
b/x11-libs/gtksourceview/files/2.10.5-gcc14.patch
new file mode 100644
index 000000000000..e86cfbc7d60f
--- /dev/null
+++ b/x11-libs/gtksourceview/files/2.10.5-gcc14.patch
@@ -0,0 +1,21 @@
+
+Fix build with gcc-14.
+
+Backported version of patch from:
+https://gitlab.gnome.org/GNOME/gtksourceview/-/commit/b25e71c57fc934a7ce36e51826af9fa7c2cf9a80
+
+Bug: https://bugs.gentoo.org/937626
+
+Signed-off-by: Holger Hoffstätte <[email protected]>
+
+--- gtksourceview-2.10.5/gtksourceview/gtksourceview.c 2010-08-22 
13:45:05.000000000 +0200
++++ gtksourceview-2.10.5-gcc14/gtksourceview/gtksourceview.c   2024-08-09 
16:11:37.319493797 +0200
+@@ -1766,7 +1766,7 @@ set_source_buffer (GtkSourceView *view,
+ 
+       if (buffer && GTK_IS_SOURCE_BUFFER (buffer))
+       {
+-              view->priv->source_buffer = g_object_ref (buffer);
++              view->priv->source_buffer = g_object_ref (GTK_SOURCE_BUFFER 
(buffer));
+ 
+               g_signal_connect (buffer,
+                                 "highlight_updated",

diff --git a/x11-libs/gtksourceview/gtksourceview-2.10.5-r3.ebuild 
b/x11-libs/gtksourceview/gtksourceview-2.10.5-r3.ebuild
index c238975c90d7..5dc42f20caa8 100644
--- a/x11-libs/gtksourceview/gtksourceview-2.10.5-r3.ebuild
+++ b/x11-libs/gtksourceview/gtksourceview-2.10.5-r3.ebuild
@@ -31,7 +31,10 @@ BDEPEND="
 DOCS=( AUTHORS ChangeLog HACKING MAINTAINERS NEWS README )
 
 # Patch from 3.x for bug #394925
-PATCHES=( "${FILESDIR}/${P}-G_CONST_RETURN.patch" )
+PATCHES=(
+       "${FILESDIR}/2.10.5-G_CONST_RETURN.patch"
+       "${FILESDIR}/2.10.5-gcc14.patch"
+)
 
 src_prepare() {
        gnome2_src_prepare

Reply via email to