SUMMARY="A Portable Z-Machine Interpreter"
DESCRIPTION="Frotz is an interpreter for Infocom games \
and other Z-machine games. \
It complies with standard 1.0 of Graham Nelson's specification. \
It was written by Stefan Jokisch in 1995-1997"
HOMEPAGE="https://davidgriffith.gitlab.io/frotz/"
COPYRIGHT="1995-1997 Stefan Jokish
		1997-2019 David Griffith"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://gitlab.com/DavidGriffith/frotz/-/archive/$portVersion/frotz-$portVersion.tar.bz2"
CHECKSUM_SHA256="7fd1185318dec2c897228d6ed81d4d2599d64d1e5bb7f913c09d17f3337ec663"
PATCHES="frotz-$portVersion.patchset"

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

PROVIDES="
	frotz$secondaryArchSuffix = $portVersion
	cmd:frotz
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libao$secondaryArchSuffix
	lib:libmodplug$secondaryArchSuffix
	lib:libncurses$secondaryArchSuffix
	lib:libsamplerate$secondaryArchSuffix
	lib:libsndfile$secondaryArchSuffix
	lib:libvorbis$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libao$secondaryArchSuffix
	devel:libmodplug$secondaryArchSuffix
	devel:libncurses$secondaryArchSuffix
	devel:libsamplerate$secondaryArchSuffix
	devel:libsndfile$secondaryArchSuffix
	devel:libvorbis$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:gcc$secondaryArchSuffix
	cmd:make
	cmd:which
	"

BUILD()
{
	make $jobArgs
}

INSTALL()
{
	make PREFIX=$prefix MANDIR=$manDir install
}
