commit: fce3b3c9d865acfd8b7a1516f13ce1499e204202 Author: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org> AuthorDate: Thu May 22 19:49:32 2025 +0000 Commit: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org> CommitDate: Thu May 22 19:50:19 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fce3b3c9
gnustep-base/gnustep-back-cairo: fix compilation with GCC 15 Closes: https://bugs.gentoo.org/956447 Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org> .../files/gnustep-back-cairo-0.32.0-gcc15.patch | 131 +++++++++++++++++++++ .../gnustep-back-cairo-0.32.0.ebuild | 3 +- 2 files changed, 133 insertions(+), 1 deletion(-) diff --git a/gnustep-base/gnustep-back-cairo/files/gnustep-back-cairo-0.32.0-gcc15.patch b/gnustep-base/gnustep-back-cairo/files/gnustep-back-cairo-0.32.0-gcc15.patch new file mode 100644 index 000000000000..c1402690a3c9 --- /dev/null +++ b/gnustep-base/gnustep-back-cairo/files/gnustep-back-cairo-0.32.0-gcc15.patch @@ -0,0 +1,131 @@ +From d27791933ec25403ff5553670061a423c2b1b22a Mon Sep 17 00:00:00 2001 +From: Fred Kiefer <[email protected]> +Date: Wed, 21 May 2025 22:21:24 +0200 +Subject: [PATCH] * Source/x11/scale.c, * Source/x11/xutil.c: Update function + declaration to modern C. + +--- + ChangeLog | 5 +++++ + Source/x11/scale.c | 26 +++++++++----------------- + Source/x11/xutil.c | 2 +- + 3 files changed, 15 insertions(+), 18 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index d59652ab..35551b1b 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,8 @@ ++2025-05-21 Fred Kiefer <[email protected]> ++ ++ * Source/x11/scale.c, ++ * Source/x11/xutil.c: Update function declaration to modern C. ++ + 2025-02-11 Richard Frith-Macdonald <[email protected]> + + * ANNOUNCE: +diff --git a/Source/x11/scale.c b/Source/x11/scale.c +index d7a7f774..2e61e3f2 100644 +--- a/Source/x11/scale.c ++++ b/Source/x11/scale.c +@@ -244,8 +244,7 @@ RScaleImage(RImage *src, unsigned new_width, unsigned new_height) + #define filter_support (1.0) + + static double +-filter(t) +-double t; ++filter(double t) + { + /* f(t) = 2|t|^3 - 3|t|^2 + 1, -1 <= t <= 1 */ + if(t < 0.0) t = -t; +@@ -256,8 +255,7 @@ double t; + #define box_support (0.5) + + static double +-box_filter(t) +-double t; ++box_filter(double t) + { + if((t > -0.5) && (t <= 0.5)) return(1.0); + return(0.0); +@@ -266,8 +264,7 @@ double t; + #define triangle_support (1.0) + + static double +-triangle_filter(t) +-double t; ++triangle_filter(double t) + { + if(t < 0.0) t = -t; + if(t < 1.0) return(1.0 - t); +@@ -277,8 +274,7 @@ double t; + #define bell_support (1.5) + + static double +-bell_filter(t) /* box (*) box (*) box */ +-double t; ++bell_filter(double t) /* box (*) box (*) box */ + { + if(t < 0) t = -t; + if(t < .5) return(.75 - (t * t)); +@@ -292,8 +288,7 @@ double t; + #define B_spline_support (2.0) + + static double +-B_spline_filter(t) /* box (*) box (*) box (*) box */ +-double t; ++B_spline_filter(double t) /* box (*) box (*) box (*) box */ + { + double tt; + +@@ -309,8 +304,7 @@ double t; + } + + static double +-sinc(x) +-double x; ++sinc(double x) + { + x *= PI; + if(x != 0) return(sin(x) / x); +@@ -320,8 +314,7 @@ double x; + #define Lanczos3_support (3.0) + + static double +-Lanczos3_filter(t) +-double t; ++Lanczos3_filter(double t) + { + if(t < 0) t = -t; + if(t < 3.0) return(sinc(t) * sinc(t/3.0)); +@@ -334,8 +327,7 @@ double t; + #define C (1.0 / 3.0) + + static double +-Mitchell_filter(t) +-double t; ++Mitchell_filter(double t) + { + double tt; + +@@ -356,7 +348,7 @@ double t; + return(0.0); + } + +-static double (*filterf)() = Mitchell_filter; ++static double (*filterf)(double) = Mitchell_filter; + static double fwidth = Mitchell_support; + + void +diff --git a/Source/x11/xutil.c b/Source/x11/xutil.c +index 0bee2ca4..990c9d44 100644 +--- a/Source/x11/xutil.c ++++ b/Source/x11/xutil.c +@@ -42,7 +42,7 @@ + + static int shmError; + +-static int (*oldErrorHandler)(); ++static int (*oldErrorHandler)(Display*, XErrorEvent*); + + static int + errorHandler(Display *dpy, XErrorEvent *err) diff --git a/gnustep-base/gnustep-back-cairo/gnustep-back-cairo-0.32.0.ebuild b/gnustep-base/gnustep-back-cairo/gnustep-back-cairo-0.32.0.ebuild index 23bafd4775fd..32e9de0e89fe 100644 --- a/gnustep-base/gnustep-back-cairo/gnustep-back-cairo-0.32.0.ebuild +++ b/gnustep-base/gnustep-back-cairo/gnustep-back-cairo-0.32.0.ebuild @@ -7,6 +7,7 @@ inherit gnustep-base DESCRIPTION="Cairo back-end component for the GNUstep GUI Library" HOMEPAGE="https://gnustep.github.io" SRC_URI="https://ftp.gnustep.org/pub/gnustep/core/gnustep-back-${PV}.tar.gz" +S="${WORKDIR}/gnustep-back-${PV}" LICENSE="LGPL-2.1+" SLOT="0" @@ -34,7 +35,7 @@ DEPEND="${RDEPEND} virtual/pkgconfig x11-base/xorg-proto" -S=${WORKDIR}/gnustep-back-${PV} +PATCHES=( "${FILESDIR}"/${P}-gcc15.patch ) src_prepare() { default
