SUMMARY="2D motocross platform game"
HOMEPAGE="http://xmoto.tuxfamily.org"
COPYRIGHT="2006-2014 Nicolas Adenis-Lamarre
2007-2011 Emmanuel Gorse
2009-2010 Jens Erler
2005-2006 Rasmus Neckelmann"
LICENSE="GNU GPL v2"
SOURCE_URI="http://download.tuxfamily.org/xmoto/xmoto/0.5.11/xmoto-0.5.11-src.tar.gz"
CHECKSUM_SHA256="a584a6f9292b184686b72c78f16de4b82d5c5b72ad89e41912ff50d03eca26b2"
REVISION="1"
ARCHITECTURES="x86_gcc2"
SECONDARY_ARCHITECTURES="x86"

PATCHES="xmoto_x86-0.5.11.patchset"

PROVIDES="
	xmoto$secondaryArchSuffix = $portVersion
	cmd:xmoto$secondaryArchSuffix = $portVersion
"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libgl$secondaryArchSuffix
	lib:libsdl$secondaryArchSuffix
	lib:libintl$secondaryArchSuffix
	lib:libcurl$secondaryArchSuffix
	lib:libode$secondaryArchSuffix
	lib:liblua$secondaryArchSuffix
	lib:libsdl_ttf$secondaryArchSuffix
	lib:libsdl_net$secondaryArchSuffix
	lib:libsdl_mixer$secondaryArchSuffix
	lib:libglu$secondaryArchSuffix
	lib:libbz2$secondaryArchSuffix
	lib:libpng$secondaryArchSuffix
	lib:libjpeg$secondaryArchSuffix
	lib:libz$secondaryArchSuffix
	lib:libsqlite3$secondaryArchSuffix
	lib:libxml2$secondaryArchSuffix
	lib:libstdc++$secondaryArchSuffix
	lib:libgcc_s$secondaryArchSuffix
	mesa_swrast
"
BUILD_REQUIRES="
	devel:libsqlite3$secondaryArchSuffix
	devel:libz$secondaryArchSuffix
	devel:libjpeg$secondaryArchSuffix
	devel:libpng$secondaryArchSuffix
	devel:libxml2$secondaryArchSuffix
	devel:libbz2$secondaryArchSuffix
	devel:libglu$secondaryArchSuffix
	devel:libsdl$secondaryArchSuffix
	devel:sdl_mixer$secondaryArchSuffix
	devel:sdl_net$secondaryArchSuffix
	devel:sdl_ttf$secondaryArchSuffix
	devel:liblua$secondaryArchSuffix
	devel:liblua
	devel:libode$secondaryArchSuffix
	devel:libcurl$secondaryArchSuffix
	devel:libgl$secondaryArchSuffix
"
BUILD_PREREQUIRES="
	haiku${secondaryArchSuffix}_devel
	cmd:gcc$secondaryArchSuffix
	cmd:make
	cmd:sed
	cmd:grep
	cmd:ode_config$secondaryArchSuffix
	cmd:awk
	cmd:find
	cmd:gettext$secondaryArchSuffix
	cmd:automake
	cmd:pkg_config$secondaryArchSuffix
	cmd:autoconf
"

BUILD()
{
	autoconf
	export CFLAGS="-lGL"
	export CXXFLAGS="-lGL"
	runConfigure ./configure --with-internal-xdg=1
	make $jobArgs
}

INSTALL()
{
	make install
}

DESCRIPTION="
X-Moto is a challenging 2D motocross platform game, where physics play \
an all important role in the gameplay. You need to control your bike to \
its limit, if you want to have a chance finishing the more difficult of \
the challenges.
"
