# $Id: Portfile 65094 2010-03-21 19:16:38Z raimue@macports.org $

PortSystem 1.0

name            xmoto
version         0.5.2
categories      games
platforms       macosx
maintainers     raimue

description     X-Moto is a challenging 2D motocross platform game
long_description \
                X-Moto is a challenging 2D motocross platform game, where \
                physics plays an all important role in the gameplay. You need \
                to control your bike to its limits, if you want to have a \
                chance to finish the most difficult challenges.

homepage        http://xmoto.tuxfamily.org/
master_sites    http://download.tuxfamily.org/xmoto/xmoto/${version}/xmoto-${version}-src.tar.gz

checksums       md5     1e3678ebceca21d61844efb53c140227 \
                sha1    aa819872f06beb114025c490cea8e229cd85135d \
                rmd160  a8323336814261b0c2bb0acf13d5e65ac92e921d

depends_build   bin:grep:grep

depends_lib     port:libpng \
                port:jpeg \
                path:lib/pkgconfig/sdl.pc:libsdl \
                port:libsdl_mixer \
                port:libsdl_ttf \
                port:libsdl_net \
                port:lua \
                port:ode \
                port:sqlite3 \
                port:bzip2 \
                port:curl

patchfiles      patch-src-replay.cpp.diff

configure.args-append --with-apple-opengl-framework

# xmoto does not pick up flags for ode correctly, so we do this manually
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521013
configure.cflags-append  -DdDOUBLE
configure.cxxflags-append -DdDOUBLE

livecheck.type  regex
livecheck.regex {XMoto ([\d.]+) released}
