dev-util/systemtap: stable 3.1-r1 for ppc64, bug #634276
[gentoo.git] / dev-util / systemtap / systemtap-2.9.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
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="sqlite"
18
19 RDEPEND=">=dev-libs/elfutils-0.142
20         sys-libs/libcap
21         ${PYTHON_DEPS}
22         sqlite? ( dev-db/sqlite:3 )"
23 DEPEND="${RDEPEND}
24         >=sys-devel/gettext-0.18.2"
25
26 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
27
28 CONFIG_CHECK="~KPROBES ~RELAY ~DEBUG_FS"
29 ERROR_KPROBES="${PN} requires support for KProbes Instrumentation (KPROBES) - this can be enabled in 'Instrumentation Support -> Kprobes'."
30 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)'."
31 ERROR_DEBUG_FS="${PN} works best with support for Debug Filesystem (DEBUG_FS) - this can be enabled in 'Kernel hacking -> Debug Filesystem'."
32
33 DOCS="AUTHORS HACKING NEWS README"
34
35 pkg_setup() {
36         linux-info_pkg_setup
37         python-single-r1_pkg_setup
38 }
39
40 src_prepare() {
41         python_fix_shebang .
42
43         sed -i \
44                 -e 's:-Werror::g' \
45                 configure.ac \
46                 Makefile.am \
47                 staprun/Makefile.am \
48                 stapdyn/Makefile.am \
49                 buildrun.cxx \
50                 testsuite/systemtap.unprivileged/unprivileged_probes.exp \
51                 testsuite/systemtap.unprivileged/unprivileged_myproc.exp \
52                 testsuite/systemtap.base/stmt_rel_user.exp \
53                 testsuite/systemtap.base/sdt_va_args.exp \
54                 testsuite/systemtap.base/sdt_misc.exp \
55                 testsuite/systemtap.base/sdt.exp \
56                 scripts/kprobes_test/gen_code.py \
57                 || die "Failed to clean up sources"
58
59         epatch_user
60
61         eautoreconf
62 }
63
64 src_configure() {
65         econf \
66                 --docdir="${EPREFIX}/usr/share/doc/${PF}" \
67                 --without-rpm \
68                 --disable-server \
69                 --disable-docs \
70                 --disable-refdocs \
71                 --disable-grapher \
72                 $(use_enable sqlite)
73 }