SUMMARY="A library for decoding mpeg-2 and mpeg-1 video"
DESCRIPTION="
A library for decoding mpeg-2 and mpeg-1 video.
"
HOMEPAGE="http://www.libmpeg2.sourceforge.net" 
LICENSE="GNU GPL v2"
COPYRIGHT="
	Copyright (C) 2000-2003 Michel Lespinasse <walken@zoy.org>
	Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
	"
SRC_URI="http://libmpeg2.sourceforge.net/files/libmpeg2-0.5.1.tar.gz"
CHECKSUM_SHA256="dee22e893cb5fc2b2b6ebd60b88478ab8556cb3b93f9a0d7ce8f3b61851871d4"
REVISION="1"
ARCHITECTURES="x86_gcc2 ?x86 ?x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 ?x86"

PROVIDES="
	libmpeg2${secondaryArchSuffix} = $portVersion
	lib:libmpeg2
	cmd:mpeg2dec
	cmd:corrupt_mpeg2
	cmd:extract_mpeg2
	"

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
	"

PATCHES="libmpeg2-${portVersion}.patch"

SOURCE_DIR="libmpeg2-${portVersion}"

BUILD()
{
	./bootstrap
	runConfigure ./configure --enable-shared --enable-static
	make $jobArgs
}

INSTALL()
{
	make install

	# prepare develop/lib
	prepareInstalledDevelLibs libmpeg2 libmpeg2convert
	fixPkgconfig

	packageEntries devel \
		$developDir
} 

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

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



