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

PortSystem              1.0

name                    ltris
version                 1.0.12
categories              games
platforms               darwin
maintainers             nomaintainer
use_parallel_build      yes

description             Tetris clone with multiplayer and AI support.
long_description        LTris as a tetris clone which means you have a bowl \
                        with blocks falling down. By rotating and moving the \
                        blocks you try to assemble whole lines which then \
                        disappear. LTris has three modes for this: Classic is \
                        the classical one where you play until the bowl \
                        becomes filled, Figures resets the bowl contents to a \
                        new figure for each level and adds suddenly appearing \
                        tiles and lines later on and Multiplayer where up to \
                        three players either controlled by human or CPU(!) \
                        compete and send completed lines to each other.

homepage                http://lgames.sourceforge.net/index.php?project=LTris
master_sites            sourceforge:lgames

checksums               md5     53b00c17a05c438602a52009e65ebde2 \
                        sha1    bc0b389b520053f97c6415b4d430f55784073c1b \
                        rmd160  017791be9d4e2dfc5a6b497e816b3482d22141c3

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

post-extract {
    move ${worksrcpath}/src/sdl.h ${worksrcpath}/src/sdl_.h
}

patchfiles              patch-sdl_.h.diff \
                        patch-libintl.diff \
                        patch-install-mode.diff

configure.args          --with-highscore-path=${prefix}/var/lib/games/ \
                        --disable-sdltest

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