SUMMARY="A library to manipulate RDF files describing LADSPA plugins"
DESCRIPTION="This is a library to make it easy to manipulate RDF files \
describing LADSPA plugins.
It can also be used for general RDF manipulation.
It can read RDF/XLM and N3 files and export N3 files, it also has a light \
taxonomic inference capablility."
HOMEPAGE="https://github.com/swh/LRDF/"
COPYRIGHT="2004,2011,2015 Steve Harris, Taybin Rutkin"
LICENSE="GNU GPL v2"
REVISION="4"
SOURCE_URI="https://github.com/swh/LRDF/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="ba803af936fd53a8b31651043732e6d6cec3d24fa24d2cb8c1506c2d1675e2a2"
SOURCE_FILENAME="liblrdf-$portVersion,tar.gz"
SOURCE_DIR="LRDF-$portVersion"

ARCHITECTURES="all"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"

PROVIDES="
	liblrdf$secondaryArchSuffix = $portVersion
	lib:liblrdf$secondaryArchSuffix = 2.0.0 compat >= 2
	"
REQUIRES="
	haiku$secondaryArchSuffix
	ladspa_sdk$secondaryArchSuffix
	lib:libcrypto$secondaryArchSuffix
	lib:libraptor2$secondaryArchSuffix
	"

PROVIDES_devel="
	liblrdf${secondaryArchSuffix}_devel = $portVersion
	devel:liblrdf$secondaryArchSuffix = 2.0.0 compat >= 2
	"
REQUIRES_devel="
	liblrdf$secondaryArchSuffix == $portVersion base
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	ladspa_sdk${secondaryArchSuffix}_devel
	devel:libcrypto$secondaryArchSuffix
	devel:libraptor2$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:aclocal
	cmd:autoconf
	cmd:automake
	cmd:find
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:libtoolize$secondaryArchSuffix
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	cmd:xargs
	"

BUILD()
{
	find . -xtype l | xargs -r rm
	autoreconf -fi
	runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install

	rm $libDir/liblrdf.la

	prepareInstalledDevelLibs liblrdf
	fixPkgconfig

	# devel package
	packageEntries devel \
		$developDir
}

TEST()
{
	make check
}
