aboutsummaryrefslogtreecommitdiff
path: root/misc/bsdsfv/bsdsfv.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'misc/bsdsfv/bsdsfv.SlackBuild')
-rw-r--r--misc/bsdsfv/bsdsfv.SlackBuild19
1 files changed, 13 insertions, 6 deletions
diff --git a/misc/bsdsfv/bsdsfv.SlackBuild b/misc/bsdsfv/bsdsfv.SlackBuild
index 5af7d49367163..dab49c6d1b6b6 100644
--- a/misc/bsdsfv/bsdsfv.SlackBuild
+++ b/misc/bsdsfv/bsdsfv.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for bsdsfv
#
-# Copyright 2007 Niklas "Nille" Åkerström
+# Copyright 2009 Niklas "Nille" Åkerström
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -31,11 +31,14 @@ CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+COLOR=${COLOR:-no}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
fi
rm -rf $PKG
@@ -48,6 +51,14 @@ cd $PRGNAM-$VERSION || exit 1
chown -R root:root .
chmod -R a-s,u+rw,go+r-w .
+#64bit patch borrowed from gentoo
+zcat $CWD/bsdsfv-1.18-64bit.patch.gz | patch -p1 --verbose --backup --suffix=.orig
+
+if [ $COLOR != no ]; then
+#colorpatch made with help of pj's old gentoo patch
+zcat $CWD/bsdsfv-1.18-color.patch.gz | patch -p1 --verbose --backup --suffix=.orig2
+fi
+
make CFLAGS="$SLKCFLAGS -Wall" || exit 1
make INSTALL_PREFIX=$PKG/usr install || exit 1
@@ -71,8 +82,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n -p $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
-
-if [ "$1" = "--cleanup" ]; then
- rm -rf $PKG $TMP/$PRGNAM-$VERSION
- fi
+/sbin/makepkg -l y -c n -p $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}