diff options
Diffstat (limited to 'meta-oe/recipes-support/opencv')
-rw-r--r-- | meta-oe/recipes-support/opencv/ade_0.1.2.bb | 1 | ||||
-rw-r--r-- | meta-oe/recipes-support/opencv/opencv/0001-FROMLIST-FastCV-latest-libs-hash-update.patch | 50 | ||||
-rw-r--r-- | meta-oe/recipes-support/opencv/opencv/0001-FROMLIST-Switch-to-static-instance-of-FastCV-on-Linux.patch | 87 | ||||
-rw-r--r-- | meta-oe/recipes-support/opencv/opencv/0001-core-fixed-VSX-intrinsics-implementation.patch | 61 | ||||
-rw-r--r-- | meta-oe/recipes-support/opencv/opencv_4.11.0.bb (renamed from meta-oe/recipes-support/opencv/opencv_4.9.0.bb) | 42 |
5 files changed, 225 insertions, 16 deletions
diff --git a/meta-oe/recipes-support/opencv/ade_0.1.2.bb b/meta-oe/recipes-support/opencv/ade_0.1.2.bb index 93b14ad4f3..b54c28d624 100644 --- a/meta-oe/recipes-support/opencv/ade_0.1.2.bb +++ b/meta-oe/recipes-support/opencv/ade_0.1.2.bb | |||
@@ -13,7 +13,6 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" | |||
13 | 13 | ||
14 | inherit cmake | 14 | inherit cmake |
15 | 15 | ||
16 | S = "${WORKDIR}/git" | ||
17 | 16 | ||
18 | EXTRA_OECMAKE += " -DCMAKE_BUILD_TYPE=Release" | 17 | EXTRA_OECMAKE += " -DCMAKE_BUILD_TYPE=Release" |
19 | 18 | ||
diff --git a/meta-oe/recipes-support/opencv/opencv/0001-FROMLIST-FastCV-latest-libs-hash-update.patch b/meta-oe/recipes-support/opencv/opencv/0001-FROMLIST-FastCV-latest-libs-hash-update.patch new file mode 100644 index 0000000000..b35335c35e --- /dev/null +++ b/meta-oe/recipes-support/opencv/opencv/0001-FROMLIST-FastCV-latest-libs-hash-update.patch | |||
@@ -0,0 +1,50 @@ | |||
1 | From ba6eb8d95292f4631a3b8de09bfaa59e43c17226 Mon Sep 17 00:00:00 2001 | ||
2 | From: adsha-quic <quic_adsha@quicinc.com> | ||
3 | Date: Wed, 16 Apr 2025 18:54:40 +0530 | ||
4 | Subject: [PATCH] FROMLIST: Merge pull request #27214 from CodeLinaro:fastcv_lib_hash_update | ||
5 | |||
6 | Signed-off-by: Alexander Smorkalov <alexander.smorkalov@opencv.ai> | ||
7 | Upstream-Status: Submitted [https://github.com/opencv/opencv/pull/27214] | ||
8 | |||
9 | --- | ||
10 | 3rdparty/fastcv/fastcv.cmake | 14 +++++++------- | ||
11 | 1 file changed, 7 insertions(+), 7 deletions(-) | ||
12 | |||
13 | diff --git a/3rdparty/fastcv/fastcv.cmake b/3rdparty/fastcv/fastcv.cmake | ||
14 | index 5c81c11300..6fee4ce4ce 100644 | ||
15 | --- a/3rdparty/fastcv/fastcv.cmake | ||
16 | +++ b/3rdparty/fastcv/fastcv.cmake | ||
17 | @@ -1,23 +1,23 @@ | ||
18 | function(download_fastcv root_dir) | ||
19 | |||
20 | # Commit SHA in the opencv_3rdparty repo | ||
21 | - set(FASTCV_COMMIT "f4413cc2ab7233fdfc383a4cded402c072677fb0") | ||
22 | + set(FASTCV_COMMIT "8d86e68dad8b80b8575a8d3cf401d3ee96c24148") | ||
23 | |||
24 | # Define actual FastCV versions | ||
25 | if(ANDROID) | ||
26 | if(AARCH64) | ||
27 | message(STATUS "Download FastCV for Android aarch64") | ||
28 | - set(FCV_PACKAGE_NAME "fastcv_android_aarch64_2024_12_11.tgz") | ||
29 | - set(FCV_PACKAGE_HASH "9dac41e86597305f846212dae31a4a88") | ||
30 | + set(FCV_PACKAGE_NAME "fastcv_android_aarch64_2025_04_08.tgz") | ||
31 | + set(FCV_PACKAGE_HASH "e028966a1d1b2f3f0bc5967d316e8b64") | ||
32 | else() | ||
33 | message(STATUS "Download FastCV for Android armv7") | ||
34 | - set(FCV_PACKAGE_NAME "fastcv_android_arm32_2024_12_11.tgz") | ||
35 | - set(FCV_PACKAGE_HASH "fe2d30334180b17e3031eee92aac43b6") | ||
36 | + set(FCV_PACKAGE_NAME "fastcv_android_arm32_2025_04_08.tgz") | ||
37 | + set(FCV_PACKAGE_HASH "6fc1e812a4b3ef392469d2283e037ffe") | ||
38 | endif() | ||
39 | elseif(UNIX AND NOT APPLE AND NOT IOS AND NOT XROS) | ||
40 | if(AARCH64) | ||
41 | - set(FCV_PACKAGE_NAME "fastcv_linux_aarch64_2025_02_12.tgz") | ||
42 | - set(FCV_PACKAGE_HASH "33ac2a59cf3e7d6402eee2e010de1202") | ||
43 | + set(FCV_PACKAGE_NAME "fastcv_linux_aarch64_2025_04_08.tgz") | ||
44 | + set(FCV_PACKAGE_HASH "062a26639cd2788beee2e0dd8743d680") | ||
45 | else() | ||
46 | message("FastCV: fastcv lib for 32-bit Linux is not supported for now!") | ||
47 | endif() | ||
48 | -- | ||
49 | 2.34.1 | ||
50 | |||
diff --git a/meta-oe/recipes-support/opencv/opencv/0001-FROMLIST-Switch-to-static-instance-of-FastCV-on-Linux.patch b/meta-oe/recipes-support/opencv/opencv/0001-FROMLIST-Switch-to-static-instance-of-FastCV-on-Linux.patch new file mode 100644 index 0000000000..dd3c9a7a82 --- /dev/null +++ b/meta-oe/recipes-support/opencv/opencv/0001-FROMLIST-Switch-to-static-instance-of-FastCV-on-Linux.patch | |||
@@ -0,0 +1,87 @@ | |||
1 | From e517347450636012e5f7a65a504e4ac9e1224c50 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Smorkalov <alexander.smorkalov@opencv.ai> | ||
3 | Date: Thu, 13 Feb 2025 09:17:08 +0300 | ||
4 | Subject: [PATCH] FROMLIST: Switch to static instance of FastCV on Linux. | ||
5 | |||
6 | Signed-off-by: Alexander Smorkalov <alexander.smorkalov@opencv.ai> | ||
7 | Upstream-Status: Submitted [https://github.com/opencv/opencv/pull/26917] | ||
8 | --- | ||
9 | 3rdparty/fastcv/fastcv.cmake | 7 ++++--- | ||
10 | cmake/OpenCVFindLibsPerf.cmake | 21 +++++++++++++++------ | ||
11 | 2 files changed, 19 insertions(+), 9 deletions(-) | ||
12 | |||
13 | diff --git a/3rdparty/fastcv/fastcv.cmake b/3rdparty/fastcv/fastcv.cmake | ||
14 | index b8172705ca..5c81c11300 100644 | ||
15 | --- a/3rdparty/fastcv/fastcv.cmake | ||
16 | +++ b/3rdparty/fastcv/fastcv.cmake | ||
17 | @@ -1,7 +1,7 @@ | ||
18 | function(download_fastcv root_dir) | ||
19 | |||
20 | # Commit SHA in the opencv_3rdparty repo | ||
21 | - set(FASTCV_COMMIT "dc5d58018f3af915a8d209386d2c58c0501c0f2c") | ||
22 | + set(FASTCV_COMMIT "f4413cc2ab7233fdfc383a4cded402c072677fb0") | ||
23 | |||
24 | # Define actual FastCV versions | ||
25 | if(ANDROID) | ||
26 | @@ -16,14 +16,15 @@ function(download_fastcv root_dir) | ||
27 | endif() | ||
28 | elseif(UNIX AND NOT APPLE AND NOT IOS AND NOT XROS) | ||
29 | if(AARCH64) | ||
30 | - set(FCV_PACKAGE_NAME "fastcv_linux_aarch64_2024_12_11.tgz") | ||
31 | - set(FCV_PACKAGE_HASH "7b33ad833e6f15ab6d4ec64fa3c17acd") | ||
32 | + set(FCV_PACKAGE_NAME "fastcv_linux_aarch64_2025_02_12.tgz") | ||
33 | + set(FCV_PACKAGE_HASH "33ac2a59cf3e7d6402eee2e010de1202") | ||
34 | else() | ||
35 | message("FastCV: fastcv lib for 32-bit Linux is not supported for now!") | ||
36 | endif() | ||
37 | endif(ANDROID) | ||
38 | |||
39 | # Download Package | ||
40 | + | ||
41 | set(OPENCV_FASTCV_URL "https://raw.githubusercontent.com/opencv/opencv_3rdparty/${FASTCV_COMMIT}/fastcv/") | ||
42 | |||
43 | ocv_download( FILENAME ${FCV_PACKAGE_NAME} | ||
44 | diff --git a/cmake/OpenCVFindLibsPerf.cmake b/cmake/OpenCVFindLibsPerf.cmake | ||
45 | index c2380e6ce5..c5fb628c44 100644 | ||
46 | --- a/cmake/OpenCVFindLibsPerf.cmake | ||
47 | +++ b/cmake/OpenCVFindLibsPerf.cmake | ||
48 | @@ -181,7 +181,14 @@ endif(WITH_KLEIDICV) | ||
49 | if(WITH_FASTCV) | ||
50 | if((EXISTS ${FastCV_INCLUDE_PATH}) AND (EXISTS ${FastCV_LIB_PATH})) | ||
51 | message(STATUS "Use external FastCV ${FastCV_INCLUDE_PATH}, ${FastCV_LIB_PATH}") | ||
52 | - set(HAVE_FASTCV TRUE CACHE BOOL "FastCV status") | ||
53 | + find_library(FASTCV_LIBRARY NAMES "fastcv" | ||
54 | + PATHS "${FastCV_LIB_PATH}" NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) | ||
55 | + mark_as_advanced(FASTCV_LIBRARY) | ||
56 | + if (FASTCV_LIBRARY) | ||
57 | + set(HAVE_FASTCV TRUE CACHE BOOL "FastCV status") | ||
58 | + else() | ||
59 | + set(HAVE_FASTCV FALSE CACHE BOOL "FastCV status") | ||
60 | + endif() | ||
61 | else() | ||
62 | include("${OpenCV_SOURCE_DIR}/3rdparty/fastcv/fastcv.cmake") | ||
63 | set(FCV_ROOT_DIR "${OpenCV_BINARY_DIR}/3rdparty/fastcv") | ||
64 | @@ -190,13 +197,15 @@ if(WITH_FASTCV) | ||
65 | set(FastCV_INCLUDE_PATH "${FCV_ROOT_DIR}/inc" CACHE PATH "FastCV includes directory") | ||
66 | set(FastCV_LIB_PATH "${FCV_ROOT_DIR}/libs" CACHE PATH "FastCV library directory") | ||
67 | ocv_install_3rdparty_licenses(FastCV "${OpenCV_BINARY_DIR}/3rdparty/fastcv/LICENSE") | ||
68 | - install(FILES "${FastCV_LIB_PATH}/libfastcvopt.so" | ||
69 | - DESTINATION "${OPENCV_LIB_INSTALL_PATH}" COMPONENT "bin") | ||
70 | + if(ANDROID) | ||
71 | + set(FASTCV_LIBRARY "${FastCV_LIB_PATH}/libfastcvopt.so" CACHE PATH "FastCV library") | ||
72 | + install(FILES "${FASTCV_LIBRARY}" DESTINATION "${OPENCV_LIB_INSTALL_PATH}" COMPONENT "bin") | ||
73 | + else() | ||
74 | + set(FASTCV_LIBRARY "${FastCV_LIB_PATH}/libfastcv.a" CACHE PATH "FastCV library") | ||
75 | + install(FILES "${FASTCV_LIBRARY}" DESTINATION "${OPENCV_LIB_INSTALL_PATH}" COMPONENT "dev") | ||
76 | + endif() | ||
77 | else() | ||
78 | set(HAVE_FASTCV FALSE CACHE BOOL "FastCV status") | ||
79 | endif() | ||
80 | endif() | ||
81 | - if(HAVE_FASTCV) | ||
82 | - set(FASTCV_LIBRARY "${FastCV_LIB_PATH}/libfastcvopt.so" CACHE PATH "FastCV library") | ||
83 | - endif() | ||
84 | endif(WITH_FASTCV) | ||
85 | -- | ||
86 | 2.34.1 | ||
87 | |||
diff --git a/meta-oe/recipes-support/opencv/opencv/0001-core-fixed-VSX-intrinsics-implementation.patch b/meta-oe/recipes-support/opencv/opencv/0001-core-fixed-VSX-intrinsics-implementation.patch new file mode 100644 index 0000000000..9fc89e4244 --- /dev/null +++ b/meta-oe/recipes-support/opencv/opencv/0001-core-fixed-VSX-intrinsics-implementation.patch | |||
@@ -0,0 +1,61 @@ | |||
1 | From 97f3f390661f2fd1168336820b89eb4383ce8528 Mon Sep 17 00:00:00 2001 | ||
2 | From: Maksim Shabunin <maksim.shabunin@gmail.com> | ||
3 | Date: Fri, 10 Jan 2025 18:34:11 +0300 | ||
4 | Subject: [PATCH] core: fixed VSX intrinsics implementation | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | [https://github.com/opencv/opencv/commit/97f3f390661f2fd1168336820b89eb4383ce8528] | ||
8 | |||
9 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
10 | --- | ||
11 | modules/core/include/opencv2/core/hal/intrin_vsx.hpp | 10 +++++----- | ||
12 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
13 | |||
14 | diff --git a/modules/core/include/opencv2/core/hal/intrin_vsx.hpp b/modules/core/include/opencv2/core/hal/intrin_vsx.hpp | ||
15 | index 2157e1e870..0a0915a22f 100644 | ||
16 | --- a/modules/core/include/opencv2/core/hal/intrin_vsx.hpp | ||
17 | +++ b/modules/core/include/opencv2/core/hal/intrin_vsx.hpp | ||
18 | @@ -262,7 +262,7 @@ OPENCV_HAL_IMPL_VSX_EXTRACT_N(v_float64x2, double) | ||
19 | inline _Tpvec v_setzero_##suffix() { return _Tpvec(vec_splats((_Tp)0)); } \ | ||
20 | inline _Tpvec v_setall_##suffix(_Tp v) { return _Tpvec(vec_splats((_Tp)v));} \ | ||
21 | template <> inline _Tpvec v_setzero_() { return v_setzero_##suffix(); } \ | ||
22 | -template <> inline _Tpvec v_setall_(_Tp v) { return v_setall_##suffix(_Tp v); } \ | ||
23 | +template <> inline _Tpvec v_setall_(_Tp v) { return v_setall_##suffix(v); } \ | ||
24 | template<typename _Tpvec0> inline _Tpvec v_reinterpret_as_##suffix(const _Tpvec0 &a) \ | ||
25 | { return _Tpvec((cast)a.val); } | ||
26 | |||
27 | @@ -650,11 +650,11 @@ OPENCV_HAL_IMPL_VSX_SELECT(v_float64x2, vec_bdword2_c) | ||
28 | #define OPENCV_HAL_IMPL_VSX_INT_CMP_OP(_Tpvec) \ | ||
29 | inline _Tpvec v_eq(const _Tpvec& a, const _Tpvec& b) \ | ||
30 | { return _Tpvec(vec_cmpeq(a.val, b.val)); } \ | ||
31 | -inline _Tpvec V_ne(const _Tpvec& a, const _Tpvec& b) \ | ||
32 | +inline _Tpvec v_ne(const _Tpvec& a, const _Tpvec& b) \ | ||
33 | { return _Tpvec(vec_cmpne(a.val, b.val)); } \ | ||
34 | inline _Tpvec v_lt(const _Tpvec& a, const _Tpvec& b) \ | ||
35 | { return _Tpvec(vec_cmplt(a.val, b.val)); } \ | ||
36 | -inline _Tpvec V_gt(const _Tpvec& a, const _Tpvec& b) \ | ||
37 | +inline _Tpvec v_gt(const _Tpvec& a, const _Tpvec& b) \ | ||
38 | { return _Tpvec(vec_cmpgt(a.val, b.val)); } \ | ||
39 | inline _Tpvec v_le(const _Tpvec& a, const _Tpvec& b) \ | ||
40 | { return _Tpvec(vec_cmple(a.val, b.val)); } \ | ||
41 | @@ -1507,7 +1507,7 @@ inline v_float64x2 v_dotprod_expand(const v_int32x4& a, const v_int32x4& b, cons | ||
42 | inline v_int32x4 v_dotprod_fast(const v_int16x8& a, const v_int16x8& b) | ||
43 | { return v_dotprod(a, b); } | ||
44 | inline v_int32x4 v_dotprod_fast(const v_int16x8& a, const v_int16x8& b, const v_int32x4& c) | ||
45 | -{ return v_int32x4(vec_msum(a.val, b.val, vec_int4_z)) + c; } | ||
46 | +{ return v_add(v_int32x4(vec_msum(a.val, b.val, vec_int4_z)), c); } | ||
47 | // 32 >> 64 | ||
48 | inline v_int64x2 v_dotprod_fast(const v_int32x4& a, const v_int32x4& b) | ||
49 | { return v_dotprod(a, b); } | ||
50 | @@ -1518,7 +1518,7 @@ inline v_int64x2 v_dotprod_fast(const v_int32x4& a, const v_int32x4& b, const v_ | ||
51 | inline v_uint32x4 v_dotprod_expand_fast(const v_uint8x16& a, const v_uint8x16& b) | ||
52 | { return v_dotprod_expand(a, b); } | ||
53 | inline v_uint32x4 v_dotprod_expand_fast(const v_uint8x16& a, const v_uint8x16& b, const v_uint32x4& c) | ||
54 | -{ return v_uint32x4(vec_msum(a.val, b.val, vec_uint4_z)) + c; } | ||
55 | +{ return v_add(v_uint32x4(vec_msum(a.val, b.val, vec_uint4_z)), c); } | ||
56 | |||
57 | inline v_int32x4 v_dotprod_expand_fast(const v_int8x16& a, const v_int8x16& b) | ||
58 | { | ||
59 | -- | ||
60 | 2.25.1 | ||
61 | |||
diff --git a/meta-oe/recipes-support/opencv/opencv_4.9.0.bb b/meta-oe/recipes-support/opencv/opencv_4.11.0.bb index cf836d3ecf..826eff30ca 100644 --- a/meta-oe/recipes-support/opencv/opencv_4.9.0.bb +++ b/meta-oe/recipes-support/opencv/opencv_4.11.0.bb | |||
@@ -10,31 +10,35 @@ ARM_INSTRUCTION_SET:armv5 = "arm" | |||
10 | 10 | ||
11 | DEPENDS = "libtool swig-native bzip2 zlib glib-2.0 libwebp" | 11 | DEPENDS = "libtool swig-native bzip2 zlib glib-2.0 libwebp" |
12 | 12 | ||
13 | SRCREV_opencv = "dad8af6b17f8e60d7b95a1203a1b4d22f56574cf" | 13 | SRCREV_opencv = "31b0eeea0b44b370fd0712312df4214d4ae1b158" |
14 | SRCREV_contrib = "c7602a8f74205e44389bd6a4e8d727d32e7e27b4" | 14 | SRCREV_contrib = "0e5254ebf54d2aed6e7eaf6660bf3b797cf50a02" |
15 | SRCREV_boostdesc = "34e4206aef44d50e6bbcd0ab06354b52e7466d26" | 15 | SRCREV_boostdesc = "34e4206aef44d50e6bbcd0ab06354b52e7466d26" |
16 | SRCREV_vgg = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d" | 16 | SRCREV_vgg = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d" |
17 | SRCREV_face = "8afa57abc8229d611c4937165d20e2a2d9fc5a12" | 17 | SRCREV_face = "8afa57abc8229d611c4937165d20e2a2d9fc5a12" |
18 | SRCREV_wechat-qrcode = "a8b69ccc738421293254aec5ddb38bd523503252" | 18 | SRCREV_wechat-qrcode = "a8b69ccc738421293254aec5ddb38bd523503252" |
19 | SRCREV_fastcv = "8d86e68dad8b80b8575a8d3cf401d3ee96c24148" | ||
19 | 20 | ||
20 | 21 | ||
21 | SRCREV_FORMAT = "opencv_contrib_ipp_boostdesc_vgg" | 22 | SRCREV_FORMAT = "opencv_contrib_ipp_boostdesc_vgg_fastcv" |
22 | SRC_URI = "git://github.com/opencv/opencv.git;name=opencv;branch=4.x;protocol=https \ | 23 | SRC_URI = "git://github.com/opencv/opencv.git;name=opencv;branch=4.x;protocol=https \ |
23 | git://github.com/opencv/opencv_contrib.git;destsuffix=git/contrib;name=contrib;branch=4.x;protocol=https \ | 24 | git://github.com/opencv/opencv_contrib.git;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/contrib;name=contrib;branch=4.x;protocol=https \ |
24 | git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=git/boostdesc;name=boostdesc;protocol=https \ | 25 | git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/boostdesc;name=boostdesc;protocol=https \ |
25 | git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=git/vgg;name=vgg;protocol=https \ | 26 | git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/vgg;name=vgg;protocol=https \ |
26 | git://github.com/opencv/opencv_3rdparty.git;branch=contrib_face_alignment_20170818;destsuffix=git/face;name=face;protocol=https \ | 27 | git://github.com/opencv/opencv_3rdparty.git;branch=contrib_face_alignment_20170818;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/face;name=face;protocol=https \ |
27 | git://github.com/WeChatCV/opencv_3rdparty.git;branch=wechat_qrcode;destsuffix=git/wechat_qrcode;name=wechat-qrcode;protocol=https \ | 28 | git://github.com/WeChatCV/opencv_3rdparty.git;branch=wechat_qrcode;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/wechat_qrcode;name=wechat-qrcode;protocol=https \ |
29 | git://github.com/opencv/opencv_3rdparty.git;branch=fastcv/4.x_20250410;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/fastcv;name=fastcv;protocol=https \ | ||
28 | file://0003-To-fix-errors-as-following.patch \ | 30 | file://0003-To-fix-errors-as-following.patch \ |
29 | file://0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch \ | 31 | file://0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch \ |
30 | file://0001-Dont-use-isystem.patch \ | 32 | file://0001-Dont-use-isystem.patch \ |
31 | file://download.patch \ | 33 | file://download.patch \ |
32 | file://0001-Make-ts-module-external.patch \ | 34 | file://0001-Make-ts-module-external.patch \ |
33 | file://0008-Do-not-embed-build-directory-in-binaries.patch \ | 35 | file://0008-Do-not-embed-build-directory-in-binaries.patch \ |
36 | file://0001-core-fixed-VSX-intrinsics-implementation.patch \ | ||
37 | file://0001-FROMLIST-Switch-to-static-instance-of-FastCV-on-Linux.patch \ | ||
38 | file://0001-FROMLIST-FastCV-latest-libs-hash-update.patch \ | ||
34 | " | 39 | " |
35 | SRC_URI:append:riscv64 = " file://0001-Use-Os-to-compile-tinyxml2.cpp.patch;patchdir=contrib" | 40 | SRC_URI:append:riscv64 = " file://0001-Use-Os-to-compile-tinyxml2.cpp.patch;patchdir=contrib" |
36 | 41 | ||
37 | S = "${WORKDIR}/git" | ||
38 | 42 | ||
39 | # OpenCV wants to download more files during configure. We download these in | 43 | # OpenCV wants to download more files during configure. We download these in |
40 | # do_fetch and construct a source cache in the format it expects | 44 | # do_fetch and construct a source cache in the format it expects |
@@ -60,6 +64,7 @@ do_unpack_extra() { | |||
60 | cache data ${S}/face/*.dat | 64 | cache data ${S}/face/*.dat |
61 | cache wechat_qrcode ${S}/wechat_qrcode/*.caffemodel | 65 | cache wechat_qrcode ${S}/wechat_qrcode/*.caffemodel |
62 | cache wechat_qrcode ${S}/wechat_qrcode/*.prototxt | 66 | cache wechat_qrcode ${S}/wechat_qrcode/*.prototxt |
67 | cache fastcv ${S}/fastcv/fastcv/*.tgz | ||
63 | } | 68 | } |
64 | addtask unpack_extra after do_unpack before do_patch | 69 | addtask unpack_extra after do_unpack before do_patch |
65 | 70 | ||
@@ -86,7 +91,7 @@ EXTRA_OECMAKE:append:x86 = " -DX86=ON" | |||
86 | EXTRA_OECMAKE:remove:x86 = " -DENABLE_SSE41=1 -DENABLE_SSE42=1" | 91 | EXTRA_OECMAKE:remove:x86 = " -DENABLE_SSE41=1 -DENABLE_SSE42=1" |
87 | 92 | ||
88 | PACKAGECONFIG ??= "gapi python3 eigen jpeg png tiff v4l libv4l gstreamer samples tbb gphoto2 \ | 93 | PACKAGECONFIG ??= "gapi python3 eigen jpeg png tiff v4l libv4l gstreamer samples tbb gphoto2 \ |
89 | ${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk", "", d)} \ | 94 | ${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'gtk', '', d)} \ |
90 | ${@bb.utils.contains_any("LICENSE_FLAGS_ACCEPTED", "commercial_ffmpeg commercial", "libav", "", d)}" | 95 | ${@bb.utils.contains_any("LICENSE_FLAGS_ACCEPTED", "commercial_ffmpeg commercial", "libav", "", d)}" |
91 | 96 | ||
92 | # TBB does not build for powerpc so disable that package config | 97 | # TBB does not build for powerpc so disable that package config |
@@ -113,20 +118,21 @@ PACKAGECONFIG[opencl] = "-DWITH_OPENCL=ON,-DWITH_OPENCL=OFF,opencl-headers virtu | |||
113 | PACKAGECONFIG[openvino] = "-DWITH_OPENVINO=ON,-DWITH_OPENVINO=OFF,openvino-inference-engine,openvino-inference-engine" | 118 | PACKAGECONFIG[openvino] = "-DWITH_OPENVINO=ON,-DWITH_OPENVINO=OFF,openvino-inference-engine,openvino-inference-engine" |
114 | PACKAGECONFIG[oracle-java] = "-DJAVA_INCLUDE_PATH=${ORACLE_JAVA_HOME}/include -DJAVA_INCLUDE_PATH2=${ORACLE_JAVA_HOME}/include/linux -DJAVA_AWT_INCLUDE_PATH=${ORACLE_JAVA_HOME}/include -DJAVA_AWT_LIBRARY=${ORACLE_JAVA_HOME}/lib/amd64/libjawt.so -DJAVA_JVM_LIBRARY=${ORACLE_JAVA_HOME}/lib/amd64/server/libjvm.so,,ant-native oracle-jse-jdk oracle-jse-jdk-native," | 119 | PACKAGECONFIG[oracle-java] = "-DJAVA_INCLUDE_PATH=${ORACLE_JAVA_HOME}/include -DJAVA_INCLUDE_PATH2=${ORACLE_JAVA_HOME}/include/linux -DJAVA_AWT_INCLUDE_PATH=${ORACLE_JAVA_HOME}/include -DJAVA_AWT_LIBRARY=${ORACLE_JAVA_HOME}/lib/amd64/libjawt.so -DJAVA_JVM_LIBRARY=${ORACLE_JAVA_HOME}/lib/amd64/server/libjvm.so,,ant-native oracle-jse-jdk oracle-jse-jdk-native," |
115 | PACKAGECONFIG[png] = "-DWITH_PNG=ON,-DWITH_PNG=OFF,libpng," | 120 | PACKAGECONFIG[png] = "-DWITH_PNG=ON,-DWITH_PNG=OFF,libpng," |
116 | PACKAGECONFIG[python3] = "-DPYTHON3_INCLUDE_PATH=${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI} -DPYTHON3_NUMPY_INCLUDE_DIRS:PATH=${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/numpy/core/include,,python3-numpy," | 121 | PACKAGECONFIG[python3] = "-DPYTHON3_INCLUDE_PATH=${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI} -DPYTHON3_NUMPY_INCLUDE_DIRS:PATH=${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/numpy/_core/include,,python3-numpy," |
117 | PACKAGECONFIG[samples] = "-DBUILD_EXAMPLES=ON -DINSTALL_PYTHON_EXAMPLES=ON,-DBUILD_EXAMPLES=OFF,," | 122 | PACKAGECONFIG[samples] = "-DBUILD_EXAMPLES=ON -DINSTALL_PYTHON_EXAMPLES=ON,-DBUILD_EXAMPLES=OFF,," |
118 | PACKAGECONFIG[tbb] = "-DWITH_TBB=ON,-DWITH_TBB=OFF,tbb," | 123 | PACKAGECONFIG[tbb] = "-DWITH_TBB=ON,-DWITH_TBB=OFF,tbb," |
119 | PACKAGECONFIG[tests] = "-DBUILD_TESTS=ON,-DBUILD_TESTS=OFF,," | 124 | PACKAGECONFIG[tests] = "-DBUILD_TESTS=ON,-DBUILD_TESTS=OFF,," |
120 | PACKAGECONFIG[text] = "-DBUILD_opencv_text=ON,-DBUILD_opencv_text=OFF,tesseract," | 125 | PACKAGECONFIG[text] = "-DBUILD_opencv_text=ON,-DBUILD_opencv_text=OFF,tesseract," |
121 | PACKAGECONFIG[tiff] = "-DWITH_TIFF=ON,-DWITH_TIFF=OFF,tiff," | 126 | PACKAGECONFIG[tiff] = "-DWITH_TIFF=ON,-DWITH_TIFF=OFF,tiff," |
122 | PACKAGECONFIG[v4l] = "-DWITH_V4L=ON,-DWITH_V4L=OFF,v4l-utils," | 127 | PACKAGECONFIG[v4l] = "-DWITH_V4L=ON,-DWITH_V4L=OFF,v4l-utils," |
128 | PACKAGECONFIG[fastcv] = "-DWITH_FASTCV=ON ,-DWITH_FASTCV=OFF,," | ||
123 | 129 | ||
124 | inherit pkgconfig cmake setuptools3-base python3native | 130 | inherit pkgconfig cmake setuptools3-base python3native |
125 | 131 | ||
126 | export PYTHON_CSPEC="-I${STAGING_INCDIR}/${PYTHON_DIR}" | 132 | export PYTHON_CSPEC = "-I${STAGING_INCDIR}/${PYTHON_DIR}" |
127 | export ORACLE_JAVA_HOME="${STAGING_DIR_NATIVE}/usr/bin/java" | 133 | export ORACLE_JAVA_HOME = "${STAGING_DIR_NATIVE}/usr/bin/java" |
128 | export JAVA_HOME="${STAGING_DIR_NATIVE}/usr/lib/jvm/openjdk-8-native" | 134 | export JAVA_HOME = "${STAGING_DIR_NATIVE}/usr/lib/jvm/openjdk-8-native" |
129 | export ANT_DIR="${STAGING_DIR_NATIVE}/usr/share/ant/" | 135 | export ANT_DIR = "${STAGING_DIR_NATIVE}/usr/share/ant/" |
130 | 136 | ||
131 | TARGET_CC_ARCH += "-I${S}/include " | 137 | TARGET_CC_ARCH += "-I${S}/include " |
132 | 138 | ||
@@ -207,4 +213,10 @@ do_install:append() { | |||
207 | if [ -f ${D}${bindir}/setup_vars_opencv4.sh ]; then | 213 | if [ -f ${D}${bindir}/setup_vars_opencv4.sh ]; then |
208 | rm -rf ${D}${bindir}/setup_vars_opencv4.sh | 214 | rm -rf ${D}${bindir}/setup_vars_opencv4.sh |
209 | fi | 215 | fi |
216 | |||
217 | for fn in arithm.vsx3.cpp convert.vsx3.cpp; do | ||
218 | if [ -f ${B}/modules/core/$fn ]; then | ||
219 | sed -i -e 's,${S},/usr/src/debug/${PN}/${PV},g' ${B}/modules/core/$fn | ||
220 | fi | ||
221 | done | ||
210 | } | 222 | } |