dev-util/systemtap: stable 3.1-r1 for ppc64, bug #634276
[gentoo.git] / dev-util / systemtap / systemtap-3.1-r1.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python2_7 )
7
8 inherit linux-info autotools eutils python-single-r1
9
10 DESCRIPTION="A linux trace/probe tool"
11 HOMEPAGE="https://www.sourceware.org/systemtap/"
12 SRC_URI="https://www.sourceware.org/${PN}/ftp/releases/${P}.tar.gz"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="alpha amd64 ~arm ~arm64 ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86"
17 IUSE="libvirt sqlite"
18
19 RDEPEND=">=dev-libs/elfutils-0.142
20         sys-libs/libcap
21         ${PYTHON_DEPS}
22         libvirt? ( >=app-emulation/libvirt-1.0.2 )
23         sqlite? ( dev-db/sqlite:3 )"
24 DEPEND="${RDEPEND}
25         >=sys-devel/gettext-0.18.2"
26
27 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
28
29 CONFIG_CHECK="~KPROBES ~RELAY ~DEBUG_FS"
30 ERROR_KPROBES="${PN} requires support for KProbes Instrumentation (KPROBES) - this can be enabled in 'Instrumentation Support -> Kprobes'."
31 ERROR_RELAY="${PN} works with support for user space relay support (RELAY) - this can be enabled in 'General setup -> Kernel->user space relay support (formerly relayfs)'."
32 ERROR_DEBUG_FS="${PN} works best with support for Debug Filesystem (DEBUG_FS) - this can be enabled in 'Kernel hacking -> Debug Filesystem'."
33
34 DOCS="AUTHORS HACKING NEWS README"
35
36 PATCHES=("${FILESDIR}"/${PN}-3.1-ia64.patch)
37
38 pkg_setup() {
39         linux-info_pkg_setup
40         python-single-r1_pkg_setup
41 }
42
43 src_prepare() {
44         python_fix_shebang .
45
46         sed -i \
47                 -e 's:-Werror::g' \
48                 configure.ac \
49                 Makefile.am \
50                 staprun/Makefile.am \
51                 stapdyn/Makefile.am \
52                 buildrun.cxx \
53                 testsuite/systemtap.unprivileged/unprivileged_probes.exp \
54                 testsuite/systemtap.unprivileged/unprivileged_myproc.exp \
55                 testsuite/systemtap.base/stmt_rel_user.exp \
56                 testsuite/systemtap.base/sdt_va_args.exp \
57                 testsuite/systemtap.base/sdt_misc.exp \
58                 testsuite/systemtap.base/sdt.exp \
59                 scripts/kprobes_test/gen_code.py \
60                 || die "Failed to clean up sources"
61
62         default
63
64         eautoreconf
65 }
66
67 src_configure() {
68         econf \
69                 --docdir="${EPREFIX}/usr/share/doc/${PF}" \
70                 --without-rpm \
71                 --disable-server \
72                 --disable-docs \
73                 --disable-refdocs \
74                 --disable-grapher \
75                 $(use_enable libvirt virt) \
76                 $(use_enable sqlite)
77 }