aboutsummaryrefslogtreecommitdiff
path: root/games/supertux/supertux.SlackBuild
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackbuilds.org>2016-01-04 00:35:38 -0600
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-01-09 07:12:53 +0700
commit1215069a8f27ff78dfec9177985c871c1aeb8abd (patch)
treef21b50c13fc6bbd5ef7080873cc350563626ab1d /games/supertux/supertux.SlackBuild
parentf15f260c74a176d6974698320fe549f4ac5b062b (diff)
games/supertux: Updated for version 0.4.0.
This replaces supertux2 as well. Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'games/supertux/supertux.SlackBuild')
-rw-r--r--games/supertux/supertux.SlackBuild42
1 files changed, 22 insertions, 20 deletions
diff --git a/games/supertux/supertux.SlackBuild b/games/supertux/supertux.SlackBuild
index 19386fd63c37c..72e00c5c770dd 100644
--- a/games/supertux/supertux.SlackBuild
+++ b/games/supertux/supertux.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for supertux
-# Copyright 2006-2011 Robby Workman, Northport, Alabama, USA
+# Copyright 2006-2011,2016 Robby Workman, Tuscaloosa, Alabama, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=supertux
-VERSION=0.1.3
+VERSION=${VERSION:-0.4.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -42,12 +42,16 @@ OUTPUT=${OUTPUT:-/tmp}
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
SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
set -e
@@ -65,31 +69,29 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# gcc4 compile patch
-patch -p1 < $CWD/supertux-gcc4.2.patch
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --sysconfdir=/etc \
- --with-x \
- --program-prefix="" \
- --build=$ARCH-slackware-linux
-
-make
-make install DESTDIR=$PKG
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DINSTALL_SUBDIR_BIN=bin \
+ -DINSTALL_SUBDIR_SHARE=share/$PRGNAM \
+ -DINSTALL_SUBDIR_DOC=doc/$PRGNAM-$VERSION \
+ -DLIB_SUBDIR=lib${LIBDIRSUFFIX} \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
+ 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
# Fix path to icon in .desktop file
sed -i s%'Icon=supertux.png'%'Icon=supertux'%g \
- $PKG/usr/share/applications/supertux.desktop
+ $PKG/usr/share/applications/supertux2.desktop
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING ChangeLog INSTALL LEVELDESIGN \
- NEWS README TODO $PKG/usr/doc/$PRGNAM-$VERSION/
+# Docs are already installed by the build system
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install