diff options
| -rw-r--r-- | meta-oe/recipes-support/opencv/opencv_4.1.0.bb | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/meta-oe/recipes-support/opencv/opencv_4.1.0.bb b/meta-oe/recipes-support/opencv/opencv_4.1.0.bb index 5e89db0977..cfc7854e1d 100644 --- a/meta-oe/recipes-support/opencv/opencv_4.1.0.bb +++ b/meta-oe/recipes-support/opencv/opencv_4.1.0.bb | |||
| @@ -51,10 +51,28 @@ PV = "4.1.0" | |||
| 51 | 51 | ||
| 52 | S = "${WORKDIR}/git" | 52 | S = "${WORKDIR}/git" |
| 53 | 53 | ||
| 54 | # OpenCV wants to download more files during configure. We download these in | ||
| 55 | # do_fetch and construct a source cache in the format it expects | ||
| 56 | OPENCV_DLDIR = "${WORKDIR}/downloads" | ||
| 57 | |||
| 54 | do_unpack_extra() { | 58 | do_unpack_extra() { |
| 55 | tar xzf ${WORKDIR}/ipp/ippicv/${IPP_FILENAME} -C ${WORKDIR} | 59 | tar xzf ${WORKDIR}/ipp/ippicv/${IPP_FILENAME} -C ${WORKDIR} |
| 56 | cp ${WORKDIR}/vgg/*.i ${WORKDIR}/contrib/modules/xfeatures2d/src | 60 | |
| 57 | cp ${WORKDIR}/boostdesc/*.i ${WORKDIR}/contrib/modules/xfeatures2d/src | 61 | md5() { |
| 62 | # Return the MD5 of $1 | ||
| 63 | echo $(md5sum $1 | cut -d' ' -f1) | ||
| 64 | } | ||
| 65 | cache() { | ||
| 66 | TAG=$1 | ||
| 67 | shift | ||
| 68 | mkdir --parents ${OPENCV_DLDIR}/$TAG | ||
| 69 | for F in $*; do | ||
| 70 | DEST=${OPENCV_DLDIR}/$TAG/$(md5 $F)-$(basename $F) | ||
| 71 | test -e $DEST || ln -s $F $DEST | ||
| 72 | done | ||
| 73 | } | ||
| 74 | cache xfeatures2d/boostdesc ${WORKDIR}/boostdesc/*.i | ||
| 75 | cache xfeatures2d/vgg ${WORKDIR}/vgg/*.i | ||
| 58 | } | 76 | } |
| 59 | addtask unpack_extra after do_unpack before do_patch | 77 | addtask unpack_extra after do_unpack before do_patch |
| 60 | 78 | ||
| @@ -65,6 +83,7 @@ EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${WORKDIR}/contrib/modules \ | |||
| 65 | -DOPENCV_ICV_HASH=${IPP_MD5} \ | 83 | -DOPENCV_ICV_HASH=${IPP_MD5} \ |
| 66 | -DIPPROOT=${WORKDIR}/ippicv_lnx \ | 84 | -DIPPROOT=${WORKDIR}/ippicv_lnx \ |
| 67 | -DOPENCV_GENERATE_PKGCONFIG=ON \ | 85 | -DOPENCV_GENERATE_PKGCONFIG=ON \ |
| 86 | -DOPENCV_DOWNLOAD_PATH=${OPENCV_DLDIR} \ | ||
| 68 | ${@bb.utils.contains("TARGET_CC_ARCH", "-msse3", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1", "", d)} \ | 87 | ${@bb.utils.contains("TARGET_CC_ARCH", "-msse3", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1", "", d)} \ |
| 69 | ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.1", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1", "", d)} \ | 88 | ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.1", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1", "", d)} \ |
| 70 | ${@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)} \ | 89 | ${@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)} \ |
