From a1f00d22d4a812ebe68f0e81dba088c479c5869c Mon Sep 17 00:00:00 2001 From: Heinz Wiesinger Date: Tue, 24 Aug 2010 00:16:58 -0400 Subject: [PATCH] games/Scorched3D: Added (3D artillery game) Signed-off-by: dsomero --- games/Scorched3D/README | 6 + games/Scorched3D/Scorched3D.SlackBuild | 110 ++++++++++++++++++ games/Scorched3D/Scorched3D.info | 10 ++ games/Scorched3D/doinst.sh | 3 + games/Scorched3D/scorched3d-42.1-fixups.patch | 32 +++++ .../scorched3d-43.1c-libpng14.patch | 40 +++++++ games/Scorched3D/scorched3d.desktop | 10 ++ games/Scorched3D/scorched3d.png | Bin 0 -> 2410 bytes games/Scorched3D/slack-desc | 19 +++ 9 files changed, 230 insertions(+) create mode 100644 games/Scorched3D/README create mode 100644 games/Scorched3D/Scorched3D.SlackBuild create mode 100644 games/Scorched3D/Scorched3D.info create mode 100644 games/Scorched3D/doinst.sh create mode 100644 games/Scorched3D/scorched3d-42.1-fixups.patch create mode 100644 games/Scorched3D/scorched3d-43.1c-libpng14.patch create mode 100644 games/Scorched3D/scorched3d.desktop create mode 100644 games/Scorched3D/scorched3d.png create mode 100644 games/Scorched3D/slack-desc diff --git a/games/Scorched3D/README b/games/Scorched3D/README new file mode 100644 index 0000000000..80812a12da --- /dev/null +++ b/games/Scorched3D/README @@ -0,0 +1,6 @@ +Scorched3D is a cross-platform 3D remake of the popular 2D artillery game +Scorched Earth. Scorched3D can be played against the computer, other players, +and remotely across the Internet or LAN. + +This requires either wxGTK or wxPython, plus OpenAL, and freealut. +All of these are available at SlackBuilds.org. diff --git a/games/Scorched3D/Scorched3D.SlackBuild b/games/Scorched3D/Scorched3D.SlackBuild new file mode 100644 index 0000000000..5d2b87b761 --- /dev/null +++ b/games/Scorched3D/Scorched3D.SlackBuild @@ -0,0 +1,110 @@ +#!/bin/sh + +# Slackware build script for Scorched3D + +# Copyright 2008-2010 Heinz Wiesinger, Amsterdam, The Netherlands +# 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=Scorched3D +VERSION=43.1c +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +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 + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf scorched +rm -rf scorched-dep-osx +tar xvf $CWD/$PRGNAM-$VERSION-src.tar.gz +cd scorched +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +#fix detection of OpenAL +patch -p1 -i $CWD/scorched3d-42.1-fixups.patch + +#fix building with libpng14 +patch -p0 -i $CWD/scorched3d-43.1c-libpng14.patch + +chmod +x ./autogen.sh +./autogen.sh + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --datadir=/usr/share/scorched3d \ + --build=$ARCH-slackware-linux \ + --host=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +mkdir -p $PKG/usr/share/{applications,pixmaps} +cp -f $CWD/scorched3d.desktop $PKG/usr/share/applications +cp -f $CWD/scorched3d.png $PKG/usr/share/pixmaps + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a CHANGELOG README $PKG/usr/doc/$PRGNAM-$VERSION +mv $PKG/usr/share/scorched3d/documentation/* $PKG/usr/doc/$PRGNAM-$VERSION/ +rm -rf $PKG/usr/share/scorched3d/documentation +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +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} diff --git a/games/Scorched3D/Scorched3D.info b/games/Scorched3D/Scorched3D.info new file mode 100644 index 0000000000..4ebfb48583 --- /dev/null +++ b/games/Scorched3D/Scorched3D.info @@ -0,0 +1,10 @@ +PRGNAM="Scorched3D" +VERSION="43.1c" +HOMEPAGE="http://www.scorched3d.co.uk" +DOWNLOAD="http://downloads.sourceforge.net/scorched3d/Scorched3D-43.1c-src.tar.gz" +MD5SUM="91d8b8cfecba870d33984319c8035a4c" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Heinz Wiesinger" +EMAIL="pprkut@liwjatan.at" +APPROVED="dsomero" diff --git a/games/Scorched3D/doinst.sh b/games/Scorched3D/doinst.sh new file mode 100644 index 0000000000..033f010d40 --- /dev/null +++ b/games/Scorched3D/doinst.sh @@ -0,0 +1,3 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database ./usr/share/applications >/dev/null 2>&1 +fi diff --git a/games/Scorched3D/scorched3d-42.1-fixups.patch b/games/Scorched3D/scorched3d-42.1-fixups.patch new file mode 100644 index 0000000000..791fbe7f33 --- /dev/null +++ b/games/Scorched3D/scorched3d-42.1-fixups.patch @@ -0,0 +1,32 @@ +diff -ru scorched.orig/configure-al.m4 scorched/configure-al.m4 +--- scorched.orig/configure-al.m4 2008-03-03 16:17:18.000000000 -0500 ++++ scorched/configure-al.m4 2009-02-15 20:43:35.000000000 -0500 +@@ -7,25 +7,9 @@ + [ --disable-openaltest Do not try to compile and run a test OpenAL program], + , enable_openaltest=yes) + AC_MSG_CHECKING(for OpenAL support) +-AC_PATH_PROG(OPENAL_CONFIG, openal-config, no) +-if test x$OPENAL_CONFIG = xno; then +- echo "*** The openal-config script installed by OpenAL could not be found" +- echo "*** Make sure openal-config is in your path, or set the OPENAL_CONFIG" +- echo "*** environment variable to the full path to openal-config." +- +- AC_MSG_ERROR([*** Can't find the openal library. Try: http://www.openal.org/]) +-else +- +- if test x"$use_static_openal" = x"yes"; then +- AL_LIBS="/usr/local/lib/libopenal.a" +- else +- AL_LIBS="`$OPENAL_CONFIG --libs`" +- fi +- +- AL_CFLAGS="`$OPENAL_CONFIG --cflags`" +- +- AC_MSG_RESULT(yes) +-fi ++AL_LIBS="-lopenal" ++AL_CFLAGS="-I/usr/include/AL" ++AC_MSG_RESULT(yes) + + AC_MSG_CHECKING(for Freealut support) + AC_PATH_PROG(FREEALUT_CONFIG, freealut-config, no) diff --git a/games/Scorched3D/scorched3d-43.1c-libpng14.patch b/games/Scorched3D/scorched3d-43.1c-libpng14.patch new file mode 100644 index 0000000000..d61a2b6ac4 --- /dev/null +++ b/games/Scorched3D/scorched3d-43.1c-libpng14.patch @@ -0,0 +1,40 @@ +http://bugs.gentoo.org/show_bug.cgi?id=308867 + +--- src/common/image/ImagePng.cpp ++++ src/common/image/ImagePng.cpp +@@ -189,7 +189,7 @@ bool ImagePng::loadFromBuffer(NetBuffer + info_ptr = png_create_info_struct(png_ptr); + if (info_ptr == NULL) + { +- png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL); ++ png_destroy_read_struct(&png_ptr, NULL, NULL); + return false; + } + +@@ -200,7 +200,7 @@ bool ImagePng::loadFromBuffer(NetBuffer + if (setjmp(png_jmpbuf(png_ptr))) + { + /* Free all of the memory associated with the png_ptr and info_ptr */ +- png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL); ++ png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + /* If we get here, we had a problem reading the file */ + return false; + } +@@ -258,7 +258,7 @@ bool ImagePng::loadFromBuffer(NetBuffer + } + else + { +- png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL); ++ png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + + Logger::log(S3D::formatStringBuffer( + "Invalid PNG format.\n" +@@ -272,7 +272,7 @@ bool ImagePng::loadFromBuffer(NetBuffer + // END NEW CODE + + /* clean up after the read, and free any memory allocated - REQUIRED */ +- png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL); ++ png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + + /* that's it */ + return true; diff --git a/games/Scorched3D/scorched3d.desktop b/games/Scorched3D/scorched3d.desktop new file mode 100644 index 0000000000..1d5d82c036 --- /dev/null +++ b/games/Scorched3D/scorched3d.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +X-MultipleArgs=false +Terminal=false +Exec=scorched3d +Icon=scorched3d +Type=Application +Categories=Game; +StartupNotify=false +Name=Scorched 3D +GenericName=Artillery Game diff --git a/games/Scorched3D/scorched3d.png b/games/Scorched3D/scorched3d.png new file mode 100644 index 0000000000000000000000000000000000000000..485685b70e2c64a8cb49568ced09ee81bd168054 GIT binary patch literal 2410 zcmV-w36=JVP)v z-ESMm6~zzd?hbdk%Oxq25@kuTEL;AJ6FYL!CTP>NO;fZ*^3uPe=u`ihz7%~gkRm_} z6h)AvY2q|V<0Q>T?Yfd>iJ~Nu5-F0)C3iWqceW2SIvC6y3!H5ddTK>{#fu!e~R14Jaq z0y&TjfWZKWK!5;xMur8NVrn2F6So5C)zCP-pqD+04Jh6Q3Uo(z(3K@h?QkwpX| z0)as+SQ(apAdrBxT}hJSI99ql91V_+A3olH+FJXwZhIBKTr5<4i*Q=`G)U% zf$tInfZ!(v5Ir%O!4?>j<`N(xCNMKI9h{73QNOcyB;(1|!_l*eGs_oyzW0>K(TS-& zj&mx0+|M4Dvhivy2ukH@ktF22za$Wt0an&rNHCGKT_OUQ&}k1_j}EQf!;9Mo>xG4r zslNBLI9qa6T+W;72esD4MOp05mZo|+v^%5zuHPMBS*zA7i&Yl_tN{iyGhiuz0BHaQ z5gaLd-Eh3$kzY4|GD~+H`NhqO*a)7vy=FV!yB{~OxYa7LES`9~BOWSLf z=+u{QT)D)I?z!G%*6!^!<-OtMrhYruFITH>*<}KQ46|TZF2G6)BA>`}sNI^Pee~RE z`2JJQ+MSnP{&98ve6aISG8AB9fhf~{mPuwJavL>;+Q!E6{rZ0LVff2&_D<_)na%~p zJSzo;W>_9k%>3?W&04MINQ(B4Z+7GTTK>WdSFUcA*U!5^6g@v?pS`g+N8LleIF*XE$-oIk%5cy7fH{CeNk44twl>NJhx5TvA} zL}P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kQYb!CG z-kGT9(a0C`|DbVm(S7FJg5wqlkOXE(5&$gE^R*o-&8)Ny24S%w(Wnk<3lH{=eK)<5 zI8yfUDPtSo7emK85&E~yydtBImebKlK`@6fj3D+94A^Z z8)gOr4ED-}#)YM@?0uAsMSpy$%R$Vmk!gt3QU2~s{k;%Hm4a7a^1XuRI;_~NppU-0cK-h8Ka1`4Y&Yo0@$c0CIWyUf`9?rV8cGc&rn7t2@EhZ{hxRNAt4!% zBtdiXQp^^V0yBXfmq@`Sa%@WU+)ZMD7;|-Ie(pQh4dW(*4fB(i05rb`B1jTslT8F> cCN07L1G_XTsz_UyApigX07*qoM6N<$f;$+g$p8QV literal 0 HcmV?d00001 diff --git a/games/Scorched3D/slack-desc b/games/Scorched3D/slack-desc new file mode 100644 index 0000000000..e7c492fa29 --- /dev/null +++ b/games/Scorched3D/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 ':'. + + |-----handy-ruler------------------------------------------------------| +Scorched3D: Scorched3D (3D artillery game) +Scorched3D: +Scorched3D: Scorched3D is a cross-platform 3D remake of the popular 2D +Scorched3D: artillery game Scorched Earth. Scorched3D can be played +Scorched3D: against the computer, other players, and remotely across the +Scorched3D: Internet or LAN. +Scorched3D: +Scorched3D: Homepage: http://www.scorched3d.co.uk +Scorched3D: +Scorched3D: +Scorched3D: