SUMMARY="libdvdcss"
DESCRIPTION="
libdvdcss is a simple library designed for accessing DVDs like a block device \
without having to bother about the decryption.
"
HOMEPAGE="http://www.videolan.org/developers/libdvdcss.html"
LICENSE="GNU GPL v2"
COPYRIGHT="1998-2008 VideoLAN"
SOURCE_URI="http://download.videolan.org/pub/libdvdcss/$portVersion/libdvdcss-$portVersion.tar.bz2"
CHECKSUM_SHA256="7c414acd520c4e4dd7267952f72d738ff50321a7869af4d75c65aefad44f1395"
REVISION="1"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 ?x86"

PATCHES="libdvdcss-${portVersion}.patchset"

PROVIDES="
	libdvdcss$secondaryArchSuffix = $portVersion
	lib:libdvdcss$secondaryArchSuffix = 2.1.0 compat >= 2
	"

REQUIRES="
	haiku$secondaryArchSuffix
	"

BUILD_REQUIRES="
	"

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

SOURCE_DIR="libdvdcss-${portVersion}"

BUILD()
{
	libtoolize --force --copy --install
	aclocal
	autoconf
	automake
	runConfigure ./configure
	make
}

INSTALL()
{
	make install

	# prepare develop/lib
	prepareInstalledDevelLibs libdvdcss
	fixPkgconfig

	packageEntries devel \
		$developDir
}

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

PROVIDES_devel="
	libdvdcss${secondaryArchSuffix}_devel = $portVersion
	devel:libdvdcss$secondaryArchSuffix = 2.1.0 compat >= 2
	"
REQUIRES_devel="
	libdvdcss$secondaryArchSuffix == $portVersion base
	"

