SUMMARY="LibDOM is an implementation of the W3C DOM" 
DESCRIPTION="An implementation of the W3C DOM for NetSurf, written in C."
HOMEPAGE="http://www.netsurf-browser.org/projects/libdom/"
LICENSE="MIT"
COPYRIGHT="2007-2014 J-M Bell"
SOURCE_URI="http://download.netsurf-browser.org/libs/releases/libdom-0.1.0-src.tar.gz"
CHECKSUM_SHA256="235fde8bcfcf71e325c1344acfb995d5d59e1d8ebfcb9c87c1aefd1a08c8fae6"
REVISION="1"
ARCHITECTURES="x86_gcc2 x86 x86_64"

PATCHES="libdom-$portVersion.patchset"

PROVIDES="
	libdom = $portVersion
	lib:libdom = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	"
BUILD_REQUIRES="
	devel:libexpat
	devel:libhubbub
	devel:libparserutils
	devel:libwapcaplet
	netsurf_buildsystem
	xml_parser
	"

BUILD_PREREQUIRES="
	haiku_devel
	cmd:gcc
	cmd:make
	cmd:perl
	cmd:pkg_config
	"

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

INSTALL()
{
	make PREFIX=$prefix NSSHARED=/system/data/netsurf-buildsystem \
		INCLUDEDIR=$relativeIncludeDir install

	prepareInstalledDevelLib libdom
	fixPkgconfig
	packageEntries devel $developDir
}

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

# ----- devel package -------------------------------------------------------

PROVIDES_devel="
	libdom_devel = $portVersion
	devel:libdom = $portVersion
"
REQUIRES_devel="
	libdom$secondaryArchSuffix == $portVersion base
	"
