SUMMARY="NetSurf generator for javascript bindings"
DESCRIPTION="This is a tool to generate JavaScript to DOM bindings from w3c \
webidl files and a binding configuration file."
HOMEPAGE="https://git.netsurf-browser.org/nsgenbind.git/"
COPYRIGHT="2012-2020 Vincent Sanders"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://download.netsurf-browser.org/libs/releases/nsgenbind-$portVersion-src.tar.gz"
CHECKSUM_SHA256="4d8d53ad000ada712772365e6a73eb8fc5ce97584af9c865ac5b26a2187f1cb3"

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

PROVIDES="
	nsgenbind$secondaryArchSuffix = $portVersion
	cmd:nsgenbind = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	netsurf_buildsystem >= 1.9
	"
BUILD_PREREQUIRES="
	cmd:bison
	cmd:flex
	cmd:gcc$secondaryArchSuffix
	cmd:make
	"

BUILD()
{
	make PREFIX="$prefix" NSSHARED=/system/data/netsurf-buildsystem
}

INSTALL()
{
	make install PREFIX="$prefix" NSSHARED=/system/data/netsurf-buildsystem
}

TEST()
{
	make PREFIX="$prefix" NSSHARED=/system/data/netsurf-buildsystem test
}
