SUMMARY="PBF image plugin for Qt5"
DESCRIPTION="Qt image plugin for displaying Mapbox vector tiles."
HOMEPAGE="https://github.com/tumic0/QtPBFImagePlugin"
COPYRIGHT="2018-2020 Martin Tůma"
LICENSE="GNU LGPL v3"
REVISION="1"
SOURCE_URI="$HOMEPAGE/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="d1b4d0e8d79e3c17aad3bfe0c349002cb30c31cb1be5535aec44c71ee4f0891a"
SOURCE_DIR="QtPBFImagePlugin-$portVersion"

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

PROVIDES="
	qtpbfimageplugin$secondaryArchSuffix = $portVersion
	lib:libpbf$secondaryArchSuffix = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libGL$secondaryArchSuffix
	lib:libprotobuf_lite$secondaryArchSuffix
	lib:libQt5Core$secondaryArchSuffix
	lib:libQt5Gui$secondaryArchSuffix
	lib:libz$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libGL$secondaryArchSuffix
	devel:libprotobuf_lite$secondaryArchSuffix
	devel:libQt5Core$secondaryArchSuffix
	devel:libQt5Gui$secondaryArchSuffix
	devel:libz$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:g++$secondaryArchSuffix
	cmd:make
	cmd:protoc$secondaryArchSuffix
	cmd:qmake$secondaryArchSuffix
	"

BUILD()
{
	qmake pbfplugin.pro
	make $jobArgs
}

INSTALL()
{
	mkdir -p $addOnsDir/Qt5/imageformats
	cp $sourceDir/libpbf.so $addOnsDir/Qt5/imageformats
}
