# $Id: Portfile,v 1.13 2006/01/09 22:09:15 mww Exp $

PortSystem 1.0

name		wesnoth
version		1.0.2
categories	games
platforms	darwin
maintainers	phw@opendarwin.org
description	A fantasy turn-based strategy game
long_description	Battle for Wesnoth is a fantasy turn-based strategy \
			game. Battle for control of villages, using variety of \
			units which have advantages and disadvantages in \
			different types of terrains and against different \
			types of attacks. Units gain experience and advance \
			levels, and are carried over from one scenario to the \
			next campaign.
checksums	md5 1d2a26062ce1c90cbf10845023f9435c
homepage	http://www.wesnoth.org/
master_sites	sourceforge
depends_lib	port:libsdl \
		port:libsdl_image \
		port:libsdl_mixer \
		port:libsdl_ttf \
		port:libsdl_net \
		port:libiconv \
		port:freetype \
		port:gettext

configure.args	--mandir=${prefix}/share/man \
				--with-freetype-prefix=${prefix} \
				--with-libiconv-prefix=${prefix} \
				--disable-sdltest \
				--disable-server \
				--disable-gnome1 \
				--disable-gnome2

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

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

