summaryrefslogtreecommitdiffstats
path: root/games/jfsw/jfsw.SlackBuild
diff options
context:
space:
mode:
author David Spencer <idlemoor@slackbuilds.org>2016-03-02 23:28:44 +0000
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2016-03-04 07:39:23 +0700
commitaa6985b28a427b6c7a3a1c201810e0b623848444 (patch)
treed016544c09bc362ab5dbd1518b3a6357fcefbed3 /games/jfsw/jfsw.SlackBuild
parentebee8777524ca9bd895a83368237f480e4c03937 (diff)
downloadslackbuilds-aa6985b28a427b6c7a3a1c201810e0b623848444.tar.gz
slackbuilds-aa6985b28a427b6c7a3a1c201810e0b623848444.tar.xz
games/jfsw: Updated for version 20160220_54912c4.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'games/jfsw/jfsw.SlackBuild')
-rw-r--r--games/jfsw/jfsw.SlackBuild78
1 files changed, 39 insertions, 39 deletions
diff --git a/games/jfsw/jfsw.SlackBuild b/games/jfsw/jfsw.SlackBuild
index b0b50783ba..a061b0bb4d 100644
--- a/games/jfsw/jfsw.SlackBuild
+++ b/games/jfsw/jfsw.SlackBuild
@@ -3,11 +3,12 @@
# Slackware build script for jfsw
# Written by B. Watson (yalhcru@gmail.com)
+# Updated for Slackware 14.2 with the help of orbea <ovariegata@yahoo.com>
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
PRGNAM=jfsw
-VERSION=${VERSION:-20051009}
+VERSION=${VERSION:-20160220_54912c4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -24,61 +25,60 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-# SLKCFLAGS is only used if FORCE_SLACK_CFLAGS=yes in the environment.
-# This is because the code has portability problems that might cause
-# trouble if built with CFLAGS other than the default ones in the Makefile.
-
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
else
- echo "Sorry, this package can't be built on $ARCH"
- exit 1
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
set -e
-BUILD_PRGNAM=jfbuild
-BIN_NAME=sw
-
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf ${PRGNAM}_src_${VERSION} ${BUILD_PRGNAM}_src_${VERSION} build
-unzip $CWD/${PRGNAM}_src_${VERSION}.zip
-unzip $CWD/${BUILD_PRGNAM}_src_${VERSION}.zip
-mv ${BUILD_PRGNAM}_src_${VERSION} build
-
-cd build
- # build engine compile fixes, from gentoo
- patch -p1 < $CWD/patches/jfbuild_src_20051009.patch
-cd -
-
-cd ${PRGNAM}_src_${VERSION}
-# compile fixes, from gentoo
-patch -p1 < $CWD/patches/jfsw_src_20051009.patch
-# permanently disable ambient sound option, since it doesn't work and
-# causes the game to lock up
-patch -p1 < $CWD/patches/disable_ambience.patch
-
+for TARNAM in \
+ jfsw-54912c4964a5d68d4fd68dba1d3affcfe2062766.tar.gz \
+ jfaudiolib-ea5613edadcf691a4867a750546f33ef84885fbf.tar.gz \
+ jfbuild-b129b7ee9ce468022610dc8194786c0bac1f66ef.tar.gz \
+ jfmact-f915216973de73c42c326fdd3b1734ac12316427.tar.gz \
+; do
+ SRCNAM=$(echo $TARNAM | sed -e 's/-.*//')
+ DERPY_TARNAM=$(echo $TARNAM | sed -e 's/.*-//')
+ COMMIT=$(basename $DERPY_TARNAM .tar.gz)
+ rm -rf $SRCNAM
+ tar xvf $CWD/$TARNAM || tar xvf $CWD/$DERPY_TARNAM
+ mv $SRCNAM-$COMMIT $SRCNAM
+done
+
+cd $PRGNAM
+mv \
+ $TMP/jfaudiolib \
+ $TMP/jfbuild \
+ $TMP/jfmact \
+ .
chown -R root:root .
find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
-
-# I hate hard-coded assumptions that I have the same CPU you have...
-sed -i 's/-march=pentium//' Makefile ../build/Makefile
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-if [ "${FORCE_SLACK_CFLAGS:-no}" = "yes" ]; then
- sed -i '/^\s\+debug=/s/=.*/='"$SLKCFLAGS"'/' Makefile ../build/Makefile
-fi
-
-make RELEASE=1
+make \
+ RELEASE=1 \
+ PREFIX=/usr/share/games/$PRGNAM \
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS"
# no 'make install' target
+BIN_NAME=sw
mkdir -p $PKG/usr/games
install -s -m0755 -oroot -groot $BIN_NAME $PKG/usr/games
cd $PKG/usr/games