opencv: Fix use before set error on meta package
PATCH v3 1/4 opencv: Fix use before set error on meta package
This bug was introducing a loop dependency of opencv->opencv that was confusing dpkg.
--- meta-oe/recipes-support/opencv/opencv_3.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-support/opencv/opencv_3.0.bb +1 -1
@@ -86,8 +86,8 @@ python populate_packages_prepend () { metapkg_rdepends.append(pkg) d.setVar('RRECOMMENDS_' + metapkg, ' '.join(metapkg_rdepends)) - blacklist = [ metapkg ] metapkg = pn + 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') :
Signature · 1 line
2.7.0
PATCH v3 2/4 opencv: Update to version 3.1
The first major update in 3.0 release series
---
meta-oe/recipes-support/opencv/{opencv_3.0.bb => opencv_3.1.bb} | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
rename meta-oe/recipes-support/opencv/{opencv_3.0.bb => opencv_3.1.bb} (97%)meta-oe/recipes-support/opencv/opencv_3.1.bb renamed from meta-oe/recipes-support/opencv/opencv_3.0.bb +4 -4
@@ -10,15 +10,15 @@ ARM_INSTRUCTION_SET_armv5 = "arm" DEFAULT_PREFERENCE = "-1" -DEPENDS = "python-numpy libtool swig swig-native python bzip2 zlib glib-2.0" +DEPENDS = "python-numpy libtool swig swig-native python bzip2 zlib glib-2.0 libwebp" -SRCREV_opencv = "424c2bddb39dae97dc4639a24eaa0e0c8fbb8e69" -SRCREV_contrib = "844c30e8b2f2f4b34b96a169fafe9beea3c45e87" +SRCREV_opencv = "92387b1ef8fad15196dd5f7fb4931444a68bc93a" +SRCREV_contrib = "5409d5ad560523c85c6796cc5a009347072d883c" SRCREV_FORMAT = "opencv" SRC_URI = "git://github.com/Itseez/opencv.git;name=opencv \ git://github.com/Itseez/opencv_contrib.git;destsuffix=contrib;name=contrib" -PV = "3.0+git${SRCPV}" +PV = "3.1+git${SRCPV}" S = "${WORKDIR}/git"
Signature · 1 line
2.7.0
PATCH v3 3/4 opencv: Fix pkg-config file.
In reply to Ricardo Ribalda DelgadoLibdir was pointing to the wrong location
also fix for QA Issue: opencv.pc failed sanity test (tmpdir) in path
--- .../opencv/opencv/fixpkgconfig.patch | 29 ++++++++++++++++++++++ meta-oe/recipes-support/opencv/opencv_3.1.bb | 3 ++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-support/opencv/opencv/fixpkgconfig.patch
meta-oe/recipes-support/opencv/opencv/fixpkgconfig.patch new file +29 -0
@@ -0,0 +1,29 @@ +diff --git a/cmake/OpenCVGenPkgconfig.cmake b/cmake/OpenCVGenPkgconfig.cmake +index b8cb8777c06b..75281ee964fd 100644 +--- a/cmake/OpenCVGenPkgconfig.cmake ++++ b/cmake/OpenCVGenPkgconfig.cmake +@@ -27,7 +27,7 @@ macro(fix_prefix lst isown) + get_filename_component(libdir "${item}" PATH) + get_filename_component(libname "${item}" NAME_WE) + string(REGEX REPLACE "^lib(.*)" "\\1" libname "${libname}") +- list(APPEND _lst "-L${libdir}" "-l${libname}") ++ list(APPEND _lst "-l${libname}") + else() + list(APPEND _lst "-l${item}") + endif() +@@ -66,10 +66,14 @@ ocv_list_unique(_3rdparty) + + set(OPENCV_PC_LIBS + "-L\${exec_prefix}/${OPENCV_LIB_INSTALL_PATH}" ++ "-L\${exec_prefix}/${OPENCV_3P_LIB_INSTALL_PATH}" + "${_modules}" + ) + if (BUILD_SHARED_LIBS) +- set(OPENCV_PC_LIBS_PRIVATE "${_extra}") ++ set(OPENCV_PC_LIBS_PRIVATE ++ "-L\${exec_prefix}/${OPENCV_LIB_INSTALL_PATH}" ++ "${_extra}" ++ ) + else() + set(OPENCV_PC_LIBS_PRIVATE + "-L\${exec_prefix}/${OPENCV_3P_LIB_INSTALL_PATH}"
meta-oe/recipes-support/opencv/opencv_3.1.bb +2 -1
@@ -16,7 +16,8 @@ SRCREV_opencv = "92387b1ef8fad15196dd5f7fb4931444a68bc93a" SRCREV_contrib = "5409d5ad560523c85c6796cc5a009347072d883c" 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_contrib.git;destsuffix=contrib;name=contrib \ + file://fixpkgconfig.patch" PV = "3.1+git${SRCPV}"
Signature · 1 line
2.7.0
PATCH v3 4/4 opencv: Remove blacklist
In reply to Ricardo Ribalda DelgadoOpencv 3.1 builds fine with ffmpeg.
ricardo@neopili:~/curro/qt5022/oe/openembedded-core/build$ bitbake opencv Loading cache: 100% |############################################################################| ETA: 00:00:00 Loaded 2018 entries from dependency cache. NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.29.0" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "Debian-testing" TARGET_SYS = "i586-oe-linux" MACHINE = "qemux86" DISTRO = "nodistro" DISTRO_VERSION = "nodistro.0" TUNE_FEATURES = "m32 i586" TARGET_FPU = "" meta = "master:300f858ba07c938427ccd05a3d7220027a03d461" meta-oe = "master:29462f7161b346dbc2ea00830da869a0a1c35fb9"
NOTE: Preparing RunQueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 1242 tasks of which 1228 didn't need to be rerun and all succeeded.
--- meta-oe/recipes-support/opencv/opencv_3.1.bb | 2 -- 1 file changed, 2 deletions(-)
meta-oe/recipes-support/opencv/opencv_3.1.bb +0 -2
@@ -133,5 +133,3 @@ do_install_append() { cp -f bin/*-tutorial-* bin/*-example-* ${D}${datadir}/OpenCV/samples/bin/ } -# http://errors.yoctoproject.org/Errors/Details/40660/ -PNBLACKLIST[opencv] ?= "Not compatible with currently used ffmpeg 3"
Signature · 1 line
2.7.0
Re: [meta-oe][PATCH v3 4/4] opencv: Remove blacklist
OK, it build now, but please add one more patch to fix autodetected dependencies:
opencv-3.1+gitAUTOINC+92387b1ef8: libopencv-videoio rdepends on libgphotoport, but it isn't a build dependency, missing libgphoto2 in DEPENDS or PACKAGECONFIG? [build-deps] opencv-3.1+gitAUTOINC+92387b1ef8: libopencv-videoio rdepends on libgphoto2, but it isn't a build dependency, missing libgphoto2 in DEPENDS or PACKAGECONFIG? [build-deps] opencv-3.1+gitAUTOINC+92387b1ef8: libopencv-dnn rdepends on protobuf, but it isn't a build dependency, missing protobuf in DEPENDS or PACKAGECONFIG? [build-deps]
Quoted 51 lines · Ricardo Ribalda Delgado
Opencv 3.1 builds fine with ffmpeg.
ricardo@neopili:~/curro/qt5022/oe/openembedded-core/build$ bitbake opencv Loading cache: 100%|############################################################################| ETA: 00:00:00Loaded 2018 entries from dependency cache.
NOTE: Resolving any missing task queue dependenciesBuild Configuration:
BB_VERSION = "1.29.0" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "Debian-testing" TARGET_SYS = "i586-oe-linux" MACHINE = "qemux86" DISTRO = "nodistro" DISTRO_VERSION = "nodistro.0" TUNE_FEATURES = "m32 i586" TARGET_FPU = "" meta = "master:300f858ba07c938427ccd05a3d7220027a03d461" meta-oe = "master:29462f7161b346dbc2ea00830da869a0a1c35fb9"NOTE: Preparing RunQueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 1242 tasks of which 1228 didn't need to be rerun and all succeeded.Signed-off-by Ricardo Ribalda Delgado <[email protected]>--- meta-oe/recipes-support/opencv/opencv_3.1.bb | 2 -- 1 file changed, 2 deletions(-)meta-oe/recipes-support/opencv/opencv_3.1.bb +0
-0@@ -133,5 +133,3 @@ do_install_append() { cp -f bin/*-tutorial-* bin/*-example-*${D}${datadir}/OpenCV/samples/bin/
}meta-oe/recipes-support/opencv/opencv_3.1.bb +0
-3-# http://errors.yoctoproject.org/Errors/Details/40660/ -PNBLACKLIST[opencv] ?= "Not compatible with currently used ffmpeg 3" --2.7.0