diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /external/meta-openembedded/meta-oe/recipes-support/opencv | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'external/meta-openembedded/meta-oe/recipes-support/opencv')
14 files changed, 238 insertions, 200 deletions
diff --git a/external/meta-openembedded/meta-oe/recipes-support/opencv/ade/0001-use-GNUInstallDirs-for-detecting-install-paths.patch b/external/meta-openembedded/meta-oe/recipes-support/opencv/ade/0001-use-GNUInstallDirs-for-detecting-install-paths.patch new file mode 100644 index 00000000..f038b0aa --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-support/opencv/ade/0001-use-GNUInstallDirs-for-detecting-install-paths.patch @@ -0,0 +1,39 @@ +From 67ccf77d97b76e8260c9d793ab172577e2393dbc Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 19 Dec 2019 21:33:46 -0800 +Subject: [PATCH] use GNUInstallDirs for detecting install paths + +This helps with multilib builds + +Upstream-Status: Submitted [https://github.com/opencv/ade/pull/19] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + sources/ade/CMakeLists.txt | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/sources/ade/CMakeLists.txt b/sources/ade/CMakeLists.txt +index 2d1dd20..46415d1 100644 +--- a/sources/ade/CMakeLists.txt ++++ b/sources/ade/CMakeLists.txt +@@ -47,12 +47,14 @@ if(BUILD_ADE_DOCUMENTATION) + VERBATIM) + endif() + ++include(GNUInstallDirs) ++ + install(TARGETS ade COMPONENT dev + EXPORT adeTargets +- ARCHIVE DESTINATION lib +- LIBRARY DESTINATION lib +- RUNTIME DESTINATION lib +- INCLUDES DESTINATION include) ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + + install(EXPORT adeTargets DESTINATION share/ade COMPONENT dev) + +-- +2.24.1 + diff --git a/external/meta-openembedded/meta-oe/recipes-support/opencv/ade_0.1.1f.bb b/external/meta-openembedded/meta-oe/recipes-support/opencv/ade_0.1.1f.bb new file mode 100644 index 00000000..38618021 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-support/opencv/ade_0.1.1f.bb @@ -0,0 +1,22 @@ +SUMMARY = "A graph construction, manipulation, and processing framework" +DESCRIPTION = "ADE Framework is a graph construction, manipulation, \ +and processing framework. ADE Framework is suitable for \ +organizing data flow processing and execution." +HOMEPAGE = "https://github.com/opencv/ade" + +SRC_URI = "git://github.com/opencv/ade.git \ + file://0001-use-GNUInstallDirs-for-detecting-install-paths.patch \ + " + +SRCREV = "58b2595a1a95cc807be8bf6222f266a9a1f393a9" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +inherit cmake + +S = "${WORKDIR}/git" + +EXTRA_OECMAKE += " -DCMAKE_BUILD_TYPE=Release" + +FILES_${PN}-dev += "${datadir}/${BPN}/*.cmake" diff --git a/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch b/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch index 4d76ad40..5f909c1a 100644 --- a/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch +++ b/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch @@ -1,16 +1,17 @@ -From 4801a057730632225337d7f6d26b9335e6b9b078 Mon Sep 17 00:00:00 2001 +From 85b882b4ceb57fe6538f47af58d0a970923fde0e Mon Sep 17 00:00:00 2001 From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Date: Thu, 31 Mar 2016 00:20:15 +0200 Subject: [PATCH] 3rdparty/ippicv: Use pre-downloaded ipp Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com> + --- 3rdparty/ippicv/ippicv.cmake | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/3rdparty/ippicv/ippicv.cmake b/3rdparty/ippicv/ippicv.cmake -index d601da4bb..f6fc1098c 100644 +index ae8748c..305abdb 100644 --- a/3rdparty/ippicv/ippicv.cmake +++ b/3rdparty/ippicv/ippicv.cmake @@ -39,18 +39,5 @@ function(download_ippicv root_var) @@ -33,6 +34,3 @@ index d601da4bb..f6fc1098c 100644 - endif() + set(${root_var} "${THE_ROOT}/${OPENCV_ICV_PACKAGE_SUBDIR}" PARENT_SCOPE) endfunction() --- -2.13.4 - diff --git a/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0001-Add-missing-multi-line-separator.patch b/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0001-Add-missing-multi-line-separator.patch deleted file mode 100644 index 513597b8..00000000 --- a/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0001-Add-missing-multi-line-separator.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 60857229aab13ccc426572a43ab891409bb76ea4 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sun, 9 Sep 2018 22:52:55 -0700 -Subject: [PATCH] Add missing multi-line separator - -Otherwise this fails to build ( found on mips ) - -Fixes -contrib/modules/surface_matching/src/hash_murmur86.hpp:97:15: error: -expected constructor, destructor, or type conversion before '(' token - && defined(__GNUC__) && (__GNUC__>4 || (__GNUC__==4 && -__GNUC_MINOR__>=3)) - ^ - -Upstream-Status: Submitted [https://github.com/opencv/opencv_contrib/pull/1764] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - modules/surface_matching/src/hash_murmur86.hpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules/surface_matching/src/hash_murmur86.hpp b/modules/surface_matching/src/hash_murmur86.hpp -index 1edf6bf4..0477d37e 100644 ---- a/modules/surface_matching/src/hash_murmur86.hpp -+++ b/modules/surface_matching/src/hash_murmur86.hpp -@@ -93,7 +93,7 @@ void hashMurmurx86 ( const void * key, const int len, const uint seed, void * ou - /* Now find best way we can to READ_UINT32 */ - #ifndef WORDS_BIGENDIAN - # define READ_UINT32(ptr) (*((uint32_t*)(ptr))) --#elif defined(WORDS_BIGENDIAN) -+#elif defined(WORDS_BIGENDIAN) \ - && defined(__GNUC__) && (__GNUC__>4 || (__GNUC__==4 && __GNUC_MINOR__>=3)) - # define READ_UINT32(ptr) (__builtin_bswap32(*((uint32_t*)(ptr)))) - #endif --- -2.18.0 - diff --git a/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0001-Check-for-clang-before-using-isystem.patch b/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0001-Check-for-clang-before-using-isystem.patch deleted file mode 100644 index 319071a3..00000000 --- a/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0001-Check-for-clang-before-using-isystem.patch +++ /dev/null @@ -1,32 +0,0 @@ -From fa76d8646bb2b9b514728eeef41afed7c43a36f2 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 11 Sep 2018 18:18:33 -0700 -Subject: [PATCH] Check for clang before using -isystem - -When cross compiling with clang, the internal C++ headers are not found -when adding sysroot to -isystem, that is redundant anyway because it -will look for headers insider --sysroot path with same quality as it -would do with -isystem otherwise - -Upstream-Status: Submitted [https://github.com/opencv/opencv/pull/12504] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - cmake/OpenCVUtils.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake -index fae91c165f..60c20192dc 100644 ---- a/cmake/OpenCVUtils.cmake -+++ b/cmake/OpenCVUtils.cmake -@@ -259,7 +259,7 @@ function(ocv_include_directories) - ocv_is_opencv_directory(__is_opencv_dir "${dir}") - if(__is_opencv_dir) - list(APPEND __add_before "${dir}") -- elseif(CV_GCC AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0" AND -+ elseif(((CV_GCC AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0") OR CV_CLANG) AND - dir MATCHES "/usr/include$") - # workaround for GCC 6.x bug - else() --- -2.18.0 - diff --git a/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0001-Dont-use-isystem.patch b/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0001-Dont-use-isystem.patch index bf0b80a3..40d3f53e 100644 --- a/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0001-Dont-use-isystem.patch +++ b/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0001-Dont-use-isystem.patch @@ -1,4 +1,4 @@ -From 7144c44ec70dee73a628463b99ffeed74b1a8ef6 Mon Sep 17 00:00:00 2001 +From 9659f5a1e75fc29c9879c301767bba72ecf9042a Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Tue, 11 Sep 2018 00:21:18 -0700 Subject: [PATCH] Dont use isystem @@ -8,12 +8,13 @@ clang really does not like it Upstream-Status: Pending Signed-off-by: Khem Raj <raj.khem@gmail.com> + --- cmake/OpenCVPCHSupport.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/OpenCVPCHSupport.cmake b/cmake/OpenCVPCHSupport.cmake -index f9b1b48b65..fe27a136f5 100644 +index 59bc826..055dfce 100644 --- a/cmake/OpenCVPCHSupport.cmake +++ b/cmake/OpenCVPCHSupport.cmake @@ -18,6 +18,8 @@ IF(CV_GCC) @@ -25,6 +26,3 @@ index f9b1b48b65..fe27a136f5 100644 SET(_PCH_include_prefix "-I") SET(_PCH_isystem_prefix "-isystem") SET(_PCH_define_prefix "-D") --- -2.18.0 - diff --git a/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch b/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch index 63cb7f94..f8ccd1d5 100644 --- a/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch +++ b/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch @@ -1,19 +1,20 @@ -From 7d31f41d2a6759e244983504ce855fc32916b97a Mon Sep 17 00:00:00 2001 +From fe27d0e2341683606704115949d16250e4cacbfa Mon Sep 17 00:00:00 2001 From: Jason Wessel <jason.wessel@windriver.com> Date: Wed, 9 May 2018 13:33:59 -0700 Subject: [PATCH] Temporarliy work around deprecated ffmpeg RAW function compile failure until next uprev Signed-off-by: Jason Wessel <jason.wessel@windriver.com> + --- modules/videoio/src/cap_ffmpeg_impl.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/videoio/src/cap_ffmpeg_impl.hpp b/modules/videoio/src/cap_ffmpeg_impl.hpp -index 5a9b10f075..97c6b74b07 100644 +index 0d360ad..566df66 100644 --- a/modules/videoio/src/cap_ffmpeg_impl.hpp +++ b/modules/videoio/src/cap_ffmpeg_impl.hpp -@@ -667,6 +667,14 @@ struct ImplMutex::Impl +@@ -736,6 +736,14 @@ struct ImplMutex::Impl #endif @@ -28,6 +29,3 @@ index 5a9b10f075..97c6b74b07 100644 void ImplMutex::init() { impl = new Impl(); --- -2.11.0 - diff --git a/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0001-carotene-Replace-ipcp-unit-growth-with-ipa-cp-unit-g.patch b/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0001-carotene-Replace-ipcp-unit-growth-with-ipa-cp-unit-g.patch new file mode 100644 index 00000000..43d32fbc --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0001-carotene-Replace-ipcp-unit-growth-with-ipa-cp-unit-g.patch @@ -0,0 +1,55 @@ +From 1edc925ecd7fb54d2dc78452069084475fbe2a70 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 16 Jan 2020 08:52:00 -0800 +Subject: [PATCH] carotene: Replace ipcp-unit-growth with ipa-cp-unit-growth on gcc >= 10 + +gcc 10+ has renamed this option, therefore check for gcc version before +deciding which name to use for opt parameter + +Upstream-Status: Submitted [https://github.com/opencv/opencv/pull/16369] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + 3rdparty/carotene/CMakeLists.txt | 8 ++++++-- + 3rdparty/carotene/hal/CMakeLists.txt | 7 ++++++- + 2 files changed, 12 insertions(+), 3 deletions(-) + +diff --git a/3rdparty/carotene/CMakeLists.txt b/3rdparty/carotene/CMakeLists.txt +index bfa9368d79..1c43b85b28 100644 +--- a/3rdparty/carotene/CMakeLists.txt ++++ b/3rdparty/carotene/CMakeLists.txt +@@ -20,8 +20,12 @@ if(CMAKE_COMPILER_IS_GNUCC) + # - matchTemplate about 5-10% + # - goodFeaturesToTrack 10-20% + # - cornerHarris 30% for some cases +- +- set_source_files_properties(${carotene_sources} COMPILE_FLAGS "--param ipcp-unit-growth=100000 --param inline-unit-growth=100000 --param large-stack-frame-growth=5000") ++ set_source_files_properties(${carotene_sources} COMPILE_FLAGS "--param inline-unit-growth=100000 --param large-stack-frame-growth=5000") ++ if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "10.0.0") ++ set_source_files_properties(${carotene_sources} COMPILE_FLAGS "--param ipcp-unit-growth=100000 ${COMPILE_FLAGS}") ++ else() ++ set_source_files_properties(${carotene_sources} COMPILE_FLAGS "--param ipa-cp-unit-growth=100000 ${COMPILE_FLAGS}") ++ endif() + endif() + + add_library(carotene_objs OBJECT +diff --git a/3rdparty/carotene/hal/CMakeLists.txt b/3rdparty/carotene/hal/CMakeLists.txt +index c4b9acaedd..bbc5b11a80 100644 +--- a/3rdparty/carotene/hal/CMakeLists.txt ++++ b/3rdparty/carotene/hal/CMakeLists.txt +@@ -90,7 +90,12 @@ set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS ${carotene_defs}) + # matchTemplate about 5-10% + # goodFeaturesToTrack 10-20% + # cornerHarris 30% for some cases +- set_source_files_properties(impl.cpp $<TARGET_OBJECTS:carotene_objs> COMPILE_FLAGS "--param ipcp-unit-growth=100000 --param inline-unit-growth=100000 --param large-stack-frame-growth=5000") ++ set_source_files_properties(impl.cpp $<TARGET_OBJECTS:carotene_objs> COMPILE_FLAGS "--param inline-unit-growth=100000 --param large-stack-frame-growth=5000") ++ if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "10.0.0") ++ set_source_files_properties(impl.cpp $<TARGET_OBJECTS:carotene_objs> COMPILE_FLAGS "--param ipcp-unit-growth=100000 ${COMPILE_FLAGS}") ++ else() ++ set_source_files_properties(impl.cpp $<TARGET_OBJECTS:carotene_objs> COMPILE_FLAGS "--param ipa-cp-unit-growth=100000 ${COMPILE_FLAGS}") ++ endif() + # set_source_files_properties(impl.cpp $<TARGET_OBJECTS:carotene_objs> COMPILE_FLAGS "--param ipcp-unit-growth=100000 --param inline-unit-growth=100000 --param large-stack-frame-growth=5000") + endif() + +-- +2.25.0 + diff --git a/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0002-Make-opencv-ts-create-share-library-intead-of-static.patch b/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0002-Make-opencv-ts-create-share-library-intead-of-static.patch index a845505a..46198fb7 100644 --- a/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0002-Make-opencv-ts-create-share-library-intead-of-static.patch +++ b/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0002-Make-opencv-ts-create-share-library-intead-of-static.patch @@ -1,15 +1,16 @@ -From 350525293aef65490e80104ddd99e1b21c5d54b0 Mon Sep 17 00:00:00 2001 +From 46ffa1f8f443b71673774fcb864eb741bbc26200 Mon Sep 17 00:00:00 2001 From: Bian Naimeng <biannm@cn.fujitsu.com> Date: Wed, 19 Apr 2017 03:11:37 +0900 -Subject: [PATCH 2/3] Make opencv-ts create share library intead of static. +Subject: [PATCH] Make opencv-ts create share library intead of static. Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com> + --- modules/ts/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ts/CMakeLists.txt b/modules/ts/CMakeLists.txt -index f95bed079..ee67858df 100644 +index f95bed0..ee67858 100644 --- a/modules/ts/CMakeLists.txt +++ b/modules/ts/CMakeLists.txt @@ -4,7 +4,7 @@ if(NOT BUILD_opencv_ts AND NOT BUILD_TESTS AND NOT BUILD_PERF_TESTS) @@ -21,6 +22,3 @@ index f95bed079..ee67858df 100644 set(OPENCV_MODULE_IS_PART_OF_WORLD FALSE) if(WINRT) --- -2.13.4 - diff --git a/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0003-To-fix-errors-as-following.patch b/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0003-To-fix-errors-as-following.patch index 5270b8c9..336c2e08 100644 --- a/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0003-To-fix-errors-as-following.patch +++ b/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/0003-To-fix-errors-as-following.patch @@ -1,7 +1,7 @@ -From ace48a628dca34d742615598afeef42ed323a029 Mon Sep 17 00:00:00 2001 +From 867caccc358266f7021f076fc8c8e41bf048782c Mon Sep 17 00:00:00 2001 From: Huang Qiyu <huangqy.fnst@cn.fujitsu.com> Date: Fri, 19 May 2017 04:27:50 +0900 -Subject: [PATCH 3/3] To fix errors as following: +Subject: [PATCH] To fix errors as following: "test_main.cpp:45: undefined reference to `parseCustomOptions(int, char**)'" "perf_abs.cpp:13: undefined reference to `cvtest::param_seed'" @@ -13,17 +13,18 @@ Also add the visibility changes for certain OpenCL-related functions in ts module. Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com> + --- - modules/ts/include/opencv2/ts.hpp | 6 +++--- + modules/ts/include/opencv2/ts.hpp | 4 ++-- modules/ts/include/opencv2/ts/ocl_test.hpp | 2 +- modules/ts/include/opencv2/ts/ts_ext.hpp | 2 +- - 3 files changed, 5 insertions(+), 5 deletions(-) + 3 files changed, 4 insertions(+), 4 deletions(-) -Index: git/modules/ts/include/opencv2/ts.hpp -=================================================================== ---- git.orig/modules/ts/include/opencv2/ts.hpp -+++ git/modules/ts/include/opencv2/ts.hpp -@@ -608,7 +608,7 @@ protected: +diff --git a/modules/ts/include/opencv2/ts.hpp b/modules/ts/include/opencv2/ts.hpp +index b9d6b74..f1ee7ee 100644 +--- a/modules/ts/include/opencv2/ts.hpp ++++ b/modules/ts/include/opencv2/ts.hpp +@@ -622,7 +622,7 @@ protected: } }; @@ -32,7 +33,7 @@ Index: git/modules/ts/include/opencv2/ts.hpp struct DefaultRngAuto { -@@ -671,7 +671,7 @@ private: +@@ -685,7 +685,7 @@ private: #endif #endif @@ -41,10 +42,10 @@ Index: git/modules/ts/include/opencv2/ts.hpp #define CV_TEST_INIT0_NOOP (void)0 -Index: git/modules/ts/include/opencv2/ts/ocl_test.hpp -=================================================================== ---- git.orig/modules/ts/include/opencv2/ts/ocl_test.hpp -+++ git/modules/ts/include/opencv2/ts/ocl_test.hpp +diff --git a/modules/ts/include/opencv2/ts/ocl_test.hpp b/modules/ts/include/opencv2/ts/ocl_test.hpp +index 11572e9..438112e 100644 +--- a/modules/ts/include/opencv2/ts/ocl_test.hpp ++++ b/modules/ts/include/opencv2/ts/ocl_test.hpp @@ -82,7 +82,7 @@ inline UMat ToUMat(InputArray src) return dst; } @@ -54,10 +55,10 @@ Index: git/modules/ts/include/opencv2/ts/ocl_test.hpp #define MAX_VALUE 357 -Index: git/modules/ts/include/opencv2/ts/ts_ext.hpp -=================================================================== ---- git.orig/modules/ts/include/opencv2/ts/ts_ext.hpp -+++ git/modules/ts/include/opencv2/ts/ts_ext.hpp +diff --git a/modules/ts/include/opencv2/ts/ts_ext.hpp b/modules/ts/include/opencv2/ts/ts_ext.hpp +index b5cea3e..e5b0b4b 100644 +--- a/modules/ts/include/opencv2/ts/ts_ext.hpp ++++ b/modules/ts/include/opencv2/ts/ts_ext.hpp @@ -9,7 +9,7 @@ #define OPENCV_TS_EXT_HPP diff --git a/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/download.patch b/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/download.patch new file mode 100644 index 00000000..fa8db880 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/download.patch @@ -0,0 +1,32 @@ +This CMake module will download files during do_configure. This is bad as it +means we can't do offline builds. + +Add an option to disallow downloads by emitting a fatal error. + +Upstream-Status: Pending +Signed-off-by: Ross Burton <ross.burton@intel.com> + +diff --git a/cmake/OpenCVDownload.cmake b/cmake/OpenCVDownload.cmake +index cdc47ad2cb..74573f45a2 100644 +--- a/cmake/OpenCVDownload.cmake ++++ b/cmake/OpenCVDownload.cmake +@@ -14,6 +14,7 @@ + # RELATIVE_URL - if set, then URL is treated as a base, and FILENAME will be appended to it + # Note: uses OPENCV_DOWNLOAD_PATH folder as cache, default is <opencv>/.cache + ++set(OPENCV_ALLOW_DOWNLOADS ON CACHE BOOL "Allow downloads") + set(HELP_OPENCV_DOWNLOAD_PATH "Cache directory for downloaded files") + if(DEFINED ENV{OPENCV_DOWNLOAD_PATH}) + set(OPENCV_DOWNLOAD_PATH "$ENV{OPENCV_DOWNLOAD_PATH}" CACHE PATH "${HELP_OPENCV_DOWNLOAD_PATH}") +@@ -153,6 +154,11 @@ function(ocv_download) + + # Download + if(NOT EXISTS "${CACHE_CANDIDATE}") ++ if(NOT OPENCV_ALLOW_DOWNLOADS) ++ message(FATAL_ERROR "Not going to download ${DL_FILENAME}") ++ return() ++ endif() ++ + ocv_download_log("#cmake_download \"${CACHE_CANDIDATE}\" \"${DL_URL}\"") + file(DOWNLOAD "${DL_URL}" "${CACHE_CANDIDATE}" + INACTIVITY_TIMEOUT 60 diff --git a/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/fixpkgconfig.patch b/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/fixpkgconfig.patch deleted file mode 100644 index 3ed3468d..00000000 --- a/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/fixpkgconfig.patch +++ /dev/null @@ -1,30 +0,0 @@ -Index: git/cmake/OpenCVGenPkgconfig.cmake -=================================================================== ---- git.orig/cmake/OpenCVGenPkgconfig.cmake -+++ git/cmake/OpenCVGenPkgconfig.cmake -@@ -31,7 +31,7 @@ macro(fix_prefix lst isown) - get_filename_component(libdir "${item}" PATH) - get_filename_component(_libname "${item}" NAME) - ocv_get_libname(libname "${_libname}") -- list(APPEND _lst "-L${libdir}" "-l${libname}") -+ list(APPEND _lst "-l${libname}") - else() - list(APPEND _lst "-l${item}") - endif() -@@ -124,11 +124,14 @@ ocv_list_unique(_extra) - ocv_list_unique(_3rdparty) - - set(OPENCV_PC_LIBS -- "-L\${exec_prefix}/${OPENCV_LIB_INSTALL_PATH}" -+ "-L\${exec_prefix}/${OPENCV_3P_LIB_INSTALL_PATH}" - "${_modules}" - ) - if(BUILD_SHARED_LIBS) -- set(OPENCV_PC_LIBS_PRIVATE "${_extra}") -+ set(OPENCV_PC_LIBS_PRIVATE -+ "-L\${exec_prefix}/${OPENCV_LIB_INSTALL_PATH}" -+ "${_extra}" -+ ) - else() - set(OPENCV_PC_LIBS_PRIVATE - "-L\${exec_prefix}/${OPENCV_3P_LIB_INSTALL_PATH}" diff --git a/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/uselocalxfeatures.patch b/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/uselocalxfeatures.patch deleted file mode 100644 index fc273a89..00000000 --- a/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv/uselocalxfeatures.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/modules/xfeatures2d/CMakeLists.txt b/modules/xfeatures2d/CMakeLists.txt -index e1755595..c7009c47 100644 ---- a/modules/xfeatures2d/CMakeLists.txt -+++ b/modules/xfeatures2d/CMakeLists.txt -@@ -5,10 +5,10 @@ ocv_define_module(xfeatures2d opencv_core opencv_imgproc opencv_features2d openc - include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/download_vgg.cmake) - include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/download_boostdesc.cmake) - set(DOWNLOAD_DIR "${OpenCV_BINARY_DIR}/downloads/xfeatures2d") --download_boost_descriptors("${DOWNLOAD_DIR}" boost_status) --download_vgg_descriptors("${DOWNLOAD_DIR}" vgg_status) --if(NOT boost_status OR NOT vgg_status) -- ocv_module_disable(xfeatures2d) --endif() -+#download_boost_descriptors("${DOWNLOAD_DIR}" boost_status) -+#download_vgg_descriptors("${DOWNLOAD_DIR}" vgg_status) -+#if(NOT boost_status OR NOT vgg_status) -+# ocv_module_disable(xfeatures2d) -+#endif() - - ocv_module_include_directories("${DOWNLOAD_DIR}") diff --git a/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv_3.4.3.bb b/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.1.0.bb index 0a99700b..d781da60 100644 --- a/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv_3.4.3.bb +++ b/external/meta-openembedded/meta-oe/recipes-support/opencv/opencv_4.1.0.bb @@ -3,67 +3,81 @@ HOMEPAGE = "http://opencv.org/" SECTION = "libs" LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=62d89c5dcb0583609ea919c56be0ee76" +LIC_FILES_CHKSUM = "file://LICENSE;md5=6450921bb12a3133c8f5cb2a80343710" ARM_INSTRUCTION_SET_armv4 = "arm" ARM_INSTRUCTION_SET_armv5 = "arm" DEPENDS = "libtool swig-native bzip2 zlib glib-2.0 libwebp" -SRCREV_opencv = "b38c50b3d0c31e82294315ec44b54b7ef559ef12" -SRCREV_contrib = "1f6d6f06266e1ef336437ae5404bee1c65d42cda" -SRCREV_ipp = "bdb7bb85f34a8cb0d35e40a81f58da431aa1557a" +SRCREV_opencv = "371bba8f54560b374fbcd47e7e02f015ac4969ad" +SRCREV_contrib = "2c32791a9c500343568a21ea34bf2daeac2adae7" +SRCREV_ipp = "32e315a5b106a7b89dbed51c28f8120a48b368b4" SRCREV_boostdesc = "34e4206aef44d50e6bbcd0ab06354b52e7466d26" SRCREV_vgg = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d" -SRC_URI[tinydnn.md5sum] = "adb1c512e09ca2c7a6faef36f9c53e59" -SRC_URI[tinydnn.sha256sum] = "e2c61ce8c5debaa644121179e9dbdcf83f497f39de853f8dd5175846505aa18b" +SRCREV_face = "8afa57abc8229d611c4937165d20e2a2d9fc5a12" def ipp_filename(d): import re - arch = d.getVar('TARGET_ARCH', True) + arch = d.getVar('TARGET_ARCH') if re.match("i.86$", arch): - return "ippicv_2017u3_lnx_ia32_general_20180518.tgz" + return "ippicv_2019_lnx_ia32_general_20180723.tgz" else: - return "ippicv_2017u3_lnx_intel64_general_20180518.tgz" + return "ippicv_2019_lnx_intel64_general_20180723.tgz" def ipp_md5sum(d): import re - arch = d.getVar('TARGET_ARCH', True) + arch = d.getVar('TARGET_ARCH') if re.match("i.86$", arch): - return "ea72de74dae3c604eb6348395366e78e" + return "4f38432c30bfd6423164b7a24bbc98a0" else: - return "b7cc351267db2d34b9efa1cd22ff0572" + return "c0bd78adb4156bbf552c1dfe90599607" IPP_FILENAME = "${@ipp_filename(d)}" IPP_MD5 = "${@ipp_md5sum(d)}" SRCREV_FORMAT = "opencv_contrib_ipp_boostdesc_vgg" SRC_URI = "git://github.com/opencv/opencv.git;name=opencv \ - git://github.com/opencv/opencv_contrib.git;destsuffix=contrib;name=contrib \ - git://github.com/opencv/opencv_3rdparty.git;branch=ippicv/master_20180518;destsuffix=ipp;name=ipp \ - git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=boostdesc;name=boostdesc \ - git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=vgg;name=vgg \ - https://github.com/tiny-dnn/tiny-dnn/archive/v1.0.0a3.tar.gz;destsuffix=git/3rdparty/tinydnn/tiny-dnn-1.0.0a3;name=tinydnn;unpack=false \ - file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \ - file://uselocalxfeatures.patch;patchdir=../contrib/ \ - file://0001-Add-missing-multi-line-separator.patch;patchdir=../contrib/ \ - file://0002-Make-opencv-ts-create-share-library-intead-of-static.patch \ - file://0003-To-fix-errors-as-following.patch \ - file://fixpkgconfig.patch \ - file://0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch \ - file://0001-Dont-use-isystem.patch \ - file://0001-Check-for-clang-before-using-isystem.patch \ -" -PV = "3.4.3+git${SRCPV}" + git://github.com/opencv/opencv_contrib.git;destsuffix=contrib;name=contrib \ + git://github.com/opencv/opencv_3rdparty.git;branch=ippicv/master_20180723;destsuffix=ipp;name=ipp \ + git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=boostdesc;name=boostdesc \ + git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=vgg;name=vgg \ + git://github.com/opencv/opencv_3rdparty.git;branch=contrib_face_alignment_20170818;destsuffix=face;name=face \ + file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \ + file://0002-Make-opencv-ts-create-share-library-intead-of-static.patch \ + file://0003-To-fix-errors-as-following.patch \ + file://0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch \ + file://0001-Dont-use-isystem.patch \ + file://0001-carotene-Replace-ipcp-unit-growth-with-ipa-cp-unit-g.patch \ + file://download.patch \ + " +PV = "4.1.0" S = "${WORKDIR}/git" +# OpenCV wants to download more files during configure. We download these in +# do_fetch and construct a source cache in the format it expects +OPENCV_DLDIR = "${WORKDIR}/downloads" + do_unpack_extra() { - mkdir -p ${S}/3rdparty/tinydnn/ - tar xzf ${WORKDIR}/v1.0.0a3.tar.gz -C ${S}/3rdparty/tinydnn/ tar xzf ${WORKDIR}/ipp/ippicv/${IPP_FILENAME} -C ${WORKDIR} - cp ${WORKDIR}/vgg/*.i ${WORKDIR}/contrib/modules/xfeatures2d/src - cp ${WORKDIR}/boostdesc/*.i ${WORKDIR}/contrib/modules/xfeatures2d/src + + md5() { + # Return the MD5 of $1 + echo $(md5sum $1 | cut -d' ' -f1) + } + cache() { + TAG=$1 + shift + mkdir --parents ${OPENCV_DLDIR}/$TAG + for F in $*; do + DEST=${OPENCV_DLDIR}/$TAG/$(md5 $F)-$(basename $F) + test -e $DEST || ln -s $F $DEST + done + } + cache xfeatures2d/boostdesc ${WORKDIR}/boostdesc/*.i + cache xfeatures2d/vgg ${WORKDIR}/vgg/*.i + cache data ${WORKDIR}/face/*.dat } addtask unpack_extra after do_unpack before do_patch @@ -73,18 +87,20 @@ EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${WORKDIR}/contrib/modules \ -DCMAKE_SKIP_RPATH=ON \ -DOPENCV_ICV_HASH=${IPP_MD5} \ -DIPPROOT=${WORKDIR}/ippicv_lnx \ + -DOPENCV_GENERATE_PKGCONFIG=ON \ + -DOPENCV_DOWNLOAD_PATH=${OPENCV_DLDIR} \ + -DOPENCV_ALLOW_DOWNLOADS=OFF \ ${@bb.utils.contains("TARGET_CC_ARCH", "-msse3", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1", "", d)} \ ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.1", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1", "", d)} \ ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.2", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1 -DENABLE_SSE42=1", "", d)} \ - ${@oe.utils.conditional("libdir", "/usr/lib64", "-DLIB_SUFFIX=64", "", d)} \ - ${@oe.utils.conditional("libdir", "/usr/lib32", "-DLIB_SUFFIX=32", "", d)} \ " EXTRA_OECMAKE_append_x86 = " -DX86=ON" -PACKAGECONFIG ??= "python3 eigen jpeg png tiff v4l libv4l gstreamer samples tbb gphoto2 \ +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_WHITELIST", "commercial", "libav", "", d)}" +PACKAGECONFIG[gapi] = "-DWITH_ADE=ON -Dade_DIR=${STAGING_LIBDIR},-DWITH_ADE=OFF,ade" PACKAGECONFIG[amdblas] = "-DWITH_OPENCLAMDBLAS=ON,-DWITH_OPENCLAMDBLAS=OFF,libclamdblas," PACKAGECONFIG[amdfft] = "-DWITH_OPENCLAMDFFT=ON,-DWITH_OPENCLAMDFFT=OFF,libclamdfft," PACKAGECONFIG[dnn] = "-DBUILD_opencv_dnn=ON -DPROTOBUF_UPDATE_FILES=ON -DBUILD_PROTOBUF=OFF,-DBUILD_opencv_dnn=OFF,protobuf protobuf-native," @@ -161,11 +177,11 @@ PACKAGES_DYNAMIC += "^libopencv-.*" FILES_${PN} = "" FILES_${PN}-dbg += "${datadir}/OpenCV/java/.debug/* ${datadir}/OpenCV/samples/bin/.debug/*" -FILES_${PN}-dev = "${includedir} ${libdir}/pkgconfig ${datadir}/OpenCV/*.cmake" -FILES_${PN}-staticdev += "${datadir}/OpenCV/3rdparty/lib/*.a" -FILES_${PN}-apps = "${bindir}/* ${datadir}/OpenCV" +FILES_${PN}-dev = "${includedir} ${libdir}/pkgconfig ${libdir}/cmake/opencv4/*.cmake" +FILES_${PN}-staticdev += "${libdir}/opencv4/3rdparty/*.a" +FILES_${PN}-apps = "${bindir}/* ${datadir}/opencv4 ${datadir}/licenses" FILES_${PN}-java = "${datadir}/OpenCV/java" -FILES_${PN}-samples = "${datadir}/OpenCV/samples/" +FILES_${PN}-samples = "${datadir}/opencv4/samples/" INSANE_SKIP_${PN}-java = "libdir" INSANE_SKIP_${PN}-dbg = "libdir" @@ -180,10 +196,9 @@ SUMMARY_python3-opencv = "Python bindings to opencv" FILES_python3-opencv = "${PYTHON_SITEPACKAGES_DIR}/*" RDEPENDS_python3-opencv = "python3-core python3-numpy" -do_install_append() { - cp ${S}/include/opencv/*.h ${D}${includedir}/opencv/ - sed -i '/blobtrack/d' ${D}${includedir}/opencv/cvaux.h +RDEPENDS_${PN}-apps = "bash" +do_install_append() { # Move Python files into correct library folder (for multilib build) if [ "$libdir" != "/usr/lib" -a -d ${D}/usr/lib ]; then mv ${D}/usr/lib/* ${D}/${libdir}/ |