SUMMARY="A translator for XPM files"
DESCRIPTION="XPMTranslator is a translator add-on, written for the \
Translation Kit for BeOS R4 for Intel, which reads in XPM graphics files and \
converts them to Be's internal bitmap representation, and which also can  \
write out XPM files from Be bitmap data.  This allows transparent use of XPM \
images by ShowImage, or any other application which uses Datatypes."
HOMEPAGE="https://github.com/HaikuArchives/XPMTranslator"
COPYRIGHT="2000 Carsten B. Larsen
	1998 Ernest Thomlinson"
LICENSE="Public Domain
	unknown"
REVISION="1"
srcGitRev="bd8533f67db5f501c8f89fe04fa00c4656f04ade"
SOURCE_URI="https://github.com/HaikuArchives/XPMTranslator/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="13d132da30e500524bcb692bc19c979ab6d4e2d67265e6094cbd8c549d20921e"
SOURCE_FILENAME="XPMTranslator-$srcGitRev.tar.gz"
SOURCE_DIR="XPMTranslator-$srcGitRev"

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

PROVIDES="
	xpmtranslator$secondaryArchSuffix = $portVersion
	addon:XPMTranslator$secondaryArchSuffix = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	"
BUILD_PREREQUIRES="
	cmd:g++$secondaryArchSuffix
	cmd:make
	"

BUILD()
{
	cd source
	make $jobArgs
}

INSTALL()
{
	mkdir -p $docDir
	cp README $docDir
	cd source
	mkdir -p $addOnsDir/Translators
	cp XPMTranslator $addOnsDir/Translators
}
