# $Id: Portfile,v 1.2 2004/11/29 22:32:02 toby Exp $

PortSystem 1.0
name             amphetamine
version          0.8.10
categories       games
maintainers      toby@opendarwin.org
description      jump 'n' run game
long_description \
    Amphetamine is a cool Jump'n Run game offering some unique visual effects.
homepage         http://n.ethz.ch/student/loehrerl/amph/amph.html
platforms        darwin

depends_lib      lib:libSDL:libsdl

master_sites     http://n.ethz.ch/student/loehrerl/amph/files/
use_bzip2        yes
set datafile     ${name}-data-0.8.6.tar.bz2
distfiles-append ${datafile}
checksums        ${distname}${extract.suffix} md5 e861489188fde0e2a22a8c1e202b1c8a \
                 ${datafile} md5 ed5f2a05b76918d3a624b38ba37dda0b

patchfiles       patch-Makefile
post-patch {
    reinplace s|__PREFIX|${prefix}| ${worksrcpath}/Makefile
    reinplace s|SDL/SDL|SDL| \
        ${worksrcpath}/src/SoundList.hpp \
        ${worksrcpath}/src/System.hpp
}

configure        {}

destroot {
    xinstall -m 555 ${worksrcpath}/amph ${destroot}${prefix}/bin
    file copy -force ${workpath}/amph ${destroot}${prefix}/share
}
