summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.33.0.bb
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.33.0.bb')
-rw-r--r--dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.33.0.bb78
1 files changed, 78 insertions, 0 deletions
diff --git a/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.33.0.bb b/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.33.0.bb
new file mode 100644
index 0000000..7e5c870
--- /dev/null
+++ b/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.33.0.bb
@@ -0,0 +1,78 @@
1SUMMARY = "BPF Compiler Collection (BCC)"
2HOMEPAGE = "https://github.com/iovisor/bcc"
3LICENSE = "Apache-2.0"
4LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e"
5
6inherit cmake python3native manpages ptest
7
8DEPENDS += "bison-native \
9 flex-native \
10 zip-native \
11 flex \
12 elfutils \
13 clang \
14 libbpf \
15 python3-setuptools-native \
16 "
17
18RDEPENDS:${PN} += "bash python3 python3-core python3-setuptools xz"
19RDEPENDS:${PN}-ptest = "kernel-devsrc packagegroup-core-buildessential cmake python3 python3-netaddr python3-pyroute2"
20
21SRC_URI = "gitsm://github.com/iovisor/bcc;branch=master;protocol=https \
22 file://0001-CMakeLists.txt-override-the-PY_CMD_ESCAPED.patch \
23 file://0001-Vendor-just-enough-extra-headers-to-allow-libbpf-to-.patch \
24 file://0001-CMakeLists.txt-don-t-modify-.gitconfig-on-build-host.patch \
25 file://run-ptest \
26 file://ptest_wrapper.sh \
27 "
28
29SRCREV = "92e32ff8a06616779f3a3191b75da6881d59fd17"
30
31PV .= "+git"
32
33S = "${WORKDIR}/git"
34
35PACKAGECONFIG ??= "examples"
36PACKAGECONFIG:remove:libc-musl = "examples"
37
38PACKAGECONFIG[manpages] = "-DENABLE_MAN=ON,-DENABLE_MAN=OFF,"
39PACKAGECONFIG[examples] = "-DENABLE_EXAMPLES=ON,-DENABLE_EXAMPLES=OFF,"
40
41EXTRA_OECMAKE = " \
42 -DREVISION='${PV}' \
43 -DCMAKE_USE_LIBBPF_PACKAGE=ON \
44 -DENABLE_LLVM_SHARED=ON \
45 -DENABLE_CLANG_JIT=ON \
46 -DPY_SKIP_DEB_LAYOUT=ON \
47 -DPYTHON_CMD=${PYTHON} \
48 -DPYTHON_FLAGS=--install-lib=${PYTHON_SITEPACKAGES_DIR} \
49"
50
51do_install:append() {
52 sed -e 's@#!/usr/bin/env python@#!/usr/bin/env python3@g' \
53 -i $(find ${D}${datadir}/${PN} -type f)
54 sed -e 's@#!/usr/bin/python.*@#!/usr/bin/env python3@g' \
55 -i $(find ${D}${datadir}/${PN} -type f)
56 rm -rf ${D}${datadir}/bcc/examples/lua
57}
58
59do_install_ptest() {
60 install -d ${D}${PTEST_PATH}/tests/cc
61 install ${B}/tests/cc/test_libbcc_no_libbpf ${B}/tests/cc/libusdt_test_lib.so ${D}${PTEST_PATH}/tests/cc
62 cp -rf ${S}/tests/python ${D}${PTEST_PATH}/tests/python
63 install ${UNPACKDIR}/ptest_wrapper.sh ${D}${PTEST_PATH}/tests
64 install ${S}/examples/networking/simulation.py ${D}${PTEST_PATH}/tests/python
65}
66
67FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}"
68FILES:${PN}-doc += "${datadir}/${PN}/man"
69
70COMPATIBLE_HOST = "(x86_64.*|aarch64.*|powerpc64.*|riscv64.*)-linux"
71
72# WARNING: bcc-0.30.0+git-r0 do_package_qa: QA Issue: File /usr/lib/bcc/ptest/tests/cc/test_libbcc_no_libbpf in package bcc-ptest contains reference to TMPDIR [buildpaths]
73# this one is difficult to resolve, because the tests use CMAKE_CURRENT_BINARY_DIR directly in .cc e.g.:
74# https://github.com/iovisor/bcc/commit/7271bfc946a19413761be2e3c60c48bf72c5eea1#diff-233a0bfa490f3d7466c49935b64c86dd93956bbc0461f5af703b344cf6601461
75# we would probably need to use separate variable for "runtime" path for test assets from the standard CMAKE_CURRENT_BINARY_DIR variable or use relative
76# path from the test binary
77WARN_QA:append = "${@bb.utils.contains('PTEST_ENABLED', '1', ' buildpaths', '', d)}"
78ERROR_QA:remove = "${@bb.utils.contains('PTEST_ENABLED', '1', 'buildpaths', '', d)}"