From 9214bb519d3ef3e77027032a7ebafda6b80d4241 Mon Sep 17 00:00:00 2001 From: Marek Szuba Date: Mon, 21 Dec 2020 12:02:05 +0000 Subject: dev-util/sysdig: migrate to lua-single.eclass We only support building sysdig against LuaJIT and while upstream build scripts do include a check for PUC Lua 5.1, it is only run if LuaJIT couldn't be found and using that implementation is not recommended: "sysdig and its chisels are designed to be used with LuaJIT in Lua 5.1 mode. While it is possible to use sysdig with LuaJIT in Lua 5.2 mode or regular Lua, some chisels may not work as expected" All in all, the changes have been rather trivial. Closes: https://bugs.gentoo.org/752672 Signed-off-by: Marek Szuba --- dev-util/sysdig/sysdig-0.27.1-r100.ebuild | 74 +++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 dev-util/sysdig/sysdig-0.27.1-r100.ebuild (limited to 'dev-util') diff --git a/dev-util/sysdig/sysdig-0.27.1-r100.ebuild b/dev-util/sysdig/sysdig-0.27.1-r100.ebuild new file mode 100644 index 000000000000..d564a5f4f305 --- /dev/null +++ b/dev-util/sysdig/sysdig-0.27.1-r100.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +LUA_COMPAT=( luajit ) +# Documentation says this might be needed but since the unmigrated ebuilds +# did not enforce it, nor does this one. +#LUA_REQ_USE="-lua52compat" + +inherit bash-completion-r1 cmake lua-single + +DESCRIPTION="A system exploration and troubleshooting tool" +HOMEPAGE="https://sysdig.com/" +SRC_URI="https://github.com/draios/sysdig/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="libressl +modules test" +REQUIRED_USE="${LUA_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +RDEPEND="${LUA_DEPS} + app-misc/jq:0= + dev-cpp/tbb:0= + >=dev-libs/jsoncpp-0.6_pre:0= + dev-libs/libb64:0= + dev-libs/protobuf:0= + net-dns/c-ares:0= + net-libs/grpc:0= + sys-libs/ncurses:0= + sys-libs/zlib:0= + libressl? ( dev-libs/libressl:0= ) + !libressl? ( dev-libs/openssl:0= ) + net-misc/curl:0=" +DEPEND="${RDEPEND} + virtual/os-headers + test? ( dev-cpp/gtest )" +PDEPEND=" + modules? ( >=dev-util/sysdig-kmod-${PV} )" + +src_prepare() { + sed -i -e 's:-ggdb::' CMakeLists.txt || die + + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DCREATE_TEST_TARGETS=$(usex test) + + # done in dev-util/sysdig-kmod + -DBUILD_DRIVER=OFF + # libscap examples are not installed or really useful + -DBUILD_LIBSCAP_EXAMPLES=OFF + + # unbundle the deps + -DUSE_BUNDLED_DEPS=OFF + ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + + # remove sources + rm -r "${ED}"/usr/src || die + + # move bashcomp to the proper location + dobashcomp "${ED}"/usr/etc/bash_completion.d/sysdig || die + rm -r "${ED}"/usr/etc || die +} -- cgit v1.2.3-65-gdbad