summaryrefslogtreecommitdiff
path: root/games/mednafen
diff options
context:
space:
mode:
authorRyan P.C. McQuen <ryan.q@linux.com>2015-12-06 15:34:55 -0800
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-12-12 07:19:05 +0700
commit61ea382b18b7593108ea64113dd2ca759bda63a3 (patch)
treee503e4900b8f884e63e3d833d695432358d0c24a /games/mednafen
parent52848f5cadbc803783d625cc826931a53be42c29 (diff)
downloadslackbuilds-61ea382b18b7593108ea64113dd2ca759bda63a3.tar.gz
games/mednafen: Only set CLANGFLAGS on affected version of clang.
Signed-off-by: Ryan P.C. McQuen <ryan.q@linux.com>
Diffstat (limited to 'games/mednafen')
-rw-r--r--games/mednafen/mednafen.SlackBuild17
1 files changed, 7 insertions, 10 deletions
diff --git a/games/mednafen/mednafen.SlackBuild b/games/mednafen/mednafen.SlackBuild
index 5f65c8362b..ea8a013e50 100644
--- a/games/mednafen/mednafen.SlackBuild
+++ b/games/mednafen/mednafen.SlackBuild
@@ -1,5 +1,4 @@
#!/bin/sh
-
# Slackware build script for mednafen
# Ryan P.C. McQuen | Everett, WA | ryan.q@linux.com
@@ -26,7 +25,7 @@
PRGNAM=mednafen
VERSION=${VERSION:-0.9.38.7}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -71,8 +70,6 @@ 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 {} \;
-CLANGFLAGS="-std=c++11"
-
##
## Switched to clang as 14.1's version of gcc will compile mednafen,
## but will not run mednafen, failing a compiler code generation
@@ -82,14 +79,14 @@ CLANGFLAGS="-std=c++11"
## will both work, but seem to give a drop in performance
## on some machines. Using "-std=c++11" works on stable
## and current, and seems to be the best option at this point.
-## Current users (or anyone who has upgraded their compilers)
-## may remove the CXXFLAGS or run like so:
-##
-## export CLANGFLAGS=""; sh mednafen.SlackBuild
##
-## Depending on your setup, this may work better in some situations.
-## But if you are on 14.1, you will need to keep those CLANGFLAGS. ;^)
+## Note that the CLANGFLAGS are only set if the user has
+## the affected version of llvm.
##
+if [ "`clang --version | grep '3.3'`" ]; then
+ CLANGFLAGS="-std=c++11"
+fi
+
CC=clang CXX=clang++ \
CXXFLAGS+="$CLANGFLAGS" \
./configure \