SUMMARY="Haiku OCR translator"
DESCRIPTION="An image to text translator add-on using Tesseract OCR engine."
HOMEPAGE="https://github.com/threedeyes/TesseractTranslator/"
COPYRIGHT="2013-2020 3dEyes"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://github.com/threedeyes/TesseractTranslator/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="0dde3a6937f51a5846a1a69f9204ea39b5353e3248fba3f15fb3fd191be8d7f9"
SOURCE_DIR="TesseractTranslator-$portVersion"

ARCHITECTURES="all"

PROVIDES="
	tesseracttranslator$secondaryArchSuffix = $portVersion
	addon:TesseractTranslator$secondaryArchSuffix = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libtesseract$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:liblept$secondaryArchSuffix
	devel:libtesseract$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:make
	"

BUILD()
{
	make $jobArgs
}

INSTALL()
{
	mkdir -p $addOnsDir/Translators
	cp build/TesseractTranslator $addOnsDir/Translators
}
