summaryrefslogtreecommitdiff
path: root/dev-util/bcc
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-03-15 18:47:53 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-03-15 18:47:53 +0000
commita4eda25bf0f72d757244b128657832bc4da28375 (patch)
tree5a4bda4947a8d19e1f07c2385db1aff2c18ba0d2 /dev-util/bcc
parent6e8d3793323b8f24be801a4aaf31cdd31a8483e9 (diff)
gentoo auto-resync : 15:03:2024 - 18:47:52
Diffstat (limited to 'dev-util/bcc')
-rw-r--r--dev-util/bcc/Manifest1
-rw-r--r--dev-util/bcc/bcc-0.29.1-r2.ebuild141
2 files changed, 142 insertions, 0 deletions
diff --git a/dev-util/bcc/Manifest b/dev-util/bcc/Manifest
index ba2b19f14ae3..59aaadd18a24 100644
--- a/dev-util/bcc/Manifest
+++ b/dev-util/bcc/Manifest
@@ -6,4 +6,5 @@ DIST bcc-0.28.0.tar.gz 6148954 BLAKE2B cfd3c8d63128e050512462449ff7d467f8f809c23
DIST bcc-0.29.1.tar.gz 6778304 BLAKE2B 23df483df59ef7d66117b15628299a32155136aa5254edbf76f7507a972f3ebcba1d4b2aa83c41e8f061eeeb96812f522c34fed27e9a37e5f4ad3478c7cde88f SHA512 9e60130ea602e19e6c6f88a8c17023cea5daf4c5bcc7af8816e9f5c662341136eb449a3fdf870ffad215495ac3bf895115c0d968d92ce79ebe2899b3e2464d24
EBUILD bcc-0.28.0-r1.ebuild 3077 BLAKE2B 705569eaa9955df0c937fb91e16bf0581efa07f75c320998b0e77965be0d44862c79a858eb1a8741ecc80aede9f628896d60a39562dabb850eeb3d7a59422597 SHA512 6b41066299ee4b0e38688aad3a471df90aef356320e478d150ee5d0e5ea35fdeff601fa68f91f0b14c3b876aac43afd86e6a4269b8eff6cd39b4ecd6acdfa939
EBUILD bcc-0.29.1-r1.ebuild 3077 BLAKE2B 3689bce1bd8cdf8f0ad0025d817af6b1a8cab5b9f7107ad3e9ae0d9a157cb256b48b7c64c51d64aa0e13c291cb9b16fd9ec3d61e9caf180840a4501f4631d332 SHA512 fcc37f4c903a8eadd5adc042c6a5f7f0ebf9fcb0e0c9189c74335df690543dd811c0bd7031db2204853ff0227efa86251a5b2d9274ed9fd629c23a54770708f6
+EBUILD bcc-0.29.1-r2.ebuild 3214 BLAKE2B 2bd87d02bf6a10f467971dd38ce76d83705664026d8b716c36b3ad03f5fa9263aaeef5df0653a661420620b16831c12cc8fce62148469d666d938fa16ed3316b SHA512 a836d324e5a5da246facc5d35546c719e23b0ed0eb1588252e49a146a4b62e83925ef18d7c6a6ceba2327c58fda471f02a615c560978a43c20816b1f3cfcb8a5
MISC metadata.xml 419 BLAKE2B 8b46153f6ab2d6959a767f105a9e33109f705bf879bd4d6708eb4a85e310140d8f810569bf3e37f89bd5a07758de7653697214643b606dc314009e8b8db709ac SHA512 3036d51a8ff5c5adc507387aad252ab7a90c341c5f04c626158353d938992e78c6b5e344354220141979f91522e0204e388d47fd0ccf91415634f6cde646a0c3
diff --git a/dev-util/bcc/bcc-0.29.1-r2.ebuild b/dev-util/bcc/bcc-0.29.1-r2.ebuild
new file mode 100644
index 000000000000..236331466a37
--- /dev/null
+++ b/dev-util/bcc/bcc-0.29.1-r2.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( luajit )
+PYTHON_COMPAT=( python3_{9..12} )
+LLVM_MAX_SLOT=18
+
+inherit cmake linux-info llvm lua-single python-r1 toolchain-funcs
+
+DESCRIPTION="Tools for BPF-based Linux IO analysis, networking, monitoring, and more"
+HOMEPAGE="https://iovisor.github.io/bcc/"
+SRC_URI="https://github.com/iovisor/bcc/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~riscv ~x86"
+IUSE="+lua test"
+
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ lua? ( ${LUA_REQUIRED_USE} )
+"
+
+# tests need root access
+RESTRICT="test"
+
+RDEPEND="
+ >=dev-libs/elfutils-0.166:=
+ >=dev-libs/libbpf-1.2.0:=[static-libs(-)]
+ sys-kernel/linux-headers
+ <sys-devel/clang-$((${LLVM_MAX_SLOT} + 1)):=
+ <sys-devel/llvm-$((${LLVM_MAX_SLOT} + 1)):=[llvm_targets_BPF(+)]
+ ${PYTHON_DEPS}
+ lua? ( ${LUA_DEPS} )
+"
+DEPEND="
+ ${RDEPEND}
+ test? (
+ || (
+ net-misc/iputils[arping]
+ net-analyzer/arping
+ )
+ net-analyzer/netperf
+ net-misc/iperf:*
+ )
+"
+BDEPEND="
+ app-arch/zip
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}/bcc-0.9.0-no-luajit-automagic-dep.patch"
+ "${FILESDIR}/bcc-0.25.0-cmakelists.patch"
+ "${FILESDIR}/bcc-0.23.0-man-compress.patch"
+)
+
+pkg_pretend() {
+ local CONFIG_CHECK="~BPF ~BPF_SYSCALL ~NET_CLS_BPF ~NET_ACT_BPF
+ ~HAVE_EBPF_JIT ~BPF_EVENTS ~DEBUG_INFO ~FUNCTION_TRACER ~KALLSYMS_ALL
+ ~KPROBES"
+
+ check_extra_config
+}
+
+pkg_setup() {
+ llvm_pkg_setup
+ python_setup
+}
+
+src_prepare() {
+ local bpf_link_path
+
+ # this avoids bundling
+ bpf_link_path="$(realpath --relative-to="${S}/src/cc/libbpf" /usr/include/bpf)" || die
+ ln -sfn "${bpf_link_path}" src/cc/libbpf/include || die
+
+ # bug 811288
+ local script scriptname
+ for script in $(find tools/old -type f -name "*.py" || die); do
+ scriptname=$(basename ${script} || die)
+ mv ${script} tools/old/old-${scriptname} || die
+ done
+
+ cmake_src_prepare
+}
+
+python_add_impl() {
+ bcc_python_impls+="${EPYTHON};"
+}
+
+src_configure() {
+ local bcc_python_impls
+ python_foreach_impl python_add_impl
+
+ local mycmakeargs=(
+ -DREVISION=${PV%%_*}
+ -DENABLE_LLVM_SHARED=ON
+ -DENABLE_NO_PIE=OFF
+ -DCMAKE_USE_LIBBPF_PACKAGE=ON
+ -DLIBBPF_INCLUDE_DIRS="$($(tc-getPKG_CONFIG) --cflags-only-I libbpf | sed 's:-I::g')"
+ -DKERNEL_INCLUDE_DIRS="${KERNEL_DIR}"
+ -DPYTHON_CMD="${bcc_python_impls%;}"
+ -Wno-dev
+ )
+ if use lua && use lua_single_target_luajit; then
+ mycmakeargs+=( -DWITH_LUAJIT=1 )
+ fi
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+ remove_egg_info() { rm -rf "${D}/$(python_get_sitedir)"/*.egg-info || die; }
+ python_foreach_impl remove_egg_info
+
+ python_replicate_script $(grep -Flr '#!/usr/bin/python' "${ED}/usr/share/bcc/tools")
+ python_foreach_impl python_optimize
+
+ newenvd "${FILESDIR}"/60bcc.env 60bcc.env
+ local -A rename_tools=(
+ [trace]=1
+ )
+
+ local tool name
+ for tool in "${ED}"/usr/share/bcc/tools/*; do
+ [[ ! -x ${tool} && ! -L ${tool} || -d ${tool} ]] && continue
+ name=${tool##*/}
+ [[ -n ${rename_tools[${name}]} ]] && name=bcc-${name}
+ dosym -r "${tool#${ED}}" /usr/sbin/${name}
+ done
+
+ docompress /usr/share/${PN}/man
+
+ newenvd - "70${P}" <<-_EOF_
+ MANPATH="${EPREFIX}/usr/share/${PN}/man"
+ _EOF_
+}