diff options
author | Anuj Mittal <anuj.mittal@intel.com> | 2022-10-06 16:40:48 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2022-10-06 07:20:50 -0700 |
commit | 6b7cf95e75cbfc08cf1f6eddc7ce3f6a0a39edcf (patch) | |
tree | 4f8c0d13b5c4f9b6d1ec738721e84d9e8a893513 | |
parent | aab662c9946111ac80bc3b30c75975884441c2f4 (diff) | |
download | meta-openembedded-6b7cf95e75cbfc08cf1f6eddc7ce3f6a0a39edcf.tar.gz |
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>
-rw-r--r-- | meta-oe/recipes-support/opencv/opencv_4.6.0.bb | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/meta-oe/recipes-support/opencv/opencv_4.6.0.bb b/meta-oe/recipes-support/opencv/opencv_4.6.0.bb index f6c10054c..da1e659a4 100644 --- a/meta-oe/recipes-support/opencv/opencv_4.6.0.bb +++ b/meta-oe/recipes-support/opencv/opencv_4.6.0.bb | |||
@@ -39,12 +39,12 @@ IPP_MD5 = "${@ipp_md5sum(d)}" | |||
39 | 39 | ||
40 | SRCREV_FORMAT = "opencv_contrib_ipp_boostdesc_vgg" | 40 | SRCREV_FORMAT = "opencv_contrib_ipp_boostdesc_vgg" |
41 | SRC_URI = "git://github.com/opencv/opencv.git;name=opencv;branch=master;protocol=https \ | 41 | SRC_URI = "git://github.com/opencv/opencv.git;name=opencv;branch=master;protocol=https \ |
42 | git://github.com/opencv/opencv_contrib.git;destsuffix=contrib;name=contrib;branch=master;protocol=https \ | 42 | git://github.com/opencv/opencv_contrib.git;destsuffix=git/contrib;name=contrib;branch=master;protocol=https \ |
43 | git://github.com/opencv/opencv_3rdparty.git;branch=ippicv/master_20191018;destsuffix=ipp;name=ipp;protocol=https \ | 43 | git://github.com/opencv/opencv_3rdparty.git;branch=ippicv/master_20191018;destsuffix=git/ipp;name=ipp;protocol=https \ |
44 | git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=boostdesc;name=boostdesc;protocol=https \ | 44 | git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=git/boostdesc;name=boostdesc;protocol=https \ |
45 | git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=vgg;name=vgg;protocol=https \ | 45 | git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=git/vgg;name=vgg;protocol=https \ |
46 | git://github.com/opencv/opencv_3rdparty.git;branch=contrib_face_alignment_20170818;destsuffix=face;name=face;protocol=https \ | 46 | git://github.com/opencv/opencv_3rdparty.git;branch=contrib_face_alignment_20170818;destsuffix=git/face;name=face;protocol=https \ |
47 | git://github.com/WeChatCV/opencv_3rdparty.git;branch=wechat_qrcode;destsuffix=wechat_qrcode;name=wechat-qrcode;protocol=https \ | 47 | git://github.com/WeChatCV/opencv_3rdparty.git;branch=wechat_qrcode;destsuffix=git/wechat_qrcode;name=wechat-qrcode;protocol=https \ |
48 | file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \ | 48 | file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \ |
49 | file://0003-To-fix-errors-as-following.patch \ | 49 | file://0003-To-fix-errors-as-following.patch \ |
50 | file://0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch \ | 50 | file://0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch \ |
@@ -52,7 +52,7 @@ SRC_URI = "git://github.com/opencv/opencv.git;name=opencv;branch=master;protocol | |||
52 | file://download.patch \ | 52 | file://download.patch \ |
53 | file://0001-Make-ts-module-external.patch \ | 53 | file://0001-Make-ts-module-external.patch \ |
54 | " | 54 | " |
55 | SRC_URI:append:riscv64 = " file://0001-Use-Os-to-compile-tinyxml2.cpp.patch;patchdir=../contrib" | 55 | SRC_URI:append:riscv64 = " file://0001-Use-Os-to-compile-tinyxml2.cpp.patch;patchdir=contrib" |
56 | 56 | ||
57 | S = "${WORKDIR}/git" | 57 | S = "${WORKDIR}/git" |
58 | 58 | ||
@@ -61,7 +61,7 @@ S = "${WORKDIR}/git" | |||
61 | OPENCV_DLDIR = "${WORKDIR}/downloads" | 61 | OPENCV_DLDIR = "${WORKDIR}/downloads" |
62 | 62 | ||
63 | do_unpack_extra() { | 63 | do_unpack_extra() { |
64 | tar xzf ${WORKDIR}/ipp/ippicv/${IPP_FILENAME} -C ${WORKDIR} | 64 | tar xzf ${S}/ipp/ippicv/${IPP_FILENAME} -C ${S} |
65 | 65 | ||
66 | md5() { | 66 | md5() { |
67 | # Return the MD5 of $1 | 67 | # Return the MD5 of $1 |
@@ -76,22 +76,22 @@ do_unpack_extra() { | |||
76 | test -e $DEST || ln -s $F $DEST | 76 | test -e $DEST || ln -s $F $DEST |
77 | done | 77 | done |
78 | } | 78 | } |
79 | cache xfeatures2d/boostdesc ${WORKDIR}/boostdesc/*.i | 79 | cache xfeatures2d/boostdesc ${S}/boostdesc/*.i |
80 | cache xfeatures2d/vgg ${WORKDIR}/vgg/*.i | 80 | cache xfeatures2d/vgg ${S}/vgg/*.i |
81 | cache data ${WORKDIR}/face/*.dat | 81 | cache data ${S}/face/*.dat |
82 | cache wechat_qrcode ${WORKDIR}/wechat_qrcode/*.caffemodel | 82 | cache wechat_qrcode ${S}/wechat_qrcode/*.caffemodel |
83 | cache wechat_qrcode ${WORKDIR}/wechat_qrcode/*.prototxt | 83 | cache wechat_qrcode ${S}/wechat_qrcode/*.prototxt |
84 | } | 84 | } |
85 | addtask unpack_extra after do_unpack before do_patch | 85 | addtask unpack_extra after do_unpack before do_patch |
86 | 86 | ||
87 | CMAKE_VERBOSE = "VERBOSE=1" | 87 | CMAKE_VERBOSE = "VERBOSE=1" |
88 | 88 | ||
89 | EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${WORKDIR}/contrib/modules \ | 89 | EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${S}/contrib/modules \ |
90 | -DWITH_1394=OFF \ | 90 | -DWITH_1394=OFF \ |
91 | -DENABLE_PRECOMPILED_HEADERS=OFF \ | 91 | -DENABLE_PRECOMPILED_HEADERS=OFF \ |
92 | -DCMAKE_SKIP_RPATH=ON \ | 92 | -DCMAKE_SKIP_RPATH=ON \ |
93 | -DOPENCV_ICV_HASH=${IPP_MD5} \ | 93 | -DOPENCV_ICV_HASH=${IPP_MD5} \ |
94 | -DIPPROOT=${WORKDIR}/ippicv_lnx \ | 94 | -DIPPROOT=${S}/ippicv_lnx \ |
95 | -DOPENCV_GENERATE_PKGCONFIG=ON \ | 95 | -DOPENCV_GENERATE_PKGCONFIG=ON \ |
96 | -DOPENCV_DOWNLOAD_PATH=${OPENCV_DLDIR} \ | 96 | -DOPENCV_DOWNLOAD_PATH=${OPENCV_DLDIR} \ |
97 | -DOPENCV_ALLOW_DOWNLOADS=OFF \ | 97 | -DOPENCV_ALLOW_DOWNLOADS=OFF \ |