1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit linux-mod bash-completion-r1 cmake-utils
9 DESCRIPTION="A system exploration and troubleshooting tool"
10 HOMEPAGE="http://www.sysdig.org/"
11 SRC_URI="https://github.com/draios/sysdig/archive/${PV}.tar.gz -> ${P}.tar.gz"
15 KEYWORDS="~amd64 ~x86"
20 >=dev-libs/jsoncpp-0.6_pre:0=
27 # needed for the kernel module
28 CONFIG_CHECK="HAVE_SYSCALL_TRACEPOINTS ~TRACEPOINTS"
31 use modules && linux-mod_pkg_setup
35 use modules && linux-mod_pkg_setup
39 sed -i -e 's:-ggdb::' CMakeLists.txt || die
41 cmake-utils_src_prepare
46 # we will use linux-mod for that
48 # libscap examples are not installed or really useful
49 -DBUILD_LIBSCAP_EXAMPLES=OFF
52 -DUSE_BUNDLED_LUAJIT=OFF
53 -DLUAJIT_PREFIX="${EPREFIX}"/usr
54 -DLUAJIT_INCLUDE="${EPREFIX}"/usr/include/luajit-2.0
55 -DUSE_BUNDLED_JSONCPP=OFF
56 -DJSONCPP_PREFIX="${EPREFIX}"/usr
57 -DJSONCPP_INCLUDE="${EPREFIX}"/usr/include/jsoncpp
58 -DUSE_BUNDLED_ZLIB=OFF
59 -DUSE_BUNDLED_NCURSES=OFF
60 -DZLIB_PREFIX="${EPREFIX}"/usr
63 cmake-utils_src_configure
65 # setup linux-mod ugliness
66 MODULE_NAMES="sysdig-probe(extra:${BUILD_DIR}/driver:)"
67 BUILD_TARGETS="driver"
71 cmake-utils_src_compile
73 use modules && linux-mod_src_compile
77 cmake-utils_src_install
79 use modules && linux-mod_src_install
82 rm -r "${ED%/}"/usr/src || die
84 # move bashcomp to the proper location
85 dobashcomp "${ED%/}"/usr/etc/bash_completion.d/sysdig || die
86 rm -r "${ED%/}"/usr/etc || die