summaryrefslogtreecommitdiff
blob: 04aa08905400ef2cdb2e4136283cc17a366e7fe2 (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
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

inherit eutils linux-info

DESCRIPTION="Dynamic tracing framework created (ported to Linux)"
HOMEPAGE="http://www.crisp.demon.co.uk/blog/"
SRC_URI="ftp://crisp.dynalias.com/pub/release/website/${PN}/${P}.tar.bz2"

LICENSE="CDDL"
SLOT="0"
KEYWORDS=""
IUSE=""

RDEPEND="
	dev-libs/libelf
	dev-libs/libdwarf"
DEPEND="${RDEPEND}
	dev-lang/perl
	sys-devel/flex
	sys-devel/bison
	virtual/linux-sources"

src_prepare() {
	rm build || die

	epatch \
		"${FILESDIR}"/${P}-destdir.patch \
		"${FILESDIR}"/${P}-build.patch
}

src_compile() {
	set_arch_to_kernel
	emake all
}

src_install() {
	dodoc Bugs CONTRIB Changes README Status.txt

	local KV_FULL=$(uname -r)
	local modulename=dtracedrv
	einfo "Installing ${modulename} module"
	insinto /lib/modules/${KV_FULL}/extra
	doins build-${KV_FULL}/driver/${modulename}.ko

	default
}