summaryrefslogtreecommitdiff
path: root/games/crack-attack
diff options
context:
space:
mode:
authorfuzzix <fuzzix@fuzzix.org>2017-06-18 22:21:57 +0100
committerDavid Spencer <idlemoor@slackbuilds.org>2017-06-18 23:33:03 +0100
commit90b6ad0ac515f7aab6121656dfa8333b139f631b (patch)
treec05ab7e25963a7c05e6af17aba79ed84bdcbc079 /games/crack-attack
parent87fd3264030baae707ef5213d7a988d8fb2979fa (diff)
downloadslackbuilds-90b6ad0ac515f7aab6121656dfa8333b139f631b.tar.gz
games/crack-attack: Added (Multiplayer puzzle game).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'games/crack-attack')
-rw-r--r--games/crack-attack/README2
-rw-r--r--games/crack-attack/crack-attack.SlackBuild109
-rw-r--r--games/crack-attack/crack-attack.info10
-rw-r--r--games/crack-attack/includes.patch48
-rw-r--r--games/crack-attack/slack-desc19
5 files changed, 188 insertions, 0 deletions
diff --git a/games/crack-attack/README b/games/crack-attack/README
new file mode 100644
index 0000000000..3c83717513
--- /dev/null
+++ b/games/crack-attack/README
@@ -0,0 +1,2 @@
+Crack Attack is a free OpenGL game for Linux and Windows based on the
+Super Nintendo classic Tetris Attack.
diff --git a/games/crack-attack/crack-attack.SlackBuild b/games/crack-attack/crack-attack.SlackBuild
new file mode 100644
index 0000000000..5fd548554e
--- /dev/null
+++ b/games/crack-attack/crack-attack.SlackBuild
@@ -0,0 +1,109 @@
+#!/bin/sh
+
+# Slackware build script for crack-attack
+
+# Copyright 2017 fuzzix <fuzzix@fuzzix.org>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=crack-attack
+VERSION=${VERSION:-1.1.15_cvs_01}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+SRCVER=$(echo $VERSION | tr _ -)
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -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
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$SRCVER
+tar xvf $CWD/$PRGNAM-$SRCVER.tar.bz2
+cd $PRGNAM-$SRCVER
+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 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+patch -p1 < $CWD/includes.patch
+
+./autogen.sh
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+LIBS="-ldl" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ COPYING INSTALL COPYRIGHT NEWS AUTHORS README \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/games/crack-attack/crack-attack.info b/games/crack-attack/crack-attack.info
new file mode 100644
index 0000000000..5cf09b4ec2
--- /dev/null
+++ b/games/crack-attack/crack-attack.info
@@ -0,0 +1,10 @@
+PRGNAM="crack-attack"
+VERSION="1.1.15_cvs_01"
+HOMEPAGE="http://aluminumangel.org/attack/"
+DOWNLOAD="http://download.savannah.nongnu.org/releases/crack-attack/crack-attack-1.1.15-cvs-01.tar.bz2"
+MD5SUM="b0f12046d41b1805c03168df57e615cd"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="fuzzix"
+EMAIL="fuzzix@fuzzix.org"
diff --git a/games/crack-attack/includes.patch b/games/crack-attack/includes.patch
new file mode 100644
index 0000000000..46627cb068
--- /dev/null
+++ b/games/crack-attack/includes.patch
@@ -0,0 +1,48 @@
+diff --git a/src/ActionRecorder.cxx b/src/ActionRecorder.cxx
+index f68e674..3312523 100644
+--- a/src/ActionRecorder.cxx
++++ b/src/ActionRecorder.cxx
+@@ -21,6 +21,7 @@
+ */
+
+ #include <fstream>
++#include <cstring>
+ #include "TextureLoader.h"
+
+ using namespace std;
+diff --git a/src/Attack.cxx b/src/Attack.cxx
+index 594ef83..1b58f6a 100644
+--- a/src/Attack.cxx
++++ b/src/Attack.cxx
+@@ -27,6 +27,7 @@
+ #include <cstring>
+ #include <cctype>
+ #include <sys/stat.h>
++#include <unistd.h>
+
+ #ifndef _WIN32
+ # include <pwd.h>
+diff --git a/src/Game.cxx b/src/Game.cxx
+index be77c38..a239e65 100644
+--- a/src/Game.cxx
++++ b/src/Game.cxx
+@@ -27,6 +27,7 @@
+ */
+
+ #include <GL/glut.h>
++#include <unistd.h>
+
+ #include "glext.h"
+
+diff --git a/src/TextureLoader.h b/src/TextureLoader.h
+index ae3bb8d..024fb0a 100644
+--- a/src/TextureLoader.h
++++ b/src/TextureLoader.h
+@@ -28,6 +28,7 @@
+ #define TEXTURELOADER_H
+
+ #include <GL/glut.h>
++#include <cstring>
+
+ #include "glext.h"
+ #include "sstream.h"
diff --git a/games/crack-attack/slack-desc b/games/crack-attack/slack-desc
new file mode 100644
index 0000000000..ffa5faaf6b
--- /dev/null
+++ b/games/crack-attack/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+crack-attack: crack-attack (Multiplayer puzzle game based on Tetris Attack)
+crack-attack:
+crack-attack: Crack Attack is a free OpenGL game for Linux and Windows based on the
+crack-attack: Super Nintendo classic Tetris Attack.
+crack-attack:
+crack-attack: Homepage: http://aluminumangel.org/attack/
+crack-attack:
+crack-attack:
+crack-attack:
+crack-attack:
+crack-attack: