From 5d25f9af8b16d110a721e1f366807cc71ff430a1 Mon Sep 17 00:00:00 2001 From: Tom Hochstein Date: Thu, 12 Jan 2023 11:19:33 -0700 Subject: opencv: Update copied recipe to latest Also fix the variable ordering for the SRC_URI overrides. Signed-off-by: Tom Hochstein (cherry picked from commit 3362cb2a0f753c9ba5284a69620628947c8c7daf) --- ...missing-header-for-LIBAVCODEC_VERSION_INT.patch | 26 ++++++++++++++++++++++ recipes-support/opencv/opencv_4.6.0.imx.bb | 14 ++++++------ 2 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 recipes-support/opencv/opencv/0001-Add-missing-header-for-LIBAVCODEC_VERSION_INT.patch diff --git a/recipes-support/opencv/opencv/0001-Add-missing-header-for-LIBAVCODEC_VERSION_INT.patch b/recipes-support/opencv/opencv/0001-Add-missing-header-for-LIBAVCODEC_VERSION_INT.patch new file mode 100644 index 00000000..59da6ab3 --- /dev/null +++ b/recipes-support/opencv/opencv/0001-Add-missing-header-for-LIBAVCODEC_VERSION_INT.patch @@ -0,0 +1,26 @@ +From d6bdd0a91eb0ed57688c0af5ba5088cf0afdc0a0 Mon Sep 17 00:00:00 2001 +From: Jochen Sprickerhof +Date: Mon, 8 Aug 2022 21:10:13 +0200 +Subject: [PATCH] Add missing header for LIBAVCODEC_VERSION_INT + +Upstream-Status: Backport [https://github.com/opencv/opencv/pull/22357] +Signed-off-by: Khem Raj +--- + modules/videoio/src/ffmpeg_codecs.hpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules/videoio/src/ffmpeg_codecs.hpp b/modules/videoio/src/ffmpeg_codecs.hpp +index 61788e0345..faad2596ed 100644 +--- a/modules/videoio/src/ffmpeg_codecs.hpp ++++ b/modules/videoio/src/ffmpeg_codecs.hpp +@@ -60,6 +60,7 @@ extern "C" { + #include + #endif + ++#include + #include + + #ifdef __cplusplus +-- +2.38.1 + diff --git a/recipes-support/opencv/opencv_4.6.0.imx.bb b/recipes-support/opencv/opencv_4.6.0.imx.bb index 54beed06..e3f03379 100644 --- a/recipes-support/opencv/opencv_4.6.0.imx.bb +++ b/recipes-support/opencv/opencv_4.6.0.imx.bb @@ -3,8 +3,7 @@ # recipe. The second section customizes the recipe for i.MX. ########## meta-openembedded copy ########### -# Upstream hash: 6b7cf95e75cbfc08cf1f6eddc7ce3f6a0a39edcf -# plus LICENSE_FLAGS_ACCEPTED fix +# Upstream hash: 72dc42966be7da07f9553f75b825123b81704f0b SUMMARY = "Opencv : The Open Computer Vision Library" HOMEPAGE = "http://opencv.org/" @@ -59,6 +58,7 @@ SRC_URI = "git://github.com/opencv/opencv.git;name=opencv;branch=master;protocol file://0001-Dont-use-isystem.patch \ file://download.patch \ file://0001-Make-ts-module-external.patch \ + file://0001-Add-missing-header-for-LIBAVCODEC_VERSION_INT.patch \ " SRC_URI:append:riscv64 = " file://0001-Use-Os-to-compile-tinyxml2.cpp.patch;patchdir=contrib" @@ -117,7 +117,7 @@ EXTRA_OECMAKE:remove:x86 = " -DENABLE_SSE41=1 -DENABLE_SSE42=1" PACKAGECONFIG ??= "gapi python3 eigen jpeg png tiff v4l libv4l gstreamer samples tbb gphoto2 \ ${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk", "", d)} \ - ${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "libav", "", d)}" + ${@bb.utils.contains_any("LICENSE_FLAGS_ACCEPTED", "commercial_ffmpeg commercial", "libav", "", d)}" # TBB does not build for powerpc so disable that package config PACKAGECONFIG:remove:powerpc = "tbb" @@ -257,19 +257,19 @@ SUMMARY = "Opencv : The Open Computer Vision Library, i.MX Fork" LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" # Replace the opencv URL with the fork -SRCREV_opencv = "d3440df40a6e90cd1d2a1b729bcbc16aa4d42f5d" -OPENCV_SRC ?= "git://github.com/nxp-imx/opencv-imx.git;protocol=https;branch=master" -SRCBRANCH = "4.6.0_imx" SRC_URI:remove = "git://github.com/opencv/opencv.git;name=opencv;branch=master;protocol=https" SRC_URI =+ "${OPENCV_SRC};branch=${SRCBRANCH};name=opencv" +OPENCV_SRC ?= "git://github.com/nxp-imx/opencv-imx.git;protocol=https;branch=master" +SRCBRANCH = "4.6.0_imx" +SRCREV_opencv = "d3440df40a6e90cd1d2a1b729bcbc16aa4d42f5d" # Add opencv_extra -SRCREV_extra = "936854e2b666853d6d0732a8eabc2d699f4fa3d8" SRC_URI += " \ git://github.com/opencv/opencv_extra.git;destsuffix=extra;name=extra;branch=master;protocol=https \ file://0001-Add-smaller-version-of-download_models.py.patch;patchdir=../extra \ " SRCREV_FORMAT:append = "_extra" +SRCREV_extra = "936854e2b666853d6d0732a8eabc2d699f4fa3d8" # Patch DNN example SRC_URI += " \ -- cgit v1.2.3-54-g00ecf