# $Id: Portfile,v 1.13 2005/10/16 11:51:54 mww Exp $

PortSystem 1.0

name			CrimsonFields
version			0.4.9
categories		games
platforms		darwin
maintainers		mww@opendarwin.org
description		Tactical war game in the tradition of Battle Isle
long_description	Crimson Fields is a tactical war game in the tradition \
				of Battle Isle, including a map editor and the \
				possibility to import the original History Line or \
				Battle Isle maps.

homepage		http://crimson.seul.org
master_sites	${homepage}/files/
distname		crimson-${version}
checksums		md5 c1ae6de5637efb9223b70c29e10de75b

use_bzip2		yes

depends_lib		port:libsdl \
				port:libsdl_mixer \
				port:libsdl_ttf \
				port:zlib

configure.args	--disable-sdltest \
				--mandir=${prefix}/share/man \
				--with-sdl-prefix=${prefix} \
				--with-zlib=${prefix} \
				--enable-cfed \
				--enable-comet

platform darwin 8 {
	configure.env	CC=/usr/bin/gcc-4.0 CXX=/usr/bin/g++-4.0 CPP=/usr/bin/cpp-4.0
}

post-destroot {
	file delete -force ${destroot}${prefix}/share/pixmaps
}

platform macosx {
	pre-destroot {
		xinstall -d -m 755 ${destroot}/Applications/DarwinPorts/CrimsonFields.app/Contents/MacOS
		system "ln -s ${prefix}/bin/crimson \
			${destroot}/Applications/DarwinPorts/CrimsonFields.app/Contents/MacOS/CrimsonFields"
	}
}
