summaryrefslogtreecommitdiff
blob: 969819957705acc85b4bf1004a3a1faff6b45fd0 (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
54
55
56
57
58
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="2"

RESTRICT="mirror"

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!"

	sed -e "s:/dev/fb0:/dev/fb_reel:" -i hde_base.h

	if has_version ">=media-libs/xine-lib-1.2" ; then
		sed -i * -e "s:get_description:description:g"
		sed -i * -e "s:get_identifier:identifier:g"
	fi

	sed -i xplayer.c -e "s:hde-video:hde-video-aa:g"

}

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

src_install() {
	dobin xplayer

	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
}