aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorRuoh-Shoei LIN <56530472+LinRs@users.noreply.github.com>2024-07-16 04:42:24 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-07-17 21:18:03 +0700
commit3392419ad83d85b42393888ed859eb03f79b241a (patch)
tree971fd716d76fbbdd1fc8a44781ed659dd8923f2d /games
parenta097e2a56e4aaa1038e07e3385e402d8b9584fe3 (diff)
games/mgba: Fix build on current.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games')
-rw-r--r--games/mgba/README3
-rw-r--r--games/mgba/mgba.SlackBuild9
2 files changed, 10 insertions, 2 deletions
diff --git a/games/mgba/README b/games/mgba/README
index 58dcaf9ff086b..c31bbc66ad22e 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 f06ee5ca79f38..2bf98a771b1ac 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 \