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 <jy6x2b32pie9@yahoo.com>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/425
Merges: https://codeberg.org/gentoo/gentoo/pulls/425
Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>
This commit is contained in:
NHOrus
2026-03-26 22:12:53 +03:00
committed by Bernard Cafarelli
parent 9a5d428daf
commit 112dab9f31
2 changed files with 53 additions and 0 deletions

View File

@@ -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 <yavor@gnu.org>
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);

View File

@@ -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
}