PortSystem 1.0

name		svinepalsen
version		0.2.1
categories	games
maintainers	nomaintainer
license		GPL-2+

description	Space Invaders style arcade game
long_description	In Svinepalsen, the year is 2223 and the population of \
			space has begun. You are tentacled creature from \
			Nurobi Gernash on a mission to reach the home planet \
			of a race called humans. You are to deliver one \
			message to all nations of Earth: 'There must be \
			security for all or no one is secure'. The mission \
			fails and you are forced to make an example of the \
			human insolence. With your vastly superior ship you \
			must destroy all resistance. You must kill them all or \
			there will be retaliation.

homepage	http://svinepalsen.sourceforge.net/
master_sites	sourceforge:project/svinepalsen/svinepalsen-src/svinepalsen-src-${version}:src \
		sourceforge:project/svinepalsen/svinepalsen-data/svinepalsen-data-${version}:data

use_bzip2	yes

distfiles	${name}-src-${version}${extract.suffix}:src \
		${name}-data-${version}${extract.suffix}:data

checksums	${name}-src-${version}${extract.suffix} \
		rmd160  25118d5785f31741bb3a122aade380b809af5ca6 \
		sha256  5708cd98a24f2933d53a9858fd7d7225c197ffdc9d559173fd0882cc3a0929f3 \
		size    71886 \
		${name}-data-${version}${extract.suffix} \
		rmd160  2d107bc3b015e1a449f4c659ccfe96150d24873e \
		sha256  9f995fb53fdb4e823941375376fb941f42b744a8333f563e27f6ca90c5a49740 \
		size    929107

depends_lib	port:libsdl \
		port:libsdl_mixer \
		port:libsdl_image \
		port:libsdl_ttf \
		port:smpeg

worksrcdir	${name}

patchfiles	implicit.patch

configure.cppflags-append   -I${prefix}/include/smpeg
configure.args	--disable-sdltest

post-configure	{
	reinplace "s|-lSDL_ttf|-lSDL_ttf -lsmpeg|g" \
		${configure.dir}/src/Makefile
	reinplace "s|data/|${prefix}/share/${name}/|g" \
		${configure.dir}/src/CEnemyBase.cc \
		${configure.dir}/src/svinepalsen.cc
}

build.env	"CPPFLAGS=-I${prefix}/include -I${prefix}/include/smpeg" LDFLAGS=-L${prefix}/lib

post-destroot	{
	xinstall -d ${destroot}${prefix}/share/doc/${name}
	file copy ${workpath}/data ${destroot}${prefix}/share/${name}
	xinstall -m 644 -W ${worksrcpath} AUTHORS README TODO \
		${destroot}${prefix}/share/doc/${name}
}
