SUMMARY="An open-source 6502 cross assembler"
DESCRIPTION="xa is a high-speed, two-pass portable cross-assembler. It \
understands mnemonics and generates code for NMOS 6502s (such as 6502A, \
6504, 6507, 6510, 7501, 8500, 8501, 8502 ...), CMOS 6502s (65C02 and \
Rockwell R65C02) and the 65816."
HOMEPAGE="https://www.floodgap.com/retrotech/xa/"
COPYRIGHT="1989-2020 Andre Fachat
	Jolse Maginnis
	David Weinehall
	Cameron Kaiser"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://www.floodgap.com/retrotech/xa/dists/xa-$portVersion.tar.gz"
CHECKSUM_SHA256="32f2164c99e305218e992970856dd8e2309b5cb6ac4758d7b2afe3bfebc9012d"
SOURCE_DIR="xa-$portVersion"
PATCHES="xa65-$portVersion.patchset"

ARCHITECTURES="all"

PROVIDES="
	xa65 = $portVersion
	cmd:file65 = 0.2.1
	cmd:ldo65 = 0.1.1
	cmd:printcbm = 1.0.0
	cmd:reloc65 = 0.2.1
	cmd:uncpk = 0.2.1
	cmd:xa = $portVersion
	"
REQUIRES="
	haiku
	"

BUILD_REQUIRES="
	haiku_devel
	"
BUILD_PREREQUIRES="
	cmd:gcc
	cmd:make
	"

TEST_REQUIRES="
	cmd:cmp
	cmd:perl
	"

BUILD()
{
	make DESTDIR=$prefix $jobArgs
}

INSTALL()
{
	make install DESTDIR=$prefix MANDIR=$manDir/man1
}

TEST()
{
	make test
}
