summaryrefslogtreecommitdiffstats
path: root/games/torcs
diff options
context:
space:
mode:
Diffstat (limited to 'games/torcs')
-rw-r--r--games/torcs/torcs.SlackBuild18
1 files changed, 14 insertions, 4 deletions
diff --git a/games/torcs/torcs.SlackBuild b/games/torcs/torcs.SlackBuild
index 76ee0f1fae..5907061aa9 100644
--- a/games/torcs/torcs.SlackBuild
+++ b/games/torcs/torcs.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for torcs
@@ -8,10 +8,13 @@
# 20170704 bkw: fix build on -current
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=torcs
VERSION=${VERSION:-1.3.7}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -21,7 +24,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -58,7 +68,7 @@ find -L . \
patch -p1 < $CWD/gcc7.diff
CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS -fpermissive" \
./configure \
--prefix=/usr \
--libdir=/usr/lib$LIBDIRSUFFIX \
@@ -108,4 +118,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE