aboutsummaryrefslogtreecommitdiff
path: root/system/vice
diff options
context:
space:
mode:
authorMatteo Bernardini <matteo.bernardini@sns.it>2010-05-29 21:15:41 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-06-01 00:12:33 -0500
commit94e75f8453bdf8de449a4fde599ac8cb306117fb (patch)
tree60997727266867fba8ea04cab7a9f3204acbc961 /system/vice
parentad51e4da5699680e7d10269687cbfa37ce1bd0d6 (diff)
system/vice: Patched to fix build; miscellaneous cleanups
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system/vice')
-rw-r--r--system/vice/patches/vice-gcc-4.4.patch11
-rw-r--r--system/vice/vice.SlackBuild19
2 files changed, 28 insertions, 2 deletions
diff --git a/system/vice/patches/vice-gcc-4.4.patch b/system/vice/patches/vice-gcc-4.4.patch
new file mode 100644
index 0000000000000..505d736943859
--- /dev/null
+++ b/system/vice/patches/vice-gcc-4.4.patch
@@ -0,0 +1,11 @@
+--- src/arch/unix/joy.c
++++ src/arch/unix/joy.c
+@@ -124,7 +124,7 @@
+ #define JS_DATA_TYPE joystick
+ #define JS_RETURN sizeof(struct joystick)
+ int use_old_api=1;
+-#elif
++#else
+ #error Unknown Joystick
+ #endif
+
diff --git a/system/vice/vice.SlackBuild b/system/vice/vice.SlackBuild
index f29eece29940e..ea0180229abdc 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 \