summaryrefslogtreecommitdiff
path: root/games/supertuxkart/supertuxkart.SlackBuild
diff options
context:
space:
mode:
authorNiels Horn <niels.horn@gmail.com>2013-04-23 20:47:18 -0400
committerNiels Horn <niels.horn@slackbuilds.org>2013-04-28 12:28:15 -0300
commit686a5a40c0ce0a495599d447b5791c67cd663086 (patch)
tree9ae559e6a89c9fc48c7f6c217538423777f45750 /games/supertuxkart/supertuxkart.SlackBuild
parentb4271e83336dd9af74c9c2500275b750a2697c7e (diff)
downloadslackbuilds-686a5a40c0ce0a495599d447b5791c67cd663086.tar.gz
games/supertuxkart: Updated for version 0.8.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'games/supertuxkart/supertuxkart.SlackBuild')
-rw-r--r--games/supertuxkart/supertuxkart.SlackBuild62
1 files changed, 32 insertions, 30 deletions
diff --git a/games/supertuxkart/supertuxkart.SlackBuild b/games/supertuxkart/supertuxkart.SlackBuild
index d1d6411770..d8ee2887fc 100644
--- a/games/supertuxkart/supertuxkart.SlackBuild
+++ b/games/supertuxkart/supertuxkart.SlackBuild
@@ -3,7 +3,7 @@
# Slackware build script for supertuxkart
# Copyright 2009-2011 Larry Hajali <larryhaja[at]gmail[dot]com>
-# Copyright 2011-2012 Niels Horn, Rio de Janeiro, RJ, Brazil
+# Copyright 2011-2013 Niels Horn, Rio de Janeiro, RJ, Brazil
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,13 +23,15 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# revision date: 2012/09/13
+# revision date: 2013/03/28
PRGNAM=supertuxkart
-VERSION=${VERSION:-0.7.3}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-0.8}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+UNTARRED=SuperTuxKart
+
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
@@ -62,9 +64,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
+rm -rf $UNTARRED-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION-src.tar.bz2
-cd $PRGNAM-$VERSION
+cd $UNTARRED-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -76,25 +78,29 @@ find . \
# Let's fix that with a few other additional cleanups.
patch -p1 < $CWD/translations.patch
sed -i 's|\/games|\/bin|g' data/${PRGNAM}_desktop.template
-for i in $(find . -name "Makefile.*"); do
- sed -i \
- -e "/^bindir/s|games|bin|g" \
- -e "/^pkgdatadir/s|=.*\/po|= \@localedir\@|" \
- -e 's|\/games\/|\/|g' $i
-done
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-LIBS="-lpthread" \
-./configure \
- --prefix=/usr \
- --localedir=/usr/share/locale \
- --datadir=/usr/share \
- --enable-debug=no \
- --build=$ARCH-slackware-linux
-
-make
-make install DESTDIR=$PKG
+
+# First build the Irrlicht (static) library.
+# Note: This is a forked, modfied copy of irrlicht-1.8
+# The original irrlicht library cannot be used, but both
+# coexist without problems.
+cd lib/irrlicht/source/Irrlicht
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ NDEBUG=1 \
+ make
+cd -
+
+# Now make SuperTuxKart
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make VERBOSE=1
+ make install DESTDIR=$PKG
+cd ..
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -102,13 +108,9 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
mkdir -p $PKG/usr/man/man6
gzip -9c $CWD/$PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz
-# Remove directories/files.
-rm -rf $PKG/usr/share/doc
-rm -f $PKG/usr/share/locale/{*.po,*.pot}
-
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- AUTHORS ChangeLog COPYING INSTALL README TODO \
+ AUTHORS CHANGES ChangeLog COPYING INSTALL README TODO \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild