From 61ea382b18b7593108ea64113dd2ca759bda63a3 Mon Sep 17 00:00:00 2001 From: "Ryan P.C. McQuen" Date: Sun, 6 Dec 2015 15:34:55 -0800 Subject: games/mednafen: Only set CLANGFLAGS on affected version of clang. Signed-off-by: Ryan P.C. McQuen --- games/mednafen/mednafen.SlackBuild | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'games/mednafen/mednafen.SlackBuild') 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 \ -- cgit v1.2.3