summaryrefslogtreecommitdiff
blob: 9acaa393a901478ba185c8eb48c52d4c04f6a467 (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
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="2"

inherit eutils

DESCRIPTION="Xine Plugin: for the Reel eHD PCI card"
HOMEPAGE="http://www.reel-multimedia.com"
SRC_URI="http://vdr.websitec.de/download/${PN}/${P}.tgz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE=""

DEPEND="media-libs/xine-lib"
RDEPEND="${DEPEND}"

S="${WORKDIR}/${PN/reelbox-}"

src_prepare() {

	sed -i -e "s:^LINUX_DIR.*:LINUX_DIR = /usr/src/linux/include:g" Makefile || die "sed Makefile failed!"
	sed -i -e "s:../driver/hdshm.h:hdshm.h:g" ../hdshm3/src/hostlib/hdshmlib.c || die "sed Makefile failed!"

	einfo "Changing framebuffer device to /dev/fb_reel"
	find . -type f -exec sed -i "s:/dev/fb0:/dev/fb_reel:g" {} \;
}

src_compile() {
	make -f Makefile || die "make failed!"
}

src_install() {
	XINE_PLUGIN_DIR=$(xine-config --plugindir)
	if [[ ${XINE_PLUGIN_DIR} = "" ]]; then
		eerror "Could not find xine plugin dir"
		die "Could not find xine plugin dir"
	fi
	cd "${S}"
	insopts -m0755
	insinto "${XINE_PLUGIN_DIR}"
	doins xineplug_hde.so
}