Commit Graph

149 Commits

Author SHA1 Message Date
Zoltán Böszörményi
6b12086873 opencv: Fix PACKAGECONFIG[openvino]
The circular dependency was fixed in a different way in
meta-intel's openvino-inference-engine. Only some samples
in openvino use opencv and building the samples was made
optional.

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-03-28 10:44:00 -07:00
Zoltán Böszörményi
29b57802c6 opencv: Support OpenVINO
Add PACKAGECONFIG[openvino]. It uses openvino-inference-engine-initial
as build dependency to avoid circular dependency.

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-03-23 15:03:43 -07:00
Mingli Yu
36a0a6874b opencv: Upgrade to 4.7.0
Upgrade opencv to 4.7.0 [1] and remove backported patch.

[1] https://github.com/opencv/opencv/wiki/ChangeLog#version470

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-03-07 15:00:10 -08:00
Mingli Yu
d0e72f07d3 opencv: disable intel IPP
The ipp related code has IP issue as below.

=====================================================================
 $ cat  tmp/work/corei7-64-wrs-linux/opencv/4.6.0-r0/git/ippicv_lnx/icv/include/ippicv.h | head -n 30
 /*
 // Copyright 2014-2019 Intel Corporation All Rights Reserved.
 //
 // The source code, information and material ("Material") contained herein is
 // owned by Intel Corporation or its suppliers or licensors, and title
 // to such Material remains with Intel Corporation or its suppliers or
 // licensors. The Material contains proprietary information of Intel
 // or its suppliers and licensors. The Material is protected by worldwide
 // copyright laws and treaty provisions. No part of the Material may be used,
 // copied, reproduced, modified, published, uploaded, posted, transmitted,
 // distributed or disclosed in any way without Intel's prior express written
 // permission. No license under any patent, copyright or other intellectual
 // property rights in the Material is granted to or conferred upon you,
 // either expressly, by implication, inducement, estoppel or otherwise.
 // Any license under such intellectual property rights must be express and
 // approved by Intel in writing.
 //
 // Unless otherwise agreed by Intel in writing,
 // you may not remove or alter this notice or any other notice embedded in
 // Materials by Intel or Intel's suppliers or licensors in any way.
 //
 */

 #if !defined( __IPPICV_H__ )
 #define __IPPICV_H__

 #ifdef __cplusplus
 extern "C" {
 #endif
=====================================================================

So disable intel IPP [1] to avoid IP issue.

[1] https://www.intel.com/content/www/us/en/developer/articles/troubleshooting/intel-integrated-performance-primitives-intel-ipp-open-source-computer-vision-library-opencv-faq.html

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-02-22 01:03:38 -08:00
Chee Yang Lee
8f9ad1050d opencv: fix reproducible builds
Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-01-09 08:56:42 -08:00
Khem Raj
72dc42966b opencv: Fix build with ffmpeg 5.1+
Backport a relevant patch

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-12-03 08:11:30 -08:00
Khem Raj
01996cbe10 opencv: Check for commercial_ffmpeg as well to enable ffmpeg
syntax for LICENSE_FLAGS_ACCEPTED can be "type_package" format as well
and some distros may enable commercial license selectively by not using
"commercial" as broadbrush but "commercial_ffmpeg" to just enable libav

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-12-03 08:11:30 -08:00
Max Krummenacher
5c23feed7b opencv: follow changed name license_flags_accepted
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-11-28 11:32:26 -08:00
Anuj Mittal
6b7cf95e75 opencv: fix reproducibility issues
Download and unpack contrib modules and other repositories in S instead
of WORKDIR so they don't escape file-prefix-map substitutions.

Fixes a number of reproducibility problems because of OpenCV check
macros that were embedding path to files in contrib/.

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-10-06 07:20:50 -07:00
Wang Mingyu
1aecfce30f ade: upgrade 0.1.1f -> 0.1.2
0001-use-GNUInstallDirs-for-detecting-install-paths.patch
removed since it's included in 0.1.2

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-08-23 10:04:07 -07:00
Khem Raj
2fc3035631 opencv: Link with libatomic on rv32
Fixes
undefined reference to `__atomic_fetch_add_8'

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-07-11 22:46:17 +01:00
Khem Raj
71091b0644 opencv: Link with libatomic on mips
Fixes linking errors e.g.
parallel.cpp:(.text._ZN3tbb6detail2d19start_forINS1_13blocked_rangeIiEEN2cv12_GLOBAL__N_113ProxyLoopBodyEKNS1_16auto_partitionerEE8finalizeERKNS1_14execution_dataE+0xe8): undefined reference to `__atomic_fetch_add_8'

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-07-07 10:26:37 -04:00
Zoltán Böszörményi
703b3c511b opencv: Upgrade to version 4.6.0
Re-enable automatic ffmpeg PACKAGECONFIG.
Drop an upstream patch.

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-06-30 13:39:28 -04:00
Khem Raj
fa5922c1cb opencv: Fix build with gcc-12 on ppc64
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-04-20 10:58:01 -07:00
Martin Jansa
856902b8c0 Fix DeprecationWarning about regexps
* fixes:
meta-oe/meta-networking/recipes-support/strongswan/strongswan_5.9.4.bb:125: DeprecationWarning: invalid escape sequence \.
meta-oe/meta-networking/recipes-support/strongswan/strongswan_5.9.4.bb:126: DeprecationWarning: invalid escape sequence \.
meta-oe/meta-networking/recipes-support/strongswan/strongswan_5.9.4.bb:128: DeprecationWarning: invalid escape sequence \.
meta-oe/meta-networking/recipes-support/strongswan/strongswan_5.9.4.bb:129: DeprecationWarning: invalid escape sequence \.
meta-oe/meta-networking/recipes-support/strongswan/strongswan_5.9.4.bb:130: DeprecationWarning: invalid escape sequence \.
meta-oe/meta-oe/recipes-graphics/ttf-fonts/ttf-mplus_027.bb:18: DeprecationWarning: invalid escape sequence \.
meta-oe/meta-oe/recipes-multimedia/libcdio/libcdio-paranoia_10.2+2.0.1.bb:21: DeprecationWarning: invalid escape sequence \.
meta-oe/meta-oe/recipes-multimedia/libcdio/libcdio_2.1.0.bb:28: DeprecationWarning: invalid escape sequence \.
oe-core/meta/classes/package.bbclass:1342: DeprecationWarning: invalid escape sequence \.
oe-core/meta/classes/package.bbclass:1343: DeprecationWarning: invalid escape sequence \-
oe-core/meta/classes/package.bbclass:1343: DeprecationWarning: invalid escape sequence \.
oe-core/meta/classes/package.bbclass:1344: DeprecationWarning: invalid escape sequence \.
oe-core/meta/classes/package.bbclass:1345: DeprecationWarning: invalid escape sequence \.
oe-core/meta/classes/package.bbclass:1348: DeprecationWarning: invalid escape sequence \.
oe-core/meta/classes/package.bbclass:1350: DeprecationWarning: invalid escape sequence \.
oe-core/meta/classes/package.bbclass:1353: DeprecationWarning: invalid escape sequence \.
oe-core/meta/classes/package.bbclass:1355: DeprecationWarning: invalid escape sequence \.
oe-core/meta/classes/package.bbclass:1358: DeprecationWarning: invalid escape sequence \.
oe-core/meta/classes/package.bbclass:1360: DeprecationWarning: invalid escape sequence \.
oe-core/meta/classes/package.bbclass:1365: DeprecationWarning: invalid escape sequence \.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-02-21 18:12:04 -08:00
Mingli Yu
3f26c46cbd opencv: disable sse4.1 and sse4.2 on x86
Disable sse4.1 and sse4.2 on x86 to fix the below build failure [1].
 | ./opencv-4.5.5/git/modules/gapi/src/backends/fluid/gfluidcore_simd_sse41.hpp:387:47: error: '_mm_insert_epi64' was not declared in this scope; did you mean '_mm_insert_epi8'?
 387 | val_0 = _mm_unpacklo_epi8(_mm_insert_epi64(val_0, reinterpret_cast<const int64_t>(&tmp[4 * (chanNum * mapsx[x + 1] + 1)]), 0), zero);
 | ^~~~~~~~~~~~~~~~
 | _mm_insert_epi8

[1] https://github.com/opencv/opencv/issues/21597

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-02-14 08:33:23 -08:00
Daniel Gomez
523d3d61f7 opencv: Update contrib 4.5.2 -> 4.5.5
Patch [1] was dropped but contrib repo was not updated leading into the
glog link issues for the sfm module. Update opencv_contrib 4.5.2 ->
4.5.5.

Error:
/var/lib/yocto/builds/build_honister/tmp/work/bobcat-poky-linux/
qtec-screwcounter-camera/1.0+gitAUTOINC+7f76d8d874-r0/
recipe-sysroot-native/usr/bin/x86_64-poky-linux/../../libexec/
x86_64-poky-linux/gcc/x86_64-poky-linux/11.2.0/ld:
/var/lib/yocto/builds/build_honister/tmp/work/bobcat-poky-linux/
qtec-screwcounter-camera/1.0+gitAUTOINC+7f76d8d874-r0/recipe-sysroot/
usr/lib/../lib/libopencv_sfm.so:
undefined reference to `google::LogMessageFatal::LogMessageFatal(char
const*, int)'

[1]:
meta-oe/recipes-support/opencv/opencv/0001-sfm-link-with-Glog_LIBS.patch

Signed-off-by: Daniel Gomez <dagmcr@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-02-03 08:41:05 -08:00
Alexander Kanavin
ea427dceaa opencv: update 4.5.2 -> 4.5.5
Drop backports.

Disable ffmpeg, as opencv is not yet compatible with ffmpeg 5.0.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-01-25 09:13:09 -08:00
Khem Raj
1d2da22e77 meta-oe: Use setuptools3-base
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-01-12 09:35:18 -08:00
Richard Purdie
b402a3076f recipes: Update SRC_URI branch and protocols
This patch updates SRC_URIs using git to include branch=master if no branch is set
and also to use protocol=https for github urls as generated by the conversion script
in OE-Core.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-11-03 06:57:49 -07:00
Mingli Yu
2178fd7386 opencv: remove setup_vars_opencv4.sh
Currently opencv ships with setup_vars_opencv4.sh, but there comes below
error:
 # /usr/bin/setup_vars_opencv4.sh
 Setting vars for OpenCV 4.5.2
 Append PYTHONPATH: /usr/bin/../lib/python3.9/site-packages
 # ls /usr/bin/../lib/python3.9/site-packages
 ls: cannot access '/usr/bin/../lib/python3.9/site-packages': No such file or directory

Considering the file is useless and also removed in other distribution [1],
so remove the file to avoid confusing.

[1] https://src.fedoraproject.org/rpms/opencv/blob/rawhide/f/opencv.spec#_424

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-10-25 10:40:50 -07:00
Martin Jansa
cafcc65e74 opencv: fix build with protobuf-3.18 when dnn PACKAGECONFIG is enabled
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-09-29 07:23:40 -07:00
Martin Jansa
c61dc077bb Convert to new override syntax
This is the result of automated script (0.9.1) conversion:

oe-core/scripts/contrib/convert-overrides.py .

converting the metadata to use ":" as the override character instead of "_".

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2021-08-03 10:21:25 -07:00
Khem Raj
3c022cd50d opencv: Do not lock to gcc only compiler
Latest version of openCV + clang compiles fine

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-05-28 06:55:34 -07:00
Khem Raj
a116630318 opencv: Disable tbb on riscv/musl
getcontext|setcontext functionality is provided via libucontext for musl
but this library is not yet ported to RISCV

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-05-20 09:09:13 -07:00
Saul Wold
e0581ad12f opencv: remove tbb packageconfig for powerpc
Since tbb does not build for powerpc remove it from the enabled list

Signed-off-by: Saul Wold <saul.wold@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-05-19 18:39:35 -07:00
Martin Jansa
41ca2e57bc opencv: link sfm module with Glog
* fixes build issue when dnn PACKAGECONFIG is enabled and ld-is-gold in DISTRO_FEATURES

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-04-15 09:28:43 -07:00
Martin Jansa
9a3040040f opencv: fetch wechat_qrcode files used by dnn PACKAGECONFIG
* otherwise build fails when dnn is enabled:
| -- wechat_qrcode: Download: detect.caffemodel
| CMake Error at /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/opencv/4.5.2-r0/git/cmake/OpenCVDownload.cmake:161 (message):
|   Not going to download detect.caffemodel
| Call Stack (most recent call first):
|   /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/opencv/4.5.2-r0/contrib/modules/wechat_qrcode/CMakeLists.txt:16 (ocv_download)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-04-15 09:28:43 -07:00
Khem Raj
ae4dd36601 opencv: Upgrade to 5.4.2
Drop patch which is already in 5.4.2 release

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-04-08 09:25:54 -07:00
Khem Raj
98175fd0cc opencv: Remove duplicate patch
<thread> include is already taken care with 0001-Fix-building-opencv-using-gcc-11.x-19244.patch

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-03-04 10:57:59 -08:00
Khem Raj
cbd15ecde5 opencv: Add packageconfig for building tests
This could be enabled when ptests are enabled but generally its fine to
disable them

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-03-04 10:57:59 -08:00
Khem Raj
75f7473f4b opencv: Upgrade to 4.5.1
Drop upstreamed patch
Add patches to support gcc 11 while here

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Jose Quaresma <quaresma.jose@gmail.com>
2021-03-03 11:08:29 -08:00
Mingli Yu
fc09f71162 opencv: improve reproducibility
Remove the build host info to improve reproducibility.

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-02-01 10:56:22 -08:00
Jose Quaresma
ea7862ab5a opencv: Update 4.4.0 -> 4.5.0
OpenCV licence has been changed to Apache 2

    * 0001-samples-cmake-digits-needs-opencv_dnn-module-to-buil.patch
      Upstream-Status: Backport [79a82013ad]

Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-11-15 12:25:53 -08:00
Mingli Yu
c75ffccd84 opencv: improve reproducibility
Remove the build host info to improve reproducibility, otherwise there
comes below detailed build host info when run below command on target.
  # python3 /usr/share/opencv4/samples/python/opencv_version.py --build
[snip]
  Extra modules:
    Location (extra):            /buildarea1/master-wr/build/User/customized_next/build/tmp/work/corei7-64-wrs-linux/opencv/4.3.0-r0/contrib/modules
[snip]

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-09-08 11:53:53 -07:00
Khem Raj
fa9f26ee02 opencv: Upgrade to 4.4.0
Add a patch to workaround a gcc bug on rv64

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-08-18 00:45:55 -07:00
Mingli Yu
a52e374663 opencv: make ts module external
* Remove the patch which used to create ts module as shared library
  as the logic is covered in the new added patch which makes ts module
  external
* Add a patch to make ts module external to fix the below broken link:
  # ls -l /usr/lib64/libopencv_ts.so
  lrwxrwxrwx 1 root root 19 Jun 14 19:13 /usr/lib64/libopencv_ts.so -> libopencv_ts.so.4.3
  # rpm -qf /usr/lib64/libopencv_ts.so
  libopencv-ts-dev-4.3.0-r0.corei7_64
  # readlink -e /usr/lib64/libopencv_ts.so
  # echo $?
  1

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-06-18 07:18:29 -07:00
Gregory Vimont
c86be743dd opencv: 4.1.0 -> 4.3.0
Signed-off-by: Gregory Vimont <gregory.vimont@softbankrobotics.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-05-05 16:23:36 -07:00
Khem Raj
0729fa9033 opencv: Tend for the compiler --param option rename in gcc10
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-01-16 11:12:55 -08:00
Ross Burton
5b92128aea opencv: abort configure if we need to download
OpenCV's habit of downloading files during do_configure is bad form
(as it becomes impossible to do offline builds), so add an option to
error out if a download would be needed.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-01-10 00:50:59 -08:00
Ross Burton
adfe0b6344 opencv: PACKAGECONFIG for G-API, use system ADE
The Graph API is enabled by default, and if ADE isn't present it will
download a copy of the source during do_configure.

Add a PACKAGECONFIG for the Graph API, and depend on the ADE that we
package.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-01-10 00:50:59 -08:00
Ross Burton
288367cfe1 opencv: also download face alignment data in do_fetch()
The face alignment data is downloaded in do_configure, so download it in
do_fetch and add it to the cache.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-01-10 00:50:59 -08:00
Ross Burton
74a54d5eda opencv: don't download during configure
OpenCV downloads data files during the CMake configure phase, which
is bad because fetching should only happen in do_fetch (and if proxies
are needed, won't be set in do_configure).

The recipe attempts to solve this already by having the repositories in
SRC_URI and moving the files to the correct place before do_configure().
However they are written to ${B} which is then wiped in do_configure so
they're not used.

The OpenCV download logic has a download cache with specially formatted
filenames, so take the downloaded files and populate the cache.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-01-10 00:50:59 -08:00
Khem Raj
b822b64aeb ade: Fix install paths in multilib builds
Fixes
ERROR: ade-0.1.1f-r0 do_package: QA Issue: ade: Files/directories were installed but not shipped in any package:
  /usr/lib
  /usr/lib/libade.a

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-12-20 16:07:50 -08:00
Carlos Rafael Giani
b29797ba4b opencv: Enable pkg-config .pc file generation
In OpenCV 4, .pc file generation is disabled by default. Yet, other
software such as GStreamer and FFmpeg rely on the .pc files during build
time configuration. Explicitely enable .pc file generation to make sure
pkg-config can be used for getting information about OpenCV.

Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-11-01 07:48:55 -07:00
Anuj Mittal
2902340351 ade: add recipe
ADE Framework is a graph construction, manipulation, and processing
framework.  ADE Framework is suitable for organizing data flow
processing and execution.

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-08-24 04:31:45 -07:00
Chin Huat Ang
e701e2d5c9 opencv: 3.4.5 -> 4.1.0
Update both opencv and opencv_contrib to 4.1.0 and refresh all patches.

Remove tiny-dnn from SRC_URI as it is not picked up by opencv cmake
build system. This also fixes a QA warning about using unstable github
archive.

Also update FILES_* to capture new paths which uses new directory name
"opencv4" instead of "OpenCV".

Signed-off-by: Chin Huat Ang <chin.huat.ang@intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-07-10 09:24:32 -07:00
Martin Jansa
f3018013ff opencv: use the same package name in PACKAGES and RDEPENDS
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-05-20 09:49:01 -07:00
Hongxu Jia
3189c0dc8f opencv: fix installed-vs-shipped QA WARNING
While baselib = 'lib64', there is a installed-vs-shipped QA WARNING
...
WARNING: QA Issue: opencv: Files/directories were installed but not shipped in any package:
  /usr/lib64/site-packages/cv2/load_config_py2.py
  /usr/lib64/site-packages/cv2/config.py
...

Drop unnecessary LIB_SUFFIX setting to fix the issue.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-03-14 07:24:03 -07:00
Khem Raj
6bcca16266 opencv: Upgrade to 3.4.5
Drop adding git revs to PV, its not needed since we are on release tag
Drop upstreamed patches

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-02-04 10:11:36 -08:00