Commit Graph

102 Commits

Author SHA1 Message Date
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
André Draszik
e219649594 meta-oe: remove True option to getVar calls (again)
A couple have still been missed in the past despite multiple
attempts at doing so (or simply have re-appeared?).

Search & replace made using the following command:
    sed -e 's|\(d\.getVar \?\)( \?\([^,()]*\), \?True)|\1(\2)|g' \
        -i $(git grep -E 'getVar ?\( ?([^,()]*), ?True\)' \
             | cut -d':' -f1 \
             | sort -u)

Signed-off-by: André Draszik <andre.draszik@jci.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-01-13 10:28:01 -08:00
Khem Raj
aee5ef8906 opencv: Fix build with clang
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-09-11 22:48:22 -07:00
Khem Raj
d5ed5b9ccf opencv: Fix build on big-endian systems
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-09-09 23:01:26 -07:00
Khem Raj
7b9f86ca79 opencv: Update to 3.4.3
* Drop backported patches
* Update versions of external submodules

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-09-09 10:46:29 -07:00
Jason Wessel
a44e42081d opencv: Work around deprecated ffmpeg functions
The ffmpeg no longer makes use of the AVFMT_RAWPICTURE format, but
opencv still has code in it for dealing with this type of exported
format.  For now it is easier to work around it and allow the code to
compile and it will just not get used.  A future version of OpenCV
will remove the AVFMT_RAWPICTURE handler.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-05-26 21:10:55 -07:00
Martin Jansa
99aa19ff53 recipes: use oe.utils.conditional instead of deprecated base_conditional
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2018-02-01 13:48:27 +00:00
Ricardo Ribalda Delgado
4a9ba44b11 opencv: Fix error when dynamic link
If opencv was imported in python or dynamic linked in gstreamer it was
producing this output and dying:

 [libprotobuf ERROR google/protobuf/descriptor_database.cc:58] File already
 exists in database: caffe.proto
 [libprotobuf FATAL google/protobuf/descriptor.cc:1315] CHECK failed:
 generated_database_->Add(encoded_file_descriptor, size):
 terminate called after throwing an instance of
 'google::protobuf::FatalException'

This patch backports a patch that fixes this issue.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-11-30 09:13:32 -08:00
Ricardo Ribalda Delgado
2bbef0ce64 opencv: Fix java wrapper generation
During configuration the java wrappers are generated (if java
is enabled via PACKAGECOFIG).

Unfortunately, the script that generates the .java files do not handle
properly paths with special symbols, such as +.

This is just a workaround for that.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-11-19 13:41:58 -08:00
Ricardo Ribalda Delgado
f888426e90 opencv: Download tinydnn manually
OpenCV was downloading tinydnn during configuration via a script. This
patch downloads and unpacks tinydnn manually.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-11-19 13:41:58 -08:00
Ricardo Ribalda Delgado
f4da4b7ceb opencv: Use OE built Protobuf
When dnn is enabled via PACKAGECONFIG it requires protobuf and
protobuf-native.

This patch modifies cmake files to detect properly protobuf.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-11-19 13:41:58 -08:00
Ricardo Ribalda Delgado
f27c6ce6b9 opencv: Update ICV variable names
Since 3.3 ICV variables have been renamed. Without this patch OpenCV
configure cannot find ICV/IPP binaries.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2017-11-19 13:41:58 -08:00
Kai Kang
6aa6ba3702 opencv: fix CVE-2017-14136
Backport patch to fix CVE-2017-14136 for opencv.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-09-22 22:50:47 +00:00
Khem Raj
98f96aa15e opencv: Fix build on aarch64
Enable intrinsics on arm/neon with clang while here

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-09-22 22:50:47 +00:00
Khem Raj
4a45235796 opencv: Fix build with clang
-isystem is not needed even with clang

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-09-13 11:13:25 +02:00
Martin Jansa
ec9e5ed062 recipes: remove blacklisted recipes
* as PNBLACKLIST message says, these recipes are blacklisted for long
  time and nobody showed any interest to fix them
* remove all unused .patch and .inc files as well

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-08-31 10:18:33 +02:00
Kai Kang
860f01d1bd opencv: fix CVEs
Fix CVEs for opencv 3.3:

* CVE-2017-12597
* CVE-2017-12598
* CVE-2017-12599
* CVE-2017-12600
* CVE-2017-12601
* CVE-2017-12602
* CVE-2017-12603
* CVE-2017-12604
* CVE-2017-12605
* CVE-2017-12606
* CVE-2017-12862
* CVE-2017-12863
* CVE-2017-12864

