SUMMARY="LibWapcaplet is a string internment library" 
DESCRIPTION="
LibWapcaplet is a string internment library.
It provides reference counted string interment and rapid string comparison \
functionality.
" 
HOMEPAGE="http://www.netsurf-browser.org/projects/libwapcaplet/" 
SOURCE_URI="http://download.netsurf-browser.org/libs/releases/libwapcaplet-${portVersion}-src.tar.gz"
CHECKSUM_SHA256="38021992e1e6b3ec50d0d3bf7add069bee4c5b179691afa6a76dd58695201485"
REVISION="1"
PATCHES="libwapcaplet-0.2.1.patchset"
LICENSE="MIT"
COPYRIGHT="2009-2014 The NetSurf Browser project"

ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"

PROVIDES="
	libwapcaplet$secondaryArchSuffix = $portVersion
	lib:libwapcaplet$secondaryArchSuffix = $portVersion
	"

REQUIRES="
	haiku$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	netsurf_buildsystem >= 0

	lib:libcheck
	devel:libcheck
	"

BUILD_PREREQUIRES="
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	"

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

INSTALL()
{
	make install PREFIX=$prefix NSSHARED=/system/data/netsurf-buildsystem \
		INCLUDEDIR=$relativeIncludeDir LIBDIR=$relativeLibDir
	mkdir -p $prefix/develop/lib

	prepareInstalledDevelLib libwapcaplet
	fixPkgconfig
	packageEntries devel $developDir
}

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

PROVIDES_devel="
	libwapcaplet${secondaryArchSuffix}_devel = $portVersion
	devel:libwapcaplet$secondaryArchSuffix = $portVersion
"
