<commit_before>DESCRIPTION = "NVIDIA Tegra Multimedia API sample programs"

require recipes-multimedia/argus/tegra-mmapi-${PV}.inc

LICENSE = "Proprietary & BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=2cc00be68c1227a7c42ff3620ef75d05"

SRC_URI += "\
    file://0001-include-fix-jpeglib-header-inclusion.patch \
    file://0002-tools-update-GetPixel.py-to-Python-3.patch \
    file://0003-samples-classes-fix-a-data-race-in-shutting-down-deq.patch \
    file://0004-samples-support-tegra_udrm-in-NvDrmRenderer.patch \
    file://0005-Remove-DO-NOT-USE-declarations-from-v4l2_nv_extensio.patch \
    file://0006-samples-Rework-makefiles-and-rules.patch \
    file://0007-trt_inference-use-smart-pointers-during-model-conver.patch \
    file://0008-frontend-add-option-to-set-timeout.patch \
    file://0009-camera_v4l2_cuda-add-option-for-setting-max-frame-co.patch \
"

DEPENDS = "libdrm tegra-mmapi tegra-libraries virtual/egl virtual/libgles1 virtual/libgles2 jpeg expat gstreamer1.0 glib-2.0 libv4l pango"

inherit pkgconfig cuda python3native features_check

PACKAGECONFIG ??= ""
PACKAGECONFIG[objdetect] = "HAVE_OPENCV=1 HAVE_TENSORRT=1,,tensorrt opencv"

REQUIRED_DISTRO_FEATURES = "x11"

CXXFLAGS += "${CUDA_CXXFLAGS}"
export NVCC = "nvcc"
export GENCODE_FLAGS = "${CUDA_NVCC_ARG_FLAGS}"
EXTRA_OEMAKE = 'VERBOSE=1 ${PACKAGECONFIG_CONFARGS} NVCCFLAGS="--shared -ccbin ${CUDAHOSTCXX} ${@cuda_extract_compiler('CXX', d)[1]}"'

do_delete_headers() {
    rm -rf ${S}/include/libjpeg-8b ${S}/include/nvbuf_utils.h
}

addtask delete_headers before do_patch after do_unpack

do_compile() {
    oe_runmake all
}<commit_msg>tegra-mmapi-samples: add tensorrt-core and tensorrt-plugins in the PACKAGECONFIG list<commit_after>DESCRIPTION = "NVIDIA Tegra Multimedia API sample programs"

require recipes-multimedia/argus/tegra-mmapi-${PV}.inc

LICENSE = "Proprietary & BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=2cc00be68c1227a7c42ff3620ef75d05"

SRC_URI += "\
    file://0001-include-fix-jpeglib-header-inclusion.patch \
    file://0002-tools-update-GetPixel.py-to-Python-3.patch \
    file://0003-samples-classes-fix-a-data-race-in-shutting-down-deq.patch \
    file://0004-samples-support-tegra_udrm-in-NvDrmRenderer.patch \
    file://0005-Remove-DO-NOT-USE-declarations-from-v4l2_nv_extensio.patch \
    file://0006-samples-Rework-makefiles-and-rules.patch \
    file://0007-trt_inference-use-smart-pointers-during-model-conver.patch \
    file://0008-frontend-add-option-to-set-timeout.patch \
    file://0009-camera_v4l2_cuda-add-option-for-setting-max-frame-co.patch \
"

DEPENDS = "libdrm tegra-mmapi tegra-libraries virtual/egl virtual/libgles1 virtual/libgles2 jpeg expat gstreamer1.0 glib-2.0 libv4l pango"

inherit pkgconfig cuda python3native features_check

PACKAGECONFIG ??= ""
PACKAGECONFIG[objdetect] = "HAVE_OPENCV=1 HAVE_TENSORRT=1,,tensorrt-core tensorrt-plugins opencv"

REQUIRED_DISTRO_FEATURES = "x11"

CXXFLAGS += "${CUDA_CXXFLAGS}"
export NVCC = "nvcc"
export GENCODE_FLAGS = "${CUDA_NVCC_ARG_FLAGS}"
EXTRA_OEMAKE = 'VERBOSE=1 ${PACKAGECONFIG_CONFARGS} NVCCFLAGS="--shared -ccbin ${CUDAHOSTCXX} ${@cuda_extract_compiler('CXX', d)[1]}"'

do_delete_headers() {
    rm -rf ${S}/include/libjpeg-8b ${S}/include/nvbuf_utils.h
}

addtask delete_headers before do_patch after do_unpack

do_compile() {
    oe_runmake all
}
{'fraction_non_alphanumeric': 0.13947210557888423, 'fraction_numerical': 0.04619076184763048, 'mean_word_length': 4.691126279863481, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6884908', 'n_tokens_mistral': 1394, 'n_tokens_neox': 1295, 'n_words': 167}