SUMMARY="a GPL codec for DV video"
DESCRIPTION="
The Quasar DV codec (libdv) is a software codec for DV video, the encoding format \
used by most digital camcorders, typically those that support the IEEE 1394 \
(a.k.a FireWire or i.Link) interface. Libdv was developed according to the \
official standards for DV video: IEC 61834 and SMPTE 314M."
HOMEPAGE="http://libdv.sourceforge.net"
COPYRIGHT="
	1999 Erik Walthinsen <omega@cse.ogi.edu>
	1999 Charles 'Buck' Krasic <krasic@acm.org>"
LICENSE="GNU LGPL v2.1"
SOURCE_URI="http://sourceforge.net/projects/libdv/files/libdv/$portVersion/libdv-$portVersion.tar.gz"
CHECKSUM_SHA256="a305734033a9c25541a59e8dd1c254409953269ea7c710c39e540bd8853389ba"
REVISION="2"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"

PATCHES="libdv-$portVersion.patchset"

PROVIDES="
	libdv$secondaryArchSuffix = $portVersion compat >= 1.0
	lib:libdv$secondaryArchSuffix = 4.0.3 compat >= 4
	cmd:dubdv$secondaryArchSuffix
	cmd:encodedv$secondaryArchSuffix
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libsdl_1.2$secondaryArchSuffix
	lib:libpopt$secondaryArchSuffix
	"
BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libsdl_1.2$secondaryArchSuffix
	devel:libpopt${secondaryArchSuffix}
	"
BUILD_PREREQUIRES="
	cmd:aclocal
	cmd:autoconf
	cmd:automake
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:libtoolize
	cmd:make
	"

BUILD()
{
	libtoolize --force --copy --install
	aclocal
	autoconf
	automake
	runConfigure ./configure --disable-gtk \
		--without-debug
	make $jobArgs
}

INSTALL()
{
	make install

	prepareInstalledDevelLibs libdv
	fixPkgconfig

	# devel package
	packageEntries devel \
		$developDir
}

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

PROVIDES_devel="
	libdv${secondaryArchSuffix}_devel = $portVersion compat >= 1.0
	devel:libdv$secondaryArchSuffix = 4.0.3 compat >= 4
	"
REQUIRES_devel="
	libdv$secondaryArchSuffix == $portVersion base
	"
