SUMMARY="An emulator for the Amstrad PCW"
DESCRIPTION="JOYCE includes ANNE, which emulates the PCW16. Additional it can \
emulate:

- The Z80 CPU, using Ian Collier's Z80 core from xz80.
- The screen.
- The keyboard.
- The floppy disc controller - enough of it to support the Amstrad BIOS. \
Floppies are emulated with disc image files.
- The Centronics ports.
- The CPS8256 serial interface.
- The PCW8256 dot-matrix printer.
- The PCW9512 daisywheel printer.
- AMX or Kempston mice.
- The beeper."
HOMEPAGE="http://www.seasip.info/Unix/Joyce/index.html"
SOURCE_URI="http://www.seasip.info/Unix/Joyce/joyce-2.2.7.tar.gz"
CHECKSUM_SHA256="a561874afd7230c3e51f4ecc313a8a5a8e8fb408dfb7169f045d3f0fb48eeafc"
REVISION="1"
COPYRIGHT="2002-2012 John Elliott"
LICENSE="GNU GPL v2"

ARCHITECTURES="x86_gcc2 ?x86 ?x86_64"

PROVIDES="
	joyce = $portVersion
	cmd:xjoyce = $portVersion
	cmd:xanne = $portVersion
	devel:lib765
	devel:libcpmredir
	devel:liblink
	"
REQUIRES="
	haiku
	lib:libsdl
	lib:libpng
	lib:libxml2
	lib:libz
	lib:libgl
	"
BUILD_REQUIRES="
	haiku_devel
	devel:libsdl
	devel:libpng
	devel:libxml2
	devel:libz
	"
BUILD_PREREQUIRES="
	cmd:make
	cmd:gcc
	cmd:awk
	"

PATCHES="joyce-2.2.6.patchset"

BUILD()
{
	runConfigure ./configure
	make
}

INSTALL()
{
	make install

	# These are already provided in the libdsk package.
	rm $binDir/apriboot $binDir/dsk* $binDir/md3serial $libDir/libdsk*
	prepareInstalledDevelLibs lib765 libcpmredir liblink
}
