# $Id: Portfile 86632 2011-10-30 12:24:57Z ryandesign@macports.org $

PortSystem              1.0
PortGroup               app 1.0

name                    blobwars
version                 1.19
categories              games
platforms               darwin
maintainers             nomaintainer
license                 GPL-2+
installs_libs           no

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.

homepage                http://www.parallelrealities.co.uk/projects/blobWars.php
master_sites            sourceforge:project/blobwars

checksums               rmd160  39a2bf865e7c2af97dcb2d26e06604e8d1fcc62f \
                        sha256  f9bafe59ead9e370ceaba4aae3d280241bf05fa06c8ae006eec0322c2fe9e2ed

depends_lib             port:gettext \
                        path:lib/pkgconfig/sdl.pc:libsdl \
                        port:libsdl_image \
                        port:libsdl_ttf \
                        port:libsdl_mixer \
                        port:libsdl_net \
                        port:zlib

post-extract {
    copy ${filespath}/${name}.in ${workpath}/${name}
}

patchfiles              patch-makefile.diff patch-src_pak.h.diff

post-patch {
    reinplace "s|@PREFIX@|${prefix}|g" ${workpath}/${name}
}

use_configure           no

variant universal {}

use_parallel_build      yes
build.args              PREFIX=${prefix}
build.env               CXX="${configure.cxx} [get_canonical_archflags]" \
                        CFLAGS=${configure.cppflags}

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

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

app.name                Blob Wars
app.executable          ${workpath}/${name}
app.icon                gfx/main/alienDevice.png
app.identifier          uk.co.parallelrealities.BlobWars

livecheck.regex         /${name}-(\[0-9.\]+)${extract.suffix}
