SUMMARY="A library to handle Quicktime format files"
DESCRIPTION="libquicktime is a library for reading and writing quicktime \
files. It is based on the quicktime4linux library, with the following \
extensions:

    * Sourcetree upgraded with autoconf/automake/libtool and all the \
other stuff, people like in "standard" linux libraries.
    * All 3rd party libraries (jpeg, OggVorbis) were removed to reduce \
download size, compilation time and code duplication on users harddisks. \
Instead, the sytemwide installed libaries are autodetected by the \
configure script.
    * All codecs have been moved into dynamically loadable modules. \
This makes it possible to distribute closed source codecs (or codecs \
with an incompatible license) as separate packages.
    * Unlike other quicktime libraries, we are source compatible with \
quicktime4linux. Programs like cinelerra or xmovie can be compiled with \
libquicktime (if the build system is modified, see our web page for more \
info).
    * The codecs themselves are also source compatible with \
quicktime4linux, so porting codecs between quicktime4linux and \
libquicktime requires only little brain load.
    * Special API extensions allow access to the codec registry. \
Applications can get important information about the codecs, their \
settable parameters etc. at runtime.
"
HOMEPAGE="http://libquicktime.sourceforge.net"
COPYRIGHT="
	2002 Heroine Virtual Ltd.
	2002-2007 Members of the libquicktime project.
	"
LICENSE="GNU LGPL v2.1"
REVISION="5"
SOURCE_URI="http://sourceforge.net/projects/libquicktime/files/libquicktime/$portVersion/libquicktime-$portVersion.tar.gz"
CHECKSUM_SHA256="1c53359c33b31347b4d7b00d3611463fe5e942cae3ec0fefe0d2fd413fd47368"
PATCHES="libquicktime-$portVersion.patchset"

ARCHITECTURES="all"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"

PROVIDES="
	libquicktime$secondaryArchSuffix = $portVersion compat >= 1.2
	lib:libquicktime$secondaryArchSuffix = 0.0.0 compat >= 0
	"
if [ -z "$secondaryArchSuffix" ]; then
	PROVIDES="$PROVIDES
		cmd:lqt_transcode
		cmd:lqtremux
		cmd:qt2text
		cmd:qtdechunk
		cmd:qtdump
		cmd:qtinfo
		cmd:qtrechunk
		cmd:qtstreamize
		cmd:qtyuv4toyuv
		"
fi
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libdv$secondaryArchSuffix
	lib:libfaad$secondaryArchSuffix
	lib:libiconv$secondaryArchSuffix
	lib:libintl$secondaryArchSuffix
	lib:libjpeg$secondaryArchSuffix
	lib:libmp3lame$secondaryArchSuffix
	lib:libogg$secondaryArchSuffix
	lib:libvorbis$secondaryArchSuffix
	lib:libz$secondaryArchSuffix
	"

PROVIDES_devel="
	libquicktime${secondaryArchSuffix}_devel = $portVersion compat >= 1.2
	devel:libquicktime$secondaryArchSuffix = 0.0.0 compat >= 0
	"
REQUIRES_devel="
	libquicktime$secondaryArchSuffix == $portVersion base
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libdv$secondaryArchSuffix
	devel:libfaad$secondaryArchSuffix
	devel:libiconv$secondaryArchSuffix
	devel:libintl$secondaryArchSuffix
	devel:libjpeg$secondaryArchSuffix
	devel:libmp3lame$secondaryArchSuffix
	devel:libogg$secondaryArchSuffix
	devel:libvorbis$secondaryArchSuffix
	devel:libz$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:aclocal
	cmd:automake
	cmd:autoreconf
	cmd:gcc$secondaryArchSuffix
	cmd:gettext
	cmd:ld$secondaryArchSuffix
	cmd:libtoolize$secondaryArchSuffix
	cmd:make
	cmd:pkg_config${secondaryArchSuffix}
	"

BUILD()
{
	autoreconf -fi
	runConfigure ./configure --without-doxygen \
		--with-libdv --without-cpuflags
	make $jobArgs
}

INSTALL()
{
	make install

	rm $libDir/libquicktime.la $libDir/libquicktime/lqt_*.la

	prepareInstalledDevelLibs libquicktime
	fixPkgconfig

	# devel package
	packageEntries devel \
		$developDir
}
