summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Hochstein <tom.hochstein@nxp.com>2021-04-30 16:04:01 -0500
committerOtavio Salvador <otavio@ossystems.com.br>2021-04-30 18:34:39 -0300
commit8118f36fd562e71df7afe7505d8a69eb329d1749 (patch)
tree5a915ae6375d351f0aa372eded36d20568985090
parent469653d2a9bf9d6362445354177c85fa34a4bed8 (diff)
downloadmeta-freescale-8118f36fd562e71df7afe7505d8a69eb329d1749.tar.gz
opencv: Upgrade to 4.5.2.imx
- Upgrade to the 4.5.2 i.MX fork. - Drop the redundant PV assignment - Adapt the i.MX test packageconfig now that upstream also has one Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
-rw-r--r--recipes-support/opencv/opencv_4.5.2.imx.bb (renamed from recipes-support/opencv/opencv_4.4.0.imx.bb)34
1 files changed, 22 insertions, 12 deletions
diff --git a/recipes-support/opencv/opencv_4.4.0.imx.bb b/recipes-support/opencv/opencv_4.5.2.imx.bb
index f50cca8a..0566341a 100644
--- a/recipes-support/opencv/opencv_4.4.0.imx.bb
+++ b/recipes-support/opencv/opencv_4.5.2.imx.bb
@@ -8,20 +8,21 @@ SUMMARY = "Opencv : The Open Computer Vision Library"
8HOMEPAGE = "http://opencv.org/" 8HOMEPAGE = "http://opencv.org/"
9SECTION = "libs" 9SECTION = "libs"
10 10
11LICENSE = "BSD-3-Clause" 11LICENSE = "Apache-2.0"
12LIC_FILES_CHKSUM = "file://LICENSE;md5=19598330421859a6dd353a4318091ac7" 12LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
13 13
14ARM_INSTRUCTION_SET_armv4 = "arm" 14ARM_INSTRUCTION_SET_armv4 = "arm"
15ARM_INSTRUCTION_SET_armv5 = "arm" 15ARM_INSTRUCTION_SET_armv5 = "arm"
16 16
17DEPENDS = "libtool swig-native bzip2 zlib glib-2.0 libwebp" 17DEPENDS = "libtool swig-native bzip2 zlib glib-2.0 libwebp"
18 18
19SRCREV_opencv = "c3bb57afeaf030f10939204d48d7c2a3842f4293" 19SRCREV_opencv = "69357b1e88680658a07cffde7678a4d697469f03"
20SRCREV_contrib = "5fae4082cc493efa5cb7a7486f9e009618a5198b" 20SRCREV_contrib = "f5d7f6712d4ff229ba4f45cf79dfd11c557d56fd"
21SRCREV_ipp = "a56b6ac6f030c312b2dce17430eef13aed9af274" 21SRCREV_ipp = "a56b6ac6f030c312b2dce17430eef13aed9af274"
22SRCREV_boostdesc = "34e4206aef44d50e6bbcd0ab06354b52e7466d26" 22SRCREV_boostdesc = "34e4206aef44d50e6bbcd0ab06354b52e7466d26"
23SRCREV_vgg = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d" 23SRCREV_vgg = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d"
24SRCREV_face = "8afa57abc8229d611c4937165d20e2a2d9fc5a12" 24SRCREV_face = "8afa57abc8229d611c4937165d20e2a2d9fc5a12"
25SRCREV_wechat-qrcode = "a8b69ccc738421293254aec5ddb38bd523503252"
25 26
26def ipp_filename(d): 27def ipp_filename(d):
27 import re 28 import re
@@ -49,12 +50,14 @@ SRC_URI = "git://github.com/opencv/opencv.git;name=opencv \
49 git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=boostdesc;name=boostdesc \ 50 git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=boostdesc;name=boostdesc \
50 git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=vgg;name=vgg \ 51 git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=vgg;name=vgg \
51 git://github.com/opencv/opencv_3rdparty.git;branch=contrib_face_alignment_20170818;destsuffix=face;name=face \ 52 git://github.com/opencv/opencv_3rdparty.git;branch=contrib_face_alignment_20170818;destsuffix=face;name=face \
53 git://github.com/WeChatCV/opencv_3rdparty.git;branch=wechat_qrcode;destsuffix=wechat_qrcode;name=wechat-qrcode \
52 file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \ 54 file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \
53 file://0003-To-fix-errors-as-following.patch \ 55 file://0003-To-fix-errors-as-following.patch \
54 file://0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch \ 56 file://0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch \
55 file://0001-Dont-use-isystem.patch \ 57 file://0001-Dont-use-isystem.patch \
56 file://download.patch \ 58 file://download.patch \
57 file://0001-Make-ts-module-external.patch \ 59 file://0001-Make-ts-module-external.patch \
60 file://0001-sfm-link-with-Glog_LIBS.patch;patchdir=../contrib \
58 " 61 "
59SRC_URI_append_riscv64 = " file://0001-Use-Os-to-compile-tinyxml2.cpp.patch;patchdir=../contrib" 62SRC_URI_append_riscv64 = " file://0001-Use-Os-to-compile-tinyxml2.cpp.patch;patchdir=../contrib"
60 63
@@ -83,6 +86,8 @@ do_unpack_extra() {
83 cache xfeatures2d/boostdesc ${WORKDIR}/boostdesc/*.i 86 cache xfeatures2d/boostdesc ${WORKDIR}/boostdesc/*.i
84 cache xfeatures2d/vgg ${WORKDIR}/vgg/*.i 87 cache xfeatures2d/vgg ${WORKDIR}/vgg/*.i
85 cache data ${WORKDIR}/face/*.dat 88 cache data ${WORKDIR}/face/*.dat
89 cache wechat_qrcode ${WORKDIR}/wechat_qrcode/*.caffemodel
90 cache wechat_qrcode ${WORKDIR}/wechat_qrcode/*.prototxt
86} 91}
87addtask unpack_extra after do_unpack before do_patch 92addtask unpack_extra after do_unpack before do_patch
88 93
@@ -128,6 +133,7 @@ PACKAGECONFIG[python2] = "-DPYTHON2_NUMPY_INCLUDE_DIRS:PATH=${STAGING_LIBDIR}/${
128PACKAGECONFIG[python3] = "-DPYTHON3_NUMPY_INCLUDE_DIRS:PATH=${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/numpy/core/include,,python3-numpy," 133PACKAGECONFIG[python3] = "-DPYTHON3_NUMPY_INCLUDE_DIRS:PATH=${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/numpy/core/include,,python3-numpy,"
129PACKAGECONFIG[samples] = "-DBUILD_EXAMPLES=ON -DINSTALL_PYTHON_EXAMPLES=ON,-DBUILD_EXAMPLES=OFF,," 134PACKAGECONFIG[samples] = "-DBUILD_EXAMPLES=ON -DINSTALL_PYTHON_EXAMPLES=ON,-DBUILD_EXAMPLES=OFF,,"
130PACKAGECONFIG[tbb] = "-DWITH_TBB=ON,-DWITH_TBB=OFF,tbb," 135PACKAGECONFIG[tbb] = "-DWITH_TBB=ON,-DWITH_TBB=OFF,tbb,"
136PACKAGECONFIG[tests] = "-DBUILD_TESTS=ON,-DBUILD_TESTS=OFF,,"
131PACKAGECONFIG[text] = "-DBUILD_opencv_text=ON,-DBUILD_opencv_text=OFF,tesseract," 137PACKAGECONFIG[text] = "-DBUILD_opencv_text=ON,-DBUILD_opencv_text=OFF,tesseract,"
132PACKAGECONFIG[tiff] = "-DWITH_TIFF=ON,-DWITH_TIFF=OFF,tiff," 138PACKAGECONFIG[tiff] = "-DWITH_TIFF=ON,-DWITH_TIFF=OFF,tiff,"
133PACKAGECONFIG[v4l] = "-DWITH_V4L=ON,-DWITH_V4L=OFF,v4l-utils," 139PACKAGECONFIG[v4l] = "-DWITH_V4L=ON,-DWITH_V4L=OFF,v4l-utils,"
@@ -218,6 +224,11 @@ do_install_append() {
218 mv ${D}/usr/lib/* ${D}/${libdir}/ 224 mv ${D}/usr/lib/* ${D}/${libdir}/
219 rm -rf ${D}/usr/lib 225 rm -rf ${D}/usr/lib
220 fi 226 fi
227 # remove build host path to improve reproducibility
228 if [ -f ${D}${libdir}/cmake/opencv4/OpenCVModules.cmake ]; then
229 sed -e 's@${STAGING_DIR_HOST}@@g' \
230 -i ${D}${libdir}/cmake/opencv4/OpenCVModules.cmake
231 fi
221} 232}
222 233
223TOOLCHAIN = "gcc" 234TOOLCHAIN = "gcc"
@@ -228,17 +239,17 @@ TOOLCHAIN = "gcc"
228 239
229SUMMARY = "Opencv : The Open Computer Vision Library, i.MX Fork" 240SUMMARY = "Opencv : The Open Computer Vision Library, i.MX Fork"
230 241
231LIC_FILES_CHKSUM = "file://LICENSE;md5=19598330421859a6dd353a4318091ac7" 242LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
232 243
233SRCREV_opencv = "e39e6eded2d365a5dc370e1a72717e132166cf07" 244SRCREV_opencv = "5423d53ae0d116ee5bbe52f8b5503f0cd8586998"
234SRCREV_contrib = "5fae4082cc493efa5cb7a7486f9e009618a5198b" 245SRCREV_contrib = "f5d7f6712d4ff229ba4f45cf79dfd11c557d56fd"
235SRCREV_extra = "65796edadce27ed013e3deeedb3c081ff527e4ec" 246SRCREV_extra = "855c4528402e563283f86f28c6393f57eb5dcf62"
236SRC_URI[tinydnn.md5sum] = "adb1c512e09ca2c7a6faef36f9c53e59" 247SRC_URI[tinydnn.md5sum] = "adb1c512e09ca2c7a6faef36f9c53e59"
237SRC_URI[tinydnn.sha256sum] = "e2c61ce8c5debaa644121179e9dbdcf83f497f39de853f8dd5175846505aa18b" 248SRC_URI[tinydnn.sha256sum] = "e2c61ce8c5debaa644121179e9dbdcf83f497f39de853f8dd5175846505aa18b"
238SRCREV_FORMAT_append = "_extra" 249SRCREV_FORMAT_append = "_extra"
239 250
240OPENCV_SRC ?= "git://source.codeaurora.org/external/imx/opencv-imx.git;protocol=https" 251OPENCV_SRC ?= "git://source.codeaurora.org/external/imx/opencv-imx.git;protocol=https"
241SRCBRANCH = "4.4.0_imx" 252SRCBRANCH = "4.5.2_imx"
242SRC_URI = "${OPENCV_SRC};branch=${SRCBRANCH};name=opencv \ 253SRC_URI = "${OPENCV_SRC};branch=${SRCBRANCH};name=opencv \
243 git://github.com/opencv/opencv_extra.git;destsuffix=extra;name=extra \ 254 git://github.com/opencv/opencv_extra.git;destsuffix=extra;name=extra \
244 git://github.com/opencv/opencv_contrib.git;destsuffix=contrib;name=contrib \ 255 git://github.com/opencv/opencv_contrib.git;destsuffix=contrib;name=contrib \
@@ -256,7 +267,6 @@ SRC_URI = "${OPENCV_SRC};branch=${SRCBRANCH};name=opencv \
256 file://OpenCV_DNN_examples.patch \ 267 file://OpenCV_DNN_examples.patch \
257 file://0001-Add-smaller-version-of-download_models.py.patch;patchdir=../extra \ 268 file://0001-Add-smaller-version-of-download_models.py.patch;patchdir=../extra \
258 " 269 "
259PV = "4.4.0.imx"
260 270
261PACKAGECONFIG_remove = "eigen" 271PACKAGECONFIG_remove = "eigen"
262PACKAGECONFIG_append_mx8 = " dnn text" 272PACKAGECONFIG_append_mx8 = " dnn text"
@@ -270,7 +280,7 @@ PACKAGECONFIG_append = " ${PACKAGECONFIG_OPENCL}"
270 280
271PACKAGECONFIG[openvx] = "-DWITH_OPENVX=ON -DOPENVX_ROOT=${STAGING_LIBDIR} -DOPENVX_LIB_CANDIDATES='OpenVX;OpenVXU',-DWITH_OPENVX=OFF,virtual/libopenvx," 281PACKAGECONFIG[openvx] = "-DWITH_OPENVX=ON -DOPENVX_ROOT=${STAGING_LIBDIR} -DOPENVX_LIB_CANDIDATES='OpenVX;OpenVXU',-DWITH_OPENVX=OFF,virtual/libopenvx,"
272PACKAGECONFIG[qt5] = "-DWITH_QT=ON -DOE_QMAKE_PATH_EXTERNAL_HOST_BINS=${STAGING_BINDIR_NATIVE} -DCMAKE_PREFIX_PATH=${STAGING_BINDIR_NATIVE}/cmake,-DWITH_QT=OFF,qtbase qtbase-native," 282PACKAGECONFIG[qt5] = "-DWITH_QT=ON -DOE_QMAKE_PATH_EXTERNAL_HOST_BINS=${STAGING_BINDIR_NATIVE} -DCMAKE_PREFIX_PATH=${STAGING_BINDIR_NATIVE}/cmake,-DWITH_QT=OFF,qtbase qtbase-native,"
273PACKAGECONFIG[test] = "-DBUILD_TESTS=ON -DINSTALL_TESTS=ON -DOPENCV_TEST_DATA_PATH=${S}/../extra/testdata, -DBUILD_TESTS=OFF -DINSTALL_TESTS=OFF," 283PACKAGECONFIG[tests-imx] = "-DINSTALL_TESTS=ON -DOPENCV_TEST_DATA_PATH=${S}/../extra/testdata, -DINSTALL_TESTS=OFF,"
274 284
275do_unpack_extra_append() { 285do_unpack_extra_append() {
276 mkdir -p ${S}/3rdparty/tinydnn/ 286 mkdir -p ${S}/3rdparty/tinydnn/
@@ -283,7 +293,7 @@ do_install_append() {
283 cp -r ${S}/samples/data/* ${D}${datadir}/OpenCV/samples/data 293 cp -r ${S}/samples/data/* ${D}${datadir}/OpenCV/samples/data
284 install -d ${D}${datadir}/OpenCV/samples/bin/ 294 install -d ${D}${datadir}/OpenCV/samples/bin/
285 cp -f bin/example_* ${D}${datadir}/OpenCV/samples/bin/ 295 cp -f bin/example_* ${D}${datadir}/OpenCV/samples/bin/
286 if ${@bb.utils.contains('PACKAGECONFIG', 'test', 'true', 'false', d)}; then 296 if ${@bb.utils.contains('PACKAGECONFIG', 'tests-imx', 'true', 'false', d)}; then
287 cp -r share/opencv4/testdata/cv/face/* ${D}${datadir}/opencv4/testdata/cv/face/ 297 cp -r share/opencv4/testdata/cv/face/* ${D}${datadir}/opencv4/testdata/cv/face/
288 fi 298 fi
289} 299}