diff options
Diffstat (limited to 'games/opendune/opendune.SlackBuild')
-rw-r--r-- | games/opendune/opendune.SlackBuild | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/games/opendune/opendune.SlackBuild b/games/opendune/opendune.SlackBuild index 5273778340..6f11010a48 100644 --- a/games/opendune/opendune.SlackBuild +++ b/games/opendune/opendune.SlackBuild @@ -6,11 +6,12 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20170531 bkw: BUILD=2, fix build on x86 # 20170302 bkw: use long-format github URL PRGNAM=opendune VERSION=${VERSION:-0.8} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -28,9 +29,11 @@ OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" + MMX=${MMX:-maybe} LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" + MMX=${MMX:-maybe} LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" @@ -57,6 +60,25 @@ 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 {} \; +# 20170531 bkw: upstream uses #if defined(__i386__) to test for MMX, +# which is wrong (should be checking __MMX__ instead). This only affects +# x86 builds (not x86_64), and only if SDL 1 is used. +patch -p1 < $CWD/mmx_bodge.diff + +if [ "$MMX" = "maybe" ]; then + if grep -q '\<mmx\>' /proc/cpuinfo; then + MMX="yes" + else + MMX="no" + fi + echo "=== autodected MMX: $MMX" +fi + +if [ "$MMX" = "yes" ]; then + SLKCFLAGS="$SLKCFLAGS -mmmx" + echo "=== added -mmmx to SLKCFLAGS" +fi + # Fix compile issue with /usr/include/alsa/pcm.h (uses inline) sed -i 's,-ansi,,' config.lib |