# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="2"

inherit vdr-plugin

DESCRIPTION="VDR Plugin: output device for the 'Full Featured' TechnoTrend
S2-6400 DVB Card"
HOMEPAGE="http://powarman.dyndns.org/hg/dvbhddevice"
HG_REVISION="91d1d0615dc7"
HG_REVISION_DATE="20120207"
SRC_URI="http://powarman.dyndns.org/hgwebdir.cgi/dvbhddevice/archive/${HG_REVISION}.tar.gz
-> dvbhddevice-0.0.4_p${HG_REVISION_DATE}.tar.gz"

KEYWORDS="~x86 ~amd64"
SLOT="0"
LICENSE="GPL-2"
IUSE="+firmware vdr-sc-patch"

DEPEND=">=media-video/vdr-1.7.18"
RDEPEND="${DEPEND}
	firmware? ( media-tv/tt-s2-6400-firmware )"

S="${WORKDIR}/dvbhddevice-${HG_REVISION}"

src_prepare() {
	vdr-plugin_src_prepare
	# http://www.digital-eliteboard.com/showthread.php?139835-VDR-SC-und-TT-S2-6400&p=1232901&viewfull=1#post1232901
	use vdr-sc-patch && epatch "${FILESDIR}/diffFile3.txt"
	fix_vdr_libsi_include dvbhdffdevice.c
}