diff options
Diffstat (limited to 'meta-oe/recipes-support/opencv')
-rw-r--r-- | meta-oe/recipes-support/opencv/ade/0001-use-GNUInstallDirs-for-detecting-install-paths.patch | 39 | ||||
-rw-r--r-- | meta-oe/recipes-support/opencv/ade_0.1.2.bb (renamed from meta-oe/recipes-support/opencv/ade_0.1.1f.bb) | 6 | ||||
-rw-r--r-- | meta-oe/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch | 36 | ||||
-rw-r--r-- | meta-oe/recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch | 2 | ||||
-rw-r--r-- | meta-oe/recipes-support/opencv/opencv/0003-To-fix-errors-as-following.patch | 2 | ||||
-rw-r--r-- | meta-oe/recipes-support/opencv/opencv/0008-Do-not-embed-build-directory-in-binaries.patch | 138 | ||||
-rw-r--r-- | meta-oe/recipes-support/opencv/opencv_4.9.0.bb (renamed from meta-oe/recipes-support/opencv/opencv_4.6.0.bb) | 77 |
7 files changed, 167 insertions, 133 deletions
diff --git a/meta-oe/recipes-support/opencv/ade/0001-use-GNUInstallDirs-for-detecting-install-paths.patch b/meta-oe/recipes-support/opencv/ade/0001-use-GNUInstallDirs-for-detecting-install-paths.patch deleted file mode 100644 index f038b0aa91..0000000000 --- a/meta-oe/recipes-support/opencv/ade/0001-use-GNUInstallDirs-for-detecting-install-paths.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 67ccf77d97b76e8260c9d793ab172577e2393dbc Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 19 Dec 2019 21:33:46 -0800 -Subject: [PATCH] use GNUInstallDirs for detecting install paths - -This helps with multilib builds - -Upstream-Status: Submitted [https://github.com/opencv/ade/pull/19] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - sources/ade/CMakeLists.txt | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -diff --git a/sources/ade/CMakeLists.txt b/sources/ade/CMakeLists.txt -index 2d1dd20..46415d1 100644 ---- a/sources/ade/CMakeLists.txt -+++ b/sources/ade/CMakeLists.txt -@@ -47,12 +47,14 @@ if(BUILD_ADE_DOCUMENTATION) - VERBATIM) - endif() - -+include(GNUInstallDirs) -+ - install(TARGETS ade COMPONENT dev - EXPORT adeTargets -- ARCHIVE DESTINATION lib -- LIBRARY DESTINATION lib -- RUNTIME DESTINATION lib -- INCLUDES DESTINATION include) -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) - - install(EXPORT adeTargets DESTINATION share/ade COMPONENT dev) - --- -2.24.1 - diff --git a/meta-oe/recipes-support/opencv/ade_0.1.1f.bb b/meta-oe/recipes-support/opencv/ade_0.1.2.bb index 48a45143db..93b14ad4f3 100644 --- a/meta-oe/recipes-support/opencv/ade_0.1.1f.bb +++ b/meta-oe/recipes-support/opencv/ade_0.1.2.bb @@ -4,11 +4,9 @@ and processing framework. ADE Framework is suitable for \ organizing data flow processing and execution." HOMEPAGE = "https://github.com/opencv/ade" -SRC_URI = "git://github.com/opencv/ade.git;branch=master;protocol=https \ - file://0001-use-GNUInstallDirs-for-detecting-install-paths.patch \ - " +SRC_URI = "git://github.com/opencv/ade.git;branch=master;protocol=https" -SRCREV = "58b2595a1a95cc807be8bf6222f266a9a1f393a9" +SRCREV = "1e02d7486bdb9c87993d91b9910e7cc6c4ddbf66" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" diff --git a/meta-oe/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch b/meta-oe/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch deleted file mode 100644 index 9e6a613713..0000000000 --- a/meta-oe/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 9b4959b97d2e95d4b49cf6ca2a3fce3cdb484f2d Mon Sep 17 00:00:00 2001 -From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> -Date: Thu, 31 Mar 2016 00:20:15 +0200 -Subject: [PATCH] 3rdparty/ippicv: Use pre-downloaded ipp - -Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> -Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com> - ---- - 3rdparty/ippicv/ippicv.cmake | 15 +-------------- - 1 file changed, 1 insertion(+), 14 deletions(-) - -diff --git a/3rdparty/ippicv/ippicv.cmake b/3rdparty/ippicv/ippicv.cmake -index 257af6fcc6..f88460450f 100644 ---- a/3rdparty/ippicv/ippicv.cmake -+++ b/3rdparty/ippicv/ippicv.cmake -@@ -34,18 +34,5 @@ function(download_ippicv root_var) - endif() - - set(THE_ROOT "${OpenCV_BINARY_DIR}/3rdparty/ippicv") -- ocv_download(FILENAME ${OPENCV_ICV_NAME} -- HASH ${OPENCV_ICV_HASH} -- URL -- "${OPENCV_IPPICV_URL}" -- "$ENV{OPENCV_IPPICV_URL}" -- "https://raw.githubusercontent.com/opencv/opencv_3rdparty/${IPPICV_COMMIT}/ippicv/" -- DESTINATION_DIR "${THE_ROOT}" -- ID IPPICV -- STATUS res -- UNPACK RELATIVE_URL) -- -- if(res) -- set(${root_var} "${THE_ROOT}/${OPENCV_ICV_PACKAGE_SUBDIR}" PARENT_SCOPE) -- endif() -+ set(${root_var} "${THE_ROOT}/${OPENCV_ICV_PACKAGE_SUBDIR}" PARENT_SCOPE) - endfunction() diff --git a/meta-oe/recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch b/meta-oe/recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch index 1e47f8b162..a3bbefaabe 100644 --- a/meta-oe/recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch +++ b/meta-oe/recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch @@ -7,6 +7,8 @@ Subject: [PATCH] Temporarliy work around deprecated ffmpeg RAW function Signed-off-by: Jason Wessel <jason.wessel@windriver.com> --- +Upstream-Status: Pending + modules/videoio/src/cap_ffmpeg_impl.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meta-oe/recipes-support/opencv/opencv/0003-To-fix-errors-as-following.patch b/meta-oe/recipes-support/opencv/opencv/0003-To-fix-errors-as-following.patch index bb47ef2bab..9df419d0b8 100644 --- a/meta-oe/recipes-support/opencv/opencv/0003-To-fix-errors-as-following.patch +++ b/meta-oe/recipes-support/opencv/opencv/0003-To-fix-errors-as-following.patch @@ -15,6 +15,8 @@ ts module. Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com> --- +Upstream-Status: Pending + modules/ts/include/opencv2/ts.hpp | 4 ++-- modules/ts/include/opencv2/ts/ocl_test.hpp | 2 +- modules/ts/include/opencv2/ts/ts_ext.hpp | 2 +- diff --git a/meta-oe/recipes-support/opencv/opencv/0008-Do-not-embed-build-directory-in-binaries.patch b/meta-oe/recipes-support/opencv/opencv/0008-Do-not-embed-build-directory-in-binaries.patch new file mode 100644 index 0000000000..8fda857080 --- /dev/null +++ b/meta-oe/recipes-support/opencv/opencv/0008-Do-not-embed-build-directory-in-binaries.patch @@ -0,0 +1,138 @@ +From: Victor Westerhuis <victor@westerhu.is> +Date: Sat, 19 Nov 2022 21:45:39 +0100 +Subject: Do not embed build directory in binaries + +This makes the opencv core module build reproducibly. + +https://salsa.debian.org/science-team/opencv/-/raw/master/debian/patches/0008-Do-not-embed-build-directory-in-binaries.patch +Upstream-Status: Backport +Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> +--- + modules/core/CMakeLists.txt | 10 ------ + modules/core/include/opencv2/core/private.hpp | 4 +-- + modules/core/include/opencv2/core/utility.hpp | 4 +-- + modules/core/src/utils/datafile.cpp | 48 +-------------------------- + 4 files changed, 5 insertions(+), 61 deletions(-) + +diff --git a/modules/core/CMakeLists.txt b/modules/core/CMakeLists.txt +index b78bb98..d96b669 100644 +--- a/modules/core/CMakeLists.txt ++++ b/modules/core/CMakeLists.txt +@@ -188,16 +188,6 @@ if(OPENCV_OTHER_INSTALL_PATH) + ") + endif() + +-set(OPENCV_DATA_CONFIG_STR "${OPENCV_DATA_CONFIG_STR} +-#define OPENCV_BUILD_DIR \"${CMAKE_BINARY_DIR}\" +-") +- +-file(RELATIVE_PATH SOURCE_DIR_RELATIVE ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}) +-set(OPENCV_DATA_CONFIG_STR "${OPENCV_DATA_CONFIG_STR} +-#define OPENCV_DATA_BUILD_DIR_SEARCH_PATHS \\ +- \"${SOURCE_DIR_RELATIVE}/\" +-") +- + if(WIN32) + file(RELATIVE_PATH INSTALL_DATA_DIR_RELATIVE "${CMAKE_INSTALL_PREFIX}/${OPENCV_BIN_INSTALL_PATH}" "${CMAKE_INSTALL_PREFIX}/${OPENCV_OTHER_INSTALL_PATH}") + else() +diff --git a/modules/core/include/opencv2/core/private.hpp b/modules/core/include/opencv2/core/private.hpp +index 146d37f..dd675bc 100644 +--- a/modules/core/include/opencv2/core/private.hpp ++++ b/modules/core/include/opencv2/core/private.hpp +@@ -818,10 +818,10 @@ Search directories: + 2. Check path specified by configuration parameter with "_HINT" suffix (name of environment variable). + 3. Check path specified by configuration parameter (name of environment variable). + If parameter value is not empty and nothing is found then stop searching. +-4. Detects build/install path based on: ++4. Detects install path based on: + a. current working directory (CWD) + b. and/or binary module location (opencv_core/opencv_world, doesn't work with static linkage) +-5. Scan `<source>/{,data}` directories if build directory is detected or the current directory is in source tree. ++5. Scan `<source>/{,data}` directories if the current directory is in source tree. + 6. Scan `<install>/share/OpenCV` directory if install directory is detected. + + @param relative_path Relative path to data file +diff --git a/modules/core/include/opencv2/core/utility.hpp b/modules/core/include/opencv2/core/utility.hpp +index 108c0d9..f15d9ea 100644 +--- a/modules/core/include/opencv2/core/utility.hpp ++++ b/modules/core/include/opencv2/core/utility.hpp +@@ -1163,10 +1163,10 @@ Search directories: + 2. OPENCV_SAMPLES_DATA_PATH_HINT environment variable + 3. OPENCV_SAMPLES_DATA_PATH environment variable + If parameter value is not empty and nothing is found then stop searching. +-4. Detects build/install path based on: ++4. Detects install path based on: + a. current working directory (CWD) + b. and/or binary module location (opencv_core/opencv_world, doesn't work with static linkage) +-5. Scan `<source>/{,data,samples/data}` directories if build directory is detected or the current directory is in source tree. ++5. Scan `<source>/{,data,samples/data}` directories if the current directory is in source tree. + 6. Scan `<install>/share/OpenCV` directory if install directory is detected. + + @see cv::utils::findDataFile +diff --git a/modules/core/src/utils/datafile.cpp b/modules/core/src/utils/datafile.cpp +index 3af83a5..6bda857 100644 +--- a/modules/core/src/utils/datafile.cpp ++++ b/modules/core/src/utils/datafile.cpp +@@ -280,32 +280,8 @@ cv::String findDataFile(const cv::String& relative_path, + + + // Steps: 4, 5, 6 +- cv::String cwd = utils::fs::getcwd(); +- cv::String build_dir(OPENCV_BUILD_DIR); +- bool has_tested_build_directory = false; +- if (isSubDirectory(build_dir, cwd) || isSubDirectory(utils::fs::canonical(build_dir), utils::fs::canonical(cwd))) +- { +- CV_LOG_DEBUG(NULL, "utils::findDataFile(): the current directory is build sub-directory: " << cwd); +- const char* build_subdirs[] = { OPENCV_DATA_BUILD_DIR_SEARCH_PATHS }; +- for (size_t k = 0; k < sizeof(build_subdirs)/sizeof(build_subdirs[0]); k++) +- { +- CV_LOG_DEBUG(NULL, "utils::findDataFile(): <build>/" << build_subdirs[k]); +- cv::String datapath = utils::fs::join(build_dir, build_subdirs[k]); +- if (utils::fs::isDirectory(datapath)) +- { +- for(size_t i = search_subdir.size(); i > 0; i--) +- { +- const cv::String& subdir = search_subdir[i - 1]; +- cv::String prefix = utils::fs::join(datapath, subdir); +- TRY_FILE_WITH_PREFIX(prefix); +- } +- } +- } +- has_tested_build_directory = true; +- } +- + cv::String source_dir; +- cv::String try_source_dir = cwd; ++ cv::String try_source_dir = utils::fs::getcwd(); + for (int levels = 0; levels < 3; ++levels) + { + if (utils::fs::exists(utils::fs::join(try_source_dir, "modules/core/include/opencv2/core/version.hpp"))) +@@ -341,28 +317,6 @@ cv::String findDataFile(const cv::String& relative_path, + CV_LOG_INFO(NULL, "Can't detect module binaries location"); + } + +- if (!has_tested_build_directory && +- (isSubDirectory(build_dir, module_path) || isSubDirectory(utils::fs::canonical(build_dir), utils::fs::canonical(module_path))) +- ) +- { +- CV_LOG_DEBUG(NULL, "utils::findDataFile(): the binary module directory is build sub-directory: " << module_path); +- const char* build_subdirs[] = { OPENCV_DATA_BUILD_DIR_SEARCH_PATHS }; +- for (size_t k = 0; k < sizeof(build_subdirs)/sizeof(build_subdirs[0]); k++) +- { +- CV_LOG_DEBUG(NULL, "utils::findDataFile(): <build>/" << build_subdirs[k]); +- cv::String datapath = utils::fs::join(build_dir, build_subdirs[k]); +- if (utils::fs::isDirectory(datapath)) +- { +- for(size_t i = search_subdir.size(); i > 0; i--) +- { +- const cv::String& subdir = search_subdir[i - 1]; +- cv::String prefix = utils::fs::join(datapath, subdir); +- TRY_FILE_WITH_PREFIX(prefix); +- } +- } +- } +- } +- + #if defined OPENCV_INSTALL_DATA_DIR_RELATIVE + if (!module_path.empty()) // require module path + { diff --git a/meta-oe/recipes-support/opencv/opencv_4.6.0.bb b/meta-oe/recipes-support/opencv/opencv_4.9.0.bb index f6c10054c2..cf836d3ecf 100644 --- a/meta-oe/recipes-support/opencv/opencv_4.6.0.bb +++ b/meta-oe/recipes-support/opencv/opencv_4.9.0.bb @@ -10,49 +10,29 @@ ARM_INSTRUCTION_SET:armv5 = "arm" DEPENDS = "libtool swig-native bzip2 zlib glib-2.0 libwebp" -SRCREV_opencv = "b0dc474160e389b9c9045da5db49d03ae17c6a6b" -SRCREV_contrib = "7b77c355a8fdc97667b3fa1e7a0d37e4973fc868" -SRCREV_ipp = "a56b6ac6f030c312b2dce17430eef13aed9af274" +SRCREV_opencv = "dad8af6b17f8e60d7b95a1203a1b4d22f56574cf" +SRCREV_contrib = "c7602a8f74205e44389bd6a4e8d727d32e7e27b4" SRCREV_boostdesc = "34e4206aef44d50e6bbcd0ab06354b52e7466d26" SRCREV_vgg = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d" SRCREV_face = "8afa57abc8229d611c4937165d20e2a2d9fc5a12" SRCREV_wechat-qrcode = "a8b69ccc738421293254aec5ddb38bd523503252" -def ipp_filename(d): - import re - arch = d.getVar('TARGET_ARCH') - if re.match("i.86$", arch): - return "ippicv_2020_lnx_ia32_20191018_general.tgz" - else: - return "ippicv_2020_lnx_intel64_20191018_general.tgz" - -def ipp_md5sum(d): - import re - arch = d.getVar('TARGET_ARCH') - if re.match("i.86$", arch): - return "ad189a940fb60eb71f291321322fe3e8" - else: - return "7421de0095c7a39162ae13a6098782f9" - -IPP_FILENAME = "${@ipp_filename(d)}" -IPP_MD5 = "${@ipp_md5sum(d)}" SRCREV_FORMAT = "opencv_contrib_ipp_boostdesc_vgg" -SRC_URI = "git://github.com/opencv/opencv.git;name=opencv;branch=master;protocol=https \ - git://github.com/opencv/opencv_contrib.git;destsuffix=contrib;name=contrib;branch=master;protocol=https \ - git://github.com/opencv/opencv_3rdparty.git;branch=ippicv/master_20191018;destsuffix=ipp;name=ipp;protocol=https \ - git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=boostdesc;name=boostdesc;protocol=https \ - git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=vgg;name=vgg;protocol=https \ - git://github.com/opencv/opencv_3rdparty.git;branch=contrib_face_alignment_20170818;destsuffix=face;name=face;protocol=https \ - git://github.com/WeChatCV/opencv_3rdparty.git;branch=wechat_qrcode;destsuffix=wechat_qrcode;name=wechat-qrcode;protocol=https \ - file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \ +SRC_URI = "git://github.com/opencv/opencv.git;name=opencv;branch=4.x;protocol=https \ + git://github.com/opencv/opencv_contrib.git;destsuffix=git/contrib;name=contrib;branch=4.x;protocol=https \ + git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=git/boostdesc;name=boostdesc;protocol=https \ + git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=git/vgg;name=vgg;protocol=https \ + git://github.com/opencv/opencv_3rdparty.git;branch=contrib_face_alignment_20170818;destsuffix=git/face;name=face;protocol=https \ + git://github.com/WeChatCV/opencv_3rdparty.git;branch=wechat_qrcode;destsuffix=git/wechat_qrcode;name=wechat-qrcode;protocol=https \ file://0003-To-fix-errors-as-following.patch \ file://0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch \ file://0001-Dont-use-isystem.patch \ file://download.patch \ file://0001-Make-ts-module-external.patch \ + file://0008-Do-not-embed-build-directory-in-binaries.patch \ " -SRC_URI:append:riscv64 = " file://0001-Use-Os-to-compile-tinyxml2.cpp.patch;patchdir=../contrib" +SRC_URI:append:riscv64 = " file://0001-Use-Os-to-compile-tinyxml2.cpp.patch;patchdir=contrib" S = "${WORKDIR}/git" @@ -61,7 +41,6 @@ S = "${WORKDIR}/git" OPENCV_DLDIR = "${WORKDIR}/downloads" do_unpack_extra() { - tar xzf ${WORKDIR}/ipp/ippicv/${IPP_FILENAME} -C ${WORKDIR} md5() { # Return the MD5 of $1 @@ -76,22 +55,21 @@ do_unpack_extra() { test -e $DEST || ln -s $F $DEST done } - cache xfeatures2d/boostdesc ${WORKDIR}/boostdesc/*.i - cache xfeatures2d/vgg ${WORKDIR}/vgg/*.i - cache data ${WORKDIR}/face/*.dat - cache wechat_qrcode ${WORKDIR}/wechat_qrcode/*.caffemodel - cache wechat_qrcode ${WORKDIR}/wechat_qrcode/*.prototxt + cache xfeatures2d/boostdesc ${S}/boostdesc/*.i + cache xfeatures2d/vgg ${S}/vgg/*.i + cache data ${S}/face/*.dat + cache wechat_qrcode ${S}/wechat_qrcode/*.caffemodel + cache wechat_qrcode ${S}/wechat_qrcode/*.prototxt } addtask unpack_extra after do_unpack before do_patch CMAKE_VERBOSE = "VERBOSE=1" -EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${WORKDIR}/contrib/modules \ +EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${S}/contrib/modules \ -DWITH_1394=OFF \ -DENABLE_PRECOMPILED_HEADERS=OFF \ -DCMAKE_SKIP_RPATH=ON \ - -DOPENCV_ICV_HASH=${IPP_MD5} \ - -DIPPROOT=${WORKDIR}/ippicv_lnx \ + -DWITH_IPP=OFF \ -DOPENCV_GENERATE_PKGCONFIG=ON \ -DOPENCV_DOWNLOAD_PATH=${OPENCV_DLDIR} \ -DOPENCV_ALLOW_DOWNLOADS=OFF \ @@ -109,7 +87,7 @@ EXTRA_OECMAKE:remove:x86 = " -DENABLE_SSE41=1 -DENABLE_SSE42=1" PACKAGECONFIG ??= "gapi python3 eigen jpeg png tiff v4l libv4l gstreamer samples tbb gphoto2 \ ${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk", "", d)} \ - ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "libav", "", d)}" + ${@bb.utils.contains_any("LICENSE_FLAGS_ACCEPTED", "commercial_ffmpeg commercial", "libav", "", d)}" # TBB does not build for powerpc so disable that package config PACKAGECONFIG:remove:powerpc = "tbb" @@ -120,7 +98,7 @@ PACKAGECONFIG:remove:libc-musl:riscv32 = "tbb" PACKAGECONFIG[gapi] = "-DWITH_ADE=ON -Dade_DIR=${STAGING_LIBDIR},-DWITH_ADE=OFF,ade" PACKAGECONFIG[amdblas] = "-DWITH_OPENCLAMDBLAS=ON,-DWITH_OPENCLAMDBLAS=OFF,libclamdblas," PACKAGECONFIG[amdfft] = "-DWITH_OPENCLAMDFFT=ON,-DWITH_OPENCLAMDFFT=OFF,libclamdfft," -PACKAGECONFIG[dnn] = "-DBUILD_opencv_dnn=ON -DPROTOBUF_UPDATE_FILES=ON -DBUILD_PROTOBUF=OFF,-DBUILD_opencv_dnn=OFF,protobuf protobuf-native," +PACKAGECONFIG[dnn] = "-DBUILD_opencv_dnn=ON -DPROTOBUF_UPDATE_FILES=ON -DBUILD_PROTOBUF=OFF -DCMAKE_CXX_STANDARD=17,-DBUILD_opencv_dnn=OFF,protobuf protobuf-native," PACKAGECONFIG[eigen] = "-DWITH_EIGEN=ON,-DWITH_EIGEN=OFF,libeigen gflags glog," PACKAGECONFIG[freetype] = "-DBUILD_opencv_freetype=ON,-DBUILD_opencv_freetype=OFF,freetype," PACKAGECONFIG[gphoto2] = "-DWITH_GPHOTO2=ON,-DWITH_GPHOTO2=OFF,libgphoto2," @@ -132,10 +110,10 @@ PACKAGECONFIG[jpeg] = "-DWITH_JPEG=ON,-DWITH_JPEG=OFF,jpeg," PACKAGECONFIG[libav] = "-DWITH_FFMPEG=ON,-DWITH_FFMPEG=OFF,libav," PACKAGECONFIG[libv4l] = "-DWITH_LIBV4L=ON,-DWITH_LIBV4L=OFF,v4l-utils," PACKAGECONFIG[opencl] = "-DWITH_OPENCL=ON,-DWITH_OPENCL=OFF,opencl-headers virtual/opencl-icd," +PACKAGECONFIG[openvino] = "-DWITH_OPENVINO=ON,-DWITH_OPENVINO=OFF,openvino-inference-engine,openvino-inference-engine" PACKAGECONFIG[oracle-java] = "-DJAVA_INCLUDE_PATH=${ORACLE_JAVA_HOME}/include -DJAVA_INCLUDE_PATH2=${ORACLE_JAVA_HOME}/include/linux -DJAVA_AWT_INCLUDE_PATH=${ORACLE_JAVA_HOME}/include -DJAVA_AWT_LIBRARY=${ORACLE_JAVA_HOME}/lib/amd64/libjawt.so -DJAVA_JVM_LIBRARY=${ORACLE_JAVA_HOME}/lib/amd64/server/libjvm.so,,ant-native oracle-jse-jdk oracle-jse-jdk-native," PACKAGECONFIG[png] = "-DWITH_PNG=ON,-DWITH_PNG=OFF,libpng," -PACKAGECONFIG[python2] = "-DPYTHON2_NUMPY_INCLUDE_DIRS:PATH=${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/numpy/core/include,,python-numpy," -PACKAGECONFIG[python3] = "-DPYTHON3_NUMPY_INCLUDE_DIRS:PATH=${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/numpy/core/include,,python3-numpy," +PACKAGECONFIG[python3] = "-DPYTHON3_INCLUDE_PATH=${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI} -DPYTHON3_NUMPY_INCLUDE_DIRS:PATH=${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/numpy/core/include,,python3-numpy," PACKAGECONFIG[samples] = "-DBUILD_EXAMPLES=ON -DINSTALL_PYTHON_EXAMPLES=ON,-DBUILD_EXAMPLES=OFF,," PACKAGECONFIG[tbb] = "-DWITH_TBB=ON,-DWITH_TBB=OFF,tbb," PACKAGECONFIG[tests] = "-DBUILD_TESTS=ON,-DBUILD_TESTS=OFF,," @@ -143,13 +121,9 @@ PACKAGECONFIG[text] = "-DBUILD_opencv_text=ON,-DBUILD_opencv_text=OFF,tesseract, PACKAGECONFIG[tiff] = "-DWITH_TIFF=ON,-DWITH_TIFF=OFF,tiff," PACKAGECONFIG[v4l] = "-DWITH_V4L=ON,-DWITH_V4L=OFF,v4l-utils," -inherit pkgconfig cmake - -inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'setuptools3-base', '', d)} -inherit ${@bb.utils.contains('PACKAGECONFIG', 'python2', 'distutils-base', '', d)} +inherit pkgconfig cmake setuptools3-base python3native export PYTHON_CSPEC="-I${STAGING_INCDIR}/${PYTHON_DIR}" -export PYTHON="${STAGING_BINDIR_NATIVE}/${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3', 'python', d)}" export ORACLE_JAVA_HOME="${STAGING_DIR_NATIVE}/usr/bin/java" export JAVA_HOME="${STAGING_DIR_NATIVE}/usr/lib/jvm/openjdk-8-native" export ANT_DIR="${STAGING_DIR_NATIVE}/usr/share/ant/" @@ -159,7 +133,6 @@ TARGET_CC_ARCH += "-I${S}/include " PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'samples', '${PN}-samples', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'oracle-java', '${PN}-java', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'java', '${PN}-java', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'python2', 'python-${BPN}', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-${BPN}', '', d)} \ ${PN}-apps" @@ -183,7 +156,7 @@ python populate_packages:prepend () { metapkg = pn d.setVar('ALLOW_EMPTY:' + metapkg, "1") - blacklist = [ metapkg, "libopencv-ts" ] + blacklist = [ metapkg ] metapkg_rdepends = [ ] for pkg in packages[1:]: if not pkg in blacklist and not pkg in metapkg_rdepends and not pkg.endswith('-dev') and not pkg.endswith('-dbg') and not pkg.endswith('-doc') and not pkg.endswith('-locale') and not pkg.endswith('-staticdev'): @@ -206,10 +179,6 @@ INSANE_SKIP:${PN}-dbg = "libdir" ALLOW_EMPTY:${PN} = "1" -SUMMARY:python-opencv = "Python bindings to opencv" -FILES:python-opencv = "${PYTHON_SITEPACKAGES_DIR}/*" -RDEPENDS:python-opencv = "python-core python-numpy" - SUMMARY:python3-opencv = "Python bindings to opencv" FILES:python3-opencv = "${PYTHON_SITEPACKAGES_DIR}/*" RDEPENDS:python3-opencv = "python3-core python3-numpy" |