Index: trunk/dports/games/atanks/Portfile
===================================================================
--- trunk/dports/games/atanks/Portfile	(revision 9247)
+++ trunk/dports/games/atanks/Portfile	(revision 9247)
@@ -0,0 +1,64 @@
+# $Id: Portfile,v 1.1 2004/11/11 14:00:59 mww Exp $
+
+PortSystem 1.0
+
+name			atanks
+version			1.5a
+categories		games
+platforms		darwin
+maintainers		mww@opendarwin.org
+description		atanks is a multi-platform Scorched Earth clone
+long_description	${description}
+
+homepage		http://atanks.sourceforge.net/
+master_sites	sourceforge
+checksums		md5 eca740f3b99feb9f61e93c6c96d0d25c
+use_bzip2		yes
+
+depends_lib		lib:XXX:allegro
+
+extract.post_args	"| tar -xf - --exclude 'Atanks.exe' --exclude 'dumpImages'"
+
+patchfiles		patch-src-Makefile \
+				patch-src-parser.cc
+
+configure	{
+	cd ${worksrcpath}/src
+	reinplace "s|definitions|${prefix}/share/atanks/definitions|g" atanks.cc
+	cd ${worksrcpath}/definitions
+	reinplace "s|inGameImages/|${prefix}/share/atanks/inGameImages/|g" \
+		00plain-missiles.txt 10missile-spreads.txt 20mirvs.txt \
+		30cluster-bombs.txt 45shaped-explosives.txt 50burrowers.txt \
+		52multi-burrowers.txt 55earth-clearers.txt 60earth-creators.txt \
+		70single-rollers.txt 85napalm-bombs.txt 90tremors.txt 95lazers.txt \
+		99naturals.txt
+	reinplace "s|stockImages/|${prefix}/share/atanks/stockImages/|g" \
+		00plain-missiles.txt 10missile-spreads.txt 20mirvs.txt \
+		30cluster-bombs.txt 45shaped-explosives.txt 50burrowers.txt \
+		52multi-burrowers.txt 55earth-clearers.txt 60earth-creators.txt \
+		70single-rollers.txt 85napalm-bombs.txt 90tremors.txt 95lazers.txt \
+		99naturals.txt
+}
+
+build.env		CFLAGS=-I${prefix}/include \
+				LDFLAGS=-L${prefix}/lib
+build.args		PREFIX=${prefix}
+
+destroot	{
+	xinstall -m 755 ${worksrcpath}/atanks ${destroot}${prefix}/bin
+	xinstall -m 755 -d ${destroot}${prefix}/share/atanks
+	xinstall -m 644 -W ${worksrcpath} button.dat misc.dat missile.dat \
+		sound.dat stock.dat tank.dat tankgun.dat title.dat revenge.txt \
+		gloat.txt tanks.txt Help.txt ${destroot}${prefix}/share/atanks
+	file copy ${worksrcpath}/definitions ${destroot}${prefix}/share/atanks
+	file copy ${worksrcpath}/inGameImages ${destroot}${prefix}/share/atanks
+	file copy ${worksrcpath}/stockImages ${destroot}${prefix}/share/atanks
+}
+
+variant darwin	{
+	post-destroot	{
+		xinstall -d -m 755 ${destroot}/Applications/DarwinPorts/ATanks.app/Contents/MacOS
+		system "ln -s ${prefix}/bin/atanks \
+			${destroot}/Applications/DarwinPorts/ATanks.app/Contents/MacOS/ATanks"
+	}
+}
Index: trunk/dports/games/atanks/files/patch-src-Makefile
===================================================================
--- trunk/dports/games/atanks/files/patch-src-Makefile	(revision 9247)
+++ trunk/dports/games/atanks/files/patch-src-Makefile	(revision 9247)
@@ -0,0 +1,17 @@
+--- src/Makefile	Tue Apr  6 21:11:20 2004
++++ src/Makefile.new	Thu Nov 11 13:14:14 2004
+@@ -4,12 +4,12 @@
+ 	globaldata.o environment.o player.o virtobj.o floattext.o teleport.o physobj.o decor.o explosion.o missile.o beam.o tank.o atanks.o fade.o perlin.o sky.o parser.o collision.o
+ 
+ CC  = g++
+-FLAGS = -DLINUX -DVERSION=\"${VERSION}\" -DDATA_DIR=\".\"
++FLAGS = -DLINUX -DVERSION=\"${VERSION}\" -DDATA_DIR=\"$(PREFIX)/share/atanks\"
+ OUTPUT = ../atanks
+ WFLAGS = 
+ OFLAGS = 
+ LFLAGS +=
+-LDFLAGS =  `allegro-config --libs`
++LDFLAGS +=  `allegro-config --libs`
+ 
+ CFLAGS += -Wall -Iinclude # -fprofile-arcs -ftest-coverage 
+ CFLAGS += -g	# debug vs optimize flags
Index: trunk/dports/games/atanks/files/patch-src-parser.cc
===================================================================
--- trunk/dports/games/atanks/files/patch-src-parser.cc	(revision 9247)
+++ trunk/dports/games/atanks/files/patch-src-parser.cc	(revision 9247)
@@ -0,0 +1,10 @@
+--- src/parser.cc	Fri Apr  2 17:38:09 2004
++++ parser.cc	Thu Nov 11 13:11:32 2004
+@@ -1,6 +1,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdlib.h>
++#include <sys/stat.h>
+ #include "main.h"
+ #include "parser.h"
+ 
