DESCRIPTION="HandBrake is an open source, multiplatform, multithreaded video transcoder." 
HOMEPAGE="http://www.handbrake.fr" 
SRC_URI="http://handbrake.fr/rotation.php?file=HandBrake-0.9.5.tar.bz2"
CHECKSUM_MD5="e17d3663fc36a985fe43e188695e3196"
REVISION="1"
STATUS_HAIKU="broken"
DEPEND="dev-libs/libxml2 >= 2.7.7
	media-libs/lame >= 3.98
	media-libs/faac >= 1.28
	media-libs/faad2 >= 2.7
	media-libs/fontconfig >= 2.8.0
	media-libs/ffmeg >= 0.6
	media-libs/freetype >= 2.3.9
	media-libs/libass >= 0.9.9
	media-libs/dvdread >= 4.1.3"
	
BUILD()
{
	cd HandBrake-0.9.5
	cp make/variant/linux.defs make/variant/haiku.defs

#	These need some help to build on Haiku, so moved them to DEPEND
#	and remove them from the build here
	sed -i 's/MODULES += contrib\/libxml2/ /' make/include/main.defs
	sed -i 's/MODULES += contrib\/lame/ /' make/include/main.defs
	sed -i 's/MODULES += contrib\/faad2/ /' make/include/main.defs
	sed -i 's/MODULES += contrib\/faac/ /' make/include/main.defs	
	sed -i 's/MODULES += contrib\/fontconfig/ /' make/include/main.defs
	sed -i 's/MODULES += contrib\/ffmpeg/ /' make/include/main.defs
	sed -i 's/MODULES += contrib\/freetype/ /' make/include/main.defs
	sed -i 's/MODULES += contrib\/libass/ /' make/include/main.defs	
	sed -i 's/MODULES += contrib\/dvdread/ /' make/include/main.defs	
	
	./configure --prefix=`finddir B_COMMON_DIRECTORY`
	cd build
	make
}

INSTALL()
{
	cd HandBrake-0.9.5
	make install
}
LICENSE="GNU GPL v2"
COPYRIGHT="2003-2011 HandBrake Developers"
