From 112dab9f31cd2aa0ec5eefee8ae35d7e4f6810bd Mon Sep 17 00:00:00 2001 From: NHOrus Date: Thu, 26 Mar 2026 22:12:53 +0300 Subject: [PATCH] gnustep-apps/gshisen: Port to C23 Was unable to replicate error from the bug, only got a warning. Patch from Debian fixes it either way. Closes: https://bugs.gentoo.org/957964 Signed-off-by: NHOrus Part-of: https://codeberg.org/gentoo/gentoo/pulls/425 Merges: https://codeberg.org/gentoo/gentoo/pulls/425 Signed-off-by: Bernard Cafarelli --- .../files/gshisen-1.3.0-warnings.patch | 29 +++++++++++++++++++ gnustep-apps/gshisen/gshisen-1.3.0-r3.ebuild | 24 +++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 gnustep-apps/gshisen/files/gshisen-1.3.0-warnings.patch create mode 100644 gnustep-apps/gshisen/gshisen-1.3.0-r3.ebuild diff --git a/gnustep-apps/gshisen/files/gshisen-1.3.0-warnings.patch b/gnustep-apps/gshisen/files/gshisen-1.3.0-warnings.patch new file mode 100644 index 0000000000000..e5b24f8561416 --- /dev/null +++ b/gnustep-apps/gshisen/files/gshisen-1.3.0-warnings.patch @@ -0,0 +1,29 @@ +Debian patch. +https://bugs.gentoo.org/957964 +https://salsa.debian.org/gnustep-team/gshisen.app/-/blob/master/debian/patches/warnings.patch?ref_type=heads +Description: Fix some compiler warnings. +Author: Yavor Doganov +Forwarded: no +Last-Update: 2025-01-20 +--- + +--- gshisen.app-1.3.0.orig/board.m ++++ gshisen.app-1.3.0/board.m +@@ -171,7 +171,7 @@ + [tile release]; + } + } +- tmptiles = (NSMutableArray *)[tmptiles sortedArrayUsingFunction:(int (*)(id, id, void*))randomizeTiles context:self]; ++ tmptiles = (NSMutableArray *)[tmptiles sortedArrayUsingFunction:(NSComparisonResult (*)(id, id, void*))randomizeTiles context:self]; + + if(tmr && !hadEndOfGame) { + if([tmr isValid]) +@@ -491,7 +491,7 @@ + [gameData setObject: entry forKey: @"seconds"]; + + [scores addObject: gameData]; +- [scores sortUsingFunction:(int (*)(id, id, void*))sortScores context:self]; ++ [scores sortUsingFunction:(NSComparisonResult (*)(id, id, void*))sortScores context:self]; + if ([scores count] > numScoresToKeep) { + NSRange scoresToZap = NSMakeRange(numScoresToKeep, + [scores count] - numScoresToKeep); diff --git a/gnustep-apps/gshisen/gshisen-1.3.0-r3.ebuild b/gnustep-apps/gshisen/gshisen-1.3.0-r3.ebuild new file mode 100644 index 0000000000000..a7cf3bd646592 --- /dev/null +++ b/gnustep-apps/gshisen/gshisen-1.3.0-r3.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit gnustep-2 edos2unix + +MY_PN=GShisen +DESCRIPTION="The first GNUstep game, similar to Mahjongg" +HOMEPAGE="https://gap.nongnu.org/gshisen/index.html" +SRC_URI="https://savannah.nongnu.org/download/gap/${MY_PN}-${PV}.tar.gz" +S="${WORKDIR}/${MY_PN}-${PV}" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +PATCHES=( "${FILESDIR}/${P}-warnings.patch" ) + +src_prepare() { + edos2unix board.m + + default +}