# $Id: Portfile,v 1.4 2004/02/13 18:25:05 mww Exp $

PortSystem 1.0

name		SDLInvaders
version		0.8.0
categories	games
platforms	darwin
maintainers	mww@opendarwin.org
description	simple clone of the famous Space Invaders game.
long_description	${description}

homepage	http://www.sdlinvaders.de/
master_sites	http://home.snafu.de/nath/SDLInvaders/
checksums	md5 f3fbca07eb05acfae23d2d554a0f1375

depends_lib	lib:libsdl:libsdl \
		lib:libsdl_image:libsdl_image \
		lib:libsdl_mixer:libsdl_mixer

configure.env	CFLAGS=-I${prefix}/include \
		LDFLAGS=-L${prefix}/lib
configure.args	--disable-sdltest

build.env	${configure.env}

variant darwin	{
	post-destroot	{
		file attributes \
			${destroot}${prefix}/share/SDLInvaders/highscores \
			-permissions +w
		file mkdir ${destroot}/Applications/DarwinPorts/${name}.app/Contents/MacOS
		system "ln -s ${prefix}/bin/${name} \
			${destroot}/Applications/DarwinPorts/${name}.app/Contents/MacOS"
	}
}
