SUMMARY="JPEG-XL Translator addon"
DESCRIPTION="JPEG-XL Translator is a translator add-on for reading and writing \
the JPEG-XL format.

Using this add-on will allow any application using Haiku Data Translations \
to read and write JPEG-XL format files.  Currently only non-animated images \
are supported. ICC Profiles are also ignored."
HOMEPAGE="https://github.com/wattoc/JXLTranslator"
COPYRIGHT="2021 Craig Watson"
LICENSE="MIT"
REVISION="1"
srcGitRev="7a0fafae0e927f647780fe2fdbdbe283ecef4638"
SOURCE_URI="https://github.com/wattoc/JXLTranslator/archive/$srcGitRev.zip"
CHECKSUM_SHA256="f5b2f670ee9694e88d08a8ee1ef6e473ed8d20fd0117b636bdb9e4292e2db74c"
SOURCE_DIR="JXLTranslator-$srcGitRev"

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

PROVIDES="
	jxl_translator$secondaryArchSuffix = $portVersion
	add_on:JXLTranslator$secondaryArchSuffix = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libjxl$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libjxl$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	makefile_engine
	cmd:gcc$secondaryArchSuffix
	cmd:make
	"

BUILD()
{
	make $jobArgs
}

INSTALL()
{
	make install INSTALL_DIR=$addOnsDir/Translators
}
