opencv: Use pre-downloaded ipp
PATCH v6 5/7 opencv: Use pre-downloaded ipp
We should not rely on cmake downloading ipp at configure time.
--- ...01-3rdparty-ippicv-Use-pre-downloaded-ipp.patch | 28 ++++++++++++++++++++++ meta-oe/recipes-support/opencv/opencv_3.1.bb | 12 ++++++++++ 2 files changed, 40 insertions(+) create mode 100644 meta-oe/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch
meta-oe/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch new file +28 -0
@@ -0,0 +1,28 @@ +From 049f931207631aa54af55a2917318d032b2ef3fa Mon Sep 17 00:00:00 2001 +From: Ricardo Ribalda Delgado <[email protected]> +Date: Thu, 31 Mar 2016 00:20:15 +0200 +Subject: [PATCH] 3rdparty/ippicv: Use pre-downloaded ipp + +Signed-off-by: Ricardo Ribalda Delgado <[email protected]> +--- + 3rdparty/ippicv/downloader.cmake | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/3rdparty/ippicv/downloader.cmake b/3rdparty/ippicv/downloader.cmake +index a6016dbe10bc..af4062c8e95e 100644 +--- a/3rdparty/ippicv/downloader.cmake ++++ b/3rdparty/ippicv/downloader.cmake +@@ -31,8 +31,10 @@ function(_icv_downloader) + return() # Not supported + endif() + ++ if(NOT DEFINED OPENCV_ICV_PATH) + set(OPENCV_ICV_UNPACK_PATH "${CMAKE_CURRENT_LIST_DIR}/unpack") + set(OPENCV_ICV_PATH "${OPENCV_ICV_UNPACK_PATH}${OPENCV_ICV_PACKAGE_SUBDIR}") ++ endif() + + if(DEFINED OPENCV_ICV_PACKAGE_DOWNLOADED + AND OPENCV_ICV_PACKAGE_DOWNLOADED STREQUAL OPENCV_ICV_PACKAGE_HASH +-- +2.8.0.rc3 +
meta-oe/recipes-support/opencv/opencv_3.1.bb +12 -0
@@ -14,19 +14,31 @@ DEPENDS = "python-numpy libtool swig swig-native python bzip2 zlib glib-2.0 libw SRCREV_opencv = "92387b1ef8fad15196dd5f7fb4931444a68bc93a" SRCREV_contrib = "5409d5ad560523c85c6796cc5a009347072d883c" +SRCREV_party3 = "81a676001ca8075ada498583e4166079e5744668" +IPP_MD5 = "808b791a6eac9ed78d32a7666804320e" + SRCREV_FORMAT = "opencv" SRC_URI = "git://github.com/Itseez/opencv.git;name=opencv \ git://github.com/Itseez/opencv_contrib.git;destsuffix=contrib;name=contrib \ + git://github.com/Itseez/opencv_3rdparty.git;branch=ippicv/master_20151201;destsuffix=party3;name=party3 \ + file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \ file://fixpkgconfig.patch" PV = "3.1+git${SRCPV}" S = "${WORKDIR}/git" +do_unpack_extra() { + tar xzf ${WORKDIR}/party3/ippicv/ippicv_linux_20151201.tgz -C ${WORKDIR} +} +addtask unpack_extra after do_unpack before do_patch + EXTRA_OECMAKE = "-DPYTHON2_NUMPY_INCLUDE_DIRS:PATH=${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/numpy/core/include \ -DOPENCV_EXTRA_MODULES_PATH=${WORKDIR}/contrib/modules \ -DWITH_1394=OFF \ -DCMAKE_SKIP_RPATH=ON \ + -DOPENCV_ICV_PACKAGE_DOWNLOADED=${IPP_MD5} \ + -DOPENCV_ICV_PATH=${WORKDIR}/ippicv_lnx \ ${@bb.utils.contains("TARGET_CC_ARCH", "-msse3", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1", "", d)} \ ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.1", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1", "", d)} \ ${@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)} \
Signature · 1 line
2.8.0.rc3
PATCH v6 6/7 opencv: Fix build on x86 platform
OpenCV wrongly assumes that the X86 variable would be set on Intel 32 bit architectures.
This patch adds the missing definition on those cases.
--- meta-oe/recipes-support/opencv/opencv_3.1.bb | 1 + 1 file changed, 1 insertion(+)
meta-oe/recipes-support/opencv/opencv_3.1.bb +1 -0
@@ -45,6 +45,7 @@ EXTRA_OECMAKE = "-DPYTHON2_NUMPY_INCLUDE_DIRS:PATH=${STAGING_LIBDIR}/${PYTHON_DI ${@base_conditional("libdir", "/usr/lib64", "-DLIB_SUFFIX=64", "", d)} \ ${@base_conditional("libdir", "/usr/lib32", "-DLIB_SUFFIX=32", "", d)} \ " +EXTRA_OECMAKE_append_x86 += "-DX86=ON" PACKAGECONFIG ??= "eigen jpeg png tiff v4l libv4l gstreamer samples tbb \ ${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk", "", d)} \
Signature · 1 line
2.8.0.rc3
Re: [meta-oe][PATCH v6 6/7] opencv: Fix build on x86 platform
Quoted 15 lines · Ricardo Ribalda Delgado
OpenCV wrongly assumes that the X86 variable would be set on Intel 32 bit architectures.
This patch adds the missing definition on those cases.
Signed-off-by Ricardo Ribalda Delgado <[email protected]>--- meta-oe/recipes-support/opencv/opencv_3.1.bb | 1 + 1 file changed, 1 insertion(+)meta-oe/recipes-support/opencv/opencv_3.1.bb +0
-0
meta-oe/recipes-support/opencv/opencv_3.1.bb EXTRA_OECMAKE = "-DPYTHON2_NUMPY_INCLUDE_DIRS:PATH=${STAGING_LIBDIR}/${PYTHON_DI · line 48
Quoted 4 lines
meta-oe/recipes-support/opencv/opencv_3.1.bb +1
-0@@ -45,6 +45,7 @@ EXTRA_OECMAKE = "-DPYTHON2_NUMPY_INCLUDE_DIRS:PATH=${STAGING_LIBDIR}/${PYTHON_DI ${@base_conditional("libdir", "/usr/lib64", "-DLIB_SUFFIX=64", "", d)} \ ${@base_conditional("libdir", "/usr/lib32", "-DLIB_SUFFIX=32", "", d)} \ " +EXTRA_OECMAKE_append_x86 += "-DX86=ON"
Version 6 seems to have gone back to combining _append with +=
It should be:
EXTRA_OECMAKE_append_x86 = " -DX86=ON"
Quoted 6 lines
meta-oe/recipes-support/opencv/opencv_3.1.bb +0
-1PACKAGECONFIG ??= "eigen jpeg png tiff v4l libv4l gstreamer samples tbb \ ${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk", "", d)} \ --2.8.0.rc3