SUMMARY="Final Burn Neo, an emulator for arcade games and selected consoles"
DESCRIPTION="Final Burn Neo is an active fork of the FinalBurn Alpha emulator \
created by many of the former FBA developers after a disagreement over a \
licensing issue. It is actively developed and supports a variety of arcade \
systems and home consoles."
HOMEPAGE="https://neo-source.com/"
COPYRIGHT="2000-2021 The FBNeo Team"
LICENSE="FBNeo"
REVISION="1"
SOURCE_URI="https://github.com/finalburnneo/FBNeo/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="c4f6c7e9854ee5eea41b2bbd33f618fdbeca009c5ac03f9faadf7ecd6cd2b0a3"
SOURCE_FILENAME="fbneo-$portVersion.tar.gz"
SOURCE_DIR="FBNeo-$portVersion"

ARCHITECTURES="all !x86_gcc2"
if [ "$targetArchitecture" = x86_gcc2 ]; then
SECONDARY_ARCHITECTURES="x86"
fi

USER_SETTINGS_FILES="
	$relativeSettingsDir/fbneo/config/fbneo.ini
	"

PROVIDES="
	fbneo$secondaryArchSuffix = $portVersion
	app:fbneo = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libGL$secondaryArchSuffix
	lib:libSDL2_2.0$secondaryArchSuffix
	lib:libSDL2_image_2.0$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libSDL2$secondaryArchSuffix
	devel:libSDL2_image_2.0$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:gcc$secondaryArchSuffix
	cmd:make
	cmd:perl
	cmd:pkg_config$secondaryArchSuffix
	cmd:which
	"

BUILD()
{
	make sdl2 RELEASEBUILD=1 SKIPDEPEND=1 $jobArgs
}

INSTALL()
{
	mkdir -p $appsDir
	install -m 0755 fbneo -t "$appsDir"/
}
