summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-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 0000000000..505d736943
--- /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 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 \