mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-23 18:38:08 -07:00
Bug: https://bugs.gentoo.org/852314 Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com> Closes: https://github.com/gentoo/gentoo/pull/26458 Signed-off-by: Sam James <sam@gentoo.org>
50 lines
1008 B
Bash
50 lines
1008 B
Bash
# Copyright 1999-2020 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=7
|
|
|
|
inherit cmake linux-mod
|
|
|
|
MY_P=${P/-kmod}
|
|
DESCRIPTION="Kernel module for dev-util/sysdig"
|
|
HOMEPAGE="https://sysdig.com/"
|
|
SRC_URI="https://github.com/draios/sysdig/archive/${PV}.tar.gz -> ${MY_P}.tar.gz"
|
|
S=${WORKDIR}/${MY_P}
|
|
|
|
LICENSE="|| ( MIT GPL-2 )"
|
|
SLOT="0"
|
|
KEYWORDS="~amd64 ~x86"
|
|
|
|
RDEPEND="!<=dev-util/sysdig-0.26.4[modules]"
|
|
|
|
CONFIG_CHECK="HAVE_SYSCALL_TRACEPOINTS ~TRACEPOINTS"
|
|
|
|
PATCHES=( "${FILESDIR}"/${PV}-fix-kmod-build-on-5.18+.patch )
|
|
|
|
pkg_pretend() {
|
|
linux-mod_pkg_setup
|
|
}
|
|
|
|
pkg_setup() {
|
|
linux-mod_pkg_setup
|
|
}
|
|
|
|
src_prepare() {
|
|
sed -i -e '/USE_BUNDLED_DEPS/,$d' CMakeLists.txt || die
|
|
cmake_src_prepare
|
|
}
|
|
|
|
src_configure() {
|
|
local mycmakeargs=(
|
|
# we will use linux-mod for that
|
|
-DBUILD_DRIVER=OFF
|
|
)
|
|
|
|
cmake_src_configure
|
|
|
|
# setup linux-mod ugliness
|
|
MODULE_NAMES="sysdig-probe(extra:${BUILD_DIR}/driver/src:)"
|
|
BUILD_PARAMS='KERNELDIR="${KERNEL_DIR}"'
|
|
BUILD_TARGETS="all"
|
|
}
|