Refs:
1 https://github.com/opencv/opencv/pull/9376
2 https://security-tracker.debian.org/tracker/CVE-2017-12601

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-08-31 10:18:33 +02:00
Ismo Puustinen
31fceb560c opencv: update to version 3.3.
Update OpenCV recipe from version 3.2 to 3.3. Rebase patches and drop
those which are no longer relevant or already contained in upstream
OpenCV. Fix changed build options, such as UPDATE_PROTO_FILES to
PROTOBUF_UPDATE_FILES. Update also subcomponents (opencv-contrib and
opencv-3rdparty) to match with 3.3.

Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-08-13 13:21:02 +02:00
Ismo Puustinen
0abf5af3ff opencv: fix runtime dependencies.
The newly split "libopencv-ts" package is empty (and thus not created),
because all ts files are installed in the development package. So, do
not add a runtime dependency to libopencv-ts.

Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-06-12 06:56:45 +02:00
Ismo Puustinen
3b37c18838 opencv: fix compilation error when OpenCL is enabled.
The patch which changes test module function visilibility was missing
some OpenCL symbols. Export also those.

Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-06-12 06:56:45 +02:00
Ismo Puustinen
e76a391376 opencv: fix building with PACKAGECONFIG "dnn" enabled.
Dependency "lapack" isn't available in meta-openembedded and it doesn't
cause a build error, so drop it. Fix buidling dnn module by backporting
a patch from opencv-contrib.

Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-06-05 11:01:46 +02:00
Huang Qiyu
2e6d62fd47 opencv: Make opencv-ts create share library intead of static
Refer to other distro,make opencv-ts create share library intead of static.

Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-06-05 11:01:42 +02:00
Randy MacLeod
c931bc6a7a opencv: disable broken Intel FP16 detection
With opencv-3.2, the configuration detects if the target supports
half-precision floating-point format. This fails to compile for some
Intel targets such as skylake with an error such as:
   error: '_mm_cvtph_ps' was not declared in this scope

The configuration used to work in opencv-3.1 so revert two commits to
drop the FP16 detection even though it may make opencv slower.
The only change in the configure log is:
   - FP16: Compiler support is available
   + FP16: Compiler support is not available

The patch should be dropped when a newer version of opencv that includes commit:
   e5d9b608c4
is available. Backporting that fix was complicated.

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-05-09 16:01:24 +02:00
Randy MacLeod
296fb498fb Revert "opencv: disable broken Intel FP16 detection"
This reverts commit 51fbd3cf7d.

The long log was truncated due to a formatting error.

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-05-09 16:01:24 +02:00
Randy MacLeod
51fbd3cf7d opencv: disable broken Intel FP16 detection
With opencv-3.2, the configuration detects if the target supports
half-precision floating-point format. This fails to compile for some
Intel targets such as skylake with an error such as:
   error: '_mm_cvtph_ps' was not declared in this scope

The configuration worked in opencv-3.1 so revert two commits to
drop the FP16 detection even though it may make opencv slower.
The only change in the configure log is:

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-04-28 10:10:41 +02:00
Kai Kang
fa943b1138 opencv: correct subpackage name for multilib
Subpackage python3-${PN} is not right for multilib and it will be
extended to such as lib32-python3-lib32-opencv.

Replace PN with BPN to fix it.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-04-18 14:21:40 +02:00
Ismo Puustinen
2cdea6c5bb opencv: do not depend on swig.
Since swig is a code generator, just depend on swig-native.

Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-04-06 13:00:31 +02:00
Martin Jansa
cdb428e7c4 recipes: add removal date to PNBLACKLIST messages
* based on discussion in pndeprecated thread:
  https://patchwork.openembedded.org/patch/137573/
  update the messages to warn possible users that the
  recipe will be removed before the end of the next development
  cycle (before Yocto 2.4 is released).

* updated with:
  sed -i 's/^\(PNBLACKLIST.*".*\)"/\1 - the recipe will be removed on 2017-09-01 unless the issue is fixed"/g' `git grep PNBLACKLIST | sed 's/:.*//g' | sort -u | xargs`
* then noticed couple recipes being blacklisted only based on
  DISTRO_FEATURES, so removed those:
  meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.17.bb
  meta-oe/recipes-connectivity/bluez/bluez-hcidump_2.5.bb
  meta-oe/recipes-connectivity/bluez/bluez4_4.101.bb
  meta-oe/recipes-connectivity/bluez/gst-plugin-bluetooth_4.101.bb
  meta-oe/recipes-navigation/foxtrotgps/foxtrotgps_1.1.1.bb
  meta-oe/recipes-navigation/gypsy/gypsy.inc
  meta-oe/recipes-navigation/navit/navit.inc
  meta-oe/recipes-support/opensync/libsyncml_0.5.4.bb

* if it isn't fixed by this date, it's fair game to be removed
  whenever someone gets around to i

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-04-05 19:36:45 +02:00
Dmitry Rozhkov
b0699e496f opencv: remove redundant build dependency on python2
The recipe opencv_3.2.bb inherits to either distutils-base or
distutils3-base classes or both which do add appropriate
build dependency on python or python3 respectively.
There's no need to have python in DEPENDS explicitly.

It can even make things needlessly complicated in case a user
wants to build python3-only images.

The redundant build dependency on python is removed from DEPENDS.

Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-04-05 19:28:31 +02:00
Ricardo Ribalda Delgado
dc1d8fad10 opencv: Configure freetype via PACKAGECONFIG
Since: http://errors.yoctoproject.org/Errors/Details/117456/ opencv
freetype module fails to build.

