commit:     7958e284ae782cb1fcb2f44569134808e2fc4f87
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Tue Oct 28 15:16:36 2025 +0000
Commit:     Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
CommitDate: Tue Nov 11 19:24:01 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7958e284

gnustep-apps/cenon: fix gcc-15

Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/44437
Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>

 gnustep-apps/cenon/cenon-4.0.6.ebuild            |  3 +-
 gnustep-apps/cenon/files/cenon-4.0.6-gcc15.patch | 67 ++++++++++++++++++++++++
 2 files changed, 69 insertions(+), 1 deletion(-)

diff --git a/gnustep-apps/cenon/cenon-4.0.6.ebuild 
b/gnustep-apps/cenon/cenon-4.0.6.ebuild
index adfd7fb6cc13..d42fcef59715 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 000000000000..d8509df756a2
--- /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 <[email protected]>
+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);

Reply via email to