summaryrefslogtreecommitdiff
path: root/dev-util/bcc
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-06-29 01:39:20 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-06-29 01:39:20 +0100
commitbdac6b4aec4024fb844f76b91f3b007b86415e68 (patch)
treee50979191de69e5531e5e21765609c2dd7b6da06 /dev-util/bcc
parent17ba30fcfb7751f08296c8e4caa05f20bb0813c5 (diff)
gentoo auto-resync : 29:06:2023 - 01:39:20
Diffstat (limited to 'dev-util/bcc')
-rw-r--r--dev-util/bcc/Manifest2
-rw-r--r--dev-util/bcc/bcc-0.28.0.ebuild138
2 files changed, 140 insertions, 0 deletions
diff --git a/dev-util/bcc/Manifest b/dev-util/bcc/Manifest
index 8e12253e92aa..816a756e7398 100644
--- a/dev-util/bcc/Manifest
+++ b/dev-util/bcc/Manifest
@@ -5,7 +5,9 @@ AUX bcc-0.9.0-no-luajit-automagic-dep.patch 463 BLAKE2B 286ed298055cbdb22d9c3f3f
DIST bcc-0.25.0.tar.gz 4984989 BLAKE2B 7547e3db293c1eef617b3bb58231f40a4bd3d58f425666dcb58bf77a69d74b468f07d07e01cdf2be89820318c9f3c213047b2d6dd654e08e6a60a3ecc2573252 SHA512 9f71f6c21d1f66054985562168d5848352f5029383e9c65c907a6f044258bc23df842cc65db20bfaaf33789e69c9b8e7b606a32dc882cbdf093b71768c8b521d
DIST bcc-0.26.0.tar.gz 5255485 BLAKE2B 934b63148dc1e4f017ab97681c6df69c9d5ab1db44c2bb1608644e1d91b745c25759fb1a6c5c543888e23a4e0c4a2e5738b772e0b02ea9901f8bec1a8b15cdd3 SHA512 394872a5780cc7651c91b584ccc13f18f64585b5843364433c042d9ded70faaf15a2e1125d51498508427b089f5bf826f13004d15a1892aada1a5f228a2a8adb
DIST bcc-0.27.0.tar.gz 5907268 BLAKE2B 83bdf7c82c9fec17deded76886b13d0c359bd7a534b7c7522e8c2749ab4615fd94a1a762459336a09ca2e1ee12022e144c021695b98fe4b81096fa5865df7140 SHA512 16df9f42444bcac3be967a43ba4183349b71e75c370957f518977051968277f9ffa8a5e3dfdb2f3bdc9b6b59b575ed82e694f5504ebc74bc0ca4cf3a4b753bfd
+DIST bcc-0.28.0.tar.gz 6148954 BLAKE2B cfd3c8d63128e050512462449ff7d467f8f809c239ac01ae8e75365e89116ec351641a68682d23472aa3b4e265547bb20ca5572084c532a40ccd3131edf255a2 SHA512 792ce93dba64b1f87390b2602dcaeba04ac8b2863652b06eb9a907b93bc6137a944b856cc6fa9c7a38671c89814740967561ca4f3b29c267babca7dc5e78aa02
EBUILD bcc-0.25.0.ebuild 3063 BLAKE2B f60ddb01c47f5bdd3ede1ae3c7a3b1d5b331a7be2cd633a769b9d079db0b428ec10200658fe636fd5effc0b8ddb860193cbcac21f24f1204b73316378eda9518 SHA512 35734ea4c94095848b19f2f0b6449860eec7196aff3043423002c07844771a8b3ca07a89a29a0fdbc63e4f4ebc035b34c6915094749cb292d70a4fe88b1e6a90
EBUILD bcc-0.26.0-r2.ebuild 3063 BLAKE2B a2ea90355401e3d63d18a65c7d7b4f584dedb6b41fb7ad963303f922f7565e79df976b4177e5493fa11288a5efeb6866b493bcd18776e03e84712e95fdf3bee8 SHA512 6dec1fe1971cd817cc34c41c809c62cbd52bb9f430598fcc819c78cf8a35ba004924ad7d47ec2cf03aa8aa671c4fbcd3aa18ed61a7db61df5be4a25446c49e5d
EBUILD bcc-0.27.0-r1.ebuild 3077 BLAKE2B 8584d7eae068cca776fcb31578cd57c3d4a7b369d79c11f96462d65409d1f42eea437a1ebe2398d6398ca5a7fe75218d4e80d97f06cf01b2019f2a1036a5dbf9 SHA512 5399daed74db9173d78436e796c865f0d6afe46322139a2fa2024f7564fc72e7cfb48741b0bc1c36b5ecd98691dd2ca695e3e28b095dba40be5011168d1e83d0
+EBUILD bcc-0.28.0.ebuild 3077 BLAKE2B 67f189ca47a5c9932a680a71839bcea88ab14d1d18308e7e1c2f24b3a98d6952d84a7a8b97729cab6d86dbbef9aee041055af15a49f4c257bcbac9592a359b47 SHA512 91b87059b0de6d29b7245aa9e7a1601ac9623536532eb200cd5cbf4e8192a3a94e1e839c733885908397f0e0a0e9e43479a88a22c9f3e148ea3a994b35a32442
MISC metadata.xml 533 BLAKE2B b34e30baea99e82348b7f925ab1b4899ea9e4119d2f24f59e11b48dd8efc61edb3029580af40184acd0dfa180caa7e558ef0303247658cc1b3136940f7a735f6 SHA512 c7d4a450c8fe534fd9ab3aede95ac1192aa62f94858b9e0b1efc1b8982d49b0546e012f2d60c1aefc96155b8641d6ebba059af8fbea798827cc8dfeee15390e9
diff --git a/dev-util/bcc/bcc-0.28.0.ebuild b/dev-util/bcc/bcc-0.28.0.ebuild
new file mode 100644
index 000000000000..25627ff05dcc
--- /dev/null
+++ b/dev-util/bcc/bcc-0.28.0.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2023 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=17
+
+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-0.7.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
+ -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
+
+ 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_
+}