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

PortSystem              1.0

name                    wesnoth
version                 1.4.7
categories              games
platforms               darwin
maintainers             nomaintainer
homepage                http://www.wesnoth.org/
master_sites            sourceforge
use_bzip2               yes
use_parallel_build      yes

description             A fantasy turn-based strategy game

long_description        Battle for Wesnoth is a fantasy turn-based strategy \
                        game. Battle for control of villages, using variety of \
                        units which have advantages and disadvantages in \
                        different types of terrains and against different \
                        types of attacks. Units gain experience and advance \
                        levels, and are carried over from one scenario to the \
                        next campaign.

checksums               md5     fdd341c3d66bf1bea2113c79db852d68 \
                        sha1    f8eb17e7a7aaff5d8fff1e18a1479efcf932fd27 \
                        rmd160  8a515aca790424a550505512eb42b101860e87b2

depends_lib             port:xorg-libX11 \
                        port:boost \
                        path:lib/pkgconfig/sdl.pc:libsdl \
                        port:libsdl_image \
                        port:libsdl_mixer \
                        port:libsdl_ttf \
                        port:libsdl_net \
                        port:libiconv \
                        port:freetype \
                        port:fribidi \
                        port:gettext \
                        port:zlib

configure.args          --with-freetype-prefix=${prefix} \
                        --with-libiconv-prefix=${prefix} \
                        --disable-desktop-entry \
                        --disable-sdltest \
                        --disable-python \
                        --disable-server \
                        --with-boost=${prefix}/include/boost

platform macosx {
    pre-destroot {
        xinstall -d ${destroot}${applications_dir}/Wesnoth.app/Contents/MacOS
        ln -sf ${prefix}/bin/wesnoth \
            ${destroot}${applications_dir}/Wesnoth.app/Contents/MacOS/Wesnoth
    }
}

livecheck.regex         <title>${name}.* ${name}-(\[0-9\]+\\.\[0-9\]*\[02468\](\\.\[0-9\]+)*) released.*</title>
