blob: 22ab021f2e7259aa6f93cfc2af0734ecf63af3fb (
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
|
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
inherit linux-info linux-mod versionator
DESCRIPTION="next generation em28xx driver including dvb support"
HOMEPAGE="http://mcentral.de/"
SRC_URI="http://upload.hasnoname.de/${PN}/${PN}-$(get_version_component_range 3).tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
S=${WORKDIR}/${PN}
CONFIG_CHECK="VIDEO_V4L2 DVB_CORE"
pkg_setup() {
linux-mod_pkg_setup
if kernel_is lt 2 6 21; then
eerror "You need at least kernel 2.6.21"
die "Kernel too old"
fi
if linux_chkconfig_present VIDEO_EM28XX; then
ewarn "In-kernel em28xx drivers enabled, disable or remove them from"
ewarn "/lib/modules/${KV_FULL} if you experience problems."
fi
}
src_prepare() {
if kernel_is eq 2 6 29; then
epatch "${FILESDIR}"/em28xx-new-video.c-2.6.29.patch
fi
if kernel_is ge 2 6 30; then
epatch "${FILESDIR}"/em28xx-new-2.6.30.patch
fi
}
src_compile() {
set_arch_to_kernel
emake || die "Compiling kernel modules failed"
}
src_install() {
insinto /lib/modules/${KV_FULL}/empia
local extglob_bak=$(shopt -p extglob)
shopt -s extglob # portage disables bash extglob in ebuilds
doins $(echo {!(precompiled)/,}*.ko) || die "doins failed"
eval ${extglob_bak} # restore previous extglob status
}
|