SUMMARY="A lightweight Matroska muxer written for HandBrake"
DESCRIPTION="
A lightweight Matroska muxer written for HandBrake.
"
HOMEPAGE="https://github.com/saintdev/libmkv"
COPYRIGHT="Copyright (C) 2007 libmkv"
LICENSE="GNU GPL v2"
SRC_URI="https://github.com/saintdev/libmkv/archive/0.6.5.1.tar.gz"
CHECKSUM_SHA256="41f08a08bab354f9834fda1dcdd1dcf4a0c67ad18021eb980f808654464cef00"
SRC_FILENAME="libmkv-0.6.5.1.tar.gz"
REVISION="1"

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

PROVIDES="
	libmkv${secondaryArchSuffix} = $portVersion
	lib:libmkv
	"

REQUIRES="
	haiku${secondaryArchSuffix} >= $haikuVersion
	"

BUILD_REQUIRES="
	"

BUILD_PREREQUIRES="
	haiku${secondaryArchSuffix}_devel >= $haikuVersion
	cmd:gcc${secondaryArchSuffix}
	cmd:ld${secondaryArchSuffix}
	cmd:make
	cmd:libtoolize
	cmd:aclocal
	cmd:autoconf
	"

SOURCE_DIR="libmkv-${portVersion}"

BUILD()
{
	./bootstrap.sh
	runConfigure ./configure
	make
}

INSTALL()
{
	make install

	# prepare develop/lib
	prepareInstalledDevelLibs libmkv
	fixPkgconfig

	packageEntries devel \
		$developDir
} 

# ----- devel package -------------------------------------------------------

PROVIDES_devel="
	libmkv${secondaryArchSuffix}_devel = $portVersion
	devel:libmkv${secondaryArchSuffix} = $portVersion
	"
REQUIRES_devel="
	libmkv${secondaryArchSuffix} == $portVersion base
	"
