diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-08-11 02:19:03 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-08-11 02:19:03 +0100 |
commit | 995884416efaa899e9abe8d5c6899570e518b84b (patch) | |
tree | b80d7fe7cc1e5e48e899d459fa62594665af4eb5 /dev-util/bcc | |
parent | f1cd8f3514f8b9fbc1cc9cfe0dd08a8cb258e87a (diff) |
gentoo auto-resync : 11:08:2022 - 02:19:03
Diffstat (limited to 'dev-util/bcc')
-rw-r--r-- | dev-util/bcc/Manifest | 3 | ||||
-rw-r--r-- | dev-util/bcc/bcc-0.25.0.ebuild | 137 | ||||
-rw-r--r-- | dev-util/bcc/files/bcc-0.25.0-cmakelists.patch | 15 |
3 files changed, 155 insertions, 0 deletions
diff --git a/dev-util/bcc/Manifest b/dev-util/bcc/Manifest index b99d8ca55bdd..ad66ee686fa4 100644 --- a/dev-util/bcc/Manifest +++ b/dev-util/bcc/Manifest @@ -1,7 +1,10 @@ AUX 60bcc.env 32 BLAKE2B dbbfb31408af7f3375b02981113d81d71075d339fded45db24b2168baa9f3ffe51205447c12eb9c3f06188fd32db591f21bce41edaff473a40b10320067447cd SHA512 a040c762df54a0218fb3fc4a6609b0e924003be689eaff629fabe69e1ed224fc38fdaac377624944718e5b174ac413edf3730cd0a228bd73bf8ef8678e97d73c AUX bcc-0.14.0-cmakelists.patch 444 BLAKE2B 3832bdfe3fdb3946889fb614c3f89220dae7b319329ad45649edda0f7c9cbd8c8e90ce200c6f7df4913c3eceb0cc729e83d90b7dcc8af991e3f59b5a772f9cc8 SHA512 05f2c50e7daabe9118ea4e6dfd6d8dc155bb0311fbb2fbc491c2740d6f5081cc95ec7cb8faf19751eb161bcf60d30be87e0b6c88d032bf88ecae48af5119e0df AUX bcc-0.23.0-man-compress.patch 704 BLAKE2B 0eceb68e7d7a09b948d24e98c833031751421c829ba99564499b4e4ded9f0bc505b60a2648de7287185d85d847b65f3b929dd08b3fe9f97b1a7aaf9868750ec4 SHA512 7f7c4f4292ab5334201506ba523adc1c9a8e87cd3656a896cf31fe7f48f25e84bb52552f7d02d12442784a72cf7bcb01dec8a63eb2679aa9d84ff935f94d1863 +AUX bcc-0.25.0-cmakelists.patch 358 BLAKE2B 0159aa6e483bd5fab0bc920e8416a94a43809d99a29344b17321bc92890614f99cba1bb8bea02522b890be456904250ef2875d2d88b3f6d55022ad2d4ad2910e SHA512 9521e22cb9318b56601e1d27362903d63fcd8954b7539e6e92db267406d8aed6be8261b62f02d186edb82d548d64578bd99674f93c86e36e1fdd43332dc1552a AUX bcc-0.9.0-no-luajit-automagic-dep.patch 463 BLAKE2B 286ed298055cbdb22d9c3f3f064c77da685cf75cc8c0ab0cad4d4b473f0eac0b1533ca8eb7e6159108d184d16db7a264b0ea9d30ccdc3d988d88bab28be7310d SHA512 6e5c20de22547410ffa566cb8226a47ee0e8c91183bc5b70eb22637a08fe55cfc96fde169ef3ab8d6e8d7c9e356c35e61b164b3ad675835d3ea8d5239a448979 DIST bcc-0.24.0.tar.gz 4640711 BLAKE2B 91d333c21c55de6a0ae78f9bb0b003803578525746e63ca5047896c0b2ed03ee880e03a84511470576e888e46559c67a8ebfdfe49d8785d094e2361bb20c5c2e SHA512 951672e3a8e5ad56eedf513477317ec3d3b4cf2d594bbfce20f3d19ddf7ce255e9dcfc69d9b05bb765a16e769c8e42d7c57071ddb86fb32437f527d3d25d19b6 +DIST bcc-0.25.0.tar.gz 4984989 BLAKE2B 7547e3db293c1eef617b3bb58231f40a4bd3d58f425666dcb58bf77a69d74b468f07d07e01cdf2be89820318c9f3c213047b2d6dd654e08e6a60a3ecc2573252 SHA512 9f71f6c21d1f66054985562168d5848352f5029383e9c65c907a6f044258bc23df842cc65db20bfaaf33789e69c9b8e7b606a32dc882cbdf093b71768c8b521d EBUILD bcc-0.24.0-r1.ebuild 3059 BLAKE2B c3461a5ecefbec5f6fc562c99ff805c82da52f009fe387d03417e36d4b3b9b1375fe113000b24f394586fd6a7a15ec835980cb2f9f480140f591d49b6e0a101e SHA512 4ac0e89395db194ac1ff5a2a18db37e4d18bebc49ed46266d2438622e98e58b86f6d466d440f20d99167b282b543acb1e4973192eba9aa9060469077bcacf6e9 +EBUILD bcc-0.25.0.ebuild 3059 BLAKE2B bd4bb17ca2e69deb8a024762f8cb48013b0b1efdd00101a40ce055a7b73855c196bbdb00c4f458c9df42518ef7d8209bb57b6135f934944bbb5f3333fecc44c7 SHA512 08c2665964fa4d07a932ab90f8777c4d4dbbb85b64d5d3125657b8ae11058abd84a3941c2d2ef5f7e1eecafdf22b89e91a6b9ce15485ac225eeea51f9f2eb51a MISC metadata.xml 533 BLAKE2B b34e30baea99e82348b7f925ab1b4899ea9e4119d2f24f59e11b48dd8efc61edb3029580af40184acd0dfa180caa7e558ef0303247658cc1b3136940f7a735f6 SHA512 c7d4a450c8fe534fd9ab3aede95ac1192aa62f94858b9e0b1efc1b8982d49b0546e012f2d60c1aefc96155b8641d6ebba059af8fbea798827cc8dfeee15390e9 diff --git a/dev-util/bcc/bcc-0.25.0.ebuild b/dev-util/bcc/bcc-0.25.0.ebuild new file mode 100644 index 000000000000..1b1af6260a0c --- /dev/null +++ b/dev-util/bcc/bcc-0.25.0.ebuild @@ -0,0 +1,137 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( luajit ) +PYTHON_COMPAT=( python3_{8..11} ) +LLVM_MAX_SLOT=14 + +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 ~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=" + 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 -a 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_ +} diff --git a/dev-util/bcc/files/bcc-0.25.0-cmakelists.patch b/dev-util/bcc/files/bcc-0.25.0-cmakelists.patch new file mode 100644 index 000000000000..dc66bafd9e50 --- /dev/null +++ b/dev-util/bcc/files/bcc-0.25.0-cmakelists.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4a32768f..c938652a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -17,10 +17,6 @@ if(CMAKE_SANITIZE_TYPE) + endif() + + +-if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) +- set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "path to install" FORCE) +-endif() +- + enable_testing() + + # populate submodules (libbpf) |