From 3392419ad83d85b42393888ed859eb03f79b241a Mon Sep 17 00:00:00 2001 From: Ruoh-Shoei LIN <56530472+LinRs@users.noreply.github.com> Date: Tue, 16 Jul 2024 04:42:24 +0000 Subject: [PATCH] games/mgba: Fix build on current. Signed-off-by: Willy Sudiarto Raharjo --- games/mgba/README | 3 +++ games/mgba/mgba.SlackBuild | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/games/mgba/README b/games/mgba/README index 58dcaf9ff0..c31bbc66ad 100644 --- a/games/mgba/README +++ b/games/mgba/README @@ -1,3 +1,6 @@ mGBA is an emulator for running Game Boy Advance games. It aims to be faster and more accurate than many existing Game Boy Advance emulators, as well as adding features that other emulators lack. + +When using slackware current, CURRENT=ON (default OFF) is required to +fix build with gcc>=14. diff --git a/games/mgba/mgba.SlackBuild b/games/mgba/mgba.SlackBuild index f06ee5ca79..2bf98a771b 100644 --- a/games/mgba/mgba.SlackBuild +++ b/games/mgba/mgba.SlackBuild @@ -27,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=mgba VERSION=${VERSION:-0.10.3} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -80,10 +80,15 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# Fix build with GCC >=14 +if [ "${CURRENT:-OFF}" = "ON" ]; then + CURRENT_CFLAGS=" -Wno-incompatible-pointer-types" +fi + mkdir -p build cd build cmake \ - -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS ${CURRENT_CFLAGS}" \ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_BINDIR=games \