SUMMARY="The MAD id3tag library"
DESCRIPTION="libid3tag is a library for reading and writing ID3 tags, both \
ID3v1 and the various versions of ID3v2."
HOMEPAGE="http://www.underbit.com/products/mad/"
COPYRIGHT="2000-2004 Underbit Technologies, Inc."
LICENSE="GNU GPL v2"
REVISION="6"
SOURCE_URI="ftp://ftp.mars.org/pub/mpeg/libid3tag-$portVersion.tar.gz"
CHECKSUM_SHA256="63da4f6e7997278f8a3fef4c6a372d342f705051d1eeb6a46a86b03610e26151"
PATCHES="libid3tag-$portVersion.patchset"

ARCHITECTURES="all"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"

PROVIDES="
	libid3tag$secondaryArchSuffix = $portVersion
	lib:libid3tag$secondaryArchSuffix = 0.3.0 compat >= 0
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libz$secondaryArchSuffix
	"

PROVIDES_devel="
	libid3tag${secondaryArchSuffix}_devel = $portVersion
	devel:libid3tag$secondaryArchSuffix = 0.3.0 compat >= 0
	"
REQUIRES_devel="
	$portName == $portVersion base
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libz$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:aclocal_1.13
	cmd:autoconf
	cmd:gcc$secondaryArchSuffix
	cmd:gperf >= 3.1
	cmd:libtoolize$secondaryArchSuffix
	cmd:make
	"

BUILD()
{
	touch AUTHORS ChangeLog NEWS
	autoreconf -vfi
	runConfigure ./configure
	make
}

INSTALL()
{
	make install

	rm $libDir/libid3tag.la

	prepareInstalledDevelLib libid3tag
	fixPkgconfig

	packageEntries devel \
		$developDir
}

TEST()
{
	make check
}
