From 7958e284ae782cb1fcb2f44569134808e2fc4f87 Mon Sep 17 00:00:00 2001 From: Alfred Wingate Date: Tue, 28 Oct 2025 17:16:36 +0200 Subject: [PATCH] gnustep-apps/cenon: fix gcc-15 Signed-off-by: Alfred Wingate Part-of: https://github.com/gentoo/gentoo/pull/44437 Signed-off-by: Bernard Cafarelli --- gnustep-apps/cenon/cenon-4.0.6.ebuild | 3 +- .../cenon/files/cenon-4.0.6-gcc15.patch | 67 +++++++++++++++++++ 2 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 gnustep-apps/cenon/files/cenon-4.0.6-gcc15.patch diff --git a/gnustep-apps/cenon/cenon-4.0.6.ebuild b/gnustep-apps/cenon/cenon-4.0.6.ebuild index adfd7fb6cc130..d42fcef597155 100644 --- a/gnustep-apps/cenon/cenon-4.0.6.ebuild +++ b/gnustep-apps/cenon/cenon-4.0.6.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -20,4 +20,5 @@ RDEPEND=">=gnustep-libs/cenonlibrary-4.0.0" PATCHES=( "${FILESDIR}"/${P}-install.patch "${FILESDIR}"/${P}-invalid_array_syntax.patch + "${FILESDIR}"/${P}-gcc15.patch ) diff --git a/gnustep-apps/cenon/files/cenon-4.0.6-gcc15.patch b/gnustep-apps/cenon/files/cenon-4.0.6-gcc15.patch new file mode 100644 index 0000000000000..d8509df756a29 --- /dev/null +++ b/gnustep-apps/cenon/files/cenon-4.0.6-gcc15.patch @@ -0,0 +1,67 @@ +https://salsa.debian.org/gnustep-team/cenon.app/-/blob/2a877c7c09ad9a7727f48027fe39c67acb1061c3/debian/patches/gcc-15.patch +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1096423 +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1099541 + +Description: Add workaround to fix FTBFS with GCC 15. + The bug is in gobjc-15 (#1099541) so this patch must be removed when it's + fixed upstream and the fix is included in Debian. +Author: Yavor Doganov +Bug-Debian: https://bugs.debian.org/1096423 +Forwarded: not-needed +Last-Update: 2025-09-07 +--- cenon.app.orig/GraphicObjects.subproj/VArc.m ++++ cenon.app/GraphicObjects.subproj/VArc.m +@@ -2239,7 +2239,7 @@ + + ea = vhfAngleOfPointRelativeCenter(gridPoint, center); + an = ea - begAngle; +- if ( angle*an < 0.0 && Diff(angle, an) >= 180.0 ) ++ if ( ({angle;})*an < 0.0 && Diff(angle, an) >= 180.0 ) + an = (angle>0.0) ? 360.0+an : an-360.0; + if (an<=TOLERANCE) an = 360.0; + [self setCenter:center start:start angle:an]; +@@ -2912,7 +2912,7 @@ + a = begAngle + angle; if (a<0.0) a+=360.0; if (a>=360.0) a-=360.0; + begAngle = vhfAngleOfPointRelativeCenter(start, center); + a = a - begAngle; /* we don't move the end point */ +- if ( angle*a < 0.0 && Diff(angle, a) >= 180.0 ) ++ if ( ({angle;})*a < 0.0 && Diff(angle, a) >= 180.0 ) + a = (angle>0.0) ? 360.0+a : a-360.0; + angle = a; + } +@@ -2947,7 +2947,7 @@ + end.y = center.y + (dy*radius)/c; + a = vhfAngleOfPointRelativeCenter(end, center); + a = a - begAngle; +- if ( angle*a < 0.0 && Diff(angle, a) >= 180.0 ) ++ if ( ({angle;})*a < 0.0 && Diff(angle, a) >= 180.0 ) + a = (angle>0.0) ? 360.0+a : a-360.0; + angle = a; + } +@@ -3014,7 +3014,7 @@ + a = begAngle + angle; if (a<0.0) a+=360.0; if (a>=360.0) a-=360.0; + begAngle = vhfAngleOfPointRelativeCenter(start, center); + a = a - begAngle; /* we don't move the end point */ +- if ( angle*a <= 0.0 && Diff(angle, a) >= 180.0 ) ++ if ( ({angle;})*a <= 0.0 && Diff(angle, a) >= 180.0 ) + a = (angle>0.0) ? 360.0+a : a-360.0; + angle = a; + } +@@ -3049,7 +3049,7 @@ + end.y = center.y + (dy*radius)/c; + a = vhfAngleOfPointRelativeCenter(end, center); + a = a - begAngle; +- if ( angle*a <= 0.0 && Diff(angle, a) >= 180.0 ) ++ if ( ({angle;})*a <= 0.0 && Diff(angle, a) >= 180.0 ) + a = (angle>0.0) ? 360.0+a : a-360.0; + angle = a; + } +@@ -3057,7 +3057,7 @@ + { end = p; + a = vhfAngleOfPointRelativeCenter(end, center); + a = a - begAngle; +- if ( angle*a <= 0.0 && Diff(angle, a) >= 180.0 ) ++ if ( ({angle;})*a <= 0.0 && Diff(angle, a) >= 180.0 ) + a = (angle>0.0) ? 360.0+a : a-360.0; + angle = a; + start = vhfPointAngleFromRefPoint(center, end, -angle);