From f76a6db1149842ee74de71323261c46470436239 Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Fri, 20 Mar 2020 01:21:29 +0800 Subject: bcc: include only when oe layer is available Move bcc to dynamic-layers/openembedded-layer since it depends on luajit. Signed-off-by: Anuj Mittal --- ...eLists.txt-Remove-check-for-host-etc-debi.patch | 40 ++++++++++++++++++++ .../recipes-devtools/bcc/bcc_0.13.0.bb | 44 ++++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-python-CMakeLists.txt-Remove-check-for-host-etc-debi.patch create mode 100644 dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.13.0.bb (limited to 'dynamic-layers') diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-python-CMakeLists.txt-Remove-check-for-host-etc-debi.patch b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-python-CMakeLists.txt-Remove-check-for-host-etc-debi.patch new file mode 100644 index 0000000..4d71b15 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-python-CMakeLists.txt-Remove-check-for-host-etc-debi.patch @@ -0,0 +1,40 @@ +From cb3f032b55b32c50201862b26c76ea18ad37cb39 Mon Sep 17 00:00:00 2001 +From: Ovidiu Panait +Date: Thu, 30 Jan 2020 14:19:33 +0200 +Subject: [PATCH] python/CMakeLists.txt: Remove check for host + /etc/debian_version + +Fix the following error that occurs during do_install when using the native +version of python3: +usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] + or: setup.py --help [cmd1 cmd2 ...] + or: setup.py --help-commands + or: setup.py cmd --help + +error: option --install-layout not recognized + +Upstream-status: Innapropriate [oe-specific] + +Signed-off-by: Ovidiu Panait +--- + src/python/CMakeLists.txt | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt +index fa602397..797e0d14 100644 +--- a/src/python/CMakeLists.txt ++++ b/src/python/CMakeLists.txt +@@ -5,10 +5,6 @@ if(NOT PYTHON_CMD) + set(PYTHON_CMD "python") + endif() + +-if(EXISTS "/etc/debian_version") +- set(PYTHON_FLAGS "${PYTHON_FLAGS} --install-layout deb") +-endif() +- + file(GLOB_RECURSE PYTHON_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/*.py) + file(GLOB_RECURSE PYTHON_INCLUDES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} +-- +2.17.1 + diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.13.0.bb b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.13.0.bb new file mode 100644 index 0000000..115084e --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.13.0.bb @@ -0,0 +1,44 @@ +SUMMARY = "BPF Compiler Collection (BCC)" +HOMEPAGE = "https://github.com/iovisor/bcc" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e" + +inherit cmake python3native manpages + +DEPENDS += "bison-native \ + flex-native \ + elfutils \ + luajit \ + clang \ + " + +RDEPENDS_${PN} += "bash python3 python3-core" + +SRC_URI = "gitsm://github.com/iovisor/bcc \ + file://0001-python-CMakeLists.txt-Remove-check-for-host-etc-debi.patch \ + " + +SRCREV = "942227484d3207f6a42103674001ef01fb5335a0" + +S = "${WORKDIR}/git" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[manpages] = "-DENABLE_MAN=ON,-DENABLE_MAN=OFF," + +EXTRA_OECMAKE = " \ + -DENABLE_LLVM_SHARED=ON \ + -DENABLE_CLANG_JIT=ON \ + -DLLVM_PACKAGE_VERSION=${LLVMVERSION} \ + -DPYTHON_CMD=${PYTHON} \ + -DPYTHON_FLAGS=--install-lib=${PYTHON_SITEPACKAGES_DIR} \ +" + +do_install_append() { + sed -e 's@#!/usr/bin/python@#!/usr/bin/env python3@g' \ + -i $(find ${D}${datadir}/${PN} -type f) +} + +FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}" +FILES_${PN}-doc += "${datadir}/${PN}/man" + +COMPATIBLE_HOST = "(x86_64.*|aarch64.*|powerpc64.*)-linux" -- cgit v1.2.3-54-g00ecf