SUMMARY="SDL-based NES emulator"
DESCRIPTION="A work-in-progress NES emulator with a real-time rewind \
feature that correctly reverses sound."
HOMEPAGE="https://github.com/ulfalizer/nesalizer"
COPYRIGHT="2013-2016 Ulf Magnusson"
LICENSE="GNU GPL v2"
REVISION="1"
srcGitRev="5bb045845a5cc829a78b7384f848fdd886cd98c8"
SOURCE_URI="https://github.com/ulfalizer/nesalizer/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="4282cb0e4af0585af4a594dfa30b2e350dd0efc39e5bc2d8312f637f50397107"
SOURCE_DIR="nesalizer-$srcGitRev"
PATCHES="nesalizer-$portVersion.patchset"

ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	nesalizer$secondaryArchSuffix = $portVersion
	app:Nesalizer
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libexecinfo$secondaryArchSuffix
	lib:libsdl2_2.0$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libexecinfo$secondaryArchSuffix
	devel:libsdl2_2.0$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:make
	"

BUILD()
{
	make CONF=release $jobArgs
}

INSTALL()
{
	make CONF=release INSTALL_DIR=$prefix/bin
}
