Skip to content
Permalink
Browse files

new port games/atanks

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@9247 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Markus W. Weißmann
Markus W. Weißmann committed Nov 11, 2004
1 parent c82095e commit b75ea439b5c87eb94225cb32cb1cbca32620f315
Showing with 91 additions and 0 deletions.
  1. +64 −0 games/atanks/Portfile
  2. +17 −0 games/atanks/files/patch-src-Makefile
  3. +10 −0 games/atanks/files/patch-src-parser.cc
@@ -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"
}
}
@@ -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
@@ -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"

0 comments on commit b75ea43

Please sign in to comment.
You can’t perform that action at this time.