Skip to contentSkip to conversation

opencv: Upgrade to 4.5.1

PATCH New Khem Raj 1 participant 1 message Mar 3, 2021

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH v2 1/1 opencv: Upgrade to 4.5.1

Drop upstreamed patch
Add patches to support gcc 11 while here

Cc Jose Quaresma <[email protected]>

---
v2: Also use 4.5.1 release for contrib repo too
Add patches for gcc 11 fixes

 .../opencv/0001-Add-missing-include.patch     | 28 +++++++++++++++++++
 ...building-opencv-using-gcc-11.x-19244.patch | 28 +++++++++++++++++++
 ...gits-needs-opencv_dnn-module-to-buil.patch | 28 -------------------
 .../{opencv_4.5.0.bb => opencv_4.5.1.bb}      |  7 +++--
 4 files changed, 60 insertions(+), 31 deletions(-)
 create mode 100644 meta-oe/recipes-support/opencv/opencv/0001-Add-missing-include.patch
 create mode 100644 meta-oe/recipes-support/opencv/opencv/0001-Fix-building-opencv-using-gcc-11.x-19244.patch
 delete mode 100644 meta-oe/recipes-support/opencv/opencv/0001-samples-cmake-digits-needs-opencv_dnn-module-to-buil.patch
 rename meta-oe/recipes-support/opencv/{opencv_4.5.0.bb => opencv_4.5.1.bb} (97%)
meta-oe/recipes-support/opencv/opencv/0001-Add-missing-include.patch new file +28 -0
new file mode 100644
index 0000000000..432f3c83ee
@@ -0,0 +1,28 @@
+From 4d984c65384e7d1f409f7e4cc56548a0924b09aa Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 2 Mar 2021 21:53:21 -0800
+Subject: [PATCH] Add missing include
+
+this is highlighted by gcc-11
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ modules/gapi/test/gapi_async_test.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/modules/gapi/test/gapi_async_test.cpp b/modules/gapi/test/gapi_async_test.cpp
+index 66b8be4dd3..aa0c9c7cfb 100644
+--- a/modules/gapi/test/gapi_async_test.cpp
++++ b/modules/gapi/test/gapi_async_test.cpp
+@@ -13,6 +13,7 @@
+ 
+ #include <condition_variable>
+ #include <stdexcept>
++#include <thread>
+ 
+ namespace opencv_test
+ {
+-- 
+2.30.1
+
meta-oe/recipes-support/opencv/opencv/0001-Fix-building-opencv-using-gcc-11.x-19244.patch new file +28 -0
new file mode 100644
index 0000000000..ce6499bfce
@@ -0,0 +1,28 @@
+From 67e1a5400383543b28fc69eb09c9429cb9d8c026 Mon Sep 17 00:00:00 2001
+From: Your Name <[email protected]>
+Date: Sat, 2 Jan 2021 17:43:11 +0000
+Subject: [PATCH] Fix building opencv using gcc 11.x #19244
+
+Add missing `#include <thread>` in modules/gapi/test/test_precomp.hpp
+
+Upstream-Status: Backport [https://github.com/opencv/opencv/pull/19247]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ modules/gapi/test/test_precomp.hpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/modules/gapi/test/test_precomp.hpp b/modules/gapi/test/test_precomp.hpp
+index 7b3c695443..e92b1d03bf 100644
+--- a/modules/gapi/test/test_precomp.hpp
++++ b/modules/gapi/test/test_precomp.hpp
+@@ -11,6 +11,7 @@
+ #define __OPENCV_GAPI_TEST_PRECOMP_HPP__
+ 
+ #include <cstdint>
++#include <thread>
+ #include <vector>
+ 
+ #include <opencv2/ts.hpp>
+-- 
+2.30.1
+
meta-oe/recipes-support/opencv/opencv/0001-samples-cmake-digits-needs-opencv_dnn-module-to-buil.patch deleted +0 -28
deleted file mode 100644
index 022680331a..0000000000
@@ -1,28 +0,0 @@
-From 114af1ca23ff9bf2e521b2969e343e74cdd8eac1 Mon Sep 17 00:00:00 2001
-From: Jose Quaresma <[email protected]>
-Date: Sun, 1 Nov 2020 12:29:56 +0000
-Subject: [PATCH] samples: cmake: digits needs opencv_dnn module to build
-
-Intrudeced in commit 397ba2d9aafb5312e777ce2f886d7b568109e931:
-add OpenCV sample for digit and text recongnition, and provide multiple OCR models.
-https://github.com/opencv/opencv/commit/397ba2d9aafb5312e777ce2f886d7b568109e931
-
-Upstream-Status: Backport [https://github.com/opencv/opencv/commit/79a82013ad2af04269891ce15281c9fdc31d3f66]
-
-Signed-off-by: Jose Quaresma <[email protected]>
----
- samples/cpp/CMakeLists.txt | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/samples/cpp/CMakeLists.txt b/samples/cpp/CMakeLists.txt
-index 617629df2e..14ab6141df 100644
---- a/samples/cpp/CMakeLists.txt
-+++ b/samples/cpp/CMakeLists.txt
-@@ -14,6 +14,7 @@ set(OPENCV_CPP_SAMPLES_REQUIRED_DEPS
-   opencv_features2d
-   opencv_calib3d
-   opencv_stitching
-+  opencv_dnn
-   ${OPENCV_MODULES_PUBLIC}
-   ${OpenCV_LIB_COMPONENTS})
- ocv_check_dependencies(${OPENCV_CPP_SAMPLES_REQUIRED_DEPS})
meta-oe/recipes-support/opencv/opencv_4.5.1.bb renamed from meta-oe/recipes-support/opencv/opencv_4.5.0.bb +4 -3
similarity index 97%
rename from meta-oe/recipes-support/opencv/opencv_4.5.0.bb
rename to meta-oe/recipes-support/opencv/opencv_4.5.1.bb
index 5263ffc03b..a595e788a2 100644
@@ -10,8 +10,8 @@ ARM_INSTRUCTION_SET_armv5 = "arm"
 
 DEPENDS = "libtool swig-native bzip2 zlib glib-2.0 libwebp"
 
-SRCREV_opencv = "d5fd2f0155ffad366f9ac912dfd6d189a7a6a98e"
-SRCREV_contrib = "37315babf9984a5b6aa981644a20dd8df1a5ff02"
+SRCREV_opencv = "1363496c1106606684d40447f5d1149b2c66a9f8"
+SRCREV_contrib = "b91a781cbc1285d441aa682926d93d8c23678b0b"
 SRCREV_ipp = "a56b6ac6f030c312b2dce17430eef13aed9af274"
 SRCREV_boostdesc = "34e4206aef44d50e6bbcd0ab06354b52e7466d26"
 SRCREV_vgg = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d"
@@ -49,7 +49,8 @@ SRC_URI = "git://github.com/opencv/opencv.git;name=opencv \
            file://0001-Dont-use-isystem.patch \
            file://download.patch \
            file://0001-Make-ts-module-external.patch \
-           file://0001-samples-cmake-digits-needs-opencv_dnn-module-to-buil.patch \
+           file://0001-Add-missing-include.patch \
+           file://0001-Fix-building-opencv-using-gcc-11.x-19244.patch \
            "
 SRC_URI_append_riscv64 = " file://0001-Use-Os-to-compile-tinyxml2.cpp.patch;patchdir=../contrib"
 
Signature · 1 line
2.30.1