games/mgba: Fix build on current.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Ruoh-Shoei LIN 2024-07-16 04:42:24 +00:00 committed by Willy Sudiarto Raharjo
parent a097e2a56e
commit 3392419ad8
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 10 additions and 2 deletions

View file

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

View file

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