commit:     3097636bde739f2b688e6e53387dc2c4568a12b5
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 20 12:57:40 2024 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Nov 20 13:06:09 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3097636b

app-editors/jove: Fix compilation with GCC 15

Closes: https://bugs.gentoo.org/944105
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 app-editors/jove/files/jove-4.17.5.3-bool.patch | 14 ++++++++++++++
 app-editors/jove/jove-4.17.5.3.ebuild           |  6 ++++--
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/app-editors/jove/files/jove-4.17.5.3-bool.patch 
b/app-editors/jove/files/jove-4.17.5.3-bool.patch
new file mode 100644
index 000000000000..901344b5c0e5
--- /dev/null
+++ b/app-editors/jove/files/jove-4.17.5.3-bool.patch
@@ -0,0 +1,14 @@
+--- jove-4.17.5.3/jove.h
++++ jove-4.17.5.3/jove.h
+@@ -148,7 +148,12 @@
+ 
+ #define private               static
+ 
++#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
++# include <stdbool.h>
++#else
+ typedef int   bool;
++#endif
++
+ #define NO            0
+ #define YES           1

diff --git a/app-editors/jove/jove-4.17.5.3.ebuild 
b/app-editors/jove/jove-4.17.5.3.ebuild
index 45d502a5e15a..429130f10619 100644
--- a/app-editors/jove/jove-4.17.5.3.ebuild
+++ b/app-editors/jove/jove-4.17.5.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -18,6 +18,8 @@ RDEPEND="sys-libs/ncurses:0="
 DEPEND="${RDEPEND}"
 BDEPEND="virtual/pkgconfig"
 
+PATCHES=( "${FILESDIR}"/${P}-bool.patch )
+
 src_compile() {
        tc-export CC
 
@@ -25,7 +27,7 @@ src_compile() {
                JOVEHOME="${EPREFIX}/usr" \
                JMANDIR="${EPREFIX}/usr/share/man/man1" \
                JDOCDIR="${EPREFIX}/usr/share/doc/${PF}" \
-               OPTFLAGS="${CFLAGS}" \
+               OPTFLAGS="-std=gnu17 ${CFLAGS}" \
                LDFLAGS="${LDFLAGS}" \
                LDLIBS="$("$(tc-getPKG_CONFIG)" --libs ncurses)" \
                SYSDEFS="-DLinux" \

Reply via email to