summaryrefslogtreecommitdiff
path: root/system/vice/vice.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/vice/vice.SlackBuild')
-rw-r--r--system/vice/vice.SlackBuild19
1 files changed, 17 insertions, 2 deletions
diff --git a/system/vice/vice.SlackBuild b/system/vice/vice.SlackBuild
index f29eece299..ea0180229a 100644
--- a/system/vice/vice.SlackBuild
+++ b/system/vice/vice.SlackBuild
@@ -24,10 +24,19 @@
PRGNAM=vice
VERSION=2.1
-ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -41,7 +50,10 @@ elif [ "$ARCH" = "i686" ]; then
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX=64
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
set -e # Exit on most errors
@@ -66,6 +78,9 @@ patch -p1 <$CWD/patches/vice-fix-help.patch
# Use /usr/lib64 on 64-bit Slackware
[ "$ARCH" == "x86_64" ] && patch -p1 < $CWD/patches/vice-2.1-64bit.patch
+# patch for gcc 4.4
+patch -p0 < $CWD/patches/vice-gcc-4.4.patch
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \