SUMMARY="A C library for encoding, decoding and manipulating JSON data"
DESCRIPTION="
Jansson is a C library for encoding, decoding and manipulating JSON data. It \
features a simple and intuitive API and data model, comprehensive \
documentation, no dependencies on other libraries, full unicode support \
(UTF-8) and an extensive test suite.
"
HOMEPAGE="http://www.digip.org/jansson/" 
SRC_URI="http://www.digip.org/jansson/releases/jansson-2.5.tar.gz"
CHECKSUM_MD5="46ac93bec48aacf207b67b51c8fbf7f1"
LICENSE="MIT"
COPYRIGHT="2009-2013 Petri Lehtinen
	2011-2012 Basile Starynkevitch
	2011-2012 Graeme Smecher"
REVISION="1"

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

PROVIDES="
	jansson$secondaryArchSuffix = $portVersion compat >= 2
	libjansson$secondaryArchSuffix = 4.5.0 compat >= 4
	lib:libjansson$secondaryArchSuffix = 4.5.0 compat >= 4
	"

REQUIRES="
	haiku$secondaryArchSuffix >= $haikuVersion
	"

BUILD_REQUIRES="
	"

BUILD_PREREQUIRES="
	haiku${secondaryArchSuffix}_devel >= $haikuVersion
	cmd:gcc$secondaryArchSuffix
	cmd:make
	"

BUILD()
{
	sed -i 's/-Wextra/ /g' Makefile.*
	sed -i 's/-Wdeclaration-after-statement/ /g' Makefile.*
	runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install
	
	# devel package
	prepareInstalledDevelLibs \
		libjansson
	
	fixPkgconfig
	packageEntries devel \
			$developDir
}

TEST()
{
	cd test
	run-suites
}

PROVIDES_devel="
	libjansson${secondaryArchSuffix}_devel = $portVersion
	devel:jansson$secondaryArchSuffix = 4.5.0 compat >= 4
	devel:libjansson$secondaryArchSuffix = 4.5.0 compat >= 4
	"
	
REQUIRES_devel="
	libjansson$secondaryArchSuffix == 4.5.0 base
	"
