SUMMARY="Unofficial MAME version with advanced video support"
DESCRIPTION="\
AdvanceMAME is unofficial MAME version with advanced video support
for better use with TVs, Arcade monitors, PC monitors and LCD screens."
HOMEPAGE="http://advancemame.sourceforge.net"
#SOURCE_URI="http://downloads.sourceforge.net/projects/advancemame/files/advancemame/$portVersion/advancemame-$portVersion.tar.gz"
SOURCE_URI="http://advancemame.sourceforge.net/beta/advancemame-$portVersion.tar.gz"
CHECKSUM_SHA256="f8c30408d64617f1b737a05c9d3e06cdafc3824e66eee68a2888d63c4e1ecf74"
REVISION="1"
LICENSE="GNU GPL v2"
COPYRIGHT="1996-2006, Nicola Salmoria and the MAME Team"
ARCHITECTURES="x86 x86_64"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
	# x86_gcc2 is fine as primary target architecture as long as we're building
	# for a different secondary architecture.
	ARCHITECTURES="$ARCHITECTURES x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86"

PATCHES="advancemame-$portVersion.patchset"

PROVIDES="
	advancemame$secondaryArchSuffix = $portVersion
	cmd:advj$secondaryArchSuffix
	cmd:advk$secondaryArchSuffix
	cmd:advm$secondaryArchSuffix
	cmd:advmame$secondaryArchSuffix
	cmd:advs$secondaryArchSuffix
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libexpat$secondaryArchSuffix
	lib:libfreetype$secondaryArchSuffix
	lib:libsdl$secondaryArchSuffix
	lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libexpat$secondaryArchSuffix
	devel:libfreetype$secondaryArchSuffix
	devel:libsdl$secondaryArchSuffix
	devel:libz$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:aclocal
	cmd:autoconf
	cmd:libtoolize
	cmd:find
	cmd:make
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
"

BUILD()
{
	autoreconf -fi
	runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install
}
