summaryrefslogtreecommitdiff
blob: f50d955bd5ab843c50772451b78563c664e4517b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-plugins/vdr-pvr350/vdr-pvr350-0.0.4.20070807.ebuild,v 1.5 2008/04/28 09:11:33 zzam Exp $
inherit vdr-plugin eutils versionator

IUSE="yaepg"

MY_PV="$(get_version_component_range 4)"
MY_PV="${MY_PV:0:4}-${MY_PV:4:2}-${MY_PV:6:2}"
MY_P="${PN#vdr-}-${MY_PV}"

DESCRIPTION="VDR plugin: use a PVR350 as output device"
HOMEPAGE="http://drseltsam.device.name/vdr/pvr/src/pvr350/"
SRC_URI="http://drseltsam.device.name/vdr/pvr/src/pvr350/${MY_P}.tgz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"

S="${WORKDIR}/${MY_P#vdr-}"

DEPEND=">=media-video/vdr-1.4.0
	media-sound/twolame"
RDEPEND="${DEPEND}"

DEPEND="${DEPEND}
	|| ( >=sys-kernel/linux-headers-2.6.22-r2 media-tv/ivtv )"

NO_GETTEXT_HACK=1

PATCHES=("${FILESDIR}/pvr-linux-headers.diff")

pkg_setup() {
	vdr-plugin_pkg_setup

	if use yaepg; then
		elog "Checking for patched vdr"
		grep -q fontYaepg /usr/include/vdr/font.h
		eend $? "You need to emerge vdr with use-flag yaepg set!" || die "Unpatched vdr detected!"

		VDRPLUGIN_MAKE_TARGET="all SET_VIDEO_WINDOW=1"
	fi
}

src_unpack() {
	vdr-plugin_src_unpack unpack

	cd "${S}"
	if has_version ">=media-video/vdr-1.6.0"; then
		epatch "${FILESDIR}/${P}-vdr-1.6.0.diff"
	fi

	vdr-plugin_src_unpack all_but_unpack
}