PortSystem 1.0
PortGroup app 1.0

name            xmoto
version         0.5.11
revision        1
categories      games
platforms       macosx
license         GPL-2
maintainers     nomaintainer

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}/
distname        ${name}-${version}-src
worksrcdir      ${name}-${version}

checksums       rmd160  4b005c37871489f54c16c9557e6a8556cd2121b4 \
                sha256  a584a6f9292b184686b72c78f16de4b82d5c5b72ad89e41912ff50d03eca26b2

depends_lib     port:libpng \
                path:include/turbojpeg.h:libjpeg-turbo \
                port:libsdl \
                port:libsdl_mixer \
                port:libsdl_ttf \
                port:libsdl_net \
                port:lua \
                port:ode \
                port:sqlite3 \
                port:bzip2 \
                port:curl \
                port:libxdg-basedir

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

# 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

app.icon ${filespath}/xmoto.png

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