# $Id: Portfile 58210 2009-09-24 06:56:08Z ryandesign@macports.org $

PortSystem              1.0

name                    CrimsonFields
version                 0.4.9
categories              games
platforms               darwin
maintainers             nomaintainer

description             Tactical war game in the tradition of Battle Isle
long_description        Crimson Fields is a tactical war game in the tradition \
                        of Battle Isle, including a map editor and the \
                        possibility to import the original History Line or \
                        Battle Isle maps.

homepage                http://crimson.seul.org
master_sites            ${homepage}/files/
distname                crimson-${version}
checksums               md5 c1ae6de5637efb9223b70c29e10de75b

use_bzip2               yes

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

configure.args          --disable-sdltest \
                        --mandir=${prefix}/share/man \
                        --with-sdl-prefix=${prefix} \
                        --with-zlib=${prefix} \
                        --enable-cfed \
                        --enable-comet

use_parallel_build      yes

post-destroot {
    file delete -force ${destroot}${prefix}/share/pixmaps
}

platform macosx {
    pre-destroot {
        xinstall -d ${destroot}${applications_dir}/CrimsonFields.app/Contents/MacOS
        ln -s ${prefix}/bin/crimson \
            ${destroot}${applications_dir}/CrimsonFields.app/Contents/MacOS/CrimsonFields
    }
}
