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