From 94e75f8453bdf8de449a4fde599ac8cb306117fb Mon Sep 17 00:00:00 2001 From: Matteo Bernardini Date: Sat, 29 May 2010 21:15:41 +0200 Subject: system/vice: Patched to fix build; miscellaneous cleanups Signed-off-by: Robby Workman --- system/vice/patches/vice-gcc-4.4.patch | 11 +++++++++++ system/vice/vice.SlackBuild | 19 +++++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 system/vice/patches/vice-gcc-4.4.patch (limited to 'system') 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 000000000000..505d73694385 --- /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 f29eece29940..ea0180229abd 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 \ -- cgit v1.2.3