# $Id: Portfile 45610 2009-01-18 22:00:27Z blb@macports.org $

PortSystem              1.0

name                    blobwars
version                 1.08
categories              games
platforms               darwin
maintainers             nomaintainer

description             jump and run game featuring a Blob as main character
long_description        In Blob Wars : Metal Blob Solid, you take on the role \
                        of a fearless Blob agent, Bob. Bob's mission is to \
                        infiltrate the various enemy bases around the Blobs' \
                        homeworld and rescue as many MIAs as possible. But \
                        standing in his way are many vicious aliens, other \
                        Blobs who have been assimilated and the evil alien \
                        leader, Galdov.

distname                ${name}-${version}-1
worksrcdir              ${name}-${version}
homepage                http://www.parallelrealities.co.uk/blobWars.php
master_sites            http://www.parallelrealities.co.uk/download.php?proj=blobwars&file=${distfiles}&type=zip&foo=

checksums               md5     16462e3ee394b05432fab820a7de8389 \
                        sha1    3b932def0d93dbbe625887558d029df0f77254dd \
                        rmd160  1816fb53c2cc8cb6aa9bb31cd2e9626bfd841a95

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

patchfiles              patch-makefile.diff

use_configure           no

use_parallel_build      yes
build.args              PREFIX=${prefix}
build.env               CFLAGS=-I${prefix}/include \
                        LDFLAGS=-bind_at_load

destroot.destdir        PREFIX=${destroot}${prefix}

post-destroot {
    file delete -force ${destroot}${prefix}/share/applications \
        ${destroot}${prefix}/share/icons
}

platform darwin {
    pre-destroot {
        xinstall -d ${destroot}${applications_dir}/BlobWars.app/Contents/MacOS
        ln -s ${prefix}/bin/blobwars \
            ${destroot}${applications_dir}/BlobWars.app/Contents/MacOS/BlobWars
    }
}
