diff options
Diffstat (limited to 'dev-util/bcc')
-rw-r--r-- | dev-util/bcc/Manifest | 3 | ||||
-rw-r--r-- | dev-util/bcc/bcc-0.23.0-r3.ebuild | 128 | ||||
-rw-r--r-- | dev-util/bcc/files/bcc-0.23.0-man-compress.patch | 18 |
3 files changed, 149 insertions, 0 deletions
diff --git a/dev-util/bcc/Manifest b/dev-util/bcc/Manifest index 10815b63e2e2..6637255569b9 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.9.0-no-luajit-automagic-dep.patch 463 BLAKE2B 286ed298055cbdb22d9c3f3f064c77da685cf75cc8c0ab0cad4d4b473f0eac0b1533ca8eb7e6159108d184d16db7a264b0ea9d30ccdc3d988d88bab28be7310d SHA512 6e5c20de22547410ffa566cb8226a47ee0e8c91183bc5b70eb22637a08fe55cfc96fde169ef3ab8d6e8d7c9e356c35e61b164b3ad675835d3ea8d5239a448979 DIST bcc-0.22.0.tar.gz 5247927 BLAKE2B 896d22c9540180e015f7be03b2ce8e6957fd7ba3e7f28fb57247bc8455b35bc82ecf321140e80f714bc01a2c01721e0544e249bc07be7b467c650788014793f0 SHA512 946ec8ed96a83cb7a9d7e44436901445588dc5e37c5cbc8b720a7a0d226b2769ab780294fa7c52099f579f4f1b6935f662be19c739d13979044723dce8ed7792 +DIST bcc-0.23.0.tar.gz 5254103 BLAKE2B 011559f081dd8f95b45b64e347ed191f585f6f5e395aadc3ef9726785aa41735b263c0d6e7743c969e390792f0f4f286930fee585c1a59878f301c4b4026dce8 SHA512 531626c920f5ef7d05617b3b418d55fdeef2dc8014f942a6e68ca457433d63445cc98303bbe331ee982e4aefe5d2df84764d373a6166638bd457992b371f037c EBUILD bcc-0.22.0-r1.ebuild 2502 BLAKE2B 4b48547c387bcf109adf746eb57eb04d93c41c6116b481beb9654dfaf82470ec34f5998cd9da0badbc308d4b0409ee7efcc4b2f1874265e5f12ca22fda4e9fbd SHA512 44f531b55f2a27be716276bf646ae2652b7e55134636c0c229fb1d327332842e8ec7211a8a9a4402e2362e17574e6fcbc375d2e0697c96250f35f5b02f554bee EBUILD bcc-0.22.0.ebuild 2533 BLAKE2B 948441d97a61b7ef0925bc6c03c130ebb56d25ada7be353bd087efaf8d37423c2b9ea407b93efffa963cd09c999e941f9f24efa20c863f07f3dc8b8b9a7084f8 SHA512 180d12f060eda41a33e57539f22eb7334e116a7d3227a2bc041e897213f19344ccb499b5d9e7ec4d455aac66e896ff88d989c866a727aad8ba304dc9dd4c4a29 +EBUILD bcc-0.23.0-r3.ebuild 2944 BLAKE2B dfd2cc99a1b446c3d0079c94a46e3999bfd3bfcf5f87f44ec42d37317429a1c0832db46e659fc5e0ec35229cc2e834a00c3bec509771c87cd4277802e2068f9b SHA512 f6ce7640b567680ee7783fc10df212422244c1672ccb7c43779f5764dbfcc6f12630334e9f32b1babafd7f5fe729fc6d178c4333b555cfe96ad797cef3f1fa79 MISC metadata.xml 501 BLAKE2B b958c89640d4cfe0cd5951fbfe65394b84a606c2ac4e73893b46fb950ce7a53f9a9623636bb8f3926c0637539c1aed3107cbf1e6aa52fc0d8a9b948977fab747 SHA512 32e576ce7431409c9c3a69f3ac1d5f757b6ec9807fa86d38a93db02721b0e10771dea786c646513f952fc6603e64df2eefa5797ef2103c55a9b1be60bee522b9 diff --git a/dev-util/bcc/bcc-0.23.0-r3.ebuild b/dev-util/bcc/bcc-0.23.0-r3.ebuild new file mode 100644 index 000000000000..dc810e641127 --- /dev/null +++ b/dev-util/bcc/bcc-0.23.0-r3.ebuild @@ -0,0 +1,128 @@ +# 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} ) +LLVM_MAX_SLOT=13 + +inherit cmake eapi8-dosym 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} )" +# tests need root access +RESTRICT="test" + +RDEPEND=" + >=dev-libs/elfutils-0.166:= + >=dev-libs/libbpf-0.5.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.14.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="$(pkg-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 tool name + for tool in "${ED}"/usr/share/bcc/tools/*; do + [[ ! -x ${tool} && ! -L ${tool} || -d ${tool} ]] && continue + name=${tool##*/} + dosym8 -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.23.0-man-compress.patch b/dev-util/bcc/files/bcc-0.23.0-man-compress.patch new file mode 100644 index 000000000000..a7164e72b602 --- /dev/null +++ b/dev-util/bcc/files/bcc-0.23.0-man-compress.patch @@ -0,0 +1,18 @@ +diff --git a/man/man8/CMakeLists.txt b/man/man8/CMakeLists.txt +index 718c7006..3fb623ff 100644 +--- a/man/man8/CMakeLists.txt ++++ b/man/man8/CMakeLists.txt +@@ -1,12 +1,4 @@ + find_program(GZIP gzip) + file(GLOB FILES *.8) +-set(GZFILES "") +-foreach(FIL ${FILES}) +- get_filename_component(NAME ${FIL} NAME) +- add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.gz +- COMMAND ${GZIP} -c ${FIL} > ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.gz +- DEPENDS ${FIL}) +- list(APPEND GZFILES "${CMAKE_CURRENT_BINARY_DIR}/${NAME}.gz") +-endforeach() + add_custom_target(man ALL DEPENDS ${GZFILES}) +-install(FILES ${GZFILES} DESTINATION share/bcc/man/man8) ++install(FILES ${FILES} DESTINATION share/bcc/man/man8) |