SUMMARY="Architecture for Sound PROcessing"
DESCRIPTION="NASPRO core is the portable runtime library at the bottom of \
the NASPRO Sound PROcessing Architecture"
HOMEPAGE="http://naspro.sourceforge.net/"
COPYRIGHT="2007-2011, NASPRO Development Team"
LICENSE="GNU LGPL v2.1"
REVISION="1"
SOURCE_URI="https://downloads.sf.net/naspro/naspro-core-$portVersion.tar.bz2"
CHECKSUM_SHA256="00d61a9a18aacb8d0fc3e21ae56f005484111a52bdc47ce64677d568908bfe2f"
SOURCE_DIR="naspro-core-$portVersion"

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

libVersion="3.1.0"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"

PROVIDES="
	naspro$secondaryArchSuffix = $portVersion
	lib:libnacore$secondaryArchSuffix = $libVersionCompat
	"
REQUIRES="
	haiku$secondaryArchSuffix
	"

PROVIDES_devel="
	naspro${secondaryArchSuffix}_devel = $portVersion
	devel:libnacore$secondaryArchSuffix = $libVersionCompat
	"
REQUIRES_devel="
	naspro$secondaryArchSuffix == $portVersion base
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	"
BUILD_PREREQUIRES="
	cmd:aclocal
	cmd:autoreconf
	cmd:awk
	cmd:gcc$secondaryArchSuffix
	cmd:libtoolize$secondaryArchSuffix
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	"

defineDebugInfoPackage naspro$secondaryArchSuffix \
	"$libDir"/libnacore.so.$libVersion

BUILD()
{
	autoreconf -vfi
	runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install

	rm "$libDir"/lib*.la

	prepareInstalledDevelLib libnacore
	fixPkgconfig

	packageEntries devel \
		"$developDir"
}

TEST()
{
	make check
}
