diff options
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.bb | 74 |
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 @@ | |||
1 | SUMMARY = "BPF Compiler Collection (BCC)" | ||
2 | HOMEPAGE = "https://github.com/iovisor/bcc" | ||
3 | LICENSE = "Apache-2.0" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e" | ||
5 | |||
6 | inherit cmake python3native manpages ptest | ||
7 | |||
8 | DEPENDS += "bison-native \ | ||
9 | flex-native \ | ||
10 | zip-native \ | ||
11 | flex \ | ||
12 | elfutils \ | ||
13 | ${LUAJIT} \ | ||
14 | clang \ | ||
15 | libbpf \ | ||
16 | python3-setuptools-native \ | ||
17 | " | ||
18 | |||
19 | LUAJIT ?= "luajit" | ||
20 | LUAJIT:powerpc64le = "" | ||
21 | LUAJIT:powerpc64 = "" | ||
22 | LUAJIT:riscv64 = "" | ||
23 | |||
24 | RDEPENDS:${PN} += "bash python3 python3-core python3-setuptools xz" | ||
25 | RDEPENDS:${PN}-ptest = "cmake python3 python3-netaddr python3-pyroute2" | ||
26 | |||
27 | SRC_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 | |||
36 | SRCREV = "eb8ede2d70b17350757f2570ef76ea4c2e1dbff8" | ||
37 | |||
38 | S = "${WORKDIR}/git" | ||
39 | |||
40 | PACKAGECONFIG ??= "examples" | ||
41 | PACKAGECONFIG:remove:libc-musl = "examples" | ||
42 | |||
43 | PACKAGECONFIG[manpages] = "-DENABLE_MAN=ON,-DENABLE_MAN=OFF," | ||
44 | PACKAGECONFIG[examples] = "-DENABLE_EXAMPLES=ON,-DENABLE_EXAMPLES=OFF," | ||
45 | |||
46 | EXTRA_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 | |||
56 | do_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 | |||
63 | do_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 | |||
71 | FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}" | ||
72 | FILES:${PN}-doc += "${datadir}/${PN}/man" | ||
73 | |||
74 | COMPATIBLE_HOST = "(x86_64.*|aarch64.*|powerpc64.*|riscv64.*)-linux" | ||