summaryrefslogtreecommitdiff
path: root/dev-util/bcc
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-09-11 12:30:55 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-09-11 12:30:55 +0100
commit65a36438d5b824f80023c282dadc3fcd5736b526 (patch)
tree12aedb23736e7cceba662d217cdd7f0f2a2662ba /dev-util/bcc
parentadd278b9601ff9e4af091c91c851ee46a185be8f (diff)
gentoo auto-resync : 11:09:2024 - 12:30:54
Diffstat (limited to 'dev-util/bcc')
-rw-r--r--dev-util/bcc/Manifest5
-rw-r--r--dev-util/bcc/bcc-0.31.0.ebuild (renamed from dev-util/bcc/bcc-0.28.0-r1.ebuild)87
-rw-r--r--dev-util/bcc/files/bcc-0.31.0-dont-install-static-libs.patch13
3 files changed, 78 insertions, 27 deletions
diff --git a/dev-util/bcc/Manifest b/dev-util/bcc/Manifest
index 35c341d2e989..84d43051517a 100644
--- a/dev-util/bcc/Manifest
+++ b/dev-util/bcc/Manifest
@@ -1,12 +1,13 @@
AUX 60bcc.env 32 BLAKE2B dbbfb31408af7f3375b02981113d81d71075d339fded45db24b2168baa9f3ffe51205447c12eb9c3f06188fd32db591f21bce41edaff473a40b10320067447cd SHA512 a040c762df54a0218fb3fc4a6609b0e924003be689eaff629fabe69e1ed224fc38fdaac377624944718e5b174ac413edf3730cd0a228bd73bf8ef8678e97d73c
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.31.0-dont-install-static-libs.patch 867 BLAKE2B 4661b7524cf337bc3b64c0a2465945cf9896bb894383fd42afdcecd6f78878fa9904722f29c8ef1cc0c539f7bd9569c98ea6795defa79c35f74c9ba34030a0dc SHA512 e612a1ea7f97d147e2d8fd26e8929803d37164e209cbb45535742f99ff2f461bd8269ea8983701d7a98287338984a097d371098fdb83e693ac89663f5dcfcaa5
AUX bcc-0.9.0-no-luajit-automagic-dep.patch 463 BLAKE2B 286ed298055cbdb22d9c3f3f064c77da685cf75cc8c0ab0cad4d4b473f0eac0b1533ca8eb7e6159108d184d16db7a264b0ea9d30ccdc3d988d88bab28be7310d SHA512 6e5c20de22547410ffa566cb8226a47ee0e8c91183bc5b70eb22637a08fe55cfc96fde169ef3ab8d6e8d7c9e356c35e61b164b3ad675835d3ea8d5239a448979
-DIST bcc-0.28.0.tar.gz 6148954 BLAKE2B cfd3c8d63128e050512462449ff7d467f8f809c239ac01ae8e75365e89116ec351641a68682d23472aa3b4e265547bb20ca5572084c532a40ccd3131edf255a2 SHA512 792ce93dba64b1f87390b2602dcaeba04ac8b2863652b06eb9a907b93bc6137a944b856cc6fa9c7a38671c89814740967561ca4f3b29c267babca7dc5e78aa02
DIST bcc-0.29.1.tar.gz 6778304 BLAKE2B 23df483df59ef7d66117b15628299a32155136aa5254edbf76f7507a972f3ebcba1d4b2aa83c41e8f061eeeb96812f522c34fed27e9a37e5f4ad3478c7cde88f SHA512 9e60130ea602e19e6c6f88a8c17023cea5daf4c5bcc7af8816e9f5c662341136eb449a3fdf870ffad215495ac3bf895115c0d968d92ce79ebe2899b3e2464d24
DIST bcc-0.30.0.tar.gz 6797246 BLAKE2B 517f4fcce8bcaf4c8c17075f9a906b452ee14a0c46fa500c301521fe46d854fcf4f632e741b34168dfeb819d9b0d64b967e716fa6222ba7dcaeddb03570985e6 SHA512 70478ca8c18e7f106c462513ca9af46f49b4ebcca6380a9393208fca88f83895a7396f918bf5d01dce1bc4a876bccb9b95aa56d426e55d384cf11c9baaa6a89b
-EBUILD bcc-0.28.0-r1.ebuild 3077 BLAKE2B 705569eaa9955df0c937fb91e16bf0581efa07f75c320998b0e77965be0d44862c79a858eb1a8741ecc80aede9f628896d60a39562dabb850eeb3d7a59422597 SHA512 6b41066299ee4b0e38688aad3a471df90aef356320e478d150ee5d0e5ea35fdeff601fa68f91f0b14c3b876aac43afd86e6a4269b8eff6cd39b4ecd6acdfa939
+DIST bcc-0.31.0.tar.gz 6807504 BLAKE2B 75739914a18a7952bbefbed6f55b88d3be4f0483d2fd74bf7d6f7a6491d659ab893e7bd6b5e74c7b2239d6a2a9db04522487e3b36e7ddf65b1cc2d8712f786a8 SHA512 a1fe855c316d0508814dc02382b13897ff565bee52de0fc9d7521eabd304227e41bf7d322b10ab29fd5b13aeac85cc75ee76ac348cf1f4bb6499b8853bac10ab
EBUILD bcc-0.29.1-r1.ebuild 3076 BLAKE2B 336b061630c512e338f92f29cd2cb83b8445436fcd31ae75008f38a989481725b589d185173ced2ba1e86d75017827a8d4619cd53ff59e45280cab67cb733d6d SHA512 544bf5ec686458b51a2e9dbc18ffb10e08d33c1626cee2698c395fa51b283a0e069fefb94dbb1f15a61406fd515a419024811a8f0de7adef4448281752cc09cc
EBUILD bcc-0.29.1-r2.ebuild 3214 BLAKE2B 2bd87d02bf6a10f467971dd38ce76d83705664026d8b716c36b3ad03f5fa9263aaeef5df0653a661420620b16831c12cc8fce62148469d666d938fa16ed3316b SHA512 a836d324e5a5da246facc5d35546c719e23b0ed0eb1588252e49a146a4b62e83925ef18d7c6a6ceba2327c58fda471f02a615c560978a43c20816b1f3cfcb8a5
EBUILD bcc-0.30.0-r1.ebuild 3099 BLAKE2B 81fe5952644ea5393523b9652e4e68af72ce496d4ccd6b9c3fdef15a5125dae89619c7c90469b0b5118d5f581b26ebc4fcc64470309495effbeb6bf144ac093e SHA512 98eeb13444dbbe044915fc61d1c3c955f338499e8bdb8ad1ec9229213c14a6783b856b49f7a36c6db30667d882fca07a9221ed25df82eb27e5773102da054724
+EBUILD bcc-0.31.0.ebuild 4056 BLAKE2B 3b3b4bf9b7dbda9576774404297e1a6385a71ac6f55a502946e231ad951d86cd621a2753911244ad8f62f870626e36261a3fa092db5bc3a709799939c71f93d5 SHA512 058c4d1eb7a982b5d41a3f1ba140243a4cf0941f2f1184a2fde205b024fd1195607efddd875c8168788027bc09e6ddfaf524976b2cfe3adf069a5e022f0ec12e
MISC metadata.xml 419 BLAKE2B 8b46153f6ab2d6959a767f105a9e33109f705bf879bd4d6708eb4a85e310140d8f810569bf3e37f89bd5a07758de7653697214643b606dc314009e8b8db709ac SHA512 3036d51a8ff5c5adc507387aad252ab7a90c341c5f04c626158353d938992e78c6b5e344354220141979f91522e0204e388d47fd0ccf91415634f6cde646a0c3
diff --git a/dev-util/bcc/bcc-0.28.0-r1.ebuild b/dev-util/bcc/bcc-0.31.0.ebuild
index 003d3e90c761..274d6f9b7d3a 100644
--- a/dev-util/bcc/bcc-0.28.0-r1.ebuild
+++ b/dev-util/bcc/bcc-0.31.0.ebuild
@@ -1,13 +1,15 @@
-# Copyright 1999-2023 Gentoo Authors
+# 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=17
+DISTUTILS_OPTIONAL=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..13} )
+LLVM_COMPAT=( {15..18} )
-inherit cmake linux-info llvm lua-single python-r1 toolchain-funcs
+inherit cmake linux-info llvm-r1 lua-single distutils-r1 toolchain-funcs
DESCRIPTION="Tools for BPF-based Linux IO analysis, networking, monitoring, and more"
HOMEPAGE="https://iovisor.github.io/bcc/"
@@ -16,11 +18,11 @@ 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"
+IUSE="+lua +python static-libs test"
REQUIRED_USE="
${PYTHON_REQUIRED_USE}
- lua? ( ${LUA_REQUIRED_USE} )
+ lua? ( python ${LUA_REQUIRED_USE} )
"
# tests need root access
@@ -28,11 +30,13 @@ RESTRICT="test"
RDEPEND="
>=dev-libs/elfutils-0.166:=
- >=dev-libs/libbpf-1.2.0:=[static-libs(-)]
+ >=dev-libs/libbpf-1.2.0:=
sys-kernel/linux-headers
- <sys-devel/clang-$((${LLVM_MAX_SLOT} + 1)):=
- <sys-devel/llvm-$((${LLVM_MAX_SLOT} + 1)):=[llvm_targets_BPF(+)]
- ${PYTHON_DEPS}
+ $(llvm_gen_dep '
+ sys-devel/clang:${LLVM_SLOT}=
+ sys-devel/llvm:${LLVM_SLOT}=
+ ')
+ python? ( ${PYTHON_DEPS} )
lua? ( ${LUA_DEPS} )
"
DEPEND="
@@ -49,6 +53,7 @@ DEPEND="
BDEPEND="
app-arch/zip
virtual/pkgconfig
+ python? ( ${DISTUTILS_DEPS} )
"
PATCHES=(
@@ -66,8 +71,22 @@ pkg_pretend() {
}
pkg_setup() {
- llvm_pkg_setup
- python_setup
+ llvm-r1_pkg_setup
+ use python && python_setup
+}
+
+bcc_distutils_phase() {
+ if use python; then
+ local python_phase_func="distutils-r1_${EBUILD_PHASE_FUNC}"
+
+ if declare -f "${python_phase_func}" > /dev/null; then
+ pushd "${S}/src/python" > /dev/null || die
+ MY_S="${S}" S="${S}/src/python" "${python_phase_func}"
+ popd > /dev/null || die
+ else
+ die "Called ${FUNCNAME[0]} called in ${EBUILD_PHASE_FUNC}, but ${python_phase_func} doesn't exist"
+ fi
+ fi
}
src_prepare() {
@@ -80,28 +99,32 @@ src_prepare() {
# 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
+ mv "${script}" "tools/old/old-${script##*/}" || die
done
- cmake_src_prepare
-}
+ use static-libs || PATCHES+=( "${FILESDIR}/bcc-0.31.0-dont-install-static-libs.patch" )
-python_add_impl() {
- bcc_python_impls+="${EPYTHON};"
+ # use distutils-r1 eclass funcs rather than letting upstream handle python
+ printf '\n' > src/python/CMakeLists.txt || die
+
+ if use python; then
+ for python_file in $(find "${S}/src/python" -name '*.py.in' || die); do
+ sed "s:@REVISION@:${PV%%_*}:" "${python_file}" > "${python_file%.in}" || die
+ done
+ fi
+
+ cmake_src_prepare
+ bcc_distutils_phase
}
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
@@ -109,13 +132,27 @@ src_configure() {
fi
cmake_src_configure
+ bcc_distutils_phase
+}
+
+src_compile() {
+ cmake_src_compile
+ bcc_distutils_phase
+}
+
+python_install() {
+ distutils-r1_python_install
+
+ local tool
+ for tool in $(grep -Elr '#!/usr/bin/(env |)python' "${MY_S}/tools"); do
+ local tool_name="${tool##*/}"
+ python_newscript "${tool}" "${tool_name%.py}"
+ done
}
src_install() {
cmake_src_install
-
- python_replicate_script $(grep -Flr '#!/usr/bin/python' "${ED}/usr/share/bcc/tools")
- python_foreach_impl python_optimize
+ bcc_distutils_phase
newenvd "${FILESDIR}"/60bcc.env 60bcc.env
local -A rename_tools=(
diff --git a/dev-util/bcc/files/bcc-0.31.0-dont-install-static-libs.patch b/dev-util/bcc/files/bcc-0.31.0-dont-install-static-libs.patch
new file mode 100644
index 000000000000..b600f128ebb0
--- /dev/null
+++ b/dev-util/bcc/files/bcc-0.31.0-dont-install-static-libs.patch
@@ -0,0 +1,13 @@
+diff --git a/src/cc/CMakeLists.txt b/src/cc/CMakeLists.txt
+index 104eff0e..e34b911a 100644
+--- a/src/cc/CMakeLists.txt
++++ b/src/cc/CMakeLists.txt
+@@ -179,7 +179,7 @@ target_link_libraries(bcc-shared ${bcc_common_libs_for_s})
+ target_link_libraries(bcc-static ${bcc_common_libs_for_a} bcc-loader-static)
+ set(bcc-lua-static ${bcc-lua-static} ${bcc_common_libs_for_lua})
+
+-install(TARGETS bcc-shared bcc-static bcc-loader-static bpf-static LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
++install(TARGETS bcc-shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ install(FILES ${bcc_table_headers} DESTINATION include/bcc)
+ install(FILES ${bcc_api_headers} DESTINATION include/bcc)
+ install(DIRECTORY ${libbpf_uapi} DESTINATION include/bcc/compat/linux FILES_MATCHING PATTERN "*.h")