summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@gentoo.org>2024-07-09 21:45:41 -0400
committerEli Schwartz <eschwartz@gentoo.org>2024-07-10 11:23:57 -0400
commitb1631392ca489e12652ed5682f2b79205b976c56 (patch)
tree07af402d82c5c52782c0422b204a6913eed641b1 /x11-libs
parentnet-fs/autofs: drop 5.1.8-r1, 5.1.9 (diff)
downloadgentoo-b1631392ca489e12652ed5682f2b79205b976c56.tar.gz
gentoo-b1631392ca489e12652ed5682f2b79205b976c56.tar.bz2
gentoo-b1631392ca489e12652ed5682f2b79205b976c56.zip
x11-libs/libgxim: backport gcc 14 fix for implicit-function-decl
Upstream has fixed this in 2018 but simply not released a new version: https://bitbucket.org/tagoh/libgxim/commits/274976ff39d9142169a18655f5013e66233ac9c8 Due to the implicit function declaration, compilation fails on gcc 14. On gcc 13, instead, there is an lto-type-mismatch because the K&R C style incorrect prototype was... incorrect and mismatched the required types. :) The same upstream commit also includes an unrelated fix for a different build issue: -Werror=format-security. Closes: https://bugs.gentoo.org/875056 Closes: https://bugs.gentoo.org/928090 Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
Diffstat (limited to 'x11-libs')
-rw-r--r--x11-libs/libgxim/files/libgxim-0.5.0-gcc14.patch40
-rw-r--r--x11-libs/libgxim/libgxim-0.5.0-r1.ebuild (renamed from x11-libs/libgxim/libgxim-0.5.0.ebuild)6
2 files changed, 46 insertions, 0 deletions
diff --git a/x11-libs/libgxim/files/libgxim-0.5.0-gcc14.patch b/x11-libs/libgxim/files/libgxim-0.5.0-gcc14.patch
new file mode 100644
index 000000000000..36e62471d591
--- /dev/null
+++ b/x11-libs/libgxim/files/libgxim-0.5.0-gcc14.patch
@@ -0,0 +1,40 @@
+From 274976ff39d9142169a18655f5013e66233ac9c8 Mon Sep 17 00:00:00 2001
+From: Akira TAGOH <akira@tagoh.org>
+Date: Wed, 14 Feb 2018 13:20:40 +0900
+Subject: [PATCH] Fix a build fail
+
+---
+ libgxim/gximcore.c | 2 --
+ libgxim/gximprotocol10.c | 2 +-
+ 2 files changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/libgxim/gximcore.c b/libgxim/gximcore.c
+index a92c413..3955d01 100644
+--- a/libgxim/gximcore.c
++++ b/libgxim/gximcore.c
+@@ -26,9 +26,7 @@
+ #endif
+
+ #include <glib/gi18n-lib.h>
+-#ifdef GNOME_ENABLE_DEBUG
+ #include <gdk/gdkx.h>
+-#endif /* GNOME_ENABLE_DEBUG */
+ #include "gximacc.h"
+ #include "gximconnection.h"
+ #include "gximmarshal.h"
+diff --git a/libgxim/gximprotocol10.c b/libgxim/gximprotocol10.c
+index 04887a5..65bd4df 100644
+--- a/libgxim/gximprotocol10.c
++++ b/libgxim/gximprotocol10.c
+@@ -2073,7 +2073,7 @@ g_xim_protocol10_closure_real_parser_error(GXimProtocol *proto,
+ msg = g_strdup_printf("Unable to parse the protocol %s properly",
+ g_xim_protocol_name(major_opcode));
+
+- g_xim_messages_error(G_XIM_PROTOCOL_GET_IFACE (proto)->message, msg);
++ g_xim_messages_error(G_XIM_PROTOCOL_GET_IFACE (proto)->message, "%s", msg);
+ switch (major_opcode) {
+ case G_XIM_CONNECT:
+ case G_XIM_AUTH_REQUIRED:
+--
+2.45.0
+
diff --git a/x11-libs/libgxim/libgxim-0.5.0.ebuild b/x11-libs/libgxim/libgxim-0.5.0-r1.ebuild
index 3a0811f9cd0d..f7a149908a9b 100644
--- a/x11-libs/libgxim/libgxim-0.5.0.ebuild
+++ b/x11-libs/libgxim/libgxim-0.5.0-r1.ebuild
@@ -33,6 +33,12 @@ BDEPEND="${RUBY_DEPS}
AT_M4DIR="m4macros"
+PATCHES=(
+ # backport upstream fix for gcc 14 implicit function declarations and by
+ # extension, LTO type mismatches. Also fixes format-security.
+ "${FILESDIR}"/${P}-gcc14.patch
+)
+
src_prepare() {
sed -i \
-e "/PKG_CHECK_MODULES/s/\(check\)/$(usex test '\1' _)/" \