SUMMARY="A C++ library to parse EBML content (read/write)"
DESCRIPTION="libebml is a C++ library to parse EBML content (read/write)."
HOMEPAGE="http://www.matroska.org/"
SOURCE_URI="http://dl.matroska.org/downloads/libebml/libebml-1.3.1.tar.bz2"
CHECKSUM_SHA256="195894b31aaca55657c9bc157d744f23b0c25597606b97cfa5a9039c4b684295"
PATCHES="libebml-$portVersion.patchset"
REVISION="2"
LICENSE="GNU LGPL v2.1"
COPYRIGHT="2005-2013 CoreCodec, Inc."

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

PROVIDES="
	libebml$secondaryArchSuffix = $portVersion
	lib:libebml$secondaryArchSuffix = 4.0.0 compat >= 4
	"
REQUIRES="
	haiku${secondaryArchSuffix}
	lib:libstdc++${secondaryArchSuffix}
	"

if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
	REQUIRES+="
		lib:libgcc_s${secondaryArchSuffix}
	"
fi

PROVIDES_devel="
	libebml${secondaryArchSuffix}_devel = $portVersion
	devel:libebml$secondaryArchSuffix = 4.0.0 compat >= 4
	"
REQUIRES_devel="
	libebml$secondaryArchSuffix == $portVersion base
	"
BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	"
BUILD_PREREQUIRES="
	cmd:aclocal
	cmd:autoconf
	cmd:automake
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:pkg_config$secondaryArchSuffix
	cmd:libtool
	cmd:make
	"

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

INSTALL()
{
	make install
	
	prepareInstalledDevelLibs libebml
	fixPkgconfig
	
	packageEntries devel $developDir
}
