# $Id: Portfile 76283 2011-02-19 20:47:22Z jmr@macports.org $

PortSystem              1.0

name                    defendguin
version                 0.0.12
categories              games
platforms               darwin
license                 GPL-2+
maintainers             nomaintainer

description             clone of the classic arcade game Defender
long_description        Defendguin is based loosely on Williams classic \
                        arcade game, Defender. Some recognizable stars in \
                        the realm of modern operating systems should be fairly \
                        obvious. Story: A certain monopoly-owning bad guy has \
                        been cloned hundreds of times by an unknown alien \
                        race. They are now attacking earth, kidnapping little \
                        penguinoids and converting them into mutants. Helping \
                        them on their way are some other nasty alien ships, of \
                        which there are plenty...

homepage                http://www.newbreedsoftware.com/defendguin/
master_sites            ftp://ftp.billsgames.com/unix/x/defendguin/src/ \
                        freebsd

checksums               md5     a543e3f5f4e935546116384c6f20d782 \
                        sha1    bdbcd49729f879d34d932bec2e3ee7991697a266 \
                        rmd160  468056a93347ec4b476d6b2daff337626a1e3921

depends_lib             path:lib/pkgconfig/sdl.pc:libsdl \
                        port:libsdl_mixer

patchfiles              Makefile.diff

use_configure           no

build.env               CFLAGS="${configure.cflags} ${configure.cc_archflags}" \
                        CC=${configure.cc} \
                        PREFIX=${prefix} \
                        JOY=NO

destroot.args           PREFIX=${destroot}${prefix} \
                        MAN_PREFIX=${destroot}${prefix}/share

post-destroot {
    set docdir ${destroot}${prefix}/share/doc/${name}
    xinstall -d ${docdir}
    xinstall -W ${worksrcpath}/docs \
        AUTHORS.txt \
        CHANGES.txt \
        COPYING.txt \
        INSTALL.txt \
        README.txt \
        TODO.txt \
        ${docdir}
}

platform darwin {
    post-destroot {
        xinstall -d ${destroot}${applications_dir}/Defendguin.app/Contents/MacOS
        ln -s ${prefix}/bin/defendguin \
            ${destroot}${applications_dir}/Defendguin.app/Contents/MacOS/Defendguin
    }
}
