SUMMARY="A translator for PDF files"
DESCRIPTION="This is a translator for PDF files based on the MuPDF library.

By installing this translator, any application that's using Haiku's data \
translation system to load images, will be able to open a PDF as an image.
With ShowImage, for example, you can even browse through multi-page PDFs \
with its 'Next/Previous page' menu items. WonderBrush, on the other hand, \
will only load the very first page.

The DataTranslations preferences provide settings for DPI and antialiasing."
HOMEPAGE="https://github.com/threedeyes/PDFTranslator"
COPYRIGHT="2012-2022 3dEyes**"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://github.com/threedeyes/PDFTranslator/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="0eeae6fcb60269853aa68d521034a866183a6c5856aab5a5e34eea7de21c434f"
SOURCE_DIR="PDFTranslator-$portVersion"

ARCHITECTURES="all"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"

PROVIDES="
	pdftranslator$secondaryArchSuffix = $portVersion
	addon:PDFTranslator$secondaryArchSuffix = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libmupdf$secondaryArchSuffix
	"

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

BUILD()
{
	mkdir -p build
	make $jobArgs
	make bindcatalogs
}

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