This patch disables that module by default via PACKAGECONFIG until we
find out a better way to do it.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-02-13 18:43:24 +01:00
Ricardo Ribalda Delgado
742ab7fc91 opencv: Remove extra space
No functional change, it just looked ugly.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-01-10 13:14:01 +01:00
Ricardo Ribalda Delgado
75da410e4e opencv: Update to version 3.2
-Only enable protobuf as dependency if dnn module is enabled
-Download manually xfeatures from 3rd party repo
-Remove uneeded fixgcc60patch

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-01-10 13:12:55 +01:00
Ricardo Ribalda Delgado
1ae8c18622 opencv: Add new PACKAGECONFIG text
Fixes dangling dependency on text contrib module

WARNING: opencv-3.1+gitAUTOINC+92387b1ef8-r0 do_package_qa: QA Issue:
libopencv-text rdepends on tesseract, but it isn't a build dependency,
	missing tesseract in DEPENDS or PACKAGECONFIG? [build-deps]

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-01-10 13:12:55 +01:00
Ricardo Ribalda Delgado
0d0ce836ec opencv: Merge dbg packages and Fix QA Issues
The presence of more than on -dbg file made completely unusable the
rest, and there is no big win by having more than one.

Also this qa issue is fixed:

QA Issue: opencv-samples-dbg: found library in wrong location:
/usr/share/OpenCV/java/.debug/libopencv_java310.so [libdir]

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-12-26 08:23:21 +01:00
Ricardo Ribalda Delgado
21b4e5b6f6 opencv: Add new PACKAGECONFIG dnn
The dnn module depends on a linear algebra libray such as lapack.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-12-26 08:23:21 +01:00
Ricardo Ribalda Delgado
d6d14547dd opencv: Add missing DEPEND for opencl PKGCFG
OpenCL headers are not enough, we also require a valid icd (.so)

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-12-26 08:23:21 +01:00
Ricardo Ribalda Delgado
f66aa42d9e opencv: Add support for python3
New PACKAGECONFIG options: python2 and python3. Python3 selectec by
default, because it is almost 2017 ;).

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-12-26 08:23:20 +01:00
Ricardo Ribalda Delgado
39d2e1b70a opencv: Add support for OpenJDK
Add support for OpenJDK8 and Oracle-java

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-12-26 08:23:20 +01:00
Ricardo Ribalda Delgado
98b2cb5bc2 opencv: Add missing depends
contrib/modules/sfm depends on glog, gflags and libeigen. The CmakeList
does not seem to provide a way to disable/enable its build.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-12-26 08:23:19 +01:00
Ricardo Ribalda Delgado
83248edc6f opencv: Metapkg should not rdepend on -staticdev
Otherwise the running dependencies will grow considerably.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-12-26 08:23:19 +01:00
Ricardo Ribalda Delgado
68a23a497c opencv: Update repository location
All opencv repos are now on github.com/opencv

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-12-26 08:23:19 +01:00
Joshua Lock
efd3696e70 remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.

Search made with the following regex: getVar ?\(( ?[^,()]*), True\)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2016-12-02 09:16:17 +01:00
Richard Purdie
d361ef01a9 nis, opencv: Update getVar/setVar syntax
The deprecated APIs are removed from bitbake, update two old style references
in meta-oe/meta-networking.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-11-26 01:04:52 +01:00
Wenzong Fan
4d5f35b4e4 opencv: remove DEFAULT_PREFERENCE = "-1" for 3.1
The opencv 2.4 has been blacklisted, 3.1 should be the default choice
for both opencv and lib32-opencv.

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-11-23 15:29:53 +01:00
Wenzong Fan
cefba87ff0 opencv: checking existence of /usr/lib
Remove install errors:

  mv: cannot stat '.../tmp/work/mips64-wrs-linux/opencv/3.1+gitAUTOINC
  +92387b1ef8-r0/image/usr/lib/*': No such file or directory

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-11-23 15:24:45 +01:00
Wenzong Fan
a36efdd02f opencv: fix QA issue
Replace '/lib' with '${baselib}' to fix QA issue:

  ERROR: do_package_qa: QA Issue: non -staticdev package contains \
  static .a library: opencv-apps path \
  '.../opencv-apps/usr/share/OpenCV/3rdparty/lib64/libippicv.a' \
  [staticdev]

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-11-23 15:24:44 +01:00
Ross Burton
fded4cf6a8 opencv: fix packaging and install
The OpenCV*.cmake files and the static library should be in the opencv-dev
package, not opencv-apps.

There is no need to specify files for PN-dbg as they're automatically found, so
remove the FILES_PN-dbg assignment.

Conditionalise the installation of the example and tutorial binaries so it
doesn't abort if samples are disabled.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-10-21 18:20:44 +02:00
Martin Jansa
dc48e768f5 meta-oe: remove trailing spaces
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-08-22 15:56:29 +02:00