PortSystem              1.0
PortGroup               app 1.0

name                    openmortal
version                 0.7
revision                1
categories              games
platforms               darwin
maintainers             nomaintainer
license                 GPL-2

description             Mortal Szombat is a parody of the coin-up game Mortal Kombat
long_description        Mortal Szombat is a parody of the popular coin-up \
                        game, Mortal Kombat. It is currently playable (maybe \
                        even enjoyable), although it is still under \
                        development. Only two-player game is supported, \
                        single-player games against computer opponent is not \
                        planned yet. There are currently 9 playable \
                        characters, and 8 more in the making!

homepage                http://openmortal.sourceforge.net/
master_sites            sourceforge:project/openmortal/openmortal/${version}
use_bzip2               yes

checksums               md5     95278382bb563906fce624d833a845cf \
                        sha1    a7177012e1c0eb04f357aa9ff013e53c8f7b835c \
                        rmd160  6a0fdd46445ed243db261227a93526b97c6f9d79

depends_lib             port:libsdl \
                        port:libsdl_mixer \
                        port:libsdl_image \
                        port:libsdl_ttf \
                        port:libsdl_net \
                        port:freetype \
                        bin:perl:perl5

patchfiles              openmortal-0.7-gcc41.patch

configure.args          --enable-main \
                        --enable-characters \
                        --enable-additional \
                        --enable-thirdparty \
                        --disable-sdltest

platform darwin {
    post-extract {
        # Convert files from DOS to UNIX linefeeds before patching.
        reinplace "s/\r$//g" \
            ${worksrcpath}/src/gfx.cpp
    }
    patchfiles-append   patch-gfx.cpp.diff \
                        patch-sge_tt_text.cpp.diff
}

app.name                OpenMortal
app.icon                ${filespath}/OpenMortal.icns
