x11-libs/libgxim: backport gcc 14 fix for implicit-function-decl

Upstream has fixed this in 2018 but simply not released a new version:
274976ff39

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>
This commit is contained in:
Eli Schwartz
2024-07-09 21:45:41 -04:00
parent 4300e0dc2b
commit b1631392ca
2 changed files with 46 additions and 0 deletions

View File

@@ -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

View File

@@ -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' _)/" \