summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.28.0.bb
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.28.0.bb')
-rw-r--r--dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.28.0.bb76
1 files changed, 76 insertions, 0 deletions
diff --git a/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.28.0.bb b/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.28.0.bb
new file mode 100644
index 0000000..105995d
--- /dev/null
+++ b/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.28.0.bb
@@ -0,0 +1,76 @@
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 ${LUAJIT} \
14 clang \
15 libbpf \
16 python3-setuptools-native \
17 "
18
19LUAJIT ?= "luajit"
20LUAJIT:powerpc64le = ""
21LUAJIT:powerpc64 = ""
22LUAJIT:riscv64 = ""
23
24RDEPENDS:${PN} += "bash python3 python3-core python3-setuptools xz"
25RDEPENDS:${PN}-ptest = "cmake python3 python3-distutils python3-netaddr python3-pyroute2"
26
27SRC_URI = "gitsm://github.com/iovisor/bcc;branch=master;protocol=https \
28 file://0001-python-CMakeLists.txt-Remove-check-for-host-etc-debi.patch \
29 file://0001-tools-trace.py-Fix-failing-to-exit.patch \
30 file://0001-CMakeLists.txt-override-the-PY_CMD_ESCAPED.patch \
31 file://0001-Vendor-just-enough-extra-headers-to-allow-libbpf-to-.patch \
32 file://0001-tests-cc-Use-c-14-standard.patch \
33 file://run-ptest \
34 file://ptest_wrapper.sh \
35 "
36
37SRCREV = "8422cd449ad2e60414a4508aa4a150a9db39c4a3"
38
39PV .= "+git${SRCPV}"
40
41S = "${WORKDIR}/git"
42
43PACKAGECONFIG ??= "examples"
44PACKAGECONFIG:remove:libc-musl = "examples"
45
46PACKAGECONFIG[manpages] = "-DENABLE_MAN=ON,-DENABLE_MAN=OFF,"
47PACKAGECONFIG[examples] = "-DENABLE_EXAMPLES=ON,-DENABLE_EXAMPLES=OFF,"
48
49EXTRA_OECMAKE = " \
50 -DCMAKE_USE_LIBBPF_PACKAGE=ON \
51 -DENABLE_LLVM_SHARED=ON \
52 -DENABLE_CLANG_JIT=ON \
53 -DLLVM_PACKAGE_VERSION=${LLVMVERSION} \
54 -DPYTHON_CMD=${PYTHON} \
55 -DPYTHON_FLAGS=--install-lib=${PYTHON_SITEPACKAGES_DIR} \
56"
57
58do_install:append() {
59 sed -e 's@#!/usr/bin/env python@#!/usr/bin/env python3@g' \
60 -i $(find ${D}${datadir}/${PN} -type f)
61 sed -e 's@#!/usr/bin/python.*@#!/usr/bin/env python3@g' \
62 -i $(find ${D}${datadir}/${PN} -type f)
63}
64
65do_install_ptest() {
66 install -d ${D}${PTEST_PATH}/tests/cc
67 install ${B}/tests/cc/test_libbcc_no_libbpf ${B}/tests/cc/libusdt_test_lib.so ${D}${PTEST_PATH}/tests/cc
68 cp -rf ${S}/tests/python ${D}${PTEST_PATH}/tests/python
69 install ${WORKDIR}/ptest_wrapper.sh ${D}${PTEST_PATH}/tests
70 install ${S}/examples/networking/simulation.py ${D}${PTEST_PATH}/tests/python
71}
72
73FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}"
74FILES:${PN}-doc += "${datadir}/${PN}/man"
75
76COMPATIBLE_HOST = "(x86_64.*|aarch64.*|powerpc64.*|riscv64.*)-linux"