From e7e96dd1a915ba00b4a63b15668b712a7814da54 Mon Sep 17 00:00:00 2001 From: Matteo Bernardini Date: Sun, 4 Aug 2024 15:41:03 +0200 Subject: [PATCH] office/xournal: Patch to build with gcc >= 14.x. Signed-off-by: Matteo Bernardini --- office/xournal/xournal-0.4.8-c99-fix.patch | 89 ++++++++++++++++++++++ office/xournal/xournal.SlackBuild | 2 + 2 files changed, 91 insertions(+) create mode 100644 office/xournal/xournal-0.4.8-c99-fix.patch diff --git a/office/xournal/xournal-0.4.8-c99-fix.patch b/office/xournal/xournal-0.4.8-c99-fix.patch new file mode 100644 index 0000000000..ee3689cddd --- /dev/null +++ b/office/xournal/xournal-0.4.8-c99-fix.patch @@ -0,0 +1,89 @@ +Bug: https://bugs.gentoo.org/875158 + +Patch: https://src.fedoraproject.org/rpms/xournal/raw/dacd5bf30ec95debca62946868d9450f68ea54de/f/xournal-c99-1.patch +Patch: https://src.fedoraproject.org/rpms/xournal/raw/dacd5bf30ec95debca62946868d9450f68ea54de/f/xournal-c99-2.patch +Author: Denis Auroux +Date: Sun Jan 24 15:48:16 2021 -0500 + + Fix implicit function declarations by including config.h in ttsubset/*.c + +--- a/src/ttsubset/list.c ++++ b/src/ttsubset/list.c +@@ -33,7 +33,7 @@ + * + */ + +-/* $Id$ */ ++/* $Id: list.c,v 1.4 2004/09/10 18:59:06 jody Exp $ */ + /* @(#)list.c 1.7 03/02/06 SMI */ + + /* +@@ -44,6 +44,10 @@ + * + */ + ++#ifdef HAVE_CONFIG_H ++# include ++#endif ++ + #include + #include + #ifdef MALLOC_TRACE +--- a/src/ttsubset/sft.c ++++ b/src/ttsubset/sft.c +@@ -33,7 +33,7 @@ + * + */ + +-/* $Id$ */ ++/* $Id: sft.c,v 1.9 2005/01/04 20:10:46 jody Exp $ */ + /* @(#)sft.c 1.17 03/01/08 SMI */ + + /* +@@ -43,6 +43,10 @@ + * @version 1.0 + */ + ++#ifdef HAVE_CONFIG_H ++# include ++#endif ++ + #include + #include + #include +--- a/src/ttsubset/ttcr.c ++++ b/src/ttsubset/ttcr.c +@@ -33,7 +33,7 @@ + * + */ + +-/* $Id$ */ ++/* $Id: ttcr.c,v 1.7 2005/01/04 20:10:46 jody Exp $ */ + /* @(#)ttcr.c 1.7 03/01/08 SMI */ + + /* +@@ -44,6 +44,10 @@ + * + */ + ++#ifdef HAVE_CONFIG_H ++# include ++#endif ++ + #include + #ifdef HAVE_UNISTD_H + #include + +Add missing include directives for make_dashed, set_cursor_busy. + +--- a/src/xo-image.c ++++ b/src/xo-image.c +@@ -25,6 +25,8 @@ + #include "xo-support.h" + #include "xo-image.h" + #include "xo-misc.h" ++#include "xo-selection.h" ++#include "xo-paint.h" + + // create pixbuf from buffer, or return NULL on failure + GdkPixbuf *pixbuf_from_buffer(const gchar *buf, gsize buflen) diff --git a/office/xournal/xournal.SlackBuild b/office/xournal/xournal.SlackBuild index 23c177c011..595aa842b5 100644 --- a/office/xournal/xournal.SlackBuild +++ b/office/xournal/xournal.SlackBuild @@ -61,6 +61,8 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +patch -p1 < $CWD/xournal-0.4.8-c99-fix.patch + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \