aboutsummaryrefslogtreecommitdiff
path: root/games/stransball2
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2008-04-28 08:46:59 +0000
committerMartin Wilke <miwi@FreeBSD.org>2008-04-28 08:46:59 +0000
commit129c27a433516da2b9288daa34398abdd5fa7616 (patch)
tree87512141908db28fb3788156cfefc0c5c7407445 /games/stransball2
parent3700954081f46feb738b016e1e4a344f54d6c2d1 (diff)
downloadports-129c27a433516da2b9288daa34398abdd5fa7616.tar.gz
ports-129c27a433516da2b9288daa34398abdd5fa7616.zip
"Super Transball 2" is the sequel of "Transball" and "Transball 2",
Inspired in THRUST type of games (and concretely in ZARA THRUSTA for the Amiga 500). In each level of Transball, the goal is to find the SPHERE, capture it and carry it to the upper part of the level. The main obstacle is the gravity, that impulses you towards the ground. But many other obstacles, canons, tanks, doors, etc. will try to make difficult your journey... WWW: http://www.braingames.getput.com/stransball2/default.asp PR: ports/122896 Submitted by: Dmitry Marakasov <amdmi3 at amdmi3.ru>
Notes
Notes: svn path=/head/; revision=212148
Diffstat (limited to 'games/stransball2')
-rw-r--r--games/stransball2/Makefile50
-rw-r--r--games/stransball2/distinfo3
-rw-r--r--games/stransball2/files/patch-sources-Makefile17
-rw-r--r--games/stransball2/files/patch-sources-main.cpp31
-rw-r--r--games/stransball2/pkg-descr9
-rw-r--r--games/stransball2/pkg-plist57
6 files changed, 167 insertions, 0 deletions
diff --git a/games/stransball2/Makefile b/games/stransball2/Makefile
new file mode 100644
index 000000000000..772356befee3
--- /dev/null
+++ b/games/stransball2/Makefile
@@ -0,0 +1,50 @@
+# New ports collection makefile for: stransball2
+# Date created: 07 Apr 2008
+# Whom: Dmitry Marakasov <amdmi3@amdmi3.ru>
+#
+# $FreeBSD$
+#
+
+PORTNAME= stransball2
+PORTVERSION= 1.5
+CATEGORIES= games
+MASTER_SITES= http://www.amdmi3.ru/distfiles/ \
+ http://braingames.bugreport.nl/stransball2/
+DISTNAME= ${PORTNAME}-v${PORTVERSION:C/\.//}-linux
+
+MAINTAINER= amdmi3@amdmi3.ru
+COMMENT= A sequel to Transball and Transball 2 THRUST-type games
+
+LIB_DEPENDS= SGE.0:${PORTSDIR}/devel/sdl_sge
+
+USE_ZIP= yes
+USE_GMAKE= yes
+USE_SDL= sdl image mixer sound
+MAKE_ENV= CXX="${CXX}"
+
+BUILD_WRKSRC= ${WRKSRC}/sources
+
+PORTDOCS= readme.txt
+
+post-extract:
+ @${RM} -f ${WRKSRC}/sound/WS_FTP.LOG
+
+post-patch:
+ @${FIND} ${BUILD_WRKSRC} -name '*.cpp' | ${XARGS} ${REINPLACE_CMD} \
+ -e 's|demos/|${DATADIR}/&|g; s|graphics/|${DATADIR}/&|g; \
+ s|maps/|${DATADIR}/&|g; s|sound/|${DATADIR}/&|g; \
+ s|"maps"|"${DATADIR}/maps"|g'
+
+do-install:
+ ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/stransball2 ${PREFIX}/bin
+ ${MKDIR} ${DATADIR}
+ cd ${WRKSRC} && ${COPYTREE_SHARE} 'graphics sound maps demos' ${DATADIR}
+
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+.for f in ${PORTDOCS}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
+.endfor
+.endif
+
+.include <bsd.port.mk>
diff --git a/games/stransball2/distinfo b/games/stransball2/distinfo
new file mode 100644
index 000000000000..26615049e778
--- /dev/null
+++ b/games/stransball2/distinfo
@@ -0,0 +1,3 @@
+MD5 (stransball2-v15-linux.zip) = 317325363253fc253d62d0df76fe0789
+SHA256 (stransball2-v15-linux.zip) = 2552a18b4b59c1d39d7a1312e7efbebf5ac89bddc30f5e188693e841516276bc
+SIZE (stransball2-v15-linux.zip) = 302212
diff --git a/games/stransball2/files/patch-sources-Makefile b/games/stransball2/files/patch-sources-Makefile
new file mode 100644
index 000000000000..e31bbf573f47
--- /dev/null
+++ b/games/stransball2/files/patch-sources-Makefile
@@ -0,0 +1,17 @@
+--- sources/Makefile.orig 2005-04-16 21:16:54.000000000 +0400
++++ sources/Makefile 2008-04-07 01:10:16.000000000 +0400
+@@ -12,12 +12,11 @@
+ all: stransball2
+
+ %.o: %.cpp
+- c++ -c -g3 -O3 $< -o $@ `sdl-config --cflags` -I/usr/local/include/SDL
++ ${CXX} ${CXXFLAGS} -c $< -o $@ `${SDL_CONFIG} --cflags`
+
+ # dynamically linked binary:
+ stransball2: $(OBJS)
+- c++ $^ -o $@ `sdl-config --libs` -lSDL_image -lSDL_mixer -lSDL_sound -lSDL_sound -lSGE -I/usr/local/include/SDL
+- mv ./stransball2 ..
++ ${CXX} $^ -o $@ `${SDL_CONFIG} --libs` -lSDL_image -lSDL_mixer -lSDL_sound -lSGE
+
+ clean:
+ rm -f stransball2
diff --git a/games/stransball2/files/patch-sources-main.cpp b/games/stransball2/files/patch-sources-main.cpp
new file mode 100644
index 000000000000..1152ae654b70
--- /dev/null
+++ b/games/stransball2/files/patch-sources-main.cpp
@@ -0,0 +1,31 @@
+--- sources/main.cpp.orig 2005-04-16 21:16:54.000000000 +0400
++++ sources/main.cpp 2008-04-07 01:37:52.000000000 +0400
+@@ -6,6 +6,8 @@
+ #include <time.h>
+ #endif
+
++#include <sys/types.h>
++#include <sys/stat.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include "SDL/SDL.h"
+@@ -126,6 +128,19 @@
+ setupTickCount();
+ #endif
+
++ if (chdir(getenv("HOME")) != 0)
++ return 0;
++
++ struct stat sb;
++ if (stat(".stransball2", &sb) != 0 &&
++ (mkdir(".stransball2", 0755) != 0 ||
++ mkdir(".stransball2/high", 0755) != 0 ||
++ mkdir(".stransball2/replays", 0755) != 0))
++ return 0;
++
++ if (chdir(".stransball2") != 0)
++ return 0;
++
+ int time,act_time;
+ SDL_Event event;
+ bool quit = false;
diff --git a/games/stransball2/pkg-descr b/games/stransball2/pkg-descr
new file mode 100644
index 000000000000..412032467c3d
--- /dev/null
+++ b/games/stransball2/pkg-descr
@@ -0,0 +1,9 @@
+"Super Transball 2" is the sequel of "Transball" and "Transball 2",
+Inspired in THRUST type of games (and concretely in ZARA THRUSTA
+for the Amiga 500). In each level of Transball, the goal is to find
+the SPHERE, capture it and carry it to the upper part of the level.
+The main obstacle is the gravity, that impulses you towards the
+ground. But many other obstacles, canons, tanks, doors, etc. will
+try to make difficult your journey...
+
+WWW: http://www.braingames.getput.com/stransball2/default.asp
diff --git a/games/stransball2/pkg-plist b/games/stransball2/pkg-plist
new file mode 100644
index 000000000000..6693362343dd
--- /dev/null
+++ b/games/stransball2/pkg-plist
@@ -0,0 +1,57 @@
+bin/stransball2
+%%DATADIR%%/demos/demo1.rpl
+%%DATADIR%%/demos/demo2.rpl
+%%DATADIR%%/demos/demo3.rpl
+%%DATADIR%%/demos/demo4.rpl
+%%DATADIR%%/graphics/brain.pcx
+%%DATADIR%%/graphics/font3.pcx
+%%DATADIR%%/graphics/tiles-mask.pcx
+%%DATADIR%%/graphics/tiles.pcx
+%%DATADIR%%/graphics/tittle.pcx
+%%DATADIR%%/maps/canons.map
+%%DATADIR%%/maps/map1.map
+%%DATADIR%%/maps/map10.map
+%%DATADIR%%/maps/map11.map
+%%DATADIR%%/maps/map12.map
+%%DATADIR%%/maps/map13.map
+%%DATADIR%%/maps/map14.map
+%%DATADIR%%/maps/map2.map
+%%DATADIR%%/maps/map3.map
+%%DATADIR%%/maps/map4.map
+%%DATADIR%%/maps/map5.map
+%%DATADIR%%/maps/map6.map
+%%DATADIR%%/maps/map7.map
+%%DATADIR%%/maps/map8.map
+%%DATADIR%%/maps/map9.map
+%%DATADIR%%/maps/sample-pack.lp
+%%DATADIR%%/maps/sample-pack/WS_FTP.LOG
+%%DATADIR%%/maps/sample-pack/directional.map
+%%DATADIR%%/maps/sample-pack/directional2.map
+%%DATADIR%%/maps/sample-pack/heavy-snow.map
+%%DATADIR%%/maps/second-assault.lp
+%%DATADIR%%/maps/second-assault/WS_FTP.LOG
+%%DATADIR%%/maps/second-assault/sa-map1.map
+%%DATADIR%%/maps/second-assault/sa-map2.map
+%%DATADIR%%/maps/second-assault/sa-map3.map
+%%DATADIR%%/maps/second-assault/sa-map4.map
+%%DATADIR%%/maps/second-assault/sa-map5.map
+%%DATADIR%%/maps/second-assault/sa-map6.map
+%%DATADIR%%/maps/second-assault/sa-map7.map
+%%DATADIR%%/maps/second-assault/sa-map8.map
+%%DATADIR%%/maps/transball.lp
+%%DATADIR%%/sound/enemyhit.wav
+%%DATADIR%%/sound/explosion.wav
+%%DATADIR%%/sound/fuel.wav
+%%DATADIR%%/sound/shipshot.wav
+%%DATADIR%%/sound/shot.wav
+%%DATADIR%%/sound/start.wav
+%%DATADIR%%/sound/switch.wav
+%%DATADIR%%/sound/takeball.wav
+%%DATADIR%%/sound/thrust.wav
+@dirrm %%DATADIR%%/sound
+@dirrm %%DATADIR%%/maps/second-assault
+@dirrm %%DATADIR%%/maps/sample-pack
+@dirrm %%DATADIR%%/maps
+@dirrm %%DATADIR%%/graphics
+@dirrm %%DATADIR%%/demos
+@dirrm %%DATADIR%%