summaryrefslogtreecommitdiff
path: root/dev-util/bcc
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-09-25 20:21:45 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-09-25 20:21:45 +0100
commitc719fdcee603a5a706a45d10cb598762d56a727d (patch)
tree620cbf137661399a3fb1eff92914204f9a970713 /dev-util/bcc
parentcc4618c9ba3d974948ebf340b542d8cb01db2f55 (diff)
gentoo resync : 25.09.2021
Diffstat (limited to 'dev-util/bcc')
-rw-r--r--dev-util/bcc/Manifest2
-rw-r--r--dev-util/bcc/bcc-0.22.0.ebuild116
2 files changed, 118 insertions, 0 deletions
diff --git a/dev-util/bcc/Manifest b/dev-util/bcc/Manifest
index 0b6718d6ae9b..4e39419d78cf 100644
--- a/dev-util/bcc/Manifest
+++ b/dev-util/bcc/Manifest
@@ -3,6 +3,8 @@ AUX bcc-0.14.0-cmakelists.patch 444 BLAKE2B 3832bdfe3fdb3946889fb614c3f89220dae7
AUX bcc-0.9.0-no-luajit-automagic-dep.patch 463 BLAKE2B 286ed298055cbdb22d9c3f3f064c77da685cf75cc8c0ab0cad4d4b473f0eac0b1533ca8eb7e6159108d184d16db7a264b0ea9d30ccdc3d988d88bab28be7310d SHA512 6e5c20de22547410ffa566cb8226a47ee0e8c91183bc5b70eb22637a08fe55cfc96fde169ef3ab8d6e8d7c9e356c35e61b164b3ad675835d3ea8d5239a448979
DIST bcc-0.19.0.tar.gz 5171216 BLAKE2B 72f0364106f894f21990865209b445eaa9640c00a27060cef220418be87625150cdc8062168dacd1370ebd01c99c2d49853869b518a3a07bb601720412b9a970 SHA512 b6180462a45c768f219e026d8a4b43424b7cad4e07db8101725bd2bc31ee4de117774c0ad8d157502c97c1187057b45c7a491e7198ac2c59e6d56e58797f4df3
DIST bcc-0.20.0.tar.gz 5193274 BLAKE2B ea78004d114e8187d82d6e58bf2c8e17d93b96a651a5557dcf3c405dfcf5ed0df3a2147f35d1b3831aa5aca5c1caf59742026740bb6da02dfda7c1dd7ef8161b SHA512 fa7c50a4fc64846ad798b6652101aa414cda53d08779cf48bd505191189cb23da2838f7511e700d59e086d35216f4e3bc9867b614738061630984dff3c4576dc
+DIST bcc-0.22.0.tar.gz 5247927 BLAKE2B 896d22c9540180e015f7be03b2ce8e6957fd7ba3e7f28fb57247bc8455b35bc82ecf321140e80f714bc01a2c01721e0544e249bc07be7b467c650788014793f0 SHA512 946ec8ed96a83cb7a9d7e44436901445588dc5e37c5cbc8b720a7a0d226b2769ab780294fa7c52099f579f4f1b6935f662be19c739d13979044723dce8ed7792
EBUILD bcc-0.19.0-r1.ebuild 2258 BLAKE2B ce5df0ce4181d14c1836e52ea25f40d31cc3776cb823540c839b6890854859aaf08eb78e229b9ab69066a40157955f1a6eb68c566a499b842d520b091ce917a2 SHA512 ec0faa3ae0a97e31d6424c621fa5166929f98a0fdbc13aef749bce6e5beb98c4a765f8db67a3554f8380fd82de89db9004824990e4a9deba1a2bf4e616eb0cbc
EBUILD bcc-0.20.0-r1.ebuild 2258 BLAKE2B 329dd78d04cc25a380fa4421a1553442e8084af2a615c160b06354e92bbef5003e2283969872eb608216443135848b397c9e15a78ade1e0d50a6849f2ce17035 SHA512 138bc254388898b03ebf0d17b95651753f6c08e5496e6b0306ad2380ba343333d2d32169f0851e2121e51d57c733574cde9557b6cb31e73e5023dc45bb870e3d
+EBUILD bcc-0.22.0.ebuild 2533 BLAKE2B f5379c1d341c9cf8cf1f629b3f22545ff5edcf5752db7b1192704d84d84aa56c4232b192befd3423ddc447da7b6cf9b5721605a8f4cc486a9b93032f45f4204c SHA512 f3e42b5c4c62c03ecee48a515c31b3b6909a5238f1ffdf10716386137550b3ecfe72cf5e81b6d16ecf5a3786570824effa4052e5d6806780e19ef0f8eb6b77d8
MISC metadata.xml 387 BLAKE2B 01669ac6fdf60ea78bc4c7fff0838ea0877a961591fd5fd069e4e4f44a991978c1de7966ae175d761d06ab5c78a142ddb451b116f29c182944795362f3c219f9 SHA512 6fc774ad3f929b31dbe44ab2413c480e4ddb5fb7eec0566fac65190391facd50fc65b6bd91a4dde51b00be2e1c1ef157e74e0f4bff0a5417df1e56a0e79f700c
diff --git a/dev-util/bcc/bcc-0.22.0.ebuild b/dev-util/bcc/bcc-0.22.0.ebuild
new file mode 100644
index 000000000000..7e7f541d74ce
--- /dev/null
+++ b/dev-util/bcc/bcc-0.22.0.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( luajit )
+PYTHON_COMPAT=( python3_{7..10} )
+
+inherit cmake linux-info llvm lua-single python-r1
+
+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 ~x86"
+IUSE="+lua test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+ lua? ( ${LUA_REQUIRED_USE} )"
+
+RDEPEND="
+ || (
+ ~dev-libs/libbpf-0.5.0
+ ~dev-libs/libbpf-9999
+ )
+ dev-libs/libbpf:=[static-libs(-)]
+ >=sys-kernel/linux-headers-4.14
+ >=dev-libs/elfutils-0.166:=
+ <=sys-devel/clang-13:=
+ <=sys-devel/llvm-13:=[llvm_targets_BPF(+)]
+ lua? ( ${LUA_DEPS} )
+ ${PYTHON_DEPS}
+"
+DEPEND="${RDEPEND}
+ test? (
+ || (
+ net-misc/iputils[arping]
+ net-analyzer/arping
+ )
+ net-analyzer/netperf
+ net-misc/iperf:*
+ )
+"
+BDEPEND="
+ dev-util/cmake
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}/bcc-0.9.0-no-luajit-automagic-dep.patch"
+ "${FILESDIR}/bcc-0.14.0-cmakelists.patch"
+)
+
+# tests need root access
+RESTRICT="test"
+
+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_MAX_SLOT=12 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
+
+ cmake_src_prepare
+}
+
+python_add_impl() {
+ bcc_python_impls+="${EPYTHON};"
+}
+
+src_configure() {
+ local bcc_python_impls
+ python_foreach_impl python_add_impl
+
+ local -a mycmakeargs=(
+ -DREVISION=${PV%%_*}
+ -DENABLE_LLVM_SHARED=ON
+ -DCMAKE_USE_LIBBPF_PACKAGE=ON
+ -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() {
+ local script scriptname
+ cmake_src_install
+ find "${ED}/usr/share/bcc/tools/old" -type f | while read script; do
+ scriptname=$(basename "${pythonScript}")
+ mv "${script}" "${ED}/usr/share/bcc/tools/old/old-${scriptname}"
+ done
+ python_replicate_script $(grep -Flr '#!/usr/bin/python' "${ED}/usr/share/bcc/tools")
+ python_foreach_impl python_optimize
+
+ newenvd "${FILESDIR}"/60bcc.env 60bcc.env
+}