All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v6 00/16] OpenCV bump
@ 2015-06-25 19:59 Samuel Martin
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 01/16] package/opencv: alphabetically sorted each _CONF_OPTS group Samuel Martin
                   ` (17 more replies)
  0 siblings, 18 replies; 44+ messages in thread
From: Samuel Martin @ 2015-06-25 19:59 UTC (permalink / raw)
  To: buildroot


Hi all,

Here is yet another iteration for the bump of OpenCV package, and
related features/packages.

Patches 1 cleans up the current opencv.mk file.
Patch 2 does the actual bump.
Patch 3 disables gst1-plugins-opencv.
Patch 4 fixes a long-standing issue in the OpenCV integration.
Patch 5 to 7 polish opencv menu.
Patches 8 to 15 add/improve 3rd-party supports.
Patches 16 fix reverse dependency (vlc).

Note that, if merged, patch 7/16 can/will break defconfigs having opencv
selected.

This series has been run in a local autobuilder, triggering more build
failures. A patch adding an exception for this series will be issued
soon...


Changes v5 -> v6:
- fix more build failures;
- rework opencv menu for gstreamer and GUI toolkit;
- and of course, all comments done in the previous round.

(Per-commit changelog append in each patch.)


Regards,


Samuel Martin (16):
  package/opencv: alphabetically sorted each _CONF_OPTS group
  package/opencv: bump to version 3.0
  package/gstreamer1/gst1-plugins-bad: disable opencv plugin with
    opencv-3
  package/opencv: define modules inter-dependencies
  package/opencv: reword modules' prompt and help text
  package/opencv: reduce modules on by default
  package/opencv: disable all modules by default
  package/opencv: add python support
  package/opencv: add a choice for selecting gstreamer support
  package/opencv: add gstreamer-1.x support
  package/opencv: add openmp support
  package/opencv: add a choice for selecting the gui toolkit
  package/opencv: add qt5 support
  package/opencv: add gtk3 support
  package/opencv: add opengl support
  package/vlc: add opencv support

 Config.in.legacy                                   |  32 +++
 package/gstreamer1/gst1-plugins-bad/Config.in      |  14 +-
 ...pthread-based-parallel_for-with-gcc-4.4.3.patch |  62 +++++
 .../0001-core-fix-x86-PIC-code-compilation.patch   |  49 ----
 ...002-fix-support-for-pthreads-parallel_for.patch | 212 +++++++++++++++
 ...ix-return-type-value-VideoFrameSource_GPU.patch |  40 ---
 ...VGenPkgconfig.cmake-rework-opencv.pc-gene.patch | 156 -----------
 package/opencv/Config.in                           | 293 +++++++++++++++------
 package/opencv/opencv.mk                           | 181 ++++++++++---
 ...opencv_wrapper-use-opencv2-style-includes.patch |  36 +++
 ...cv_example-add-missing-include-statements.patch |  29 ++
 package/vlc/Config.in                              |   2 +
 package/vlc/vlc.mk                                 |   8 +-
 13 files changed, 746 insertions(+), 368 deletions(-)
 create mode 100644 package/opencv/0001-Fixed-compilation-of-pthread-based-parallel_for-with-gcc-4.4.3.patch
 delete mode 100644 package/opencv/0001-core-fix-x86-PIC-code-compilation.patch
 create mode 100644 package/opencv/0002-fix-support-for-pthreads-parallel_for.patch
 delete mode 100644 package/opencv/0002-superres-Fix-return-type-value-VideoFrameSource_GPU.patch
 delete mode 100644 package/opencv/0003-cmake-OpenCVGenPkgconfig.cmake-rework-opencv.pc-gene.patch
 create mode 100644 package/vlc/0008-opencv_wrapper-use-opencv2-style-includes.patch
 create mode 100644 package/vlc/0009-opencv_example-add-missing-include-statements.patch

--
2.4.4

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 01/16] package/opencv: alphabetically sorted each _CONF_OPTS group
  2015-06-25 19:59 [Buildroot] [PATCH v6 00/16] OpenCV bump Samuel Martin
@ 2015-06-25 19:59 ` Samuel Martin
  2015-06-25 22:00   ` Yann E. MORIN
  2015-06-26 18:35   ` Thomas Petazzoni
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 02/16] package/opencv: bump to version 3.0 Samuel Martin
                   ` (16 subsequent siblings)
  17 siblings, 2 replies; 44+ messages in thread
From: Samuel Martin @ 2015-06-25 19:59 UTC (permalink / raw)
  To: buildroot

No new option added nor removed.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>

---
changes v5->v6:
- fix configure options ordering (Yann)

changes v4->v5:
- new patch
---
 package/opencv/opencv.mk | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index 9967abc..ee11220 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -12,9 +12,9 @@ OPENCV_LICENSE_FILES = LICENSE
 
 # OpenCV component options
 OPENCV_CONF_OPTS += \
-	-DBUILD_WITH_DEBUG_INFO=OFF \
 	-DBUILD_PERF_TESTS=$(if $(BR2_PACKAGE_OPENCV_BUILD_PERF_TESTS),ON,OFF) \
-	-DBUILD_TESTS=$(if $(BR2_PACKAGE_OPENCV_BUILD_TESTS),ON,OFF)
+	-DBUILD_TESTS=$(if $(BR2_PACKAGE_OPENCV_BUILD_TESTS),ON,OFF) \
+	-DBUILD_WITH_DEBUG_INFO=OFF
 
 # OpenCV build options
 OPENCV_CONF_OPTS += \
@@ -71,14 +71,14 @@ OPENCV_CONF_OPTS += \
 # * PowerPC support is turned off since its only effect is altering CFLAGS,
 #   adding '-mcpu=G3 -mtune=G5' to them, which is already handled by Buildroot.
 OPENCV_CONF_OPTS += \
+	-DENABLE_AVX=$(if $(BR2_X86_CPU_HAS_AVX),ON,OFF) \
+	-DENABLE_AVX2=$(if $(BR2_X86_CPU_HAS_AVX2),ON,OFF) \
 	-DENABLE_POWERPC=OFF \
 	-DENABLE_SSE=$(if $(BR2_X86_CPU_HAS_SSE),ON,OFF) \
 	-DENABLE_SSE2=$(if $(BR2_X86_CPU_HAS_SSE2),ON,OFF) \
 	-DENABLE_SSE3=$(if $(BR2_X86_CPU_HAS_SSE3),ON,OFF) \
 	-DENABLE_SSE41=$(if $(BR2_X86_CPU_HAS_SSE4),ON,OFF) \
 	-DENABLE_SSE42=$(if $(BR2_X86_CPU_HAS_SSE42),ON,OFF) \
-	-DENABLE_AVX=$(if $(BR2_X86_CPU_HAS_AVX),ON,OFF) \
-	-DENABLE_AVX2=$(if $(BR2_X86_CPU_HAS_AVX2),ON,OFF) \
 	-DENABLE_SSSE3=$(if $(BR2_X86_CPU_HAS_SSSE3),ON,OFF)
 
 # Cuda stuff
@@ -92,8 +92,8 @@ OPENCV_CONF_OPTS += -DWITH_NVCUVID=OFF
 
 # AMD stuff
 OPENCV_CONF_OPTS += \
-	-DWITH_OPENCLAMDFFT=OFF \
-	-DWITH_OPENCLAMDBLAS=OFF
+	-DWITH_OPENCLAMDBLAS=OFF \
+	-DWITH_OPENCLAMDFFT=OFF
 
 # Intel stuff
 OPENCV_CONF_OPTS += \
@@ -112,12 +112,12 @@ OPENCV_CONF_OPTS += -DWITH_XIMEA=OFF
 
 # Non-Linux support (Android options) must remain OFF:
 OPENCV_CONF_OPTS += \
-	-DWITH_ANDROID_CAMERA=OFF \
 	-DBUILD_ANDROID_CAMERA_WRAPPER=OFF \
 	-DBUILD_ANDROID_EXAMPLES=OFF \
-	-DINSTALL_ANDROID_EXAMPLES=OFF \
 	-DBUILD_FAT_JAVA_LIB=OFF \
-	-DBUILD_JAVA_SUPPORT=OFF
+	-DBUILD_JAVA_SUPPORT=OFF \
+	-DINSTALL_ANDROID_EXAMPLES=OFF \
+	-DWITH_ANDROID_CAMERA=OFF
 
 # Non-Linux support (Mac OSX options) must remain OFF:
 OPENCV_CONF_OPTS += \
@@ -127,22 +127,22 @@ OPENCV_CONF_OPTS += \
 
 # Non-Linux support (Windows options) must remain OFF:
 OPENCV_CONF_OPTS += \
-	-DWITH_VFW=OFF \
-	-DWITH_WIN32UI=OFF \
 	-DWITH_CSTRIPES=OFF \
 	-DWITH_DSHOW=OFF \
 	-DWITH_MSMF=OFF \
-	-DWITH_VIDEOINPUT=OFF
+	-DWITH_VFW=OFF \
+	-DWITH_VIDEOINPUT=OFF \
+	-DWITH_WIN32UI=OFF
 
 # Software/3rd-party support options.
 OPENCV_CONF_OPTS += \
 	-DBUILD_JASPER=OFF \
 	-DBUILD_JPEG=OFF \
+	-DBUILD_NEW_PYTHON_SUPPORT=OFF \
 	-DBUILD_OPENEXR=OFF \
 	-DBUILD_PNG=OFF \
 	-DBUILD_TIFF=OFF \
 	-DBUILD_ZLIB=OFF \
-	-DBUILD_NEW_PYTHON_SUPPORT=OFF \
 	-DINSTALL_C_EXAMPLES=OFF \
 	-DINSTALL_PYTHON_EXAMPLES=OFF \
 	-DINSTALL_TO_MANGLED_PATHS=OFF
@@ -221,8 +221,8 @@ endif
 
 ifeq ($(BR2_PACKAGE_OPENCV_WITH_V4L),y)
 OPENCV_CONF_OPTS += \
-	-DWITH_V4L=ON \
-	-DWITH_LIBV4L=$(if $(BR2_PACKAGE_LIBV4L),ON,OFF)
+	-DWITH_LIBV4L=$(if $(BR2_PACKAGE_LIBV4L),ON,OFF) \
+	-DWITH_V4L=ON
 OPENCV_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBV4L),libv4l)
 else
 OPENCV_CONF_OPTS += -DWITH_V4L=OFF -DWITH_LIBV4L=OFF
-- 
2.4.4

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 02/16] package/opencv: bump to version 3.0
  2015-06-25 19:59 [Buildroot] [PATCH v6 00/16] OpenCV bump Samuel Martin
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 01/16] package/opencv: alphabetically sorted each _CONF_OPTS group Samuel Martin
@ 2015-06-25 19:59 ` Samuel Martin
  2015-06-26 14:51   ` Yann E. MORIN
  2015-06-26 18:39   ` Thomas Petazzoni
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 03/16] package/gstreamer1/gst1-plugins-bad: disable opencv plugin with opencv-3 Samuel Martin
                   ` (15 subsequent siblings)
  17 siblings, 2 replies; 44+ messages in thread
From: Samuel Martin @ 2015-06-25 19:59 UTC (permalink / raw)
  To: buildroot

This major version bump is in fact a bump from 2.4.10 to 2.4.11, then to
3.0.

OpenCV-2.4.11 improves a lot the Buildroot integration, including a
couple of patches that are no longer needed:
- x86 PIC code compilation fix in core module [1];
- return type fix in superes module [2];
- opencv.pc generation [3].

It also improves the gstreamer-0.10/1.x detection [4], that will be
needed in a follow-up patch.

OpenCV-3.0 still requires 2 patches (backported from upstream fixing
pthread support [5,6].

The OpenCV-3.0 does some major changes, for which a transition guide
has been published [7].

Among these changes coming with OpenCV-3.0, some new modules have been
introduced and others got removed; leading to a bunch of configure
option updates (to keep as much as possible an iso-functional-perimeter)
and the legacy menu has been updated too.
The worth noticing removals being:
- the opencv_legacy and opencv_nonfree modules no longer exist;
- the opencv_contrib module has moved out of the opencv base tree and
  now has its own repository [8].
  There is currently no plan to support it.

Some 3rd-party supports have been improved or added; their integrations
in Buildroot will be addressed in follow-up patches.

[1] https://github.com/Itseez/opencv/commit/ea50be0529c248961e1b66293f8a9e4b807294a6
[2] https://github.com/Itseez/opencv/commit/2e393ab83362743ba1825ad4b31d4a2925c606b4
[3] https://github.com/Itseez/opencv/commit/eceada586bbf18fc267e437522ec4f1f23ddc656
[4] https://github.com/Itseez/opencv/commit/38bb0db9dbec08666c8a64b3e4ead8fadf15c980
[5] https://github.com/Itseez/opencv/commit/1f983ec39c97298b0c8ce409a1cc229ecf14e55c
[6] https://github.com/Itseez/opencv/commit/a482dcce464acbd5368fb93c6c3d52ba8401776a
[7] http://docs.opencv.org/master/db/dfa/tutorial_transition_guide.html
[8] https://github.com/itseez/opencv_contrib

Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>

---
changes v5->v6:
- rebase
- fix commit message (Yann)
- improve legacy options (Yann)
- use positive logic (Yann)
- remove duplicated configure options (Yann)
- update module selection comment
- add missing WITH_GSTREAMER_0_10 (Yann)
- add patches backported from upstream fixing failures on local
  autobuilder instances
- disable if BR2_STATIC_LIBS (fixe local autobuilder failures)

changes v4->v5:
- new patch
---
 Config.in.legacy                                   |  32 ++++
 ...pthread-based-parallel_for-with-gcc-4.4.3.patch |  62 ++++++
 .../0001-core-fix-x86-PIC-code-compilation.patch   |  49 -----
 ...002-fix-support-for-pthreads-parallel_for.patch | 212 +++++++++++++++++++++
 ...ix-return-type-value-VideoFrameSource_GPU.patch |  40 ----
 ...VGenPkgconfig.cmake-rework-opencv.pc-gene.patch | 156 ---------------
 package/opencv/Config.in                           |  52 ++---
 package/opencv/opencv.mk                           |  86 +++++++--
 8 files changed, 406 insertions(+), 283 deletions(-)
 create mode 100644 package/opencv/0001-Fixed-compilation-of-pthread-based-parallel_for-with-gcc-4.4.3.patch
 delete mode 100644 package/opencv/0001-core-fix-x86-PIC-code-compilation.patch
 create mode 100644 package/opencv/0002-fix-support-for-pthreads-parallel_for.patch
 delete mode 100644 package/opencv/0002-superres-Fix-return-type-value-VideoFrameSource_GPU.patch
 delete mode 100644 package/opencv/0003-cmake-OpenCVGenPkgconfig.cmake-rework-opencv.pc-gene.patch

diff --git a/Config.in.legacy b/Config.in.legacy
index 9b9fff0..d86d585 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -113,6 +113,38 @@ config BR2_TARGET_UBOOT_NETWORK
 	help
 	  U-Boot's custom network settings options have been removed.
 
+config BR2_PACKAGE_OPENCV_LIB_CONTRIB
+	bool "opencv contrib module no longer exists"
+	select BR2_LEGACY
+	help
+	  OpenCV >=3.0 does not come with in-tree contrib modules.
+
+	  They have been moved out of the OpenCV base tree, into the opencv_contrib
+	  repository:
+	    https://github.com/Itseez/opencv_contrib
+
+config BR2_PACKAGE_OPENCV_LIB_GPU
+	bool "opencv gpu module no longer exists"
+	select BR2_LEGACY
+	help
+	  opencv_gpu module no longer exists as is in OpenCV >=3.0.
+
+	  It has been split into several modules prefixed with "cuda" that require
+	  Cuda programming toolkit, which is not available in Buildroot. So cuda
+	  modules are forcibly disabled in Buildroot.
+
+config BR2_PACKAGE_OPENCV_LIB_LEGACY
+	bool "opencv legacy module no longer exists"
+	select BR2_LEGACY
+	help
+	  opencv_legacy module no longer exists in OpenCV >=3.0.
+
+config BR2_PACKAGE_OPENCV_LIB_NONFREE
+	bool "opencv nonfree module no longer exists"
+	select BR2_LEGACY
+	help
+	  opencv_nonfree module no longer exists in OpenCV >=3.0.
+
 ###############################################################################
 comment "Legacy options removed in 2015.05"
 
diff --git a/package/opencv/0001-Fixed-compilation-of-pthread-based-parallel_for-with-gcc-4.4.3.patch b/package/opencv/0001-Fixed-compilation-of-pthread-based-parallel_for-with-gcc-4.4.3.patch
new file mode 100644
index 0000000..2be8f33
--- /dev/null
+++ b/package/opencv/0001-Fixed-compilation-of-pthread-based-parallel_for-with-gcc-4.4.3.patch
@@ -0,0 +1,62 @@
+Backport from https://github.com/Itseez/opencv/commit/1f983ec39c97298b0c8ce409a1cc229ecf14e55c
+
+From 1f983ec39c97298b0c8ce409a1cc229ecf14e55c Mon Sep 17 00:00:00 2001
+From: Maksim Shabunin <maksim.shabunin@itseez.com>
+Date: Tue, 9 Jun 2015 13:59:48 +0300
+Subject: [PATCH] Fixed compilation of pthread-based parallel_for with gcc
+ 4.4.3
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+---
+ modules/core/src/parallel.cpp | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/modules/core/src/parallel.cpp b/modules/core/src/parallel.cpp
+index b1e7567..0b593ee 100644
+--- a/modules/core/src/parallel.cpp
++++ b/modules/core/src/parallel.cpp
+@@ -132,8 +132,14 @@
+ namespace cv
+ {
+     ParallelLoopBody::~ParallelLoopBody() {}
++#if defined HAVE_PTHREADS && HAVE_PTHREADS
++    void parallel_for_pthreads(const cv::Range& range, const cv::ParallelLoopBody& body, double nstripes);
++    size_t parallel_pthreads_get_threads_num();
++    void parallel_pthreads_set_threads_num(int num);
++#endif
+ }
+ 
++
+ namespace
+ {
+ #ifdef CV_PARALLEL_FRAMEWORK
+@@ -301,7 +307,7 @@ void cv::parallel_for_(const cv::Range& range, const cv::ParallelLoopBody& body,
+         }
+ 
+ #elif defined HAVE_PTHREADS
+-        void parallel_for_pthreads(const Range& range, const ParallelLoopBody& body, double nstripes);
++
+         parallel_for_pthreads(range, body, nstripes);
+ 
+ #else
+@@ -361,8 +367,6 @@ int cv::getNumThreads(void)
+ 
+ #elif defined HAVE_PTHREADS
+ 
+-        size_t parallel_pthreads_get_threads_num();
+-
+         return parallel_pthreads_get_threads_num();
+ 
+ #else
+@@ -424,8 +428,6 @@ void cv::setNumThreads( int threads )
+ 
+ #elif defined HAVE_PTHREADS
+ 
+-    void parallel_pthreads_set_threads_num(int num);
+-
+     parallel_pthreads_set_threads_num(threads);
+ 
+ #endif
+-- 
+2.4.4
+
diff --git a/package/opencv/0001-core-fix-x86-PIC-code-compilation.patch b/package/opencv/0001-core-fix-x86-PIC-code-compilation.patch
deleted file mode 100644
index 9e8c2e9..0000000
--- a/package/opencv/0001-core-fix-x86-PIC-code-compilation.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From ea50be0529c248961e1b66293f8a9e4b807294a6 Mon Sep 17 00:00:00 2001
-From: Samuel Martin <s.martin49@gmail.com>
-Date: Sun, 12 Oct 2014 10:17:23 +0200
-Subject: [PATCH] core: fix x86 PIC code compilation
-
-This bug was triggered by Buildroot autobuilders [1,2], causing this
-kind of failures [3,4]:
-
-  [ 14%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/system.cpp.o
-  /home/test/autobuild/instance-0/output/build/opencv-2.4.10/modules/core/src/system.cpp: In function '(static initializers for /home/test/autobuild/instance-0/output/build/opencv-2.4.10/modules/core/src/system.cpp)':
-  /home/test/autobuild/instance-0/output/build/opencv-2.4.10/modules/core/src/system.cpp:280:10: error: inconsistent operand constraints in an 'asm'
-  make[3]: *** [modules/core/CMakeFiles/opencv_core.dir/src/system.cpp.o] Error 1
-
-[1] http://buildroot.org/
-[2] http://autobuild.buildroot.org/
-[3] http://autobuild.buildroot.org/?reason=opencv-2.4.10
-[4] http://autobuild.buildroot.org/results/483/4838285b25d6293a5cf0bb9eadd5040a7c75d766/build-end.log
-
-Signed-off-by: Samuel Martin <s.martin49@gmail.com>
----
- modules/core/src/system.cpp | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/modules/core/src/system.cpp b/modules/core/src/system.cpp
-index 5a970d5..e9ffdc7 100644
---- a/modules/core/src/system.cpp
-+++ b/modules/core/src/system.cpp
-@@ -267,14 +267,17 @@ struct HWFeatures
-          : "cc"
-         );
-         #else
-+        // We need to preserve ebx since we are compiling PIC code.
-+        // This means we cannot use "=b" for the 2nd output register.
-         asm volatile
-         (
-          "pushl %%ebx\n\t"
-          "movl $7,%%eax\n\t"
-          "movl $0,%%ecx\n\t"
-          "cpuid\n\t"
-+         "movl %%ebx,%1\n\t"
-          "popl %%ebx\n\t"
--         : "=a"(cpuid_data[0]), "=b"(cpuid_data[1]), "=c"(cpuid_data[2]), "=d"(cpuid_data[3])
-+         : "=a"(cpuid_data[0]), "=r"(cpuid_data[1]), "=c"(cpuid_data[2]), "=d"(cpuid_data[3])
-          :
-          : "cc"
-         );
--- 
-2.1.2
-
diff --git a/package/opencv/0002-fix-support-for-pthreads-parallel_for.patch b/package/opencv/0002-fix-support-for-pthreads-parallel_for.patch
new file mode 100644
index 0000000..6eeb270
--- /dev/null
+++ b/package/opencv/0002-fix-support-for-pthreads-parallel_for.patch
@@ -0,0 +1,212 @@
+Backport from https://github.com/Itseez/opencv/commit/a482dcce464acbd5368fb93c6c3d52ba8401776a
+
+From a482dcce464acbd5368fb93c6c3d52ba8401776a Mon Sep 17 00:00:00 2001
+From: Alexander Alekhin <alexander.alekhin@itseez.com>
+Date: Thu, 11 Jun 2015 16:53:07 +0300
+Subject: [PATCH] fix support for pthreads parallel_for
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+---
+ CMakeLists.txt                         | 29 ++++++++++++++++++++++-------
+ cmake/OpenCVFindLibsPerf.cmake         | 14 +++++++++-----
+ cmake/templates/cvconfig.h.in          |  6 ++++++
+ modules/core/src/parallel.cpp          | 13 ++++++++-----
+ modules/core/src/parallel_pthreads.cpp |  2 +-
+ modules/core/src/precomp.hpp           |  6 ------
+ 6 files changed, 46 insertions(+), 24 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d9a17b3..27d8470 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -188,7 +188,7 @@ OCV_OPTION(WITH_QUICKTIME      "Use QuickTime for Video I/O insted of QTKit" OFF
+ OCV_OPTION(WITH_TBB            "Include Intel TBB support"                   OFF  IF (NOT IOS AND NOT WINRT) )
+ OCV_OPTION(WITH_OPENMP         "Include OpenMP support"                      OFF)
+ OCV_OPTION(WITH_CSTRIPES       "Include C= support"                          OFF  IF (WIN32 AND NOT WINRT)  )
+-OCV_OPTION(WITH_PTHREADS_PF    "Use pthreads-based parallel_for"             OFF  IF (NOT WIN32) )
++OCV_OPTION(WITH_PTHREADS_PF    "Use pthreads-based parallel_for"             ON   IF (NOT WIN32) )
+ OCV_OPTION(WITH_TIFF           "Include TIFF support"                        ON   IF (NOT IOS) )
+ OCV_OPTION(WITH_UNICAP         "Include Unicap support (GPL)"                OFF  IF (UNIX AND NOT APPLE AND NOT ANDROID) )
+ OCV_OPTION(WITH_V4L            "Include Video 4 Linux support"               ON   IF (UNIX AND NOT ANDROID) )
+@@ -1026,6 +1026,27 @@ if(DEFINED WITH_GPHOTO2)
+ endif(DEFINED WITH_GPHOTO2)
+ 
+ 
++# Order is similar to CV_PARALLEL_FRAMEWORK in core/src/parallel.cpp
++ocv_clear_vars(CV_PARALLEL_FRAMEWORK)
++if(HAVE_TBB)
++  set(CV_PARALLEL_FRAMEWORK "TBB (ver ${TBB_VERSION_MAJOR}.${TBB_VERSION_MINOR} interface ${TBB_INTERFACE_VERSION})")
++elseif(HAVE_CSTRIPES)
++  set(CV_PARALLEL_FRAMEWORK "C=")
++elseif(HAVE_OPENMP)
++  set(CV_PARALLEL_FRAMEWORK "OpenMP")
++elseif(HAVE_GCD)
++  set(CV_PARALLEL_FRAMEWORK "GCD")
++elseif(WINRT OR HAVE_CONCURRENCY)
++  set(CV_PARALLEL_FRAMEWORK "Concurrency")
++elseif(HAVE_PTHREADS_PF)
++  set(CV_PARALLEL_FRAMEWORK "pthreads")
++else()
++  set(CV_PARALLEL_FRAMEWORK "none")
++endif()
++status("")
++status("  Parallel framework:" TRUE THEN "${CV_PARALLEL_FRAMEWORK}" ELSE NO)
++
++
+ # ========================== Other third-party libraries ==========================
+ status("")
+ status("  Other third-party libraries:")
+@@ -1045,12 +1066,6 @@ status("    Use IPP Async:"  HAVE_IPP_A       THEN "YES" ELSE NO)
+ endif(DEFINED WITH_IPP_A)
+ 
+ status("    Use Eigen:"      HAVE_EIGEN       THEN "YES (ver ${EIGEN_WORLD_VERSION}.${EIGEN_MAJOR_VERSION}.${EIGEN_MINOR_VERSION})" ELSE NO)
+-status("    Use TBB:"        HAVE_TBB         THEN "YES (ver ${TBB_VERSION_MAJOR}.${TBB_VERSION_MINOR} interface ${TBB_INTERFACE_VERSION})" ELSE NO)
+-status("    Use OpenMP:"     HAVE_OPENMP      THEN YES ELSE NO)
+-status("    Use GCD"         HAVE_GCD         THEN YES ELSE NO)
+-status("    Use Concurrency" HAVE_CONCURRENCY THEN YES ELSE NO)
+-status("    Use C=:"         HAVE_CSTRIPES    THEN YES ELSE NO)
+-status("    Use pthreads for parallel for:"   HAVE_PTHREADS_PF THEN YES ELSE NO)
+ status("    Use Cuda:"       HAVE_CUDA        THEN "YES (ver ${CUDA_VERSION_STRING})" ELSE NO)
+ status("    Use OpenCL:"     HAVE_OPENCL      THEN YES ELSE NO)
+ 
+diff --git a/cmake/OpenCVFindLibsPerf.cmake b/cmake/OpenCVFindLibsPerf.cmake
+index bda5d79..d1bc541 100644
+--- a/cmake/OpenCVFindLibsPerf.cmake
++++ b/cmake/OpenCVFindLibsPerf.cmake
+@@ -120,12 +120,16 @@ if(WITH_OPENMP)
+   set(HAVE_OPENMP "${OPENMP_FOUND}")
+ endif()
+ 
+-if(UNIX OR ANDROID)
+-if(NOT APPLE AND NOT HAVE_TBB AND NOT HAVE_OPENMP)
+-  set(HAVE_PTHREADS_PF 1)
+-else()
+-  set(HAVE_PTHREADS_PF 0)
++if(NOT MSVC AND NOT DEFINED HAVE_PTHREADS)
++  set(_fname "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/pthread_test.cpp")
++  file(WRITE "${_fname}" "#include <pthread.h>\nint main() { (void)pthread_self(); return 0; }\n")
++  try_compile(HAVE_PTHREADS "${CMAKE_BINARY_DIR}" "${_fname}")
++  file(REMOVE "${_fname}")
+ endif()
++
++ocv_clear_vars(HAVE_PTHREADS_PF)
++if(WITH_PTHREADS_PF)
++  set(HAVE_PTHREADS_PF ${HAVE_PTHREADS})
+ else()
+   set(HAVE_PTHREADS_PF 0)
+ endif()
+diff --git a/cmake/templates/cvconfig.h.in b/cmake/templates/cvconfig.h.in
+index 4a1d1c6..3330774 100644
+--- a/cmake/templates/cvconfig.h.in
++++ b/cmake/templates/cvconfig.h.in
+@@ -139,6 +139,12 @@
+ /* PNG codec */
+ #cmakedefine HAVE_PNG
+ 
++/* Posix threads (pthreads) */
++#cmakedefine HAVE_PTHREADS
++
++/* parallel_for with pthreads */
++#cmakedefine HAVE_PTHREADS_PF
++
+ /* Qt support */
+ #cmakedefine HAVE_QT
+ 
+diff --git a/modules/core/src/parallel.cpp b/modules/core/src/parallel.cpp
+index 0b593ee..caa8129 100644
+--- a/modules/core/src/parallel.cpp
++++ b/modules/core/src/parallel.cpp
+@@ -80,6 +80,7 @@
+    4. HAVE_GCD         - system wide, used automatically        (APPLE only)
+    5. WINRT            - system wide, used automatically        (Windows RT only)
+    6. HAVE_CONCURRENCY - part of runtime, used automatically    (Windows only - MSVS 10, MSVS 11)
++   7. HAVE_PTHREADS_PF - pthreads if available
+ */
+ 
+ #if defined HAVE_TBB
+@@ -125,14 +126,14 @@
+ #  define CV_PARALLEL_FRAMEWORK "winrt-concurrency"
+ #elif defined HAVE_CONCURRENCY
+ #  define CV_PARALLEL_FRAMEWORK "ms-concurrency"
+-#elif defined HAVE_PTHREADS
++#elif defined HAVE_PTHREADS_PF
+ #  define CV_PARALLEL_FRAMEWORK "pthreads"
+ #endif
+ 
+ namespace cv
+ {
+     ParallelLoopBody::~ParallelLoopBody() {}
+-#if defined HAVE_PTHREADS && HAVE_PTHREADS
++#ifdef HAVE_PTHREADS_PF
+     void parallel_for_pthreads(const cv::Range& range, const cv::ParallelLoopBody& body, double nstripes);
+     size_t parallel_pthreads_get_threads_num();
+     void parallel_pthreads_set_threads_num(int num);
+@@ -306,7 +307,7 @@ void cv::parallel_for_(const cv::Range& range, const cv::ParallelLoopBody& body,
+             Concurrency::CurrentScheduler::Detach();
+         }
+ 
+-#elif defined HAVE_PTHREADS
++#elif defined HAVE_PTHREADS_PF
+ 
+         parallel_for_pthreads(range, body, nstripes);
+ 
+@@ -365,7 +366,7 @@ int cv::getNumThreads(void)
+         ? Concurrency::CurrentScheduler::Get()->GetNumberOfVirtualProcessors()
+         : pplScheduler->GetNumberOfVirtualProcessors());
+ 
+-#elif defined HAVE_PTHREADS
++#elif defined HAVE_PTHREADS_PF
+ 
+         return parallel_pthreads_get_threads_num();
+ 
+@@ -426,7 +427,7 @@ void cv::setNumThreads( int threads )
+                        Concurrency::MaxConcurrency, threads-1));
+     }
+ 
+-#elif defined HAVE_PTHREADS
++#elif defined HAVE_PTHREADS_PF
+ 
+     parallel_pthreads_set_threads_num(threads);
+ 
+@@ -452,6 +453,8 @@ int cv::getThreadNum(void)
+     return 0;
+ #elif defined HAVE_CONCURRENCY
+     return std::max(0, (int)Concurrency::Context::VirtualProcessorId()); // zero for master thread, unique number for others but not necessary 1,2,3,...
++#elif defined HAVE_PTHREADS_PF
++    return (int)(size_t)(void*)pthread_self(); // no zero-based indexing
+ #else
+     return 0;
+ #endif
+diff --git a/modules/core/src/parallel_pthreads.cpp b/modules/core/src/parallel_pthreads.cpp
+index 8c34959..091ea2d 100644
+--- a/modules/core/src/parallel_pthreads.cpp
++++ b/modules/core/src/parallel_pthreads.cpp
+@@ -42,7 +42,7 @@
+ 
+ #include "precomp.hpp"
+ 
+-#if defined HAVE_PTHREADS && HAVE_PTHREADS
++#ifdef HAVE_PTHREADS_PF
+ 
+ #include <algorithm>
+ #include <pthread.h>
+diff --git a/modules/core/src/precomp.hpp b/modules/core/src/precomp.hpp
+index d463126..88b60e4 100644
+--- a/modules/core/src/precomp.hpp
++++ b/modules/core/src/precomp.hpp
+@@ -292,12 +292,6 @@ TLSData<CoreTLSData>& getCoreTlsData();
+ #define CL_RUNTIME_EXPORT
+ #endif
+ 
+-#ifndef HAVE_PTHREADS
+-#if !(defined WIN32 || defined _WIN32 || defined WINCE || defined HAVE_WINRT)
+-#define HAVE_PTHREADS 1
+-#endif
+-#endif
+-
+ extern bool __termination; // skip some cleanups, because process is terminating
+                            // (for example, if ExitProcess() was already called)
+ 
+-- 
+2.4.4
+
diff --git a/package/opencv/0002-superres-Fix-return-type-value-VideoFrameSource_GPU.patch b/package/opencv/0002-superres-Fix-return-type-value-VideoFrameSource_GPU.patch
deleted file mode 100644
index d71235d..0000000
--- a/package/opencv/0002-superres-Fix-return-type-value-VideoFrameSource_GPU.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-superres: Fix return value VideoFrameSource_GPU
-
-Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
-
-From 2e393ab83362743ba1825ad4b31d4a2925c606b4 Mon Sep 17 00:00:00 2001
-From: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
-Date: Mon, 27 Oct 2014 13:39:35 +0000
-Subject: [PATCH] superres: Fix return value VideoFrameSource_GPU
-
-superres module fails to compile with the following error messages:
-
-[100%] Building CXX object modules/superres/CMakeFiles/opencv_superres.dir/src/super_resolution.cpp.o
-/opencv-2.4.10/modules/superres/src/frame_source.cpp: In function 'cv::Ptr<cv::superres::FrameSource> cv::superres::createFrameSource_Video_GPU(const string&)':
-/opencv-2.4.10/modules/superres/src/frame_source.cpp:263:16: error: expected type-specifier before 'VideoFrameSource'
-/opencv-2.4.10/modules/superres/src/frame_source.cpp:263:16: error: could not convert '(int*)operator new(4ul)' from 'int*' to 'cv::Ptr<cv::superres::FrameSource>'
-/opencv-2.4.10/modules/superres/src/frame_source.cpp:263:16: error: expected ';' before 'VideoFrameSource'
-/opencv-2.4.10/modules/superres/src/frame_source.cpp:263:41: error: 'VideoFrameSource' was not declared in this scope
-/opencv-2.4.10/modules/superres/src/frame_source.cpp:264:1: error: control reaches end of non-void function [-Werror=return-type]
-cc1plus: some warnings being treated as errors
-make[3]: *** [modules/superres/CMakeFiles/opencv_superres.dir/src/frame_source.cpp.o] Error 1
-make[3]: *** Waiting for unfinished jobs....
-
-This is caused because the return value of the createFrameSource_Video_GPU function should be a VideoFrameSource_GPU object.
----
- modules/superres/src/frame_source.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/modules/superres/src/frame_source.cpp b/modules/superres/src/frame_source.cpp
-index 5f59a98..c5b2e76 100644
---- a/modules/superres/src/frame_source.cpp
-+++ b/modules/superres/src/frame_source.cpp
-@@ -260,7 +260,7 @@ namespace
- 
- Ptr<FrameSource> cv::superres::createFrameSource_Video_GPU(const string& fileName)
- {
--    return new VideoFrameSource(fileName);
-+    return new VideoFrameSource_GPU(fileName);
- }
- 
- #endif // HAVE_OPENCV_GPU
diff --git a/package/opencv/0003-cmake-OpenCVGenPkgconfig.cmake-rework-opencv.pc-gene.patch b/package/opencv/0003-cmake-OpenCVGenPkgconfig.cmake-rework-opencv.pc-gene.patch
deleted file mode 100644
index 768f08d..0000000
--- a/package/opencv/0003-cmake-OpenCVGenPkgconfig.cmake-rework-opencv.pc-gene.patch
+++ /dev/null
@@ -1,156 +0,0 @@
-From eceada586bbf18fc267e437522ec4f1f23ddc656 Mon Sep 17 00:00:00 2001
-From: Samuel Martin <s.martin49@gmail.com>
-Date: Fri, 3 Oct 2014 00:32:40 +0200
-Subject: [PATCH] cmake/OpenCVGenPkgconfig.cmake: rework opencv.pc generation
-
-Using absolute path to locate the components in the "Libs:" field of the
-*.pc can badly break cross-compilation, especially when building
-statically linked objects.
-
-Indeed, pkg-config automatically replaces the '-I...' and '-L...' paths
-when the PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_LIBDIR environment
-variables are set [1]. This feature is very helpful and common in
-cross-compilation framework like Buildroot [2,3].
-
-When there are absolute paths in the *.pc files, pkg-config won't be
-able to do the path substitions for these paths when the afromentioned
-environment variables are set.
-In such case, since the prefix is the target one, not the sysroot one,
-these libraries' abolute paths will point to:
-- in the best case: a non-existing file (i.e. these files do not exists
-  on the host system;
-- at worst: the host system's libraries. This will make the linking
-  failed because these host system's libraries will most likely not be
-  build for the target architecture [4].
-
-So, this patch replace the components' absolute paths by the form:
-  -L<libdir> -l<libname>
-
-This way, the linker will be able to resolve each dependency path,
-whatever the kind of objects/build (shared object or static build) it
-is dealing with.
-
-Note that for static link, the library order does matter [5]. The order
-of the opencv components has been carefully chosen to comply with this
-requirement.
-
-Fixes #3931
-
-[1] http://linux.die.net/man/1/pkg-config
-[2] http://buildroot.org/
-[3] http://git.buildroot.net/buildroot/tree/package/pkgconf/pkg-config.in
-[4] http://autobuild.buildroot.net/results/e8a/e8a859276db34aff87ef181b0cce98916b0afc90/build-end.log
-[5] http://stackoverflow.com/questions/45135/linker-order-gcc
-
-Signed-off-by: Samuel Martin <s.martin49@gmail.com>
-
----
-Note: this patch properly applies on top of the master branch, though it
-      has been written on top of the 2.4 branch.
----
- cmake/OpenCVGenPkgconfig.cmake | 64 +++++++++++++++++++++++++++---------------
- 1 file changed, 42 insertions(+), 22 deletions(-)
-
-diff --git a/cmake/OpenCVGenPkgconfig.cmake b/cmake/OpenCVGenPkgconfig.cmake
-index fa57db9..183c56d 100644
---- a/cmake/OpenCVGenPkgconfig.cmake
-+++ b/cmake/OpenCVGenPkgconfig.cmake
-@@ -8,10 +8,6 @@
- #
- # ${BIN_DIR}/unix-install/opencv.pc -> For use *with* "make install"
- # -------------------------------------------------------------------------------------------
--set(prefix      "${CMAKE_INSTALL_PREFIX}")
--set(exec_prefix "\${prefix}")
--set(libdir      "") #TODO: need link paths for OpenCV_EXTRA_COMPONENTS
--set(includedir  "\${prefix}/${OPENCV_INCLUDE_INSTALL_PATH}")
- 
- if(CMAKE_BUILD_TYPE MATCHES "Release")
-   set(ocv_optkind OPT)
-@@ -35,42 +31,66 @@ ocv_list_reverse(OpenCV_LIB_COMPONENTS)
- ocv_list_reverse(OpenCV_EXTRA_COMPONENTS)
- 
- #build the list of components
--set(OpenCV_LIB_COMPONENTS_ "")
--foreach(CVLib ${OpenCV_LIB_COMPONENTS})
--  get_target_property(libpath ${CVLib} LOCATION_${CMAKE_BUILD_TYPE})
--  get_filename_component(libname "${libpath}" NAME)
- 
--  if(INSTALL_TO_MANGLED_PATHS)
--    set(libname "${libname}.${OPENCV_VERSION}")
--  endif()
-+# Note:
-+#   when linking against static libraries, if libfoo depends on libbar, then
-+#   libfoo must come first in the linker flags.
-+
-+# world is a special target whose library should come first, especially for
-+# static link.
-+if(OpenCV_LIB_COMPONENTS MATCHES "opencv_world")
-+  list(REMOVE_ITEM OpenCV_LIB_COMPONENTS "opencv_world")
-+  list(INSERT OpenCV_LIB_COMPONENTS 0 "opencv_world")
-+endif()
-+
-+set(OpenCV_LIB_COMPONENTS_)
-+foreach(CVLib ${OpenCV_LIB_COMPONENTS})
- 
--  #need better solution....
--  if(libpath MATCHES "3rdparty")
--    set(installDir "share/OpenCV/3rdparty/${OPENCV_LIB_INSTALL_PATH}")
-+  get_target_property(libloc ${CVLib} LOCATION_${CMAKE_BUILD_TYPE})
-+  if(libloc MATCHES "3rdparty")
-+    set(libpath "\${exec_prefix}/share/OpenCV/3rdparty/${OPENCV_LIB_INSTALL_PATH}")
-   else()
--    set(installDir "${OPENCV_LIB_INSTALL_PATH}")
-+    set(libpath "\${exec_prefix}/${OPENCV_LIB_INSTALL_PATH}")
-   endif()
-+  list(APPEND OpenCV_LIB_COMPONENTS_ "-L${libpath}")
-+
-+  get_filename_component(libname ${CVLib} NAME_WE)
-+  string(REGEX REPLACE "^lib" "" libname "${libname}")
-+  list(APPEND OpenCV_LIB_COMPONENTS_ "-l${libname}")
- 
--  set(OpenCV_LIB_COMPONENTS_ "${OpenCV_LIB_COMPONENTS_} \${exec_prefix}/${installDir}/${libname}")
- endforeach()
- 
- # add extra dependencies required for OpenCV
--set(OpenCV_LIB_COMPONENTS ${OpenCV_LIB_COMPONENTS_})
- if(OpenCV_EXTRA_COMPONENTS)
-   foreach(extra_component ${OpenCV_EXTRA_COMPONENTS})
- 
--    if(extra_component MATCHES "^-[lL]" OR extra_component MATCHES "[\\/]")
--      set(maybe_l_prefix "")
-+    if(extra_component MATCHES "^-[lL]")
-+      set(libprefix "")
-+      set(libname "${extra_component}")
-+    elseif(extra_component MATCHES "[\\/]")
-+      get_filename_component(libdir "${extra_component}" PATH)
-+      list(APPEND OpenCV_LIB_COMPONENTS_ "-L${libdir}")
-+      get_filename_component(libname "${extra_component}" NAME_WE)
-+      string(REGEX REPLACE "^lib" "" libname "${libname}")
-+      set(libprefix "-l")
-     else()
--      set(maybe_l_prefix "-l")
-+      set(libprefix "-l")
-+      set(libname "${extra_component}")
-     endif()
--
--    set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} ${maybe_l_prefix}${extra_component}")
-+    list(APPEND OpenCV_LIB_COMPONENTS_ "${libprefix}${libname}")
- 
-   endforeach()
- endif()
- 
-+list(REMOVE_DUPLICATES OpenCV_LIB_COMPONENTS_)
-+string(REPLACE ";" " " OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS_}")
-+
- #generate the .pc file
-+set(prefix      "${CMAKE_INSTALL_PREFIX}")
-+set(exec_prefix "\${prefix}")
-+set(libdir      "\${exec_prefix}/${OPENCV_LIB_INSTALL_PATH}")
-+set(includedir  "\${prefix}/${OPENCV_INCLUDE_INSTALL_PATH}")
-+
- if(INSTALL_TO_MANGLED_PATHS)
-   set(OPENCV_PC_FILE_NAME "opencv-${OPENCV_VERSION}.pc")
- else()
--- 
-2.4.1
-
diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index e40437f..95e1e13 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -4,10 +4,14 @@ menuconfig BR2_PACKAGE_OPENCV
 	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_USE_WCHAR
+	depends on !BR2_STATIC_LIBS # include dlfcn.h
 	help
 	  OpenCV (Open Source Computer Vision) is a library of programming
 	  functions for real time computer vision.
 
+	  Note that the opencv_core module and the opencv_hal library are
+	  automatically enabled.
+
 	  http://opencv.org/
 
 if BR2_PACKAGE_OPENCV
@@ -20,11 +24,7 @@ config BR2_PACKAGE_OPENCV_LIB_CALIB3D
 	help
 	  Include opencv_calib3d module into the OpenCV build.
 
-config BR2_PACKAGE_OPENCV_LIB_CONTRIB
-	bool "contrib"
-	default y
-	help
-	  Include opencv_contrib module into the OpenCV build.
+# opencv_core module is automatically enabled when OpenCV package is selected
 
 config BR2_PACKAGE_OPENCV_LIB_FEATURES2D
 	bool "features2d"
@@ -38,10 +38,8 @@ config BR2_PACKAGE_OPENCV_LIB_FLANN
 	help
 	  Include opencv_flann module into the OpenCV build.
 
-config BR2_PACKAGE_OPENCV_LIB_GPU
-	bool "gpu"
-	help
-	  Include opencv_gpu module into the OpenCV build.
+# opencv_hal (hardware acceleration layer (hal) module is required by
+# opencv_core, so it is automatically enabled
 
 config BR2_PACKAGE_OPENCV_LIB_HIGHGUI
 	bool "highgui"
@@ -49,17 +47,17 @@ config BR2_PACKAGE_OPENCV_LIB_HIGHGUI
 	help
 	  Include opencv_highgui module into the OpenCV build.
 
-config BR2_PACKAGE_OPENCV_LIB_IMGPROC
-	bool "imgproc"
+config BR2_PACKAGE_OPENCV_LIB_IMGCODECS
+	bool "imgcodecs (image codecs)"
 	default y
 	help
-	  Include opencv_imgproc module into the OpenCV build.
+	  Include opencv_imgcodecs module into the OpenCV build.
 
-config BR2_PACKAGE_OPENCV_LIB_LEGACY
-	bool "legacy"
+config BR2_PACKAGE_OPENCV_LIB_IMGPROC
+	bool "imgproc (image processing)"
 	default y
 	help
-	  Include opencv_legacy module into the OpenCV build.
+	  Include opencv_imgproc module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_ML
 	bool "ml (machine learning)"
@@ -67,11 +65,6 @@ config BR2_PACKAGE_OPENCV_LIB_ML
 	help
 	  Include opencv_ml module into the OpenCV build.
 
-config BR2_PACKAGE_OPENCV_LIB_NONFREE
-	bool "nonfree"
-	help
-	  Include opencv_nonfree module into the OpenCV build.
-
 config BR2_PACKAGE_OPENCV_LIB_OBJDETECT
 	bool "objdetect"
 	default y
@@ -86,6 +79,12 @@ config BR2_PACKAGE_OPENCV_LIB_PHOTO
 
 comment "opencv_python module requires numpy which is not yet available."
 
+config BR2_PACKAGE_OPENCV_LIB_SHAPE
+	bool "shape (shape descriptors and matchers)"
+	default y
+	help
+	  Include opencv_shape module into the OpenCV build.
+
 config BR2_PACKAGE_OPENCV_LIB_STITCHING
 	bool "stitching"
 	default y
@@ -106,6 +105,12 @@ config BR2_PACKAGE_OPENCV_LIB_TS
 	help
 	  Include opencv_ts module into the OpenCV build.
 
+config BR2_PACKAGE_OPENCV_LIB_VIDEOIO
+	bool "videoio (media i/o)"
+	default y
+	help
+	  Include opencv_videoio module into the OpenCV build.
+
 config BR2_PACKAGE_OPENCV_LIB_VIDEO
 	bool "video"
 	default y
@@ -219,5 +224,8 @@ config BR2_PACKAGE_OPENCV_INSTALL_DATA
 
 endif # BR2_PACKAGE_OPENCV
 
-comment "opencv needs a toolchain w/ C++, NPTL, wchar"
-	depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS_NPTL)
+comment "opencv needs a toolchain w/ C++, NPTL, wchar, dynamic library"
+	depends on !BR2_INSTALL_LIBSTDCPP || \
+		!BR2_USE_WCHAR || \
+		!BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
+		BR2_STATIC_LIBS
diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index ee11220..7211c18 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-OPENCV_VERSION = 2.4.10
+OPENCV_VERSION = 3.0.0
 OPENCV_SITE = $(call github,itseez,opencv,$(OPENCV_VERSION))
 OPENCV_INSTALL_STAGING = YES
 OPENCV_LICENSE = BSD-3c
@@ -12,19 +12,28 @@ OPENCV_LICENSE_FILES = LICENSE
 
 # OpenCV component options
 OPENCV_CONF_OPTS += \
+	-DBUILD_DOCS=OFF \
 	-DBUILD_PERF_TESTS=$(if $(BR2_PACKAGE_OPENCV_BUILD_PERF_TESTS),ON,OFF) \
 	-DBUILD_TESTS=$(if $(BR2_PACKAGE_OPENCV_BUILD_TESTS),ON,OFF) \
 	-DBUILD_WITH_DEBUG_INFO=OFF
 
+ifeq ($(BR2_PACKAGE_OPENCV_BUILD_TESTS)$(BR2_PACKAGE_OPENCV_BUILD_PERF_TESTS),)
+OPENCV_CONF_OPTS += -DINSTALL_TEST=OFF
+else
+OPENCV_CONF_OPTS += -DINSTALL_TEST=ON
+endif
+
 # OpenCV build options
 OPENCV_CONF_OPTS += \
 	-DBUILD_WITH_STATIC_CRT=OFF \
+	-DENABLE_COVERAGE=OFF \
 	-DENABLE_FAST_MATH=ON \
+	-DENABLE_IMPL_COLLECTION=OFF \
 	-DENABLE_NOISY_WARNINGS=OFF \
 	-DENABLE_OMIT_FRAME_POINTER=ON \
 	-DENABLE_PRECOMPILED_HEADERS=OFF \
 	-DENABLE_PROFILING=OFF \
-	-DOPENCV_CAN_BREAK_BINARY_COMPATIBILITY=ON
+	-DOPENCV_WARNINGS_ARE_ERRORS=OFF
 
 # OpenCV link options
 OPENCV_CONF_OPTS += \
@@ -39,40 +48,61 @@ OPENCV_CONF_OPTS += \
 	-DINSTALL_CREATE_DISTRIB=OFF
 
 # OpenCV module selection
+# * Modules on:
+#   - core: if not set, opencv does not build anything
+#   - hal: core's dependency
+# * Modules off:
+#   - android*: android stuff
+#   - apps: programs for training classifiers
+#   - java: java bindings
+#   - viz: missing VTK dependency
+#   - world: all-in-one module
+#
+# * Contrib modules from [1] are disabled:
+#   - opencv_contrib package is not available in Buildroot;
+#   - OPENCV_EXTRA_MODULES_PATH is not set.
+#
+# [1] https://github.com/Itseez/opencv_contrib
 OPENCV_CONF_OPTS += \
 	-DBUILD_opencv_androidcamera=OFF \
 	-DBUILD_opencv_apps=OFF \
 	-DBUILD_opencv_calib3d=$(if $(BR2_PACKAGE_OPENCV_LIB_CALIB3D),ON,OFF) \
-	-DBUILD_opencv_contrib=$(if $(BR2_PACKAGE_OPENCV_LIB_CONTRIB),ON,OFF) \
 	-DBUILD_opencv_core=ON \
-	-DBUILD_opencv_dynamicuda=OFF \
 	-DBUILD_opencv_features2d=$(if $(BR2_PACKAGE_OPENCV_LIB_FEATURES2D),ON,OFF) \
 	-DBUILD_opencv_flann=$(if $(BR2_PACKAGE_OPENCV_LIB_FLANN),ON,OFF) \
-	-DBUILD_opencv_gpu=$(if $(BR2_PACKAGE_OPENCV_LIB_GPU),ON,OFF) \
+	-DBUILD_opencv_hal=ON \
 	-DBUILD_opencv_highgui=$(if $(BR2_PACKAGE_OPENCV_LIB_HIGHGUI),ON,OFF) \
+	-DBUILD_opencv_imgcodecs=$(if $(BR2_PACKAGE_OPENCV_LIB_IMGCODECS),ON,OFF) \
 	-DBUILD_opencv_imgproc=$(if $(BR2_PACKAGE_OPENCV_LIB_IMGPROC),ON,OFF) \
 	-DBUILD_opencv_java=OFF \
-	-DBUILD_opencv_legacy=$(if $(BR2_PACKAGE_OPENCV_LIB_LEGACY),ON,OFF) \
 	-DBUILD_opencv_ml=$(if $(BR2_PACKAGE_OPENCV_LIB_ML),ON,OFF) \
-	-DBUILD_opencv_nonfree=$(if $(BR2_PACKAGE_OPENCV_LIB_NONFREE),ON,OFF) \
 	-DBUILD_opencv_objdetect=$(if $(BR2_PACKAGE_OPENCV_LIB_OBJDETECT),ON,OFF) \
-	-DBUILD_opencv_ocl=OFF \
 	-DBUILD_opencv_photo=$(if $(BR2_PACKAGE_OPENCV_LIB_PHOTO),ON,OFF) \
-	-DBUILD_opencv_python=OFF \
+	-DBUILD_opencv_python2=OFF \
+	-DBUILD_opencv_python3=OFF \
+	-DBUILD_opencv_shape=$(if $(BR2_PACKAGE_OPENCV_LIB_SHAPE),ON,OFF) \
 	-DBUILD_opencv_stitching=$(if $(BR2_PACKAGE_OPENCV_LIB_STITCHING),ON,OFF) \
 	-DBUILD_opencv_superres=$(if $(BR2_PACKAGE_OPENCV_LIB_SUPERRES),ON,OFF) \
 	-DBUILD_opencv_ts=$(if $(BR2_PACKAGE_OPENCV_LIB_TS),ON,OFF) \
 	-DBUILD_opencv_video=$(if $(BR2_PACKAGE_OPENCV_LIB_VIDEO),ON,OFF) \
+	-DBUILD_opencv_videoio=$(if $(BR2_PACKAGE_OPENCV_LIB_VIDEOIO),ON,OFF) \
 	-DBUILD_opencv_videostab=$(if $(BR2_PACKAGE_OPENCV_LIB_VIDEOSTAB),ON,OFF) \
+	-DBUILD_opencv_viz=OFF \
 	-DBUILD_opencv_world=OFF
 
 # Hardware support options.
 #
 # * PowerPC support is turned off since its only effect is altering CFLAGS,
 #   adding '-mcpu=G3 -mtune=G5' to them, which is already handled by Buildroot.
+# * fma3 and popcnt support is disabled because according to gcc manual [2], it
+#   is only available on x86_64 haswell, broadwell and knl architecture.
+#
+# [2] https://gcc.gnu.org/onlinedocs/gcc-5.1.0/gcc/x86-Options.html#x86-Options
 OPENCV_CONF_OPTS += \
 	-DENABLE_AVX=$(if $(BR2_X86_CPU_HAS_AVX),ON,OFF) \
 	-DENABLE_AVX2=$(if $(BR2_X86_CPU_HAS_AVX2),ON,OFF) \
+	-DENABLE_FMA3=OFF \
+	-DENABLE_POPCNT=OFF \
 	-DENABLE_POWERPC=OFF \
 	-DENABLE_SSE=$(if $(BR2_X86_CPU_HAS_SSE),ON,OFF) \
 	-DENABLE_SSE2=$(if $(BR2_X86_CPU_HAS_SSE2),ON,OFF) \
@@ -83,6 +113,19 @@ OPENCV_CONF_OPTS += \
 
 # Cuda stuff
 OPENCV_CONF_OPTS += \
+	-DBUILD_CUDA_STUBS=OFF \
+	-DBUILD_opencv_cudaarithm=OFF \
+	-DBUILD_opencv_cudabgsegm=OFF \
+	-DBUILD_opencv_cudacodec=OFF \
+	-DBUILD_opencv_cudafeatures2d=OFF \
+	-DBUILD_opencv_cudafilters=OFF \
+	-DBUILD_opencv_cudaimgproc=OFF \
+	-DBUILD_opencv_cudalegacy=OFF \
+	-DBUILD_opencv_cudaobjdetect=OFF \
+	-DBUILD_opencv_cudaoptflow=OFF \
+	-DBUILD_opencv_cudastereo=OFF \
+	-DBUILD_opencv_cudawarping=OFF \
+	-DBUILD_opencv_cudev=OFF \
 	-DWITH_CUBLAS=OFF \
 	-DWITH_CUDA=OFF \
 	-DWITH_CUFFT=OFF
@@ -97,8 +140,10 @@ OPENCV_CONF_OPTS += \
 
 # Intel stuff
 OPENCV_CONF_OPTS += \
+	-DBUILD_WITH_DYNAMIC_IPP=OFF \
 	-DWITH_INTELPERC=OFF \
 	-DWITH_IPP=OFF \
+	-DWITH_IPP_A=OFF \
 	-DWITH_TBB=OFF
 
 # Smartek stuff
@@ -112,10 +157,11 @@ OPENCV_CONF_OPTS += -DWITH_XIMEA=OFF
 
 # Non-Linux support (Android options) must remain OFF:
 OPENCV_CONF_OPTS += \
+	-DANDROID=OFF \
 	-DBUILD_ANDROID_CAMERA_WRAPPER=OFF \
 	-DBUILD_ANDROID_EXAMPLES=OFF \
+	-DBUILD_ANDROID_SERVICE=OFF \
 	-DBUILD_FAT_JAVA_LIB=OFF \
-	-DBUILD_JAVA_SUPPORT=OFF \
 	-DINSTALL_ANDROID_EXAMPLES=OFF \
 	-DWITH_ANDROID_CAMERA=OFF
 
@@ -130,15 +176,17 @@ OPENCV_CONF_OPTS += \
 	-DWITH_CSTRIPES=OFF \
 	-DWITH_DSHOW=OFF \
 	-DWITH_MSMF=OFF \
+	-DWITH_PTHREADS_PF=OFF \
 	-DWITH_VFW=OFF \
 	-DWITH_VIDEOINPUT=OFF \
 	-DWITH_WIN32UI=OFF
 
-# Software/3rd-party support options.
+# Software/3rd-party support options:
+# - disable all examples
 OPENCV_CONF_OPTS += \
+	-DBUILD_EXAMPLES=OFF \
 	-DBUILD_JASPER=OFF \
 	-DBUILD_JPEG=OFF \
-	-DBUILD_NEW_PYTHON_SUPPORT=OFF \
 	-DBUILD_OPENEXR=OFF \
 	-DBUILD_PNG=OFF \
 	-DBUILD_TIFF=OFF \
@@ -151,14 +199,20 @@ OPENCV_CONF_OPTS += \
 # - eigen: OpenCV does not use it, not take any benefit from it.
 OPENCV_CONF_OPTS += \
 	-DWITH_1394=OFF \
+	-DWITH_CLP=OFF \
 	-DWITH_EIGEN=OFF \
-	-DWITH_IMAGEIO=OFF \
+	-DWITH_GDAL=OFF \
+	-DWITH_GPHOTO2=OFF \
 	-DWITH_OPENCL=OFF \
+	-DWITH_OPENCL_SVM=OFF \
 	-DWITH_OPENEXR=OFF \
 	-DWITH_OPENGL=OFF \
 	-DWITH_OPENMP=OFF \
+	-DWITH_OPENNI2=OFF \
 	-DWITH_OPENNI=OFF \
 	-DWITH_UNICAP=OFF \
+	-DWITH_VTK=OFF \
+	-DWITH_WEBP=OFF \
 	-DWITH_XINE=OFF
 
 OPENCV_DEPENDENCIES += zlib
@@ -171,14 +225,14 @@ OPENCV_CONF_OPTS += -DWITH_FFMPEG=OFF
 endif
 
 ifeq ($(BR2_PACKAGE_OPENCV_WITH_GSTREAMER),y)
-OPENCV_CONF_OPTS += -DWITH_GSTREAMER=ON
+OPENCV_CONF_OPTS += -DWITH_GSTREAMER=ON -DWITH_GSTREAMER_0_10=ON
 OPENCV_DEPENDENCIES += gstreamer gst-plugins-base
 else
-OPENCV_CONF_OPTS += -DWITH_GSTREAMER=OFF
+OPENCV_CONF_OPTS += -DWITH_GSTREAMER=OFF -DWITH_GSTREAMER_0_10=OFF
 endif
 
 ifeq ($(BR2_PACKAGE_OPENCV_WITH_GTK),y)
-OPENCV_CONF_OPTS += -DWITH_GTK=ON
+OPENCV_CONF_OPTS += -DWITH_GTK=ON -DWITH_GTK_2_X=ON
 OPENCV_DEPENDENCIES += libgtk2
 else
 OPENCV_CONF_OPTS += -DWITH_GTK=OFF
-- 
2.4.4

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 03/16] package/gstreamer1/gst1-plugins-bad: disable opencv plugin with opencv-3
  2015-06-25 19:59 [Buildroot] [PATCH v6 00/16] OpenCV bump Samuel Martin
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 01/16] package/opencv: alphabetically sorted each _CONF_OPTS group Samuel Martin
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 02/16] package/opencv: bump to version 3.0 Samuel Martin
@ 2015-06-25 19:59 ` Samuel Martin
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 04/16] package/opencv: define modules inter-dependencies Samuel Martin
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 44+ messages in thread
From: Samuel Martin @ 2015-06-25 19:59 UTC (permalink / raw)
  To: buildroot

The opencv plugin uses stuff from the now removed opencv's legacy module.
Note that the configure script already correctly check the opencv version
and disable the opencv plugin with opencv-3.x.

Also remove 'select ...' to prevent kconfig from complaining about
recursive dependencies.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

---
changes v5->v6:
- remove 'select ...'
- update a/r/t tags

changes v4->v5:
- new patch
---
 package/gstreamer1/gst1-plugins-bad/Config.in | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/package/gstreamer1/gst1-plugins-bad/Config.in b/package/gstreamer1/gst1-plugins-bad/Config.in
index 76a601a..bc99527 100644
--- a/package/gstreamer1/gst1-plugins-bad/Config.in
+++ b/package/gstreamer1/gst1-plugins-bad/Config.in
@@ -559,19 +559,7 @@ config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_OPENCV
 	bool "opencv"
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
-	select BR2_PACKAGE_OPENCV
-	# Remove the following opencv modules when gstreamer fixes the
-	# problem of including the old "cv.h" header
-	# bug: https://bugzilla.gnome.org/show_bug.cgi?id=725163
-	select BR2_PACKAGE_OPENCV_LIB_CALIB3D
-	select BR2_PACKAGE_OPENCV_LIB_CONTRIB
-	select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
-	select BR2_PACKAGE_OPENCV_LIB_FLANN
-	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
-	select BR2_PACKAGE_OPENCV_LIB_LEGACY
-	select BR2_PACKAGE_OPENCV_LIB_ML
-	select BR2_PACKAGE_OPENCV_LIB_OBJDETECT
-	select BR2_PACKAGE_OPENCV_LIB_VIDEO
+	depends on BROKEN # gst1-plugin-opencv does not (yet) support opencv >=3.x
 	help
 	  GStreamer OpenCV Plugins
 
-- 
2.4.4

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 04/16] package/opencv: define modules inter-dependencies
  2015-06-25 19:59 [Buildroot] [PATCH v6 00/16] OpenCV bump Samuel Martin
                   ` (2 preceding siblings ...)
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 03/16] package/gstreamer1/gst1-plugins-bad: disable opencv plugin with opencv-3 Samuel Martin
@ 2015-06-25 19:59 ` Samuel Martin
  2015-06-26 15:20   ` Yann E. MORIN
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 05/16] package/opencv: reword modules' prompt and help text Samuel Martin
                   ` (13 subsequent siblings)
  17 siblings, 1 reply; 44+ messages in thread
From: Samuel Martin @ 2015-06-25 19:59 UTC (permalink / raw)
  To: buildroot

OpenCV allows to enable/disable the selection of modules (a.k.a.
opencv libraries). These modules depend one on the others; these
dependencies are already handled by the build-system (CMake).

However, the way we handled them in Buildroot was not really clean.
For each opencv module, there is a kconfig option, but we forced the
corresponding CMake config option without checking for the modules'
dependencies.

This patch replicates the modules' dependency relations in the
Config.in, so that the selection of the user will actually be built.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>

---
changes v5->v6:
- rebase

changes v4->v5:
- rebase
- remove Reviewed-by tag form Yann (because of the changes introduced
  with the version bump)

changes v3->v4:
- rebase
- update ts module dependencies

changes v2->v3:
- rebase
- fix typo in commit log (Yann)
- update A/R/T tags

changes v1->v2:
- rebase
---
 package/opencv/Config.in | 39 ++++++++++++++++++++++++++++++++++++++-
 1 file changed, 38 insertions(+), 1 deletion(-)

diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 95e1e13..87f4bf5 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -21,6 +21,8 @@ comment "OpenCV modules"
 config BR2_PACKAGE_OPENCV_LIB_CALIB3D
 	bool "calib3d"
 	default y
+	select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	help
 	  Include opencv_calib3d module into the OpenCV build.
 
@@ -29,12 +31,16 @@ config BR2_PACKAGE_OPENCV_LIB_CALIB3D
 config BR2_PACKAGE_OPENCV_LIB_FEATURES2D
 	bool "features2d"
 	default y
+	select BR2_PACKAGE_OPENCV_LIB_FLANN
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
+	select BR2_PACKAGE_OPENCV_LIB_ML
 	help
 	  Include opencv_features2d module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_FLANN
 	bool "flann"
 	default y
+	# opencv_core dependency is already enabled
 	help
 	  Include opencv_flann module into the OpenCV build.
 
@@ -44,36 +50,46 @@ config BR2_PACKAGE_OPENCV_LIB_FLANN
 config BR2_PACKAGE_OPENCV_LIB_HIGHGUI
 	bool "highgui"
 	default y
+	select BR2_PACKAGE_OPENCV_LIB_IMGCODECS
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
+	select BR2_PACKAGE_OPENCV_LIB_VIDEOIO
 	help
 	  Include opencv_highgui module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_IMGCODECS
 	bool "imgcodecs (image codecs)"
 	default y
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	help
 	  Include opencv_imgcodecs module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	bool "imgproc (image processing)"
 	default y
+	# opencv_core dependency is already enabled
 	help
 	  Include opencv_imgproc module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_ML
 	bool "ml (machine learning)"
 	default y
+	# opencv_core dependency is already enabled
 	help
 	  Include opencv_ml module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_OBJDETECT
 	bool "objdetect"
 	default y
+	# opencv_core dependency is already enabled
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
+	select BR2_PACKAGE_OPENCV_LIB_ML
 	help
 	  Include opencv_objdetect module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_PHOTO
 	bool "photo"
 	default y
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	help
 	  Include opencv_photo module into the OpenCV build.
 
@@ -82,44 +98,65 @@ comment "opencv_python module requires numpy which is not yet available."
 config BR2_PACKAGE_OPENCV_LIB_SHAPE
 	bool "shape (shape descriptors and matchers)"
 	default y
+	# opencv_core dependency is already enabled
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
+	select BR2_PACKAGE_OPENCV_LIB_VIDEO
 	help
 	  Include opencv_shape module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_STITCHING
 	bool "stitching"
 	default y
+	select BR2_PACKAGE_OPENCV_LIB_CALIB3D
+	select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
+	select BR2_PACKAGE_OPENCV_LIB_OBJDETECT
 	help
 	  Include opencv_stitching module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_SUPERRES
 	bool "superres"
 	default y
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
+	select BR2_PACKAGE_OPENCV_LIB_VIDEO
 	help
 	  Include opencv_superres "super resolution" - module into the OpenCV
 	  build.
 
 config BR2_PACKAGE_OPENCV_LIB_TS
 	bool "ts (touchscreen)"
-	select BR2_PACKAGE_OPENCV_LIB_HIGHGUI
 	default y
+	# opencv_core dependency is already enabled
+	select BR2_PACKAGE_OPENCV_LIB_HIGHGUI
+	select BR2_PACKAGE_OPENCV_LIB_IMGCODECS
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
+	select BR2_PACKAGE_OPENCV_LIB_VIDEOIO
 	help
 	  Include opencv_ts module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_VIDEOIO
 	bool "videoio (media i/o)"
 	default y
+	select BR2_PACKAGE_OPENCV_LIB_IMGCODECS
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	help
 	  Include opencv_videoio module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_VIDEO
 	bool "video"
 	default y
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	help
 	  Include opencv_video module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_VIDEOSTAB
 	bool "videostab"
 	default y
+	select BR2_PACKAGE_OPENCV_LIB_CALIB3D
+	select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
+	select BR2_PACKAGE_OPENCV_LIB_PHOTO
+	select BR2_PACKAGE_OPENCV_LIB_VIDEO
 	help
 	  Include opencv_videostab module into the OpenCV build.
 
-- 
2.4.4

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 05/16] package/opencv: reword modules' prompt and help text
  2015-06-25 19:59 [Buildroot] [PATCH v6 00/16] OpenCV bump Samuel Martin
                   ` (3 preceding siblings ...)
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 04/16] package/opencv: define modules inter-dependencies Samuel Martin
@ 2015-06-25 19:59 ` Samuel Martin
  2015-06-26 15:27   ` Yann E. MORIN
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 06/16] package/opencv: reduce modules on by default Samuel Martin
                   ` (12 subsequent siblings)
  17 siblings, 1 reply; 44+ messages in thread
From: Samuel Martin @ 2015-06-25 19:59 UTC (permalink / raw)
  To: buildroot

This patch is mostly cosmetic changes improving the human interface.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>

---
changes v5->v6:
- fix prompts de help texts (Yann, ThomasP)

changes v4->v5:
- new patch
---
 package/opencv/Config.in | 52 +++++++++++++++++++++++++++---------------------
 1 file changed, 29 insertions(+), 23 deletions(-)

diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 87f4bf5..4f29ffd 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -24,7 +24,8 @@ config BR2_PACKAGE_OPENCV_LIB_CALIB3D
 	select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
 	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	help
-	  Include opencv_calib3d module into the OpenCV build.
+	  Include opencv_calib3d (camera calibration and 3d reconstruction) module
+	  into the OpenCV build.
 
 # opencv_core module is automatically enabled when OpenCV package is selected
 
@@ -35,14 +36,16 @@ config BR2_PACKAGE_OPENCV_LIB_FEATURES2D
 	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	select BR2_PACKAGE_OPENCV_LIB_ML
 	help
-	  Include opencv_features2d module into the OpenCV build.
+	  Include opencv_features2d (2d features framework) module into the OpenCV
+	  build.
 
 config BR2_PACKAGE_OPENCV_LIB_FLANN
 	bool "flann"
 	default y
 	# opencv_core dependency is already enabled
 	help
-	  Include opencv_flann module into the OpenCV build.
+	  Include opencv_flann (clustering and search in multi-dimensional spaces)
+	  module into the OpenCV build.
 
 # opencv_hal (hardware acceleration layer (hal) module is required by
 # opencv_core, so it is automatically enabled
@@ -54,28 +57,29 @@ config BR2_PACKAGE_OPENCV_LIB_HIGHGUI
 	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	select BR2_PACKAGE_OPENCV_LIB_VIDEOIO
 	help
-	  Include opencv_highgui module into the OpenCV build.
+	  Include opencv_highgui (high-level gui and media i/o) module into the
+	  OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_IMGCODECS
-	bool "imgcodecs (image codecs)"
+	bool "imgcodecs"
 	default y
 	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	help
-	  Include opencv_imgcodecs module into the OpenCV build.
+	  Include opencv_imgcodecs (image codecs) module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_IMGPROC
-	bool "imgproc (image processing)"
+	bool "imgproc"
 	default y
 	# opencv_core dependency is already enabled
 	help
-	  Include opencv_imgproc module into the OpenCV build.
+	  Include opencv_imgproc (image processing) module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_ML
-	bool "ml (machine learning)"
+	bool "ml"
 	default y
 	# opencv_core dependency is already enabled
 	help
-	  Include opencv_ml module into the OpenCV build.
+	  Include opencv_ml (machine learning) module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_OBJDETECT
 	bool "objdetect"
@@ -84,25 +88,27 @@ config BR2_PACKAGE_OPENCV_LIB_OBJDETECT
 	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	select BR2_PACKAGE_OPENCV_LIB_ML
 	help
-	  Include opencv_objdetect module into the OpenCV build.
+	  Include opencv_objdetect (object detection) module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_PHOTO
 	bool "photo"
 	default y
 	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	help
-	  Include opencv_photo module into the OpenCV build.
+	  Include opencv_photo (computational photography) module into the OpenCV
+	  build.
 
 comment "opencv_python module requires numpy which is not yet available."
 
 config BR2_PACKAGE_OPENCV_LIB_SHAPE
-	bool "shape (shape descriptors and matchers)"
+	bool "shape"
 	default y
 	# opencv_core dependency is already enabled
 	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	select BR2_PACKAGE_OPENCV_LIB_VIDEO
 	help
-	  Include opencv_shape module into the OpenCV build.
+	  Include opencv_shape (shape descriptors and matchers) module into the
+	  OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_STITCHING
 	bool "stitching"
@@ -112,7 +118,7 @@ config BR2_PACKAGE_OPENCV_LIB_STITCHING
 	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	select BR2_PACKAGE_OPENCV_LIB_OBJDETECT
 	help
-	  Include opencv_stitching module into the OpenCV build.
+	  Include opencv_stitching (images stitching) module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_SUPERRES
 	bool "superres"
@@ -120,11 +126,10 @@ config BR2_PACKAGE_OPENCV_LIB_SUPERRES
 	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	select BR2_PACKAGE_OPENCV_LIB_VIDEO
 	help
-	  Include opencv_superres "super resolution" - module into the OpenCV
-	  build.
+	  Include opencv_superres (super resolution) module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_TS
-	bool "ts (touchscreen)"
+	bool "ts"
 	default y
 	# opencv_core dependency is already enabled
 	select BR2_PACKAGE_OPENCV_LIB_HIGHGUI
@@ -132,22 +137,22 @@ config BR2_PACKAGE_OPENCV_LIB_TS
 	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	select BR2_PACKAGE_OPENCV_LIB_VIDEOIO
 	help
-	  Include opencv_ts module into the OpenCV build.
+	  Include opencv_ts (test) module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_VIDEOIO
-	bool "videoio (media i/o)"
+	bool "videoio"
 	default y
 	select BR2_PACKAGE_OPENCV_LIB_IMGCODECS
 	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	help
-	  Include opencv_videoio module into the OpenCV build.
+	  Include opencv_videoio (media i/o) module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_VIDEO
 	bool "video"
 	default y
 	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	help
-	  Include opencv_video module into the OpenCV build.
+	  Include opencv_video (video analysis) module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_VIDEOSTAB
 	bool "videostab"
@@ -158,7 +163,8 @@ config BR2_PACKAGE_OPENCV_LIB_VIDEOSTAB
 	select BR2_PACKAGE_OPENCV_LIB_PHOTO
 	select BR2_PACKAGE_OPENCV_LIB_VIDEO
 	help
-	  Include opencv_videostab module into the OpenCV build.
+	  Include opencv_videostab (video stabilization) module into the OpenCV
+	  build.
 
 comment "Test sets"
 config BR2_PACKAGE_OPENCV_BUILD_TESTS
-- 
2.4.4

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 06/16] package/opencv: reduce modules on by default
  2015-06-25 19:59 [Buildroot] [PATCH v6 00/16] OpenCV bump Samuel Martin
                   ` (4 preceding siblings ...)
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 05/16] package/opencv: reword modules' prompt and help text Samuel Martin
@ 2015-06-25 19:59 ` Samuel Martin
  2015-06-26 15:30   ` Yann E. MORIN
  2015-06-26 15:34   ` Yann E. MORIN
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 07/16] package/opencv: disable all modules " Samuel Martin
                   ` (11 subsequent siblings)
  17 siblings, 2 replies; 44+ messages in thread
From: Samuel Martin @ 2015-06-25 19:59 UTC (permalink / raw)
  To: buildroot

Since its integration into Buildroot, OpenCV always enables all modules
by default because the inter-module denpedency were not supported.

Now that OpenCV inter-module dependencies are correctly set at the
Buildroot configuration level, it is possible to reduce the enabled
module list to its minimal set, letting kconfig enable the other
modules.

This change will not change anything WRT a defconfig build with opencv.

Cc: "Yann E. Morin" <yann.morin.1998@free.fr>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>

---
changes v5->v6:
- new patch
---
 package/opencv/Config.in | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 4f29ffd..ce67f0c 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -20,7 +20,6 @@ comment "OpenCV modules"
 
 config BR2_PACKAGE_OPENCV_LIB_CALIB3D
 	bool "calib3d"
-	default y
 	select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
 	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	help
@@ -31,7 +30,6 @@ config BR2_PACKAGE_OPENCV_LIB_CALIB3D
 
 config BR2_PACKAGE_OPENCV_LIB_FEATURES2D
 	bool "features2d"
-	default y
 	select BR2_PACKAGE_OPENCV_LIB_FLANN
 	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	select BR2_PACKAGE_OPENCV_LIB_ML
@@ -41,7 +39,6 @@ config BR2_PACKAGE_OPENCV_LIB_FEATURES2D
 
 config BR2_PACKAGE_OPENCV_LIB_FLANN
 	bool "flann"
-	default y
 	# opencv_core dependency is already enabled
 	help
 	  Include opencv_flann (clustering and search in multi-dimensional spaces)
@@ -52,7 +49,6 @@ config BR2_PACKAGE_OPENCV_LIB_FLANN
 
 config BR2_PACKAGE_OPENCV_LIB_HIGHGUI
 	bool "highgui"
-	default y
 	select BR2_PACKAGE_OPENCV_LIB_IMGCODECS
 	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	select BR2_PACKAGE_OPENCV_LIB_VIDEOIO
@@ -62,28 +58,24 @@ config BR2_PACKAGE_OPENCV_LIB_HIGHGUI
 
 config BR2_PACKAGE_OPENCV_LIB_IMGCODECS
 	bool "imgcodecs"
-	default y
 	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	help
 	  Include opencv_imgcodecs (image codecs) module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	bool "imgproc"
-	default y
 	# opencv_core dependency is already enabled
 	help
 	  Include opencv_imgproc (image processing) module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_ML
 	bool "ml"
-	default y
 	# opencv_core dependency is already enabled
 	help
 	  Include opencv_ml (machine learning) module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_OBJDETECT
 	bool "objdetect"
-	default y
 	# opencv_core dependency is already enabled
 	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	select BR2_PACKAGE_OPENCV_LIB_ML
@@ -92,7 +84,6 @@ config BR2_PACKAGE_OPENCV_LIB_OBJDETECT
 
 config BR2_PACKAGE_OPENCV_LIB_PHOTO
 	bool "photo"
-	default y
 	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	help
 	  Include opencv_photo (computational photography) module into the OpenCV
@@ -141,7 +132,6 @@ config BR2_PACKAGE_OPENCV_LIB_TS
 
 config BR2_PACKAGE_OPENCV_LIB_VIDEOIO
 	bool "videoio"
-	default y
 	select BR2_PACKAGE_OPENCV_LIB_IMGCODECS
 	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	help
@@ -149,7 +139,6 @@ config BR2_PACKAGE_OPENCV_LIB_VIDEOIO
 
 config BR2_PACKAGE_OPENCV_LIB_VIDEO
 	bool "video"
-	default y
 	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	help
 	  Include opencv_video (video analysis) module into the OpenCV build.
-- 
2.4.4

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 07/16] package/opencv: disable all modules by default
  2015-06-25 19:59 [Buildroot] [PATCH v6 00/16] OpenCV bump Samuel Martin
                   ` (5 preceding siblings ...)
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 06/16] package/opencv: reduce modules on by default Samuel Martin
@ 2015-06-25 19:59 ` Samuel Martin
  2015-06-26 15:36   ` Yann E. MORIN
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 08/16] package/opencv: add python support Samuel Martin
                   ` (10 subsequent siblings)
  17 siblings, 1 reply; 44+ messages in thread
From: Samuel Martin @ 2015-06-25 19:59 UTC (permalink / raw)
  To: buildroot

This change allows to reduce the size of the default OpenCV package, so
the final root filesystem.

However, this will break any existing defconfig enabling OpenCV. Indeed,
a minimal OpenCV  package will be built, whereas, prior to applying this
patches, a full-featured one would have been built instead.

Cc: "Yann E. Morin" <yann.morin.1998@free.fr>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>

---
changes v5->v6:
- new patch
---
 package/opencv/Config.in | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index ce67f0c..3c00525 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -93,7 +93,6 @@ comment "opencv_python module requires numpy which is not yet available."
 
 config BR2_PACKAGE_OPENCV_LIB_SHAPE
 	bool "shape"
-	default y
 	# opencv_core dependency is already enabled
 	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	select BR2_PACKAGE_OPENCV_LIB_VIDEO
@@ -103,7 +102,6 @@ config BR2_PACKAGE_OPENCV_LIB_SHAPE
 
 config BR2_PACKAGE_OPENCV_LIB_STITCHING
 	bool "stitching"
-	default y
 	select BR2_PACKAGE_OPENCV_LIB_CALIB3D
 	select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
 	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
@@ -113,7 +111,6 @@ config BR2_PACKAGE_OPENCV_LIB_STITCHING
 
 config BR2_PACKAGE_OPENCV_LIB_SUPERRES
 	bool "superres"
-	default y
 	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	select BR2_PACKAGE_OPENCV_LIB_VIDEO
 	help
@@ -121,7 +118,6 @@ config BR2_PACKAGE_OPENCV_LIB_SUPERRES
 
 config BR2_PACKAGE_OPENCV_LIB_TS
 	bool "ts"
-	default y
 	# opencv_core dependency is already enabled
 	select BR2_PACKAGE_OPENCV_LIB_HIGHGUI
 	select BR2_PACKAGE_OPENCV_LIB_IMGCODECS
@@ -145,7 +141,6 @@ config BR2_PACKAGE_OPENCV_LIB_VIDEO
 
 config BR2_PACKAGE_OPENCV_LIB_VIDEOSTAB
 	bool "videostab"
-	default y
 	select BR2_PACKAGE_OPENCV_LIB_CALIB3D
 	select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
 	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
-- 
2.4.4

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 08/16] package/opencv: add python support
  2015-06-25 19:59 [Buildroot] [PATCH v6 00/16] OpenCV bump Samuel Martin
                   ` (6 preceding siblings ...)
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 07/16] package/opencv: disable all modules " Samuel Martin
@ 2015-06-25 19:59 ` Samuel Martin
  2015-06-26 17:51   ` Yann E. MORIN
  2015-06-26 17:59   ` Yann E. MORIN
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 09/16] package/opencv: add a choice for selecting gstreamer support Samuel Martin
                   ` (9 subsequent siblings)
  17 siblings, 2 replies; 44+ messages in thread
From: Samuel Martin @ 2015-06-25 19:59 UTC (permalink / raw)
  To: buildroot

opencv_python module needs python-numpy because it uses some numpy
headers in this wrapper.

From its 2.4 release, OpenCV offers python bindings, but they required
most of the OpenCV modules to be enabled.

Since OpenCV-3.0.0, python bindings have been reworked:
- it now supports both python2 and python3
- only built modules supporting wrapped in python will be included in
  the bindings.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

---
changes v5->v6:
- rebase

changes v4->v5:
- rebase
- update a/r/t tags
- update commit log
- fix python-numpy selection
- add python3 support

changes v3->v4:
- rebase
- rename _OPT -> _OPTS
- remove python/numpy patch (merged upstream since opencv bump)

changes v2->v3:
- rebase
- add fetch uri in the opencv's patch (Yann)
- move pyhton module knob under the multi-line if block about python deps
  (Yann)

changes v1->v2:
- rebase
- use patch merged upstream
---
 package/opencv/Config.in | 12 +++++++++++-
 package/opencv/opencv.mk | 33 +++++++++++++++++++++++++++++++--
 2 files changed, 42 insertions(+), 3 deletions(-)

diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 3c00525..8ed505e 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -89,7 +89,17 @@ config BR2_PACKAGE_OPENCV_LIB_PHOTO
 	  Include opencv_photo (computational photography) module into the OpenCV
 	  build.
 
-comment "opencv_python module requires numpy which is not yet available."
+config BR2_PACKAGE_OPENCV_LIB_PYTHON
+	bool "python"
+	depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
+	depends on BR2_aarch64 || BR2_arm || BR2_armeb || BR2_i386 \
+		|| BR2_mips || BR2_mipsel || BR2_powerpc || BR2_powerpc64 \
+		|| BR2_sh || BR2_x86_64 # python-numpy
+	depends on !BR2_TOOLCHAIN_USES_UCLIBC || BR2_i386 || BR2_x86_64 # python-numpy
+	select BR2_PACKAGE_PYTHON_NUMPY
+	help
+	  Include opencv_python module into the OpenCV build.
+	  No python example is installed.
 
 config BR2_PACKAGE_OPENCV_LIB_SHAPE
 	bool "shape"
diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index 7211c18..a43de0c 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -78,8 +78,6 @@ OPENCV_CONF_OPTS += \
 	-DBUILD_opencv_ml=$(if $(BR2_PACKAGE_OPENCV_LIB_ML),ON,OFF) \
 	-DBUILD_opencv_objdetect=$(if $(BR2_PACKAGE_OPENCV_LIB_OBJDETECT),ON,OFF) \
 	-DBUILD_opencv_photo=$(if $(BR2_PACKAGE_OPENCV_LIB_PHOTO),ON,OFF) \
-	-DBUILD_opencv_python2=OFF \
-	-DBUILD_opencv_python3=OFF \
 	-DBUILD_opencv_shape=$(if $(BR2_PACKAGE_OPENCV_LIB_SHAPE),ON,OFF) \
 	-DBUILD_opencv_stitching=$(if $(BR2_PACKAGE_OPENCV_LIB_STITCHING),ON,OFF) \
 	-DBUILD_opencv_superres=$(if $(BR2_PACKAGE_OPENCV_LIB_SUPERRES),ON,OFF) \
@@ -282,6 +280,37 @@ else
 OPENCV_CONF_OPTS += -DWITH_V4L=OFF -DWITH_LIBV4L=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_OPENCV_LIB_PYTHON),y)
+ifeq ($(BR2_PACKAGE_PYTHON),y)
+OPENCV_CONF_OPTS += \
+	-DBUILD_opencv_python2=ON \
+	-DBUILD_opencv_python3=OFF \
+	-DPYTHON2_EXECUTABLE=$(HOST_DIR)/usr/bin/python2 \
+	-DPYTHON2_INCLUDE_PATH=$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) \
+	-DPYTHON2_LIBRARIES=$(STAGING_DIR)/usr/lib/libpython$(PYTHON_VERSION_MAJOR).so \
+	-DPYTHON2_NUMPY_INCLUDE_DIRS=$(STAGING_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/numpy/core/include \
+	-DPYTHON2_PACKAGES_PATH=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
+	-DPYTHON2_NUMPY_VERSION=$(PYTHON_NUMPY_VERSION)
+OPENCV_DEPENDENCIES += python
+else
+OPENCV_CONF_OPTS += \
+	-DBUILD_opencv_python2=OFF \
+	-DBUILD_opencv_python3=ON \
+	-DPYTHON3_EXECUTABLE=$(HOST_DIR)/usr/bin/python3 \
+	-DPYTHON3_INCLUDE_PATH=$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR)m \
+	-DPYTHON3_LIBRARIES=$(STAGING_DIR)/usr/lib/libpython$(PYTHON3_VERSION_MAJOR)m.so \
+	-DPYTHON3_NUMPY_INCLUDE_DIRS=$(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/numpy/core/include \
+	-DPYTHON3_PACKAGES_PATH=/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
+	-DPYTHON3_NUMPY_VERSION=$(PYTHON_NUMPY_VERSION)
+OPENCV_DEPENDENCIES += python3
+endif
+OPENCV_DEPENDENCIES += python-numpy
+else
+OPENCV_CONF_OPTS += \
+	-DBUILD_opencv_python2=OFF \
+	-DBUILD_opencv_python3=OFF
+endif
+
 # Installation hooks:
 define OPENCV_CLEAN_INSTALL_DOC
 	$(RM) -fr $(TARGET_DIR)/usr/share/OpenCV/doc
-- 
2.4.4

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 09/16] package/opencv: add a choice for selecting gstreamer support
  2015-06-25 19:59 [Buildroot] [PATCH v6 00/16] OpenCV bump Samuel Martin
                   ` (7 preceding siblings ...)
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 08/16] package/opencv: add python support Samuel Martin
@ 2015-06-25 19:59 ` Samuel Martin
  2015-06-26 18:11   ` Yann E. MORIN
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 10/16] package/opencv: add gstreamer-1.x support Samuel Martin
                   ` (8 subsequent siblings)
  17 siblings, 1 reply; 44+ messages in thread
From: Samuel Martin @ 2015-06-25 19:59 UTC (permalink / raw)
  To: buildroot

OpenCV 3.0 support both gstreamer-0.10 and gstreamer-1.x, but only one
is used at the time.

This patch turns the gstreamer support into a choice, in order to prepare
adding the support for gstreamer-1 in a following patch.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>

---
changes v5->v6:
- new patch
---
 package/opencv/Config.in | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 8ed505e..4b571e0 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -177,18 +177,27 @@ config BR2_PACKAGE_OPENCV_WITH_FFMPEG
 	help
 	  Use ffmpeg from the target system.
 
+comment "gstreamer support needs a toolchain w/ wchar, threads"
+	depends on BR2_USE_MMU
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+
+choice
+	prompt "gstreamer support"
+	depends on BR2_USE_MMU # libglib2
+	depends on BR2_USE_WCHAR # libglib2
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
+
+config BR2_PACKAGE_OPENCV_WITHOUT_GSTREAMER
+	bool "none"
+
 config BR2_PACKAGE_OPENCV_WITH_GSTREAMER
-	bool "gstreamer support"
-	depends on BR2_USE_MMU # gstreamer -> libglib2
-	depends on BR2_USE_WCHAR # gstreamer -> libglib2
-	depends on BR2_TOOLCHAIN_HAS_THREADS # gstreamer -> libglib2
+	bool "gstreamer-0.10"
 	select BR2_PACKAGE_GSTREAMER
 	select BR2_PACKAGE_GST_PLUGINS_BASE
 	select BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_APP
 
-comment "gstreamer support needs a toolchain w/ wchar, threads"
-	depends on BR2_USE_MMU
-	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+
+endchoice
 
 config BR2_PACKAGE_OPENCV_WITH_GTK
 	bool "gtk support"
-- 
2.4.4

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 10/16] package/opencv: add gstreamer-1.x support
  2015-06-25 19:59 [Buildroot] [PATCH v6 00/16] OpenCV bump Samuel Martin
                   ` (8 preceding siblings ...)
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 09/16] package/opencv: add a choice for selecting gstreamer support Samuel Martin
@ 2015-06-25 19:59 ` Samuel Martin
  2015-06-26 18:12   ` Yann E. MORIN
  2015-06-26 20:01   ` Yann E. MORIN
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 11/16] package/opencv: add openmp support Samuel Martin
                   ` (7 subsequent siblings)
  17 siblings, 2 replies; 44+ messages in thread
From: Samuel Martin @ 2015-06-25 19:59 UTC (permalink / raw)
  To: buildroot

Starting with the 2.4.10 release, OpenCV supports both Gstreamer-0.10
and Gstreamer-1, but only one can be enabled at the same time (OpenCV
chooses Gstreamer-1 over Gstreamer-0.10 when both are available).

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>

---
changes v5->v6:
- rebase
- use a choice

changes v4->v5:
- rebase
- update a/r/t tags
- rework gst-X backend selection (use similar structure for qt)
- remove patch merged upstream

changes v3->v4:
- new patch
---
 package/opencv/Config.in |  7 +++++++
 package/opencv/opencv.mk | 15 ++++++++++++---
 2 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 4b571e0..f89e62d 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -186,6 +186,8 @@ choice
 	depends on BR2_USE_MMU # libglib2
 	depends on BR2_USE_WCHAR # libglib2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
+	help
+	  OpenCV prefers gstreamer-1 over gstreamer-0.10.
 
 config BR2_PACKAGE_OPENCV_WITHOUT_GSTREAMER
 	bool "none"
@@ -196,6 +198,11 @@ config BR2_PACKAGE_OPENCV_WITH_GSTREAMER
 	select BR2_PACKAGE_GST_PLUGINS_BASE
 	select BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_APP
 
+config BR2_PACKAGE_OPENCV_WITH_GSTREAMER1
+	bool "gstreamer-1.x"
+	select BR2_PACKAGE_GSTREAMER1
+	select BR2_PACKAGE_GST1_PLUGINS_BASE
+	select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_APP
 
 endchoice
 
diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index a43de0c..d249400 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -222,11 +222,20 @@ else
 OPENCV_CONF_OPTS += -DWITH_FFMPEG=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_GSTREAMER)$(BR2_PACKAGE_OPENCV_WITH_GSTREAMER1),)
+OPENCV_CONF_OPTS += -DWITH_GSTREAMER=OFF -DWITH_GSTREAMER_0_10=OFF
+endif
+
 ifeq ($(BR2_PACKAGE_OPENCV_WITH_GSTREAMER),y)
-OPENCV_CONF_OPTS += -DWITH_GSTREAMER=ON -DWITH_GSTREAMER_0_10=ON
+OPENCV_CONF_OPTS += -DWITH_GSTREAMER=OFF -DWITH_GSTREAMER_0_10=ON
 OPENCV_DEPENDENCIES += gstreamer gst-plugins-base
-else
-OPENCV_CONF_OPTS += -DWITH_GSTREAMER=OFF -DWITH_GSTREAMER_0_10=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_GSTREAMER1),y)
+OPENCV_CONF_OPTS += -DWITH_GSTREAMER=ON -DWITH_GSTREAMER_0_10=OFF
+OPENCV_DEPENDENCIES += gstreamer1 gst1-plugins-base
+endif
+
 endif
 
 ifeq ($(BR2_PACKAGE_OPENCV_WITH_GTK),y)
-- 
2.4.4

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 11/16] package/opencv: add openmp support
  2015-06-25 19:59 [Buildroot] [PATCH v6 00/16] OpenCV bump Samuel Martin
                   ` (9 preceding siblings ...)
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 10/16] package/opencv: add gstreamer-1.x support Samuel Martin
@ 2015-06-25 19:59 ` Samuel Martin
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 12/16] package/opencv: add a choice for selecting the gui toolkit Samuel Martin
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 44+ messages in thread
From: Samuel Martin @ 2015-06-25 19:59 UTC (permalink / raw)
  To: buildroot

Note that this situation is not ideal because it only add openmp support
to the Buildroot toolchain, not the external ones; but a couple of
packages already are in this situation.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

---
changes v5->v6:
- update a/r/t tags

changes v4->v5:
- new patch
---
 package/opencv/opencv.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index d249400..19863f4 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -259,6 +259,8 @@ else
 OPENCV_CONF_OPTS += -DWITH_JPEG=OFF
 endif
 
+OPENCV_CONF_OPTS += -DWITH_OPENMP=$(if $(BR2_GCC_ENABLE_OPENMP),ON,OFF)
+
 ifeq ($(BR2_PACKAGE_OPENCV_WITH_PNG),y)
 OPENCV_CONF_OPTS += -DWITH_PNG=ON
 OPENCV_DEPENDENCIES += libpng
-- 
2.4.4

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 12/16] package/opencv: add a choice for selecting the gui toolkit
  2015-06-25 19:59 [Buildroot] [PATCH v6 00/16] OpenCV bump Samuel Martin
                   ` (10 preceding siblings ...)
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 11/16] package/opencv: add openmp support Samuel Martin
@ 2015-06-25 19:59 ` Samuel Martin
  2015-06-26 21:31   ` Yann E. MORIN
  2015-06-26 22:47   ` Yann E. MORIN
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 13/16] package/opencv: add qt5 support Samuel Martin
                   ` (5 subsequent siblings)
  17 siblings, 2 replies; 44+ messages in thread
From: Samuel Martin @ 2015-06-25 19:59 UTC (permalink / raw)
  To: buildroot

This patch moves the existing Qt4 and gtk2 options in that choice
because, in OpenCV, only one toolkik will be actually used at the time,
given priority to Qt4.

Suggested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>

---
changes v5->v6:
- new patch
---
 package/opencv/Config.in | 53 +++++++++++++++++++++++++++++++++++-------------
 1 file changed, 39 insertions(+), 14 deletions(-)

diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index f89e62d..040ee55 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -206,17 +206,54 @@ config BR2_PACKAGE_OPENCV_WITH_GSTREAMER1
 
 endchoice
 
+choice
+	prompt "gui toolkit"
+	depends on BR2_PACKAGE_OPENCV_LIB_HIGHGUI
+	help
+	  GUI toolkit for opencv_highgui module.
+
+	  OpenCV GUI toolkit preference (from the most to the least):
+	  - Qt4
+	  - gtk-2
+
+config BR2_PACKAGE_OPENCV_GUI_NONE
+	bool "none"
+
 config BR2_PACKAGE_OPENCV_WITH_GTK
-	bool "gtk support"
+	bool "gtk2"
 	depends on BR2_PACKAGE_XORG7
 	depends on BR2_USE_WCHAR # libgtk2 -> libglib2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk2 -> libglib2
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_USE_MMU # libgtk2 -> glib2
 	depends on BR2_ARCH_HAS_ATOMICS # libgtk2 -> cairo
-	depends on BR2_PACKAGE_OPENCV_LIB_HIGHGUI
 	select BR2_PACKAGE_LIBGTK2
 
+comment "gtk2 depends on X.org and needs a toolchain w/ wchar, threads, C++"
+	depends on BR2_USE_MMU # libgtk2 -> glib2
+	depends on BR2_ARCH_HAS_ATOMICS # libgtk2 -> cairo
+	depends on !BR2_PACKAGE_XORG7 || \
+		!BR2_USE_WCHAR || \
+		!BR2_TOOLCHAIN_HAS_THREADS || \
+		!BR2_INSTALL_LIBSTDCPP
+
+config BR2_PACKAGE_OPENCV_WITH_QT
+	bool "qt4"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_USE_MMU # qt
+	select BR2_PACKAGE_QT
+	select BR2_PACKAGE_QT_STL
+	select BR2_PACKAGE_QT_GUI_MODULE
+	select BR2_PACKAGE_QT_TEST
+	help
+	  Use Qt with QtTest module and STL support
+
+comment "qt4 needs a toolchain w/ C++"
+	depends on BR2_USE_MMU # qt
+	depends on !BR2_INSTALL_LIBSTDCPP
+
+endchoice
+
 config BR2_PACKAGE_OPENCV_WITH_JASPER
 	bool "jpeg2000 support"
 	select BR2_PACKAGE_JASPER
@@ -239,18 +276,6 @@ config BR2_PACKAGE_OPENCV_WITH_PNG
 	help
 	  Use shared libpng from the target system.
 
-config BR2_PACKAGE_OPENCV_WITH_QT
-	bool "qt backend support"
-	depends on BR2_INSTALL_LIBSTDCPP
-	depends on BR2_USE_MMU # qt
-	depends on BR2_PACKAGE_OPENCV_LIB_HIGHGUI
-	select BR2_PACKAGE_QT
-	select BR2_PACKAGE_QT_STL
-	select BR2_PACKAGE_QT_GUI_MODULE
-	select BR2_PACKAGE_QT_TEST
-	help
-	  Use Qt with QtTest module and STL support
-
 config BR2_PACKAGE_OPENCV_WITH_TIFF
 	bool "tiff support"
 	select BR2_PACKAGE_TIFF
-- 
2.4.4

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 13/16] package/opencv: add qt5 support
  2015-06-25 19:59 [Buildroot] [PATCH v6 00/16] OpenCV bump Samuel Martin
                   ` (11 preceding siblings ...)
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 12/16] package/opencv: add a choice for selecting the gui toolkit Samuel Martin
@ 2015-06-25 19:59 ` Samuel Martin
  2015-06-26 22:40   ` Yann E. MORIN
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 14/16] package/opencv: add gtk3 support Samuel Martin
                   ` (4 subsequent siblings)
  17 siblings, 1 reply; 44+ messages in thread
From: Samuel Martin @ 2015-06-25 19:59 UTC (permalink / raw)
  To: buildroot

Starting with the 2.4.6 release, OpenCV supports both Qt4 and Qt5 as GUI
toolkit, but only one can be enabled at the same time.

Since Buildroot does not support Qt4/Qt5 co-existence, we make the Qt4
knob depend on BR2_PACKAGE_QT5.

Note that we usually use 'select ...' to express the dependencies
between packages, but in this case, we cannot since the Qt4/Qt5
co-existence exclusion is not handled by a simple choice, but by some
extra dependencies in the choice entries. This makes impossible using
'select ...' for the Qt support knob without triggering a circular
dependency at the kconfig level.

Besides, we already use 'depends on ...' to express the dependencies
with some "big" packages (like xorg or libgtk2). qt or qt5* packages
are fairly big. So, I don't think it will hurt that much to use a
'depends on ...' statement in this case.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>

---
changes v5->v6:
- bury BR2_avr32 remains (Yann)
- move knob in a choice (Yann)
- reword commit log

changes v4->v5:
- rebase

changes v3->v4:
- rebase
- rename _OPT -> _OPTS options
- rework qt backend selection (Yann)

changes v2->v3:
- rebase
- remove duplicate qt/qt5 dependencies (Yann)
- add missing 'depends on' to the comment about qt4

changes v1->v2:
- rebase
- update threads support dependency for qt5
---
 package/opencv/Config.in | 33 +++++++++++++++++++++++++++++----
 package/opencv/opencv.mk | 11 +++++++++--
 2 files changed, 38 insertions(+), 6 deletions(-)

diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 040ee55..ac0443a 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -213,6 +213,7 @@ choice
 	  GUI toolkit for opencv_highgui module.
 
 	  OpenCV GUI toolkit preference (from the most to the least):
+	  - Qt5
 	  - Qt4
 	  - gtk-2
 
@@ -241,16 +242,40 @@ config BR2_PACKAGE_OPENCV_WITH_QT
 	bool "qt4"
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_USE_MMU # qt
-	select BR2_PACKAGE_QT
+	depends on BR2_PACKAGE_QT
 	select BR2_PACKAGE_QT_STL
 	select BR2_PACKAGE_QT_GUI_MODULE
 	select BR2_PACKAGE_QT_TEST
 	help
-	  Use Qt with QtTest module and STL support
+	  Use Qt4 with QtTest and QtGui modules and STL support, as GUI toolkit.
 
-comment "qt4 needs a toolchain w/ C++"
+# no need for a comment about qt availability WRT the toolchain dependencies
+# because they are included in the opencv's ones, so already met.
+
+comment "qt4 depends on qt"
+	depends on BR2_USE_MMU # qt
+	depends on !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5
+
+config BR2_PACKAGE_OPENCV_WITH_QT5
+	bool "qt5"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_USE_MMU # qt5
+	depends on BR2_PACKAGE_QT5
+	select BR2_PACKAGE_QT5BASE
+	select BR2_PACKAGE_QT5BASE_CONCURRENT
+	select BR2_PACKAGE_QT5BASE_TEST
+	select BR2_PACKAGE_QT5BASE_GUI
+	select BR2_PACKAGE_QT5BASE_WIDGETS
+	help
+	  Use Qt5 with base, concurrent, test, gui and widgets components, as GUI
+	  toolkit.
+
+# no need for a comment about qt5 availability WRT the toolchain dependencies
+# because they are included in the opencv's ones, so already met.
+
+comment "qt5 depends on qt5"
 	depends on BR2_USE_MMU # qt
-	depends on !BR2_INSTALL_LIBSTDCPP
+	depends on !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5
 
 endchoice
 
diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index 19863f4..602b59a 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -268,11 +268,18 @@ else
 OPENCV_CONF_OPTS += -DWITH_PNG=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT)$(BR2_PACKAGE_OPENCV_WITH_QT5),)
+OPENCV_CONF_OPTS += -DWITH_QT=OFF
+endif
+
 ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT),y)
 OPENCV_CONF_OPTS += -DWITH_QT=4
 OPENCV_DEPENDENCIES += qt
-else
-OPENCV_CONF_OPTS += -DWITH_QT=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT5),y)
+OPENCV_CONF_OPTS += -DWITH_QT=5
+OPENCV_DEPENDENCIES += qt5base
 endif
 
 ifeq ($(BR2_PACKAGE_OPENCV_WITH_TIFF),y)
-- 
2.4.4

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 14/16] package/opencv: add gtk3 support
  2015-06-25 19:59 [Buildroot] [PATCH v6 00/16] OpenCV bump Samuel Martin
                   ` (12 preceding siblings ...)
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 13/16] package/opencv: add qt5 support Samuel Martin
@ 2015-06-25 19:59 ` Samuel Martin
  2015-06-26 23:00   ` Yann E. MORIN
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 15/16] package/opencv: add opengl support Samuel Martin
                   ` (3 subsequent siblings)
  17 siblings, 1 reply; 44+ messages in thread
From: Samuel Martin @ 2015-06-25 19:59 UTC (permalink / raw)
  To: buildroot

Fully rework the GTK support in OpenCV because it now supports gtk-2 and
gtk-3 (but only one at the time).
Note that, in the build-system, the gtk support is only available when
Qt support is disabled; so make sure the menuconfig reflects this.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

---
changes v5->v6:
- update a/r/t tags
- remove unneeded "default ..." (Yann)

changes v4->v5:
- new patch
---
 package/opencv/Config.in | 22 +++++++++++++++++++---
 package/opencv/opencv.mk |  9 +++++++--
 2 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index ac0443a..b738f71 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -215,6 +215,7 @@ choice
 	  OpenCV GUI toolkit preference (from the most to the least):
 	  - Qt5
 	  - Qt4
+	  - gtk-3
 	  - gtk-2
 
 config BR2_PACKAGE_OPENCV_GUI_NONE
@@ -222,12 +223,12 @@ config BR2_PACKAGE_OPENCV_GUI_NONE
 
 config BR2_PACKAGE_OPENCV_WITH_GTK
 	bool "gtk2"
-	depends on BR2_PACKAGE_XORG7
+	depends on BR2_ARCH_HAS_ATOMICS # libgtk2 -> cairo
+	depends on BR2_USE_MMU # libgtk2 -> libglib2
 	depends on BR2_USE_WCHAR # libgtk2 -> libglib2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk2 -> libglib2
 	depends on BR2_INSTALL_LIBSTDCPP
-	depends on BR2_USE_MMU # libgtk2 -> glib2
-	depends on BR2_ARCH_HAS_ATOMICS # libgtk2 -> cairo
+	depends on BR2_PACKAGE_XORG7
 	select BR2_PACKAGE_LIBGTK2
 
 comment "gtk2 depends on X.org and needs a toolchain w/ wchar, threads, C++"
@@ -238,6 +239,21 @@ comment "gtk2 depends on X.org and needs a toolchain w/ wchar, threads, C++"
 		!BR2_TOOLCHAIN_HAS_THREADS || \
 		!BR2_INSTALL_LIBSTDCPP
 
+config BR2_PACKAGE_OPENCV_WITH_GTK3
+	bool "gtk3"
+	depends on BR2_ARCH_HAS_ATOMICS # libgtk3 -> cairo
+	depends on BR2_USE_MMU # libgtk3 -> libglib2
+	depends on BR2_USE_WCHAR # libgtk3 -> libglib2
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk3 -> libglib2
+	depends on BR2_INSTALL_LIBSTDCPP
+	select BR2_PACKAGE_LIBGTK3
+
+comment "gtk3 needs a toolchain w/ wchar, threads, C++"
+	depends on BR2_USE_MMU # libgtk3 -> glib2
+	depends on BR2_ARCH_HAS_ATOMICS # libgtk3 -> cairo
+	depends on !(BR2_USE_WCHAR || BR2_TOOLCHAIN_HAS_THREADS || \
+		BR2_INSTALL_LIBSTDCPP)
+
 config BR2_PACKAGE_OPENCV_WITH_QT
 	bool "qt4"
 	depends on BR2_INSTALL_LIBSTDCPP
diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index 602b59a..986e7b4 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -236,13 +236,18 @@ OPENCV_CONF_OPTS += -DWITH_GSTREAMER=ON -DWITH_GSTREAMER_0_10=OFF
 OPENCV_DEPENDENCIES += gstreamer1 gst1-plugins-base
 endif
 
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_GTK)$(BR2_PACKAGE_OPENCV_WITH_GTK3),)
+OPENCV_CONF_OPTS += -DWITH_GTK=OFF -DWITH_GTK_2_X=OFF
 endif
 
 ifeq ($(BR2_PACKAGE_OPENCV_WITH_GTK),y)
 OPENCV_CONF_OPTS += -DWITH_GTK=ON -DWITH_GTK_2_X=ON
 OPENCV_DEPENDENCIES += libgtk2
-else
-OPENCV_CONF_OPTS += -DWITH_GTK=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_GTK3),y)
+OPENCV_CONF_OPTS += -DWITH_GTK=ON -DWITH_GTK_2_X=OFF
+OPENCV_DEPENDENCIES += libgtk3
 endif
 
 ifeq ($(BR2_PACKAGE_OPENCV_WITH_JASPER),y)
-- 
2.4.4

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 15/16] package/opencv: add opengl support
  2015-06-25 19:59 [Buildroot] [PATCH v6 00/16] OpenCV bump Samuel Martin
                   ` (13 preceding siblings ...)
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 14/16] package/opencv: add gtk3 support Samuel Martin
@ 2015-06-25 19:59 ` Samuel Martin
  2015-06-27  7:55   ` Yann E. MORIN
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 16/16] package/vlc: add opencv support Samuel Martin
                   ` (2 subsequent siblings)
  17 siblings, 1 reply; 44+ messages in thread
From: Samuel Martin @ 2015-06-25 19:59 UTC (permalink / raw)
  To: buildroot

In OpenCV, OpenGL support is done using extensions from 3rd party
framework: either Qt5OpenGL with Qt5 (with GL support only, not GLES);
or gtkglext (which is not available in Buildroot) with gtk2

So, make OpenGL knob visible when Qt5 support is selected.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>

---
changes v5->v6:
- update comments (Yann)

changes v4->v5:
- new patch
---
 package/opencv/Config.in | 16 ++++++++++++++++
 package/opencv/opencv.mk |  7 +++++++
 2 files changed, 23 insertions(+)

diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index b738f71..b80c9fa 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -311,6 +311,22 @@ config BR2_PACKAGE_OPENCV_WITH_JPEG
 	help
 	  Use shared libjpeg from the target system.
 
+config BR2_PACKAGE_OPENCV_WITH_OPENGL
+	bool "opengl support"
+	# OpenGL support done using Qt5OpenGL, so depends on WITH_QT5
+	depends on BR2_PACKAGE_OPENCV_WITH_QT5
+	# OpenGL support requires Qt5OpenGL with GL support, not GLES
+	depends on BR2_PACKAGE_QT5_GL_AVAILABLE
+	depends on BR2_PACKAGE_HAS_LIBGL
+	select BR2_PACKAGE_QT5BASE_OPENGL
+	help
+	  Enable OpenGL for UI.
+
+comment "opengl support needs Qt5 and an OpenGL provider"
+	depends on !BR2_PACKAGE_OPENCV_WITH_QT5 || \
+		!BR2_PACKAGE_QT5_GL_AVAILABLE || \
+		!BR2_PACKAGE_HAS_LIBGL
+
 config BR2_PACKAGE_OPENCV_WITH_PNG
 	bool "png support"
 	select BR2_PACKAGE_LIBPNG
diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index 986e7b4..61a3ccd 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -264,6 +264,13 @@ else
 OPENCV_CONF_OPTS += -DWITH_JPEG=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_OPENGL),y)
+OPENCV_CONF_OPTS += -DWITH_OPENGL=ON
+OPENCV_DEPENDENCIES += libgl qt5base
+else
+OPENCV_CONF_OPTS += -DWITH_OPENGL=OFF
+endif
+
 OPENCV_CONF_OPTS += -DWITH_OPENMP=$(if $(BR2_GCC_ENABLE_OPENMP),ON,OFF)
 
 ifeq ($(BR2_PACKAGE_OPENCV_WITH_PNG),y)
-- 
2.4.4

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 16/16] package/vlc: add opencv support
  2015-06-25 19:59 [Buildroot] [PATCH v6 00/16] OpenCV bump Samuel Martin
                   ` (14 preceding siblings ...)
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 15/16] package/opencv: add opengl support Samuel Martin
@ 2015-06-25 19:59 ` Samuel Martin
  2015-06-25 20:04 ` [Buildroot] [PATCH v6 00/16] OpenCV bump Samuel Martin
  2015-06-26 18:47 ` Thomas Petazzoni
  17 siblings, 0 replies; 44+ messages in thread
From: Samuel Martin @ 2015-06-25 19:59 UTC (permalink / raw)
  To: buildroot

This change adds 2 patches (backported from upstream) to vlc fixing the
build against opencv2 APIs.
This allows to select the minimal set of opencv modules when opencv
support is enabled.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

---
changes v5->v6:
- update a/r/t tags
- add backport url (Yann)

changes v4->v5:
- new patch
---
 ...opencv_wrapper-use-opencv2-style-includes.patch | 36 ++++++++++++++++++++++
 ...cv_example-add-missing-include-statements.patch | 29 +++++++++++++++++
 package/vlc/Config.in                              |  2 ++
 package/vlc/vlc.mk                                 |  8 ++++-
 4 files changed, 74 insertions(+), 1 deletion(-)
 create mode 100644 package/vlc/0008-opencv_wrapper-use-opencv2-style-includes.patch
 create mode 100644 package/vlc/0009-opencv_example-add-missing-include-statements.patch

diff --git a/package/vlc/0008-opencv_wrapper-use-opencv2-style-includes.patch b/package/vlc/0008-opencv_wrapper-use-opencv2-style-includes.patch
new file mode 100644
index 0000000..0ce0206
--- /dev/null
+++ b/package/vlc/0008-opencv_wrapper-use-opencv2-style-includes.patch
@@ -0,0 +1,36 @@
+Backport from: https://git.videolan.org/?p=vlc.git;a=commit;h=cc236e4652255902f2c2cee3b18f83367f35a8c7
+
+From cc236e4652255902f2c2cee3b18f83367f35a8c7 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+Date: Sun, 24 May 2015 14:30:09 +0200
+Subject: [PATCH 8/9] opencv_wrapper: use opencv2-style includes
+
+If old opencv1-style legacy include directory is available, this change
+becomes purely cosmetic (maybe will compile a bit faster).
+It becomes an FTBFS fix when opencv1-style include directory is missing
+(i.e. from opencv-3.0).
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
+---
+ modules/video_filter/opencv_wrapper.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/modules/video_filter/opencv_wrapper.c b/modules/video_filter/opencv_wrapper.c
+index e36e1a5..5d74241 100644
+--- a/modules/video_filter/opencv_wrapper.c
++++ b/modules/video_filter/opencv_wrapper.c
+@@ -39,8 +39,8 @@
+ #include <vlc_image.h>
+ #include "filter_picture.h"
+ 
+-#include <cxcore.h>
+-#include <cv.h>
++#include <opencv2/core/core_c.h>
++#include <opencv2/core/types_c.h>
+ 
+ /*****************************************************************************
+  * Local prototypes
+-- 
+2.4.2
+
diff --git a/package/vlc/0009-opencv_example-add-missing-include-statements.patch b/package/vlc/0009-opencv_example-add-missing-include-statements.patch
new file mode 100644
index 0000000..7b7f727
--- /dev/null
+++ b/package/vlc/0009-opencv_example-add-missing-include-statements.patch
@@ -0,0 +1,29 @@
+Backport from: https://git.videolan.org/?p=vlc.git;a=commit;h=b82416d7000a993b33e903095a590fe32212a85e
+
+From b82416d7000a993b33e903095a590fe32212a85e Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+Date: Sun, 24 May 2015 14:30:10 +0200
+Subject: [PATCH 9/9] opencv_example: add missing #include statements
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
+---
+ modules/video_filter/opencv_example.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/modules/video_filter/opencv_example.cpp b/modules/video_filter/opencv_example.cpp
+index ae3af05..998f286 100644
+--- a/modules/video_filter/opencv_example.cpp
++++ b/modules/video_filter/opencv_example.cpp
+@@ -41,6 +41,8 @@
+ 
+ #include <opencv2/core/core_c.h>
+ #include <opencv2/core/core.hpp>
++#include <opencv2/imgproc/imgproc_c.h>
++#include <opencv2/imgproc/imgproc.hpp>
+ #include <opencv2/objdetect/objdetect.hpp>
+ 
+ /*****************************************************************************
+-- 
+2.4.2
+
diff --git a/package/vlc/Config.in b/package/vlc/Config.in
index b030a56..471f4a7 100644
--- a/package/vlc/Config.in
+++ b/package/vlc/Config.in
@@ -11,6 +11,8 @@ config BR2_PACKAGE_VLC
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
 	select BR2_PACKAGE_LIBVORBIS if BR2_PACKAGE_OPUS
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC if BR2_PACKAGE_OPENCV
+	select BR2_PACKAGE_OPENCV_LIB_OBJDETECT if BR2_PACKAGE_OPENCV
 	help
 	  VLC is a free and open source cross-platform multimedia player
 	  and framework that plays most multimedia files as well as DVD,
diff --git a/package/vlc/vlc.mk b/package/vlc/vlc.mk
index acd67ee..f609041 100644
--- a/package/vlc/vlc.mk
+++ b/package/vlc/vlc.mk
@@ -41,7 +41,6 @@ VLC_CONF_OPTS += \
 	--disable-projectm \
 	--disable-vsxu \
 	--disable-mtp \
-	--disable-opencv \
 	--disable-mmal-codec \
 	--disable-mmal-vout \
 	--disable-dvdnav \
@@ -145,6 +144,13 @@ else
 VLC_CONF_OPTS += --disable-gles2
 endif
 
+ifeq ($(BR2_PACKAGE_OPENCV),y)
+VLC_CONF_OPTS += --enable-opencv
+VLC_DEPENDENCIES += opencv
+else
+VLC_CONF_OPTS += --disable-opencv
+endif
+
 ifeq ($(BR2_PACKAGE_OPUS),y)
 VLC_CONF_OPTS += --enable-opus
 VLC_DEPENDENCIES += libvorbis opus
-- 
2.4.4

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 00/16] OpenCV bump
  2015-06-25 19:59 [Buildroot] [PATCH v6 00/16] OpenCV bump Samuel Martin
                   ` (15 preceding siblings ...)
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 16/16] package/vlc: add opencv support Samuel Martin
@ 2015-06-25 20:04 ` Samuel Martin
  2015-06-26 18:47 ` Thomas Petazzoni
  17 siblings, 0 replies; 44+ messages in thread
From: Samuel Martin @ 2015-06-25 20:04 UTC (permalink / raw)
  To: buildroot

On Thu, Jun 25, 2015 at 9:59 PM, Samuel Martin <s.martin49@gmail.com> wrote:
>
> Hi all,
>
> Here is yet another iteration for the bump of OpenCV package, and
> related features/packages.
>
> Patches 1 cleans up the current opencv.mk file.
> Patch 2 does the actual bump.
> Patch 3 disables gst1-plugins-opencv.
> Patch 4 fixes a long-standing issue in the OpenCV integration.
> Patch 5 to 7 polish opencv menu.
> Patches 8 to 15 add/improve 3rd-party supports.
> Patches 16 fix reverse dependency (vlc).
>
> Note that, if merged, patch 7/16 can/will break defconfigs having opencv
> selected.
>
> This series has been run in a local autobuilder, triggering more build
> failures. A patch adding an exception for this series will be issued
> soon...

Here it is:
http://lists.busybox.net/pipermail/buildroot/2015-June/130854.html
http://patchwork.ozlabs.org/patch/488547/

Regards,

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 01/16] package/opencv: alphabetically sorted each _CONF_OPTS group
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 01/16] package/opencv: alphabetically sorted each _CONF_OPTS group Samuel Martin
@ 2015-06-25 22:00   ` Yann E. MORIN
  2015-06-26 18:35   ` Thomas Petazzoni
  1 sibling, 0 replies; 44+ messages in thread
From: Yann E. MORIN @ 2015-06-25 22:00 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2015-06-25 21:59 +0200, Samuel Martin spake thusly:
> No new option added nor removed.
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
> changes v5->v6:
> - fix configure options ordering (Yann)
> 
> changes v4->v5:
> - new patch
> ---
>  package/opencv/opencv.mk | 30 +++++++++++++++---------------
>  1 file changed, 15 insertions(+), 15 deletions(-)
> 
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index 9967abc..ee11220 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -12,9 +12,9 @@ OPENCV_LICENSE_FILES = LICENSE
>  
>  # OpenCV component options
>  OPENCV_CONF_OPTS += \
> -	-DBUILD_WITH_DEBUG_INFO=OFF \
>  	-DBUILD_PERF_TESTS=$(if $(BR2_PACKAGE_OPENCV_BUILD_PERF_TESTS),ON,OFF) \
> -	-DBUILD_TESTS=$(if $(BR2_PACKAGE_OPENCV_BUILD_TESTS),ON,OFF)
> +	-DBUILD_TESTS=$(if $(BR2_PACKAGE_OPENCV_BUILD_TESTS),ON,OFF) \
> +	-DBUILD_WITH_DEBUG_INFO=OFF
>  
>  # OpenCV build options
>  OPENCV_CONF_OPTS += \
> @@ -71,14 +71,14 @@ OPENCV_CONF_OPTS += \
>  # * PowerPC support is turned off since its only effect is altering CFLAGS,
>  #   adding '-mcpu=G3 -mtune=G5' to them, which is already handled by Buildroot.
>  OPENCV_CONF_OPTS += \
> +	-DENABLE_AVX=$(if $(BR2_X86_CPU_HAS_AVX),ON,OFF) \
> +	-DENABLE_AVX2=$(if $(BR2_X86_CPU_HAS_AVX2),ON,OFF) \
>  	-DENABLE_POWERPC=OFF \
>  	-DENABLE_SSE=$(if $(BR2_X86_CPU_HAS_SSE),ON,OFF) \
>  	-DENABLE_SSE2=$(if $(BR2_X86_CPU_HAS_SSE2),ON,OFF) \
>  	-DENABLE_SSE3=$(if $(BR2_X86_CPU_HAS_SSE3),ON,OFF) \
>  	-DENABLE_SSE41=$(if $(BR2_X86_CPU_HAS_SSE4),ON,OFF) \
>  	-DENABLE_SSE42=$(if $(BR2_X86_CPU_HAS_SSE42),ON,OFF) \
> -	-DENABLE_AVX=$(if $(BR2_X86_CPU_HAS_AVX),ON,OFF) \
> -	-DENABLE_AVX2=$(if $(BR2_X86_CPU_HAS_AVX2),ON,OFF) \
>  	-DENABLE_SSSE3=$(if $(BR2_X86_CPU_HAS_SSSE3),ON,OFF)
>  
>  # Cuda stuff
> @@ -92,8 +92,8 @@ OPENCV_CONF_OPTS += -DWITH_NVCUVID=OFF
>  
>  # AMD stuff
>  OPENCV_CONF_OPTS += \
> -	-DWITH_OPENCLAMDFFT=OFF \
> -	-DWITH_OPENCLAMDBLAS=OFF
> +	-DWITH_OPENCLAMDBLAS=OFF \
> +	-DWITH_OPENCLAMDFFT=OFF
>  
>  # Intel stuff
>  OPENCV_CONF_OPTS += \
> @@ -112,12 +112,12 @@ OPENCV_CONF_OPTS += -DWITH_XIMEA=OFF
>  
>  # Non-Linux support (Android options) must remain OFF:
>  OPENCV_CONF_OPTS += \
> -	-DWITH_ANDROID_CAMERA=OFF \
>  	-DBUILD_ANDROID_CAMERA_WRAPPER=OFF \
>  	-DBUILD_ANDROID_EXAMPLES=OFF \
> -	-DINSTALL_ANDROID_EXAMPLES=OFF \
>  	-DBUILD_FAT_JAVA_LIB=OFF \
> -	-DBUILD_JAVA_SUPPORT=OFF
> +	-DBUILD_JAVA_SUPPORT=OFF \
> +	-DINSTALL_ANDROID_EXAMPLES=OFF \
> +	-DWITH_ANDROID_CAMERA=OFF
>  
>  # Non-Linux support (Mac OSX options) must remain OFF:
>  OPENCV_CONF_OPTS += \
> @@ -127,22 +127,22 @@ OPENCV_CONF_OPTS += \
>  
>  # Non-Linux support (Windows options) must remain OFF:
>  OPENCV_CONF_OPTS += \
> -	-DWITH_VFW=OFF \
> -	-DWITH_WIN32UI=OFF \
>  	-DWITH_CSTRIPES=OFF \
>  	-DWITH_DSHOW=OFF \
>  	-DWITH_MSMF=OFF \
> -	-DWITH_VIDEOINPUT=OFF
> +	-DWITH_VFW=OFF \
> +	-DWITH_VIDEOINPUT=OFF \
> +	-DWITH_WIN32UI=OFF
>  
>  # Software/3rd-party support options.
>  OPENCV_CONF_OPTS += \
>  	-DBUILD_JASPER=OFF \
>  	-DBUILD_JPEG=OFF \
> +	-DBUILD_NEW_PYTHON_SUPPORT=OFF \
>  	-DBUILD_OPENEXR=OFF \
>  	-DBUILD_PNG=OFF \
>  	-DBUILD_TIFF=OFF \
>  	-DBUILD_ZLIB=OFF \
> -	-DBUILD_NEW_PYTHON_SUPPORT=OFF \
>  	-DINSTALL_C_EXAMPLES=OFF \
>  	-DINSTALL_PYTHON_EXAMPLES=OFF \
>  	-DINSTALL_TO_MANGLED_PATHS=OFF
> @@ -221,8 +221,8 @@ endif
>  
>  ifeq ($(BR2_PACKAGE_OPENCV_WITH_V4L),y)
>  OPENCV_CONF_OPTS += \
> -	-DWITH_V4L=ON \
> -	-DWITH_LIBV4L=$(if $(BR2_PACKAGE_LIBV4L),ON,OFF)
> +	-DWITH_LIBV4L=$(if $(BR2_PACKAGE_LIBV4L),ON,OFF) \
> +	-DWITH_V4L=ON
>  OPENCV_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBV4L),libv4l)
>  else
>  OPENCV_CONF_OPTS += -DWITH_V4L=OFF -DWITH_LIBV4L=OFF
> -- 
> 2.4.4
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 02/16] package/opencv: bump to version 3.0
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 02/16] package/opencv: bump to version 3.0 Samuel Martin
@ 2015-06-26 14:51   ` Yann E. MORIN
  2015-06-26 15:22     ` Yann E. MORIN
  2015-06-26 18:39   ` Thomas Petazzoni
  1 sibling, 1 reply; 44+ messages in thread
From: Yann E. MORIN @ 2015-06-26 14:51 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2015-06-25 21:59 +0200, Samuel Martin spake thusly:
> This major version bump is in fact a bump from 2.4.10 to 2.4.11, then to
> 3.0.
> 
> OpenCV-2.4.11 improves a lot the Buildroot integration, including a
> couple of patches that are no longer needed:
> - x86 PIC code compilation fix in core module [1];
> - return type fix in superes module [2];
> - opencv.pc generation [3].
> 
> It also improves the gstreamer-0.10/1.x detection [4], that will be
> needed in a follow-up patch.
> 
> OpenCV-3.0 still requires 2 patches (backported from upstream fixing
> pthread support [5,6].
> 
> The OpenCV-3.0 does some major changes, for which a transition guide
> has been published [7].
> 
> Among these changes coming with OpenCV-3.0, some new modules have been
> introduced and others got removed; leading to a bunch of configure
> option updates (to keep as much as possible an iso-functional-perimeter)
> and the legacy menu has been updated too.
> The worth noticing removals being:
> - the opencv_legacy and opencv_nonfree modules no longer exist;
> - the opencv_contrib module has moved out of the opencv base tree and
>   now has its own repository [8].
>   There is currently no plan to support it.
> 
> Some 3rd-party supports have been improved or added; their integrations
> in Buildroot will be addressed in follow-up patches.
> 
> [1] https://github.com/Itseez/opencv/commit/ea50be0529c248961e1b66293f8a9e4b807294a6
> [2] https://github.com/Itseez/opencv/commit/2e393ab83362743ba1825ad4b31d4a2925c606b4
> [3] https://github.com/Itseez/opencv/commit/eceada586bbf18fc267e437522ec4f1f23ddc656
> [4] https://github.com/Itseez/opencv/commit/38bb0db9dbec08666c8a64b3e4ead8fadf15c980
> [5] https://github.com/Itseez/opencv/commit/1f983ec39c97298b0c8ce409a1cc229ecf14e55c
> [6] https://github.com/Itseez/opencv/commit/a482dcce464acbd5368fb93c6c3d52ba8401776a
> [7] http://docs.opencv.org/master/db/dfa/tutorial_transition_guide.html
> [8] https://github.com/itseez/opencv_contrib

Great list of pointers! :-)

> Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
[--SNIP--]
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index e40437f..95e1e13 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -4,10 +4,14 @@ menuconfig BR2_PACKAGE_OPENCV
>  	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
>  	depends on BR2_INSTALL_LIBSTDCPP
>  	depends on BR2_USE_WCHAR
> +	depends on !BR2_STATIC_LIBS # include dlfcn.h
>  	help
>  	  OpenCV (Open Source Computer Vision) is a library of programming
>  	  functions for real time computer vision.
>  
> +	  Note that the opencv_core module and the opencv_hal library are
> +	  automatically enabled.

"automatically enabled" suggests that we do have (Kconfig) options to
enable them, which is not the case. What about:

    Note that the opencv_core module and the opencv_hal library are
    always built and installed, not matter which other modules are
    enabled below.

>  	  http://opencv.org/
>  
>  if BR2_PACKAGE_OPENCV
> @@ -20,11 +24,7 @@ config BR2_PACKAGE_OPENCV_LIB_CALIB3D
>  	help
>  	  Include opencv_calib3d module into the OpenCV build.
>  
> -config BR2_PACKAGE_OPENCV_LIB_CONTRIB
> -	bool "contrib"
> -	default y
> -	help
> -	  Include opencv_contrib module into the OpenCV build.
> +# opencv_core module is automatically enabled when OpenCV package is selected

I would not add this comment, since it's already been explicitly stated
so in the help entry.

>  config BR2_PACKAGE_OPENCV_LIB_FEATURES2D
>  	bool "features2d"
> @@ -38,10 +38,8 @@ config BR2_PACKAGE_OPENCV_LIB_FLANN
>  	help
>  	  Include opencv_flann module into the OpenCV build.
>  
> -config BR2_PACKAGE_OPENCV_LIB_GPU
> -	bool "gpu"
> -	help
> -	  Include opencv_gpu module into the OpenCV build.
> +# opencv_hal (hardware acceleration layer (hal) module is required by
> +# opencv_core, so it is automatically enabled

Ditto.

>  config BR2_PACKAGE_OPENCV_LIB_HIGHGUI
>  	bool "highgui"
> @@ -49,17 +47,17 @@ config BR2_PACKAGE_OPENCV_LIB_HIGHGUI
>  	help
>  	  Include opencv_highgui module into the OpenCV build.
>  
> -config BR2_PACKAGE_OPENCV_LIB_IMGPROC
> -	bool "imgproc"
> +config BR2_PACKAGE_OPENCV_LIB_IMGCODECS
> +	bool "imgcodecs (image codecs)"

I forgot to say so in my previous review, but we ususally do not add
such explications in the prompt, but in the help text. Besides, since
you do not update the existing prompts accordingly, it makes the whole
menu inconsistent, because some prompts have explanations, some don't.

(Note that this comment is valid for all entries; I won't repeat it.)

>  	default y
>  	help
> -	  Include opencv_imgproc module into the OpenCV build.
> +	  Include opencv_imgcodecs module into the OpenCV build.

Furthermore, the proposed help text is not very helpful. A help text,
when present, should have some explanations that go further than just
repeating the promopt with syntaxic sugar. What about (adapt list, of
course):

    config BR2_PACKAGE_OPENCV_LIB_IMGCODECS
        bool "imgcodecs"
        help
            Include opencv_imgcodecs module, to provide image codecs,
            like jpeg, png, gif...

(Ditto, comment valid for all following entries.)

But others may disagree, of course. ;-)

Otherwise:

    Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
    Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Build-tested only, on i586.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 04/16] package/opencv: define modules inter-dependencies
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 04/16] package/opencv: define modules inter-dependencies Samuel Martin
@ 2015-06-26 15:20   ` Yann E. MORIN
  0 siblings, 0 replies; 44+ messages in thread
From: Yann E. MORIN @ 2015-06-26 15:20 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2015-06-25 21:59 +0200, Samuel Martin spake thusly:
> OpenCV allows to enable/disable the selection of modules (a.k.a.
> opencv libraries). These modules depend one on the others; these
> dependencies are already handled by the build-system (CMake).
> 
> However, the way we handled them in Buildroot was not really clean.
> For each opencv module, there is a kconfig option, but we forced the
> corresponding CMake config option without checking for the modules'
> dependencies.
> 
> This patch replicates the modules' dependency relations in the
> Config.in, so that the selection of the user will actually be built.
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
> changes v5->v6:
> - rebase
> 
> changes v4->v5:
> - rebase
> - remove Reviewed-by tag form Yann (because of the changes introduced
>   with the version bump)
> 
> changes v3->v4:
> - rebase
> - update ts module dependencies
> 
> changes v2->v3:
> - rebase
> - fix typo in commit log (Yann)
> - update A/R/T tags
> 
> changes v1->v2:
> - rebase
> ---
>  package/opencv/Config.in | 39 ++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 38 insertions(+), 1 deletion(-)
> 
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index 95e1e13..87f4bf5 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -21,6 +21,8 @@ comment "OpenCV modules"
>  config BR2_PACKAGE_OPENCV_LIB_CALIB3D
>  	bool "calib3d"
>  	default y
> +	select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
> +	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	help
>  	  Include opencv_calib3d module into the OpenCV build.
>  
> @@ -29,12 +31,16 @@ config BR2_PACKAGE_OPENCV_LIB_CALIB3D
>  config BR2_PACKAGE_OPENCV_LIB_FEATURES2D
>  	bool "features2d"
>  	default y
> +	select BR2_PACKAGE_OPENCV_LIB_FLANN
> +	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
> +	select BR2_PACKAGE_OPENCV_LIB_ML
>  	help
>  	  Include opencv_features2d module into the OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_FLANN
>  	bool "flann"
>  	default y
> +	# opencv_core dependency is already enabled
>  	help
>  	  Include opencv_flann module into the OpenCV build.
>  
> @@ -44,36 +50,46 @@ config BR2_PACKAGE_OPENCV_LIB_FLANN
>  config BR2_PACKAGE_OPENCV_LIB_HIGHGUI
>  	bool "highgui"
>  	default y
> +	select BR2_PACKAGE_OPENCV_LIB_IMGCODECS
> +	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
> +	select BR2_PACKAGE_OPENCV_LIB_VIDEOIO
>  	help
>  	  Include opencv_highgui module into the OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_IMGCODECS
>  	bool "imgcodecs (image codecs)"
>  	default y
> +	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	help
>  	  Include opencv_imgcodecs module into the OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	bool "imgproc (image processing)"
>  	default y
> +	# opencv_core dependency is already enabled
>  	help
>  	  Include opencv_imgproc module into the OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_ML
>  	bool "ml (machine learning)"
>  	default y
> +	# opencv_core dependency is already enabled
>  	help
>  	  Include opencv_ml module into the OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_OBJDETECT
>  	bool "objdetect"
>  	default y
> +	# opencv_core dependency is already enabled
> +	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
> +	select BR2_PACKAGE_OPENCV_LIB_ML
>  	help
>  	  Include opencv_objdetect module into the OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_PHOTO
>  	bool "photo"
>  	default y
> +	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	help
>  	  Include opencv_photo module into the OpenCV build.
>  
> @@ -82,44 +98,65 @@ comment "opencv_python module requires numpy which is not yet available."
>  config BR2_PACKAGE_OPENCV_LIB_SHAPE
>  	bool "shape (shape descriptors and matchers)"
>  	default y
> +	# opencv_core dependency is already enabled
> +	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
> +	select BR2_PACKAGE_OPENCV_LIB_VIDEO
>  	help
>  	  Include opencv_shape module into the OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_STITCHING
>  	bool "stitching"
>  	default y
> +	select BR2_PACKAGE_OPENCV_LIB_CALIB3D
> +	select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
> +	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
> +	select BR2_PACKAGE_OPENCV_LIB_OBJDETECT
>  	help
>  	  Include opencv_stitching module into the OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_SUPERRES
>  	bool "superres"
>  	default y
> +	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
> +	select BR2_PACKAGE_OPENCV_LIB_VIDEO
>  	help
>  	  Include opencv_superres "super resolution" - module into the OpenCV
>  	  build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_TS
>  	bool "ts (touchscreen)"
> -	select BR2_PACKAGE_OPENCV_LIB_HIGHGUI
>  	default y
> +	# opencv_core dependency is already enabled
> +	select BR2_PACKAGE_OPENCV_LIB_HIGHGUI
> +	select BR2_PACKAGE_OPENCV_LIB_IMGCODECS
> +	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
> +	select BR2_PACKAGE_OPENCV_LIB_VIDEOIO
>  	help
>  	  Include opencv_ts module into the OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_VIDEOIO
>  	bool "videoio (media i/o)"
>  	default y
> +	select BR2_PACKAGE_OPENCV_LIB_IMGCODECS
> +	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	help
>  	  Include opencv_videoio module into the OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_VIDEO
>  	bool "video"
>  	default y
> +	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	help
>  	  Include opencv_video module into the OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_VIDEOSTAB
>  	bool "videostab"
>  	default y
> +	select BR2_PACKAGE_OPENCV_LIB_CALIB3D
> +	select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
> +	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
> +	select BR2_PACKAGE_OPENCV_LIB_PHOTO
> +	select BR2_PACKAGE_OPENCV_LIB_VIDEO
>  	help
>  	  Include opencv_videostab module into the OpenCV build.
>  
> -- 
> 2.4.4
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 02/16] package/opencv: bump to version 3.0
  2015-06-26 14:51   ` Yann E. MORIN
@ 2015-06-26 15:22     ` Yann E. MORIN
  0 siblings, 0 replies; 44+ messages in thread
From: Yann E. MORIN @ 2015-06-26 15:22 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2015-06-26 16:51 +0200, Yann E. MORIN spake thusly:
> On 2015-06-25 21:59 +0200, Samuel Martin spake thusly:
> > This major version bump is in fact a bump from 2.4.10 to 2.4.11, then to
> > 3.0.
[--SNIP--]
> > @@ -49,17 +47,17 @@ config BR2_PACKAGE_OPENCV_LIB_HIGHGUI
> >  	help
> >  	  Include opencv_highgui module into the OpenCV build.
> >  
> > -config BR2_PACKAGE_OPENCV_LIB_IMGPROC
> > -	bool "imgproc"
> > +config BR2_PACKAGE_OPENCV_LIB_IMGCODECS
> > +	bool "imgcodecs (image codecs)"
> 
> I forgot to say so in my previous review, but we ususally do not add
> such explications in the prompt, but in the help text.

OK, there is a patch later on that deals with prompt and help texts.
Let's see that...

However, I find it dubious that you add those texts in this patch, to
later remove them in a following patch. Why not just omit them to begin
with?

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 05/16] package/opencv: reword modules' prompt and help text
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 05/16] package/opencv: reword modules' prompt and help text Samuel Martin
@ 2015-06-26 15:27   ` Yann E. MORIN
  0 siblings, 0 replies; 44+ messages in thread
From: Yann E. MORIN @ 2015-06-26 15:27 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2015-06-25 21:59 +0200, Samuel Martin spake thusly:
> This patch is mostly cosmetic changes improving the human interface.
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>

Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
> changes v5->v6:
> - fix prompts de help texts (Yann, ThomasP)
> 
> changes v4->v5:
> - new patch
> ---
>  package/opencv/Config.in | 52 +++++++++++++++++++++++++++---------------------
>  1 file changed, 29 insertions(+), 23 deletions(-)
> 
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index 87f4bf5..4f29ffd 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -24,7 +24,8 @@ config BR2_PACKAGE_OPENCV_LIB_CALIB3D
>  	select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	help
> -	  Include opencv_calib3d module into the OpenCV build.
> +	  Include opencv_calib3d (camera calibration and 3d reconstruction) module
> +	  into the OpenCV build.
>  
>  # opencv_core module is automatically enabled when OpenCV package is selected
>  
> @@ -35,14 +36,16 @@ config BR2_PACKAGE_OPENCV_LIB_FEATURES2D
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	select BR2_PACKAGE_OPENCV_LIB_ML
>  	help
> -	  Include opencv_features2d module into the OpenCV build.
> +	  Include opencv_features2d (2d features framework) module into the OpenCV
> +	  build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_FLANN
>  	bool "flann"
>  	default y
>  	# opencv_core dependency is already enabled
>  	help
> -	  Include opencv_flann module into the OpenCV build.
> +	  Include opencv_flann (clustering and search in multi-dimensional spaces)
> +	  module into the OpenCV build.
>  
>  # opencv_hal (hardware acceleration layer (hal) module is required by
>  # opencv_core, so it is automatically enabled
> @@ -54,28 +57,29 @@ config BR2_PACKAGE_OPENCV_LIB_HIGHGUI
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	select BR2_PACKAGE_OPENCV_LIB_VIDEOIO
>  	help
> -	  Include opencv_highgui module into the OpenCV build.
> +	  Include opencv_highgui (high-level gui and media i/o) module into the
> +	  OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_IMGCODECS
> -	bool "imgcodecs (image codecs)"
> +	bool "imgcodecs"
>  	default y
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	help
> -	  Include opencv_imgcodecs module into the OpenCV build.
> +	  Include opencv_imgcodecs (image codecs) module into the OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_IMGPROC
> -	bool "imgproc (image processing)"
> +	bool "imgproc"
>  	default y
>  	# opencv_core dependency is already enabled
>  	help
> -	  Include opencv_imgproc module into the OpenCV build.
> +	  Include opencv_imgproc (image processing) module into the OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_ML
> -	bool "ml (machine learning)"
> +	bool "ml"
>  	default y
>  	# opencv_core dependency is already enabled
>  	help
> -	  Include opencv_ml module into the OpenCV build.
> +	  Include opencv_ml (machine learning) module into the OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_OBJDETECT
>  	bool "objdetect"
> @@ -84,25 +88,27 @@ config BR2_PACKAGE_OPENCV_LIB_OBJDETECT
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	select BR2_PACKAGE_OPENCV_LIB_ML
>  	help
> -	  Include opencv_objdetect module into the OpenCV build.
> +	  Include opencv_objdetect (object detection) module into the OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_PHOTO
>  	bool "photo"
>  	default y
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	help
> -	  Include opencv_photo module into the OpenCV build.
> +	  Include opencv_photo (computational photography) module into the OpenCV
> +	  build.
>  
>  comment "opencv_python module requires numpy which is not yet available."
>  
>  config BR2_PACKAGE_OPENCV_LIB_SHAPE
> -	bool "shape (shape descriptors and matchers)"
> +	bool "shape"
>  	default y
>  	# opencv_core dependency is already enabled
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	select BR2_PACKAGE_OPENCV_LIB_VIDEO
>  	help
> -	  Include opencv_shape module into the OpenCV build.
> +	  Include opencv_shape (shape descriptors and matchers) module into the
> +	  OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_STITCHING
>  	bool "stitching"
> @@ -112,7 +118,7 @@ config BR2_PACKAGE_OPENCV_LIB_STITCHING
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	select BR2_PACKAGE_OPENCV_LIB_OBJDETECT
>  	help
> -	  Include opencv_stitching module into the OpenCV build.
> +	  Include opencv_stitching (images stitching) module into the OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_SUPERRES
>  	bool "superres"
> @@ -120,11 +126,10 @@ config BR2_PACKAGE_OPENCV_LIB_SUPERRES
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	select BR2_PACKAGE_OPENCV_LIB_VIDEO
>  	help
> -	  Include opencv_superres "super resolution" - module into the OpenCV
> -	  build.
> +	  Include opencv_superres (super resolution) module into the OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_TS
> -	bool "ts (touchscreen)"
> +	bool "ts"
>  	default y
>  	# opencv_core dependency is already enabled
>  	select BR2_PACKAGE_OPENCV_LIB_HIGHGUI
> @@ -132,22 +137,22 @@ config BR2_PACKAGE_OPENCV_LIB_TS
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	select BR2_PACKAGE_OPENCV_LIB_VIDEOIO
>  	help
> -	  Include opencv_ts module into the OpenCV build.
> +	  Include opencv_ts (test) module into the OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_VIDEOIO
> -	bool "videoio (media i/o)"
> +	bool "videoio"
>  	default y
>  	select BR2_PACKAGE_OPENCV_LIB_IMGCODECS
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	help
> -	  Include opencv_videoio module into the OpenCV build.
> +	  Include opencv_videoio (media i/o) module into the OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_VIDEO
>  	bool "video"
>  	default y
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	help
> -	  Include opencv_video module into the OpenCV build.
> +	  Include opencv_video (video analysis) module into the OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_VIDEOSTAB
>  	bool "videostab"
> @@ -158,7 +163,8 @@ config BR2_PACKAGE_OPENCV_LIB_VIDEOSTAB
>  	select BR2_PACKAGE_OPENCV_LIB_PHOTO
>  	select BR2_PACKAGE_OPENCV_LIB_VIDEO
>  	help
> -	  Include opencv_videostab module into the OpenCV build.
> +	  Include opencv_videostab (video stabilization) module into the OpenCV
> +	  build.
>  
>  comment "Test sets"
>  config BR2_PACKAGE_OPENCV_BUILD_TESTS
> -- 
> 2.4.4
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 06/16] package/opencv: reduce modules on by default
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 06/16] package/opencv: reduce modules on by default Samuel Martin
@ 2015-06-26 15:30   ` Yann E. MORIN
  2015-06-26 15:34   ` Yann E. MORIN
  1 sibling, 0 replies; 44+ messages in thread
From: Yann E. MORIN @ 2015-06-26 15:30 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2015-06-25 21:59 +0200, Samuel Martin spake thusly:
> Since its integration into Buildroot, OpenCV always enables all modules
> by default because the inter-module denpedency were not supported.
> 
> Now that OpenCV inter-module dependencies are correctly set at the
> Buildroot configuration level, it is possible to reduce the enabled
> module list to its minimal set, letting kconfig enable the other
> modules.
> 
> This change will not change anything WRT a defconfig build with opencv.
> 
> Cc: "Yann E. Morin" <yann.morin.1998@free.fr>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>

Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
> changes v5->v6:
> - new patch
> ---
>  package/opencv/Config.in | 11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index 4f29ffd..ce67f0c 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -20,7 +20,6 @@ comment "OpenCV modules"
>  
>  config BR2_PACKAGE_OPENCV_LIB_CALIB3D
>  	bool "calib3d"
> -	default y
>  	select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	help
> @@ -31,7 +30,6 @@ config BR2_PACKAGE_OPENCV_LIB_CALIB3D
>  
>  config BR2_PACKAGE_OPENCV_LIB_FEATURES2D
>  	bool "features2d"
> -	default y
>  	select BR2_PACKAGE_OPENCV_LIB_FLANN
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	select BR2_PACKAGE_OPENCV_LIB_ML
> @@ -41,7 +39,6 @@ config BR2_PACKAGE_OPENCV_LIB_FEATURES2D
>  
>  config BR2_PACKAGE_OPENCV_LIB_FLANN
>  	bool "flann"
> -	default y
>  	# opencv_core dependency is already enabled
>  	help
>  	  Include opencv_flann (clustering and search in multi-dimensional spaces)
> @@ -52,7 +49,6 @@ config BR2_PACKAGE_OPENCV_LIB_FLANN
>  
>  config BR2_PACKAGE_OPENCV_LIB_HIGHGUI
>  	bool "highgui"
> -	default y
>  	select BR2_PACKAGE_OPENCV_LIB_IMGCODECS
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	select BR2_PACKAGE_OPENCV_LIB_VIDEOIO
> @@ -62,28 +58,24 @@ config BR2_PACKAGE_OPENCV_LIB_HIGHGUI
>  
>  config BR2_PACKAGE_OPENCV_LIB_IMGCODECS
>  	bool "imgcodecs"
> -	default y
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	help
>  	  Include opencv_imgcodecs (image codecs) module into the OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	bool "imgproc"
> -	default y
>  	# opencv_core dependency is already enabled
>  	help
>  	  Include opencv_imgproc (image processing) module into the OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_ML
>  	bool "ml"
> -	default y
>  	# opencv_core dependency is already enabled
>  	help
>  	  Include opencv_ml (machine learning) module into the OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_OBJDETECT
>  	bool "objdetect"
> -	default y
>  	# opencv_core dependency is already enabled
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	select BR2_PACKAGE_OPENCV_LIB_ML
> @@ -92,7 +84,6 @@ config BR2_PACKAGE_OPENCV_LIB_OBJDETECT
>  
>  config BR2_PACKAGE_OPENCV_LIB_PHOTO
>  	bool "photo"
> -	default y
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	help
>  	  Include opencv_photo (computational photography) module into the OpenCV
> @@ -141,7 +132,6 @@ config BR2_PACKAGE_OPENCV_LIB_TS
>  
>  config BR2_PACKAGE_OPENCV_LIB_VIDEOIO
>  	bool "videoio"
> -	default y
>  	select BR2_PACKAGE_OPENCV_LIB_IMGCODECS
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	help
> @@ -149,7 +139,6 @@ config BR2_PACKAGE_OPENCV_LIB_VIDEOIO
>  
>  config BR2_PACKAGE_OPENCV_LIB_VIDEO
>  	bool "video"
> -	default y
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	help
>  	  Include opencv_video (video analysis) module into the OpenCV build.
> -- 
> 2.4.4
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 06/16] package/opencv: reduce modules on by default
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 06/16] package/opencv: reduce modules on by default Samuel Martin
  2015-06-26 15:30   ` Yann E. MORIN
@ 2015-06-26 15:34   ` Yann E. MORIN
  2015-06-26 15:35     ` Yann E. MORIN
  1 sibling, 1 reply; 44+ messages in thread
From: Yann E. MORIN @ 2015-06-26 15:34 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2015-06-25 21:59 +0200, Samuel Martin spake thusly:
> Since its integration into Buildroot, OpenCV always enables all modules
> by default because the inter-module denpedency were not supported.
> 
> Now that OpenCV inter-module dependencies are correctly set at the
> Buildroot configuration level, it is possible to reduce the enabled
> module list to its minimal set, letting kconfig enable the other
> modules.
> 
> This change will not change anything WRT a defconfig build with opencv.
> 
> Cc: "Yann E. Morin" <yann.morin.1998@free.fr>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>

Although I'm usually not opposed to getting the smallest possible config
as a default, as you say this one breaks existing defconfigs.

OTOH, do we really care?

Anyway, I won't ack this one, but I am not ooposed to it being merged
either.

Regards,
Yann E. MORIN.

> ---
> changes v5->v6:
> - new patch
> ---
>  package/opencv/Config.in | 11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index 4f29ffd..ce67f0c 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -20,7 +20,6 @@ comment "OpenCV modules"
>  
>  config BR2_PACKAGE_OPENCV_LIB_CALIB3D
>  	bool "calib3d"
> -	default y
>  	select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	help
> @@ -31,7 +30,6 @@ config BR2_PACKAGE_OPENCV_LIB_CALIB3D
>  
>  config BR2_PACKAGE_OPENCV_LIB_FEATURES2D
>  	bool "features2d"
> -	default y
>  	select BR2_PACKAGE_OPENCV_LIB_FLANN
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	select BR2_PACKAGE_OPENCV_LIB_ML
> @@ -41,7 +39,6 @@ config BR2_PACKAGE_OPENCV_LIB_FEATURES2D
>  
>  config BR2_PACKAGE_OPENCV_LIB_FLANN
>  	bool "flann"
> -	default y
>  	# opencv_core dependency is already enabled
>  	help
>  	  Include opencv_flann (clustering and search in multi-dimensional spaces)
> @@ -52,7 +49,6 @@ config BR2_PACKAGE_OPENCV_LIB_FLANN
>  
>  config BR2_PACKAGE_OPENCV_LIB_HIGHGUI
>  	bool "highgui"
> -	default y
>  	select BR2_PACKAGE_OPENCV_LIB_IMGCODECS
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	select BR2_PACKAGE_OPENCV_LIB_VIDEOIO
> @@ -62,28 +58,24 @@ config BR2_PACKAGE_OPENCV_LIB_HIGHGUI
>  
>  config BR2_PACKAGE_OPENCV_LIB_IMGCODECS
>  	bool "imgcodecs"
> -	default y
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	help
>  	  Include opencv_imgcodecs (image codecs) module into the OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	bool "imgproc"
> -	default y
>  	# opencv_core dependency is already enabled
>  	help
>  	  Include opencv_imgproc (image processing) module into the OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_ML
>  	bool "ml"
> -	default y
>  	# opencv_core dependency is already enabled
>  	help
>  	  Include opencv_ml (machine learning) module into the OpenCV build.
>  
>  config BR2_PACKAGE_OPENCV_LIB_OBJDETECT
>  	bool "objdetect"
> -	default y
>  	# opencv_core dependency is already enabled
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	select BR2_PACKAGE_OPENCV_LIB_ML
> @@ -92,7 +84,6 @@ config BR2_PACKAGE_OPENCV_LIB_OBJDETECT
>  
>  config BR2_PACKAGE_OPENCV_LIB_PHOTO
>  	bool "photo"
> -	default y
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	help
>  	  Include opencv_photo (computational photography) module into the OpenCV
> @@ -141,7 +132,6 @@ config BR2_PACKAGE_OPENCV_LIB_TS
>  
>  config BR2_PACKAGE_OPENCV_LIB_VIDEOIO
>  	bool "videoio"
> -	default y
>  	select BR2_PACKAGE_OPENCV_LIB_IMGCODECS
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	help
> @@ -149,7 +139,6 @@ config BR2_PACKAGE_OPENCV_LIB_VIDEOIO
>  
>  config BR2_PACKAGE_OPENCV_LIB_VIDEO
>  	bool "video"
> -	default y
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	help
>  	  Include opencv_video (video analysis) module into the OpenCV build.
> -- 
> 2.4.4
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 06/16] package/opencv: reduce modules on by default
  2015-06-26 15:34   ` Yann E. MORIN
@ 2015-06-26 15:35     ` Yann E. MORIN
  0 siblings, 0 replies; 44+ messages in thread
From: Yann E. MORIN @ 2015-06-26 15:35 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2015-06-26 17:34 +0200, Yann E. MORIN spake thusly:
> On 2015-06-25 21:59 +0200, Samuel Martin spake thusly:
> > Since its integration into Buildroot, OpenCV always enables all modules
> > by default because the inter-module denpedency were not supported.
> > 
> > Now that OpenCV inter-module dependencies are correctly set at the
> > Buildroot configuration level, it is possible to reduce the enabled
> > module list to its minimal set, letting kconfig enable the other
> > modules.
> > 
> > This change will not change anything WRT a defconfig build with opencv.
> > 
> > Cc: "Yann E. Morin" <yann.morin.1998@free.fr>
> > Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> 
> Although I'm usually not opposed to getting the smallest possible config
> as a default, as you say this one breaks existing defconfigs.
> 
> OTOH, do we really care?
> 
> Anyway, I won't ack this one, but I am not ooposed to it being merged
> either.

This should have been a comment to the following patch:
    package/opencv: disable all modules by default

Sorry for the confusion...

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 07/16] package/opencv: disable all modules by default
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 07/16] package/opencv: disable all modules " Samuel Martin
@ 2015-06-26 15:36   ` Yann E. MORIN
  2015-07-06 22:19     ` Arnout Vandecappelle
  0 siblings, 1 reply; 44+ messages in thread
From: Yann E. MORIN @ 2015-06-26 15:36 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2015-06-25 21:59 +0200, Samuel Martin spake thusly:
> This change allows to reduce the size of the default OpenCV package, so
> the final root filesystem.
> 
> However, this will break any existing defconfig enabling OpenCV. Indeed,
> a minimal OpenCV  package will be built, whereas, prior to applying this
> patches, a full-featured one would have been built instead.
> 
> Cc: "Yann E. Morin" <yann.morin.1998@free.fr>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>

Although I'm usually not opposed to getting the smallest possible config
as a default, however as you say this one breaks existing defconfigs.

OTOH, do we really care?

Anyway, I won't ack this one, but I am not opposed to it being merged
either.

Regards,
Yann E. MORIN.

> ---
> changes v5->v6:
> - new patch
> ---
>  package/opencv/Config.in | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index ce67f0c..3c00525 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -93,7 +93,6 @@ comment "opencv_python module requires numpy which is not yet available."
>  
>  config BR2_PACKAGE_OPENCV_LIB_SHAPE
>  	bool "shape"
> -	default y
>  	# opencv_core dependency is already enabled
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	select BR2_PACKAGE_OPENCV_LIB_VIDEO
> @@ -103,7 +102,6 @@ config BR2_PACKAGE_OPENCV_LIB_SHAPE
>  
>  config BR2_PACKAGE_OPENCV_LIB_STITCHING
>  	bool "stitching"
> -	default y
>  	select BR2_PACKAGE_OPENCV_LIB_CALIB3D
>  	select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
> @@ -113,7 +111,6 @@ config BR2_PACKAGE_OPENCV_LIB_STITCHING
>  
>  config BR2_PACKAGE_OPENCV_LIB_SUPERRES
>  	bool "superres"
> -	default y
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
>  	select BR2_PACKAGE_OPENCV_LIB_VIDEO
>  	help
> @@ -121,7 +118,6 @@ config BR2_PACKAGE_OPENCV_LIB_SUPERRES
>  
>  config BR2_PACKAGE_OPENCV_LIB_TS
>  	bool "ts"
> -	default y
>  	# opencv_core dependency is already enabled
>  	select BR2_PACKAGE_OPENCV_LIB_HIGHGUI
>  	select BR2_PACKAGE_OPENCV_LIB_IMGCODECS
> @@ -145,7 +141,6 @@ config BR2_PACKAGE_OPENCV_LIB_VIDEO
>  
>  config BR2_PACKAGE_OPENCV_LIB_VIDEOSTAB
>  	bool "videostab"
> -	default y
>  	select BR2_PACKAGE_OPENCV_LIB_CALIB3D
>  	select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
>  	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
> -- 
> 2.4.4
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 08/16] package/opencv: add python support
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 08/16] package/opencv: add python support Samuel Martin
@ 2015-06-26 17:51   ` Yann E. MORIN
  2015-06-26 17:59   ` Yann E. MORIN
  1 sibling, 0 replies; 44+ messages in thread
From: Yann E. MORIN @ 2015-06-26 17:51 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2015-06-25 21:59 +0200, Samuel Martin spake thusly:
> opencv_python module needs python-numpy because it uses some numpy
> headers in this wrapper.
> 
> From its 2.4 release, OpenCV offers python bindings, but they required
> most of the OpenCV modules to be enabled.
> 
> Since OpenCV-3.0.0, python bindings have been reworked:
> - it now supports both python2 and python3
> - only built modules supporting wrapped in python will be included in
>   the bindings.

With Python2 enabled, I still see this in the configure log:

    --   Python 2:
    --     Interpreter:     /home/ymorin/dev/buildroot/O/host/usr/bin/python2 (ver 2.7.10)
    --     Libraries:       /home/ymorin/dev/buildroot/O/host/usr/i586-buildroot-linux-gnu/sysroot/usr/lib32/libpython2.7.so (ver 2.7.10)
    --     numpy:           /home/ymorin/dev/buildroot/O/host/usr/i586-buildroot-linux-gnu/sysroot/usr/lib/python2.7/site-packages/numpy/core/include
           (ver undefined - cannot be probed because of the cross-compilation)
    --     packages path:   /usr/lib/python2.7/site-packages
    --
    --   Python 3:
    --     Interpreter:     /usr/bin/python3.4 (ver 3.4)
    --

Should we force the configure step to find python3 as something like
/bin/false to avoid any potential issue, even if we already pass
-DBUILD_opencv_python3=OFF

(Similarly with python2 when python3 is enabled, of course.)

> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

(reviewed tag still valid)

Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Build-tested only, for i586.

Regards,
Yann E. MORIN.

> ---
> changes v5->v6:
> - rebase
> 
> changes v4->v5:
> - rebase
> - update a/r/t tags
> - update commit log
> - fix python-numpy selection
> - add python3 support
> 
> changes v3->v4:
> - rebase
> - rename _OPT -> _OPTS
> - remove python/numpy patch (merged upstream since opencv bump)
> 
> changes v2->v3:
> - rebase
> - add fetch uri in the opencv's patch (Yann)
> - move pyhton module knob under the multi-line if block about python deps
>   (Yann)
> 
> changes v1->v2:
> - rebase
> - use patch merged upstream
> ---
>  package/opencv/Config.in | 12 +++++++++++-
>  package/opencv/opencv.mk | 33 +++++++++++++++++++++++++++++++--
>  2 files changed, 42 insertions(+), 3 deletions(-)
> 
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index 3c00525..8ed505e 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -89,7 +89,17 @@ config BR2_PACKAGE_OPENCV_LIB_PHOTO
>  	  Include opencv_photo (computational photography) module into the OpenCV
>  	  build.
>  
> -comment "opencv_python module requires numpy which is not yet available."
> +config BR2_PACKAGE_OPENCV_LIB_PYTHON
> +	bool "python"
> +	depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
> +	depends on BR2_aarch64 || BR2_arm || BR2_armeb || BR2_i386 \
> +		|| BR2_mips || BR2_mipsel || BR2_powerpc || BR2_powerpc64 \
> +		|| BR2_sh || BR2_x86_64 # python-numpy
> +	depends on !BR2_TOOLCHAIN_USES_UCLIBC || BR2_i386 || BR2_x86_64 # python-numpy
> +	select BR2_PACKAGE_PYTHON_NUMPY
> +	help
> +	  Include opencv_python module into the OpenCV build.
> +	  No python example is installed.
>  
>  config BR2_PACKAGE_OPENCV_LIB_SHAPE
>  	bool "shape"
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index 7211c18..a43de0c 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -78,8 +78,6 @@ OPENCV_CONF_OPTS += \
>  	-DBUILD_opencv_ml=$(if $(BR2_PACKAGE_OPENCV_LIB_ML),ON,OFF) \
>  	-DBUILD_opencv_objdetect=$(if $(BR2_PACKAGE_OPENCV_LIB_OBJDETECT),ON,OFF) \
>  	-DBUILD_opencv_photo=$(if $(BR2_PACKAGE_OPENCV_LIB_PHOTO),ON,OFF) \
> -	-DBUILD_opencv_python2=OFF \
> -	-DBUILD_opencv_python3=OFF \
>  	-DBUILD_opencv_shape=$(if $(BR2_PACKAGE_OPENCV_LIB_SHAPE),ON,OFF) \
>  	-DBUILD_opencv_stitching=$(if $(BR2_PACKAGE_OPENCV_LIB_STITCHING),ON,OFF) \
>  	-DBUILD_opencv_superres=$(if $(BR2_PACKAGE_OPENCV_LIB_SUPERRES),ON,OFF) \
> @@ -282,6 +280,37 @@ else
>  OPENCV_CONF_OPTS += -DWITH_V4L=OFF -DWITH_LIBV4L=OFF
>  endif
>  
> +ifeq ($(BR2_PACKAGE_OPENCV_LIB_PYTHON),y)
> +ifeq ($(BR2_PACKAGE_PYTHON),y)
> +OPENCV_CONF_OPTS += \
> +	-DBUILD_opencv_python2=ON \
> +	-DBUILD_opencv_python3=OFF \
> +	-DPYTHON2_EXECUTABLE=$(HOST_DIR)/usr/bin/python2 \
> +	-DPYTHON2_INCLUDE_PATH=$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) \
> +	-DPYTHON2_LIBRARIES=$(STAGING_DIR)/usr/lib/libpython$(PYTHON_VERSION_MAJOR).so \
> +	-DPYTHON2_NUMPY_INCLUDE_DIRS=$(STAGING_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/numpy/core/include \
> +	-DPYTHON2_PACKAGES_PATH=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
> +	-DPYTHON2_NUMPY_VERSION=$(PYTHON_NUMPY_VERSION)
> +OPENCV_DEPENDENCIES += python
> +else
> +OPENCV_CONF_OPTS += \
> +	-DBUILD_opencv_python2=OFF \
> +	-DBUILD_opencv_python3=ON \
> +	-DPYTHON3_EXECUTABLE=$(HOST_DIR)/usr/bin/python3 \
> +	-DPYTHON3_INCLUDE_PATH=$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR)m \
> +	-DPYTHON3_LIBRARIES=$(STAGING_DIR)/usr/lib/libpython$(PYTHON3_VERSION_MAJOR)m.so \
> +	-DPYTHON3_NUMPY_INCLUDE_DIRS=$(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/numpy/core/include \
> +	-DPYTHON3_PACKAGES_PATH=/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
> +	-DPYTHON3_NUMPY_VERSION=$(PYTHON_NUMPY_VERSION)
> +OPENCV_DEPENDENCIES += python3
> +endif
> +OPENCV_DEPENDENCIES += python-numpy
> +else
> +OPENCV_CONF_OPTS += \
> +	-DBUILD_opencv_python2=OFF \
> +	-DBUILD_opencv_python3=OFF
> +endif
> +
>  # Installation hooks:
>  define OPENCV_CLEAN_INSTALL_DOC
>  	$(RM) -fr $(TARGET_DIR)/usr/share/OpenCV/doc
> -- 
> 2.4.4
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 08/16] package/opencv: add python support
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 08/16] package/opencv: add python support Samuel Martin
  2015-06-26 17:51   ` Yann E. MORIN
@ 2015-06-26 17:59   ` Yann E. MORIN
  1 sibling, 0 replies; 44+ messages in thread
From: Yann E. MORIN @ 2015-06-26 17:59 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2015-06-25 21:59 +0200, Samuel Martin spake thusly:
> opencv_python module needs python-numpy because it uses some numpy
> headers in this wrapper.
> 
> From its 2.4 release, OpenCV offers python bindings, but they required
> most of the OpenCV modules to be enabled.
> 
> Since OpenCV-3.0.0, python bindings have been reworked:
> - it now supports both python2 and python3
> - only built modules supporting wrapped in python will be included in
>   the bindings.
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

I forgot two points, though...
(Damn, it's too hot here, I can't think straight...)

[--SNIP--]
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index 3c00525..8ed505e 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -89,7 +89,17 @@ config BR2_PACKAGE_OPENCV_LIB_PHOTO
>  	  Include opencv_photo (computational photography) module into the OpenCV
>  	  build.
>  
> -comment "opencv_python module requires numpy which is not yet available."

Thios comment is now gone, and there's no longer any hint that python
support can be enabled by selecting python2 or python3. But see below...

> +config BR2_PACKAGE_OPENCV_LIB_PYTHON
> +	bool "python"
> +	depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
> +	depends on BR2_aarch64 || BR2_arm || BR2_armeb || BR2_i386 \
> +		|| BR2_mips || BR2_mipsel || BR2_powerpc || BR2_powerpc64 \
> +		|| BR2_sh || BR2_x86_64 # python-numpy
> +	depends on !BR2_TOOLCHAIN_USES_UCLIBC || BR2_i386 || BR2_x86_64 # python-numpy

It would probably be good to introduce a numpy kconfig variable that
syummraises al those dependencies, like so:

    config BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS
        bool
        default y
        depends on BR2_aarch64 || BR2_arm || BR2_armeb || blabla
        depends on !BR2_TOOLCHAIN_USES_UCLIBC || BR2_i386 || BR2_x86_64

and use that here instead of repeating the whole stuff (which is
difficult to maintain, should python-numpy's dependencies change in a
future version).

And then you could easily add a comment:

    comment "python support needs either python2 or python3"
        depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS
        depends on !BR2_PACKAGE_PYTHON && !BR2_PACKAGE_PYTHON3

Which means I withdraw my reviewed-by tag, sorry. :-(

Regards,
Yann E. MORIN.

> +	select BR2_PACKAGE_PYTHON_NUMPY
> +	help
> +	  Include opencv_python module into the OpenCV build.
> +	  No python example is installed.
>  
>  config BR2_PACKAGE_OPENCV_LIB_SHAPE
>  	bool "shape"
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index 7211c18..a43de0c 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -78,8 +78,6 @@ OPENCV_CONF_OPTS += \
>  	-DBUILD_opencv_ml=$(if $(BR2_PACKAGE_OPENCV_LIB_ML),ON,OFF) \
>  	-DBUILD_opencv_objdetect=$(if $(BR2_PACKAGE_OPENCV_LIB_OBJDETECT),ON,OFF) \
>  	-DBUILD_opencv_photo=$(if $(BR2_PACKAGE_OPENCV_LIB_PHOTO),ON,OFF) \
> -	-DBUILD_opencv_python2=OFF \
> -	-DBUILD_opencv_python3=OFF \
>  	-DBUILD_opencv_shape=$(if $(BR2_PACKAGE_OPENCV_LIB_SHAPE),ON,OFF) \
>  	-DBUILD_opencv_stitching=$(if $(BR2_PACKAGE_OPENCV_LIB_STITCHING),ON,OFF) \
>  	-DBUILD_opencv_superres=$(if $(BR2_PACKAGE_OPENCV_LIB_SUPERRES),ON,OFF) \
> @@ -282,6 +280,37 @@ else
>  OPENCV_CONF_OPTS += -DWITH_V4L=OFF -DWITH_LIBV4L=OFF
>  endif
>  
> +ifeq ($(BR2_PACKAGE_OPENCV_LIB_PYTHON),y)
> +ifeq ($(BR2_PACKAGE_PYTHON),y)
> +OPENCV_CONF_OPTS += \
> +	-DBUILD_opencv_python2=ON \
> +	-DBUILD_opencv_python3=OFF \
> +	-DPYTHON2_EXECUTABLE=$(HOST_DIR)/usr/bin/python2 \
> +	-DPYTHON2_INCLUDE_PATH=$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) \
> +	-DPYTHON2_LIBRARIES=$(STAGING_DIR)/usr/lib/libpython$(PYTHON_VERSION_MAJOR).so \
> +	-DPYTHON2_NUMPY_INCLUDE_DIRS=$(STAGING_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/numpy/core/include \
> +	-DPYTHON2_PACKAGES_PATH=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
> +	-DPYTHON2_NUMPY_VERSION=$(PYTHON_NUMPY_VERSION)
> +OPENCV_DEPENDENCIES += python
> +else
> +OPENCV_CONF_OPTS += \
> +	-DBUILD_opencv_python2=OFF \
> +	-DBUILD_opencv_python3=ON \
> +	-DPYTHON3_EXECUTABLE=$(HOST_DIR)/usr/bin/python3 \
> +	-DPYTHON3_INCLUDE_PATH=$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR)m \
> +	-DPYTHON3_LIBRARIES=$(STAGING_DIR)/usr/lib/libpython$(PYTHON3_VERSION_MAJOR)m.so \
> +	-DPYTHON3_NUMPY_INCLUDE_DIRS=$(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/numpy/core/include \
> +	-DPYTHON3_PACKAGES_PATH=/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
> +	-DPYTHON3_NUMPY_VERSION=$(PYTHON_NUMPY_VERSION)
> +OPENCV_DEPENDENCIES += python3
> +endif
> +OPENCV_DEPENDENCIES += python-numpy
> +else
> +OPENCV_CONF_OPTS += \
> +	-DBUILD_opencv_python2=OFF \
> +	-DBUILD_opencv_python3=OFF
> +endif
> +
>  # Installation hooks:
>  define OPENCV_CLEAN_INSTALL_DOC
>  	$(RM) -fr $(TARGET_DIR)/usr/share/OpenCV/doc
> -- 
> 2.4.4
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 09/16] package/opencv: add a choice for selecting gstreamer support
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 09/16] package/opencv: add a choice for selecting gstreamer support Samuel Martin
@ 2015-06-26 18:11   ` Yann E. MORIN
  0 siblings, 0 replies; 44+ messages in thread
From: Yann E. MORIN @ 2015-06-26 18:11 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2015-06-25 21:59 +0200, Samuel Martin spake thusly:
> OpenCV 3.0 support both gstreamer-0.10 and gstreamer-1.x, but only one
> is used at the time.
> 
> This patch turns the gstreamer support into a choice, in order to prepare
> adding the support for gstreamer-1 in a following patch.
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> 
> ---
> changes v5->v6:
> - new patch
> ---
>  package/opencv/Config.in | 23 ++++++++++++++++-------
>  1 file changed, 16 insertions(+), 7 deletions(-)
> 
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index 8ed505e..4b571e0 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -177,18 +177,27 @@ config BR2_PACKAGE_OPENCV_WITH_FFMPEG
>  	help
>  	  Use ffmpeg from the target system.
>  
> +comment "gstreamer support needs a toolchain w/ wchar, threads"
> +	depends on BR2_USE_MMU
> +	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS

Although I don't like it much, we usually have the comment in the choice
itself, see for example the external toolchain choice.

> +choice
> +	prompt "gstreamer support"
> +	depends on BR2_USE_MMU # libglib2
> +	depends on BR2_USE_WCHAR # libglib2
> +	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2

So, this means the choice will not be visible when gstreamer is missing
its dependencies.

Instead, I'd do something like is done (in a later patch) for the GUI
toolkits, that is always show the choice, but hide whatever entries are
not available:

    choice
        bool "gstreamer support"

    config BR2_PKG_OCV_GST_NONE
        bool "none"

    config BR2_PKG_OCV_GST_0_10
        bool "gstreamer 0.10"
        depends on BR2_USE_MMU # gst-0.10
        depends on BR2_USE_WCHAR # gst-0.10
        depends on BR2_TOOLCHAIN_HAS_THREADS # gst-0.10

    comment "gst-0.10 support needs a toolchain w/ wxhar, threads"
        depends on BR2_USE_MMU
        depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS

    endchoice

Regards,
Yann E. MORIN.

> +config BR2_PACKAGE_OPENCV_WITHOUT_GSTREAMER
> +	bool "none"
> +
>  config BR2_PACKAGE_OPENCV_WITH_GSTREAMER
> -	bool "gstreamer support"
> -	depends on BR2_USE_MMU # gstreamer -> libglib2
> -	depends on BR2_USE_WCHAR # gstreamer -> libglib2
> -	depends on BR2_TOOLCHAIN_HAS_THREADS # gstreamer -> libglib2
> +	bool "gstreamer-0.10"
>  	select BR2_PACKAGE_GSTREAMER
>  	select BR2_PACKAGE_GST_PLUGINS_BASE
>  	select BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_APP
>  
> -comment "gstreamer support needs a toolchain w/ wchar, threads"
> -	depends on BR2_USE_MMU
> -	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
> +
> +endchoice
>  
>  config BR2_PACKAGE_OPENCV_WITH_GTK
>  	bool "gtk support"
> -- 
> 2.4.4
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 10/16] package/opencv: add gstreamer-1.x support
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 10/16] package/opencv: add gstreamer-1.x support Samuel Martin
@ 2015-06-26 18:12   ` Yann E. MORIN
  2015-06-26 20:01   ` Yann E. MORIN
  1 sibling, 0 replies; 44+ messages in thread
From: Yann E. MORIN @ 2015-06-26 18:12 UTC (permalink / raw)
  To: buildroot

On 2015-06-25 21:59 +0200, Samuel Martin spake thusly:
> Starting with the 2.4.10 release, OpenCV supports both Gstreamer-0.10
> and Gstreamer-1, but only one can be enabled at the same time (OpenCV
> chooses Gstreamer-1 over Gstreamer-0.10 when both are available).
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
> 
> ---
> changes v5->v6:
> - rebase
> - use a choice
> 
> changes v4->v5:
> - rebase
> - update a/r/t tags
> - rework gst-X backend selection (use similar structure for qt)
> - remove patch merged upstream
> 
> changes v3->v4:
> - new patch
> ---
>  package/opencv/Config.in |  7 +++++++
>  package/opencv/opencv.mk | 15 ++++++++++++---
>  2 files changed, 19 insertions(+), 3 deletions(-)
> 
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index 4b571e0..f89e62d 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -186,6 +186,8 @@ choice
>  	depends on BR2_USE_MMU # libglib2
>  	depends on BR2_USE_WCHAR # libglib2
>  	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
> +	help
> +	  OpenCV prefers gstreamer-1 over gstreamer-0.10.
>  
>  config BR2_PACKAGE_OPENCV_WITHOUT_GSTREAMER
>  	bool "none"
> @@ -196,6 +198,11 @@ config BR2_PACKAGE_OPENCV_WITH_GSTREAMER
>  	select BR2_PACKAGE_GST_PLUGINS_BASE
>  	select BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_APP
>  
> +config BR2_PACKAGE_OPENCV_WITH_GSTREAMER1
> +	bool "gstreamer-1.x"
> +	select BR2_PACKAGE_GSTREAMER1
> +	select BR2_PACKAGE_GST1_PLUGINS_BASE
> +	select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_APP

And then, of course, update the comment from the previous patch, to
encompass both gstreamer versions.

Regards,
Yann E. MORIN.

>  endchoice
>  
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index a43de0c..d249400 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -222,11 +222,20 @@ else
>  OPENCV_CONF_OPTS += -DWITH_FFMPEG=OFF
>  endif
>  
> +ifeq ($(BR2_PACKAGE_OPENCV_WITH_GSTREAMER)$(BR2_PACKAGE_OPENCV_WITH_GSTREAMER1),)
> +OPENCV_CONF_OPTS += -DWITH_GSTREAMER=OFF -DWITH_GSTREAMER_0_10=OFF
> +endif
> +
>  ifeq ($(BR2_PACKAGE_OPENCV_WITH_GSTREAMER),y)
> -OPENCV_CONF_OPTS += -DWITH_GSTREAMER=ON -DWITH_GSTREAMER_0_10=ON
> +OPENCV_CONF_OPTS += -DWITH_GSTREAMER=OFF -DWITH_GSTREAMER_0_10=ON
>  OPENCV_DEPENDENCIES += gstreamer gst-plugins-base
> -else
> -OPENCV_CONF_OPTS += -DWITH_GSTREAMER=OFF -DWITH_GSTREAMER_0_10=OFF
> +endif
> +
> +ifeq ($(BR2_PACKAGE_OPENCV_WITH_GSTREAMER1),y)
> +OPENCV_CONF_OPTS += -DWITH_GSTREAMER=ON -DWITH_GSTREAMER_0_10=OFF
> +OPENCV_DEPENDENCIES += gstreamer1 gst1-plugins-base
> +endif
> +
>  endif
>  
>  ifeq ($(BR2_PACKAGE_OPENCV_WITH_GTK),y)
> -- 
> 2.4.4
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 01/16] package/opencv: alphabetically sorted each _CONF_OPTS group
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 01/16] package/opencv: alphabetically sorted each _CONF_OPTS group Samuel Martin
  2015-06-25 22:00   ` Yann E. MORIN
@ 2015-06-26 18:35   ` Thomas Petazzoni
  1 sibling, 0 replies; 44+ messages in thread
From: Thomas Petazzoni @ 2015-06-26 18:35 UTC (permalink / raw)
  To: buildroot

Dear Samuel Martin,

On Thu, 25 Jun 2015 21:59:42 +0200, Samuel Martin wrote:
> No new option added nor removed.
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> 
> ---
> changes v5->v6:
> - fix configure options ordering (Yann)

Applied, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 02/16] package/opencv: bump to version 3.0
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 02/16] package/opencv: bump to version 3.0 Samuel Martin
  2015-06-26 14:51   ` Yann E. MORIN
@ 2015-06-26 18:39   ` Thomas Petazzoni
  1 sibling, 0 replies; 44+ messages in thread
From: Thomas Petazzoni @ 2015-06-26 18:39 UTC (permalink / raw)
  To: buildroot

Dear Samuel Martin,

On Thu, 25 Jun 2015 21:59:43 +0200, Samuel Martin wrote:
> This major version bump is in fact a bump from 2.4.10 to 2.4.11, then to
> 3.0.
> 
> OpenCV-2.4.11 improves a lot the Buildroot integration, including a
> couple of patches that are no longer needed:
> - x86 PIC code compilation fix in core module [1];
> - return type fix in superes module [2];
> - opencv.pc generation [3].
> 
> It also improves the gstreamer-0.10/1.x detection [4], that will be
> needed in a follow-up patch.
> 
> OpenCV-3.0 still requires 2 patches (backported from upstream fixing
> pthread support [5,6].
> 
> The OpenCV-3.0 does some major changes, for which a transition guide
> has been published [7].
> 
> Among these changes coming with OpenCV-3.0, some new modules have been
> introduced and others got removed; leading to a bunch of configure
> option updates (to keep as much as possible an iso-functional-perimeter)
> and the legacy menu has been updated too.
> The worth noticing removals being:
> - the opencv_legacy and opencv_nonfree modules no longer exist;
> - the opencv_contrib module has moved out of the opencv base tree and
>   now has its own repository [8].
>   There is currently no plan to support it.
> 
> Some 3rd-party supports have been improved or added; their integrations
> in Buildroot will be addressed in follow-up patches.
> 
> [1] https://github.com/Itseez/opencv/commit/ea50be0529c248961e1b66293f8a9e4b807294a6
> [2] https://github.com/Itseez/opencv/commit/2e393ab83362743ba1825ad4b31d4a2925c606b4
> [3] https://github.com/Itseez/opencv/commit/eceada586bbf18fc267e437522ec4f1f23ddc656
> [4] https://github.com/Itseez/opencv/commit/38bb0db9dbec08666c8a64b3e4ead8fadf15c980
> [5] https://github.com/Itseez/opencv/commit/1f983ec39c97298b0c8ce409a1cc229ecf14e55c
> [6] https://github.com/Itseez/opencv/commit/a482dcce464acbd5368fb93c6c3d52ba8401776a
> [7] http://docs.opencv.org/master/db/dfa/tutorial_transition_guide.html
> [8] https://github.com/itseez/opencv_contrib
> 
> Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> 
> ---
> changes v5->v6:
> - rebase
> - fix commit message (Yann)
> - improve legacy options (Yann)
> - use positive logic (Yann)
> - remove duplicated configure options (Yann)
> - update module selection comment
> - add missing WITH_GSTREAMER_0_10 (Yann)
> - add patches backported from upstream fixing failures on local
>   autobuilder instances
> - disable if BR2_STATIC_LIBS (fixe local autobuilder failures)

I've taken into account most of the comments from Yann and applied.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 00/16] OpenCV bump
  2015-06-25 19:59 [Buildroot] [PATCH v6 00/16] OpenCV bump Samuel Martin
                   ` (16 preceding siblings ...)
  2015-06-25 20:04 ` [Buildroot] [PATCH v6 00/16] OpenCV bump Samuel Martin
@ 2015-06-26 18:47 ` Thomas Petazzoni
  2015-07-04 13:34   ` Thomas Petazzoni
  17 siblings, 1 reply; 44+ messages in thread
From: Thomas Petazzoni @ 2015-06-26 18:47 UTC (permalink / raw)
  To: buildroot

Dear Samuel Martin,

On Thu, 25 Jun 2015 21:59:41 +0200, Samuel Martin wrote:

>   package/opencv: alphabetically sorted each _CONF_OPTS group
>   package/opencv: bump to version 3.0
>   package/gstreamer1/gst1-plugins-bad: disable opencv plugin with
>     opencv-3
>   package/opencv: define modules inter-dependencies
>   package/opencv: reword modules' prompt and help text
>   package/opencv: reduce modules on by default
>   package/opencv: disable all modules by default
>   package/opencv: add python support

Applied.

>   package/opencv: add openmp support

Applied.

For the other patches, I'm waiting for some more review (and some of
the patches have comments from Yann).

Thanks a lot for working on OpenCV!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 10/16] package/opencv: add gstreamer-1.x support
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 10/16] package/opencv: add gstreamer-1.x support Samuel Martin
  2015-06-26 18:12   ` Yann E. MORIN
@ 2015-06-26 20:01   ` Yann E. MORIN
  1 sibling, 0 replies; 44+ messages in thread
From: Yann E. MORIN @ 2015-06-26 20:01 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2015-06-25 21:59 +0200, Samuel Martin spake thusly:
> Starting with the 2.4.10 release, OpenCV supports both Gstreamer-0.10
> and Gstreamer-1, but only one can be enabled at the same time (OpenCV
> chooses Gstreamer-1 over Gstreamer-0.10 when both are available).
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
[--SNIP--]
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index a43de0c..d249400 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -222,11 +222,20 @@ else
>  OPENCV_CONF_OPTS += -DWITH_FFMPEG=OFF
>  endif
>  
> +ifeq ($(BR2_PACKAGE_OPENCV_WITH_GSTREAMER)$(BR2_PACKAGE_OPENCV_WITH_GSTREAMER1),)
> +OPENCV_CONF_OPTS += -DWITH_GSTREAMER=OFF -DWITH_GSTREAMER_0_10=OFF
> +endif
> +
>  ifeq ($(BR2_PACKAGE_OPENCV_WITH_GSTREAMER),y)
> -OPENCV_CONF_OPTS += -DWITH_GSTREAMER=ON -DWITH_GSTREAMER_0_10=ON
> +OPENCV_CONF_OPTS += -DWITH_GSTREAMER=OFF -DWITH_GSTREAMER_0_10=ON
>  OPENCV_DEPENDENCIES += gstreamer gst-plugins-base
> -else
> -OPENCV_CONF_OPTS += -DWITH_GSTREAMER=OFF -DWITH_GSTREAMER_0_10=OFF
> +endif
> +
> +ifeq ($(BR2_PACKAGE_OPENCV_WITH_GSTREAMER1),y)
> +OPENCV_CONF_OPTS += -DWITH_GSTREAMER=ON -DWITH_GSTREAMER_0_10=OFF
> +OPENCV_DEPENDENCIES += gstreamer1 gst1-plugins-base
> +endif
> +
>  endif

Bug...

    $ make -C /home/ymorin/dev/buildroot/buildroot O=/home/ymorin/dev/buildroot/O/. distclean
    package/opencv/opencv.mk:239: *** extraneous `endif'.  Stop.
    make: *** [_all] Error 2

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 12/16] package/opencv: add a choice for selecting the gui toolkit
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 12/16] package/opencv: add a choice for selecting the gui toolkit Samuel Martin
@ 2015-06-26 21:31   ` Yann E. MORIN
  2015-06-26 22:47   ` Yann E. MORIN
  1 sibling, 0 replies; 44+ messages in thread
From: Yann E. MORIN @ 2015-06-26 21:31 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2015-06-25 21:59 +0200, Samuel Martin spake thusly:
> This patch moves the existing Qt4 and gtk2 options in that choice
> because, in OpenCV, only one toolkik will be actually used at the time,
> given priority to Qt4.

Incomplete commit log (minor!):

    Also add comments when the toolkit are not available because
    of missing dependencies.

> Suggested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> 
> ---
> changes v5->v6:
> - new patch
> ---
>  package/opencv/Config.in | 53 +++++++++++++++++++++++++++++++++++-------------
>  1 file changed, 39 insertions(+), 14 deletions(-)
> 
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index f89e62d..040ee55 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -206,17 +206,54 @@ config BR2_PACKAGE_OPENCV_WITH_GSTREAMER1
>  
>  endchoice
>  
> +choice
> +	prompt "gui toolkit"
> +	depends on BR2_PACKAGE_OPENCV_LIB_HIGHGUI

If that depends on highgui, then maybe it would be better to put the
choice right below the option for highgui, no?

> +	help
> +	  GUI toolkit for opencv_highgui module.
> +
> +	  OpenCV GUI toolkit preference (from the most to the least):
> +	  - Qt4
> +	  - gtk-2

Do we really need this "preference" comment in the help text?
If thue user selects gtk2 as a toolkit for OpenCV, but also has Qt4
enabled, surely we'd build an OpenCV with gtk2 support and no Qt4
support, right?

So, there's no reason to have this comment, I think. Or it should maybe
rewritten, sometyhing like:

    The best toolkit to work with OpenCV are, in decreasing order of
    preference by the OpenCV build system):
        - Qt4
        - gtk2

    Note that, whatever you choose here will be used by OpenCV, even
    if you also enabled a more preferred toolkit in your Buildroot
    configuration.

(Not that this is perfect either, but still...)

Otherwise:

    Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

(I think I again forgot something, but can't figure out what it was...)

Regards,
Yann E. MORIN.

> +config BR2_PACKAGE_OPENCV_GUI_NONE
> +	bool "none"
> +
>  config BR2_PACKAGE_OPENCV_WITH_GTK
> -	bool "gtk support"
> +	bool "gtk2"
>  	depends on BR2_PACKAGE_XORG7
>  	depends on BR2_USE_WCHAR # libgtk2 -> libglib2
>  	depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk2 -> libglib2
>  	depends on BR2_INSTALL_LIBSTDCPP
>  	depends on BR2_USE_MMU # libgtk2 -> glib2
>  	depends on BR2_ARCH_HAS_ATOMICS # libgtk2 -> cairo
> -	depends on BR2_PACKAGE_OPENCV_LIB_HIGHGUI
>  	select BR2_PACKAGE_LIBGTK2
>  
> +comment "gtk2 depends on X.org and needs a toolchain w/ wchar, threads, C++"
> +	depends on BR2_USE_MMU # libgtk2 -> glib2
> +	depends on BR2_ARCH_HAS_ATOMICS # libgtk2 -> cairo
> +	depends on !BR2_PACKAGE_XORG7 || \
> +		!BR2_USE_WCHAR || \
> +		!BR2_TOOLCHAIN_HAS_THREADS || \
> +		!BR2_INSTALL_LIBSTDCPP
> +
> +config BR2_PACKAGE_OPENCV_WITH_QT
> +	bool "qt4"
> +	depends on BR2_INSTALL_LIBSTDCPP
> +	depends on BR2_USE_MMU # qt
> +	select BR2_PACKAGE_QT
> +	select BR2_PACKAGE_QT_STL
> +	select BR2_PACKAGE_QT_GUI_MODULE
> +	select BR2_PACKAGE_QT_TEST
> +	help
> +	  Use Qt with QtTest module and STL support
> +
> +comment "qt4 needs a toolchain w/ C++"
> +	depends on BR2_USE_MMU # qt
> +	depends on !BR2_INSTALL_LIBSTDCPP
> +
> +endchoice
> +
>  config BR2_PACKAGE_OPENCV_WITH_JASPER
>  	bool "jpeg2000 support"
>  	select BR2_PACKAGE_JASPER
> @@ -239,18 +276,6 @@ config BR2_PACKAGE_OPENCV_WITH_PNG
>  	help
>  	  Use shared libpng from the target system.
>  
> -config BR2_PACKAGE_OPENCV_WITH_QT
> -	bool "qt backend support"
> -	depends on BR2_INSTALL_LIBSTDCPP
> -	depends on BR2_USE_MMU # qt
> -	depends on BR2_PACKAGE_OPENCV_LIB_HIGHGUI
> -	select BR2_PACKAGE_QT
> -	select BR2_PACKAGE_QT_STL
> -	select BR2_PACKAGE_QT_GUI_MODULE
> -	select BR2_PACKAGE_QT_TEST
> -	help
> -	  Use Qt with QtTest module and STL support
> -
>  config BR2_PACKAGE_OPENCV_WITH_TIFF
>  	bool "tiff support"
>  	select BR2_PACKAGE_TIFF
> -- 
> 2.4.4
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 13/16] package/opencv: add qt5 support
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 13/16] package/opencv: add qt5 support Samuel Martin
@ 2015-06-26 22:40   ` Yann E. MORIN
  0 siblings, 0 replies; 44+ messages in thread
From: Yann E. MORIN @ 2015-06-26 22:40 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2015-06-25 21:59 +0200, Samuel Martin spake thusly:
> Starting with the 2.4.6 release, OpenCV supports both Qt4 and Qt5 as GUI
> toolkit, but only one can be enabled at the same time.
> 
> Since Buildroot does not support Qt4/Qt5 co-existence, we make the Qt4
> knob depend on BR2_PACKAGE_QT5.
> 
> Note that we usually use 'select ...' to express the dependencies
> between packages, but in this case, we cannot since the Qt4/Qt5
> co-existence exclusion is not handled by a simple choice, but by some
> extra dependencies in the choice entries. This makes impossible using
> 'select ...' for the Qt support knob without triggering a circular
> dependency at the kconfig level.
> 
> Besides, we already use 'depends on ...' to express the dependencies
> with some "big" packages (like xorg or libgtk2). qt or qt5* packages
> are fairly big. So, I don't think it will hurt that much to use a
> 'depends on ...' statement in this case.
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
[--SNIP--]
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index 040ee55..ac0443a 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -213,6 +213,7 @@ choice
>  	  GUI toolkit for opencv_highgui module.
>  
>  	  OpenCV GUI toolkit preference (from the most to the least):
> +	  - Qt5
>  	  - Qt4
>  	  - gtk-2
>  
> @@ -241,16 +242,40 @@ config BR2_PACKAGE_OPENCV_WITH_QT
>  	bool "qt4"
>  	depends on BR2_INSTALL_LIBSTDCPP
>  	depends on BR2_USE_MMU # qt
> -	select BR2_PACKAGE_QT
> +	depends on BR2_PACKAGE_QT
>  	select BR2_PACKAGE_QT_STL
>  	select BR2_PACKAGE_QT_GUI_MODULE
>  	select BR2_PACKAGE_QT_TEST
>  	help
> -	  Use Qt with QtTest module and STL support
> +	  Use Qt4 with QtTest and QtGui modules and STL support, as GUI toolkit.
>  
> -comment "qt4 needs a toolchain w/ C++"
> +# no need for a comment about qt availability WRT the toolchain dependencies
> +# because they are included in the opencv's ones, so already met.
> +
> +comment "qt4 depends on qt"

    comment "qt4 support needs qt"

> +	depends on BR2_USE_MMU # qt
> +	depends on !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5
> +
> +config BR2_PACKAGE_OPENCV_WITH_QT5
> +	bool "qt5"
> +	depends on BR2_INSTALL_LIBSTDCPP
> +	depends on BR2_USE_MMU # qt5

No need to add those dependencies, they are inherited with the Qt5
dependency. Besides, Qt5 does not depend on MMU.

> +	depends on BR2_PACKAGE_QT5
> +	select BR2_PACKAGE_QT5BASE
> +	select BR2_PACKAGE_QT5BASE_CONCURRENT
> +	select BR2_PACKAGE_QT5BASE_TEST

BR2_PACKAGE_QT5BASE_TEST is a noop now, see package/qt5/qt5base/Config.in:

   99 config BR2_PACKAGE_QT5BASE_TEST
  100     def_bool y

> +	select BR2_PACKAGE_QT5BASE_GUI
> +	select BR2_PACKAGE_QT5BASE_WIDGETS
> +	help
> +	  Use Qt5 with base, concurrent, test, gui and widgets components, as GUI
> +	  toolkit.
> +
> +# no need for a comment about qt5 availability WRT the toolchain dependencies
> +# because they are included in the opencv's ones, so already met.
> +
> +comment "qt5 depends on qt5"
>  	depends on BR2_USE_MMU # qt
> -	depends on !BR2_INSTALL_LIBSTDCPP
> +	depends on !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5

Since Qt5 can be built for noMMU, I think these dependencies are wrong.
Probably we want just:

    comment "qt5 support needs qt5"
        depends on !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5

Here's a defconfig matching all the requirements for noMMU and
Qt5 available (totally untested! ;-) just to validate the comment
dependencies):

    BR2_bfin=y
    BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
    BR2_TOOLCHAIN_EXTERNAL_WCHAR=y
    BR2_TOOLCHAIN_EXTERNAL_CXX=y

Regards,
Yann E. MORIN.

>  endchoice
>  
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index 19863f4..602b59a 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -268,11 +268,18 @@ else
>  OPENCV_CONF_OPTS += -DWITH_PNG=OFF
>  endif
>  
> +ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT)$(BR2_PACKAGE_OPENCV_WITH_QT5),)
> +OPENCV_CONF_OPTS += -DWITH_QT=OFF
> +endif
> +
>  ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT),y)
>  OPENCV_CONF_OPTS += -DWITH_QT=4
>  OPENCV_DEPENDENCIES += qt
> -else
> -OPENCV_CONF_OPTS += -DWITH_QT=OFF
> +endif
> +
> +ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT5),y)
> +OPENCV_CONF_OPTS += -DWITH_QT=5
> +OPENCV_DEPENDENCIES += qt5base
>  endif
>  
>  ifeq ($(BR2_PACKAGE_OPENCV_WITH_TIFF),y)
> -- 
> 2.4.4
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 12/16] package/opencv: add a choice for selecting the gui toolkit
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 12/16] package/opencv: add a choice for selecting the gui toolkit Samuel Martin
  2015-06-26 21:31   ` Yann E. MORIN
@ 2015-06-26 22:47   ` Yann E. MORIN
  1 sibling, 0 replies; 44+ messages in thread
From: Yann E. MORIN @ 2015-06-26 22:47 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2015-06-25 21:59 +0200, Samuel Martin spake thusly:
> This patch moves the existing Qt4 and gtk2 options in that choice
> because, in OpenCV, only one toolkik will be actually used at the time,
> given priority to Qt4.
> 
> Suggested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
[--SNIP--]

And here's what I forgot:

> +comment "gtk2 depends on X.org and needs a toolchain w/ wchar, threads, C++"

    comment "gtk2 support needs X.org and a toolchain w/...."

OK, minor! ;-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 14/16] package/opencv: add gtk3 support
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 14/16] package/opencv: add gtk3 support Samuel Martin
@ 2015-06-26 23:00   ` Yann E. MORIN
  2015-07-04 17:51     ` Samuel Martin
  0 siblings, 1 reply; 44+ messages in thread
From: Yann E. MORIN @ 2015-06-26 23:00 UTC (permalink / raw)
  To: buildroot

Samuel, all,

On 2015-06-25 21:59 +0200, Samuel Martin spake thusly:
> Fully rework the GTK support in OpenCV because it now supports gtk-2 and
> gtk-3 (but only one at the time).
> Note that, in the build-system, the gtk support is only available when
> Qt support is disabled; so make sure the menuconfig reflects this.

Those last two lines no longer make sense now that we're using a choice.

> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

My reviewd-by tag was before there was this big choice (which I did
suggest you do). It no longer stands now, sorry.

> ---
> changes v5->v6:
> - update a/r/t tags
> - remove unneeded "default ..." (Yann)
> 
> changes v4->v5:
> - new patch
> ---
>  package/opencv/Config.in | 22 +++++++++++++++++++---
>  package/opencv/opencv.mk |  9 +++++++--
>  2 files changed, 26 insertions(+), 5 deletions(-)
> 
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index ac0443a..b738f71 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -215,6 +215,7 @@ choice
>  	  OpenCV GUI toolkit preference (from the most to the least):
>  	  - Qt5
>  	  - Qt4
> +	  - gtk-3
>  	  - gtk-2
>  
>  config BR2_PACKAGE_OPENCV_GUI_NONE
> @@ -222,12 +223,12 @@ config BR2_PACKAGE_OPENCV_GUI_NONE
>  
>  config BR2_PACKAGE_OPENCV_WITH_GTK
>  	bool "gtk2"
> -	depends on BR2_PACKAGE_XORG7
> +	depends on BR2_ARCH_HAS_ATOMICS # libgtk2 -> cairo
> +	depends on BR2_USE_MMU # libgtk2 -> libglib2
>  	depends on BR2_USE_WCHAR # libgtk2 -> libglib2
>  	depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk2 -> libglib2
>  	depends on BR2_INSTALL_LIBSTDCPP
> -	depends on BR2_USE_MMU # libgtk2 -> glib2
> -	depends on BR2_ARCH_HAS_ATOMICS # libgtk2 -> cairo
> +	depends on BR2_PACKAGE_XORG7
>  	select BR2_PACKAGE_LIBGTK2

Why do you re-order the dependencies here? There's no real reason for
that.

(Except you might want to align the ordering to the one for gtk3? I
don't think it's needed...)

>  comment "gtk2 depends on X.org and needs a toolchain w/ wchar, threads, C++"
> @@ -238,6 +239,21 @@ comment "gtk2 depends on X.org and needs a toolchain w/ wchar, threads, C++"
>  		!BR2_TOOLCHAIN_HAS_THREADS || \
>  		!BR2_INSTALL_LIBSTDCPP
>  
> +config BR2_PACKAGE_OPENCV_WITH_GTK3
> +	bool "gtk3"
> +	depends on BR2_ARCH_HAS_ATOMICS # libgtk3 -> cairo
> +	depends on BR2_USE_MMU # libgtk3 -> libglib2
> +	depends on BR2_USE_WCHAR # libgtk3 -> libglib2
> +	depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk3 -> libglib2
> +	depends on BR2_INSTALL_LIBSTDCPP
> +	select BR2_PACKAGE_LIBGTK3
> +
> +comment "gtk3 needs a toolchain w/ wchar, threads, C++"
> +	depends on BR2_USE_MMU # libgtk3 -> glib2
> +	depends on BR2_ARCH_HAS_ATOMICS # libgtk3 -> cairo
> +	depends on !(BR2_USE_WCHAR || BR2_TOOLCHAIN_HAS_THREADS || \
> +		BR2_INSTALL_LIBSTDCPP)
> +
>  config BR2_PACKAGE_OPENCV_WITH_QT
>  	bool "qt4"
>  	depends on BR2_INSTALL_LIBSTDCPP
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index 602b59a..986e7b4 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -236,13 +236,18 @@ OPENCV_CONF_OPTS += -DWITH_GSTREAMER=ON -DWITH_GSTREAMER_0_10=OFF
>  OPENCV_DEPENDENCIES += gstreamer1 gst1-plugins-base
>  endif
>  
> +ifeq ($(BR2_PACKAGE_OPENCV_WITH_GTK)$(BR2_PACKAGE_OPENCV_WITH_GTK3),)
> +OPENCV_CONF_OPTS += -DWITH_GTK=OFF -DWITH_GTK_2_X=OFF
>  endif

And here you have this extraneous endif that is now useful. ;-)

>  ifeq ($(BR2_PACKAGE_OPENCV_WITH_GTK),y)
>  OPENCV_CONF_OPTS += -DWITH_GTK=ON -DWITH_GTK_2_X=ON
>  OPENCV_DEPENDENCIES += libgtk2
> -else
> -OPENCV_CONF_OPTS += -DWITH_GTK=OFF
> +endif
> +
> +ifeq ($(BR2_PACKAGE_OPENCV_WITH_GTK3),y)
> +OPENCV_CONF_OPTS += -DWITH_GTK=ON -DWITH_GTK_2_X=OFF
> +OPENCV_DEPENDENCIES += libgtk3
>  endif

So, have you tried a build with both gtk2 and gtk3 enabled, but with
OpenCV using gtk2?

Regards,
Yann E. MORIN.

>  ifeq ($(BR2_PACKAGE_OPENCV_WITH_JASPER),y)
> -- 
> 2.4.4
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 15/16] package/opencv: add opengl support
  2015-06-25 19:59 ` [Buildroot] [PATCH v6 15/16] package/opencv: add opengl support Samuel Martin
@ 2015-06-27  7:55   ` Yann E. MORIN
  0 siblings, 0 replies; 44+ messages in thread
From: Yann E. MORIN @ 2015-06-27  7:55 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2015-06-25 21:59 +0200, Samuel Martin spake thusly:
> In OpenCV, OpenGL support is done using extensions from 3rd party
> framework: either Qt5OpenGL with Qt5 (with GL support only, not GLES);
> or gtkglext (which is not available in Buildroot) with gtk2
> 
> So, make OpenGL knob visible when Qt5 support is selected.
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> 
> ---
> changes v5->v6:
> - update comments (Yann)
> 
> changes v4->v5:
> - new patch
> ---
>  package/opencv/Config.in | 16 ++++++++++++++++
>  package/opencv/opencv.mk |  7 +++++++
>  2 files changed, 23 insertions(+)
> 
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index b738f71..b80c9fa 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -311,6 +311,22 @@ config BR2_PACKAGE_OPENCV_WITH_JPEG
>  	help
>  	  Use shared libjpeg from the target system.
>  
> +config BR2_PACKAGE_OPENCV_WITH_OPENGL
> +	bool "opengl support"
> +	# OpenGL support done using Qt5OpenGL, so depends on WITH_QT5
> +	depends on BR2_PACKAGE_OPENCV_WITH_QT5
> +	# OpenGL support requires Qt5OpenGL with GL support, not GLES
> +	depends on BR2_PACKAGE_QT5_GL_AVAILABLE
> +	depends on BR2_PACKAGE_HAS_LIBGL
> +	select BR2_PACKAGE_QT5BASE_OPENGL
> +	help
> +	  Enable OpenGL for UI.
> +
> +comment "opengl support needs Qt5 and an OpenGL provider"

"But I do have Qt5 enabled and a GL provider set" would say a dumb user
like me with Qt5 enabled and mesa3d (with DRI driver), but with the
opencv toolkit set to gtk2.

What you meant was:  "opengl needs Qt5 as toolkit and an openGL proivder"
But that's not much better either.

What would really make it obvious is:

    comment "opengl support needs an OpenGL provider"
        depends on BR2_PACKAGE_OPENCV_WITH_QT5
        depends on !BR2_PACKAGE_QT5_GL_AVAILABLE \
                || !BR2_PACKAGE_HAS_LIBGL

No, I did not forget to negate BR2_PACKAGE_OPENCV_WITH_QT5, because what
I suggest is that opengl support be treated as a sub-option of Qt5, so
be the comment.

Regards,
Yann E. MORIN.

> +	depends on !BR2_PACKAGE_OPENCV_WITH_QT5 || \
> +		!BR2_PACKAGE_QT5_GL_AVAILABLE || \
> +		!BR2_PACKAGE_HAS_LIBGL
> +
>  config BR2_PACKAGE_OPENCV_WITH_PNG
>  	bool "png support"
>  	select BR2_PACKAGE_LIBPNG
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index 986e7b4..61a3ccd 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -264,6 +264,13 @@ else
>  OPENCV_CONF_OPTS += -DWITH_JPEG=OFF
>  endif
>  
> +ifeq ($(BR2_PACKAGE_OPENCV_WITH_OPENGL),y)
> +OPENCV_CONF_OPTS += -DWITH_OPENGL=ON
> +OPENCV_DEPENDENCIES += libgl qt5base
> +else
> +OPENCV_CONF_OPTS += -DWITH_OPENGL=OFF
> +endif
> +
>  OPENCV_CONF_OPTS += -DWITH_OPENMP=$(if $(BR2_GCC_ENABLE_OPENMP),ON,OFF)
>  
>  ifeq ($(BR2_PACKAGE_OPENCV_WITH_PNG),y)
> -- 
> 2.4.4
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 00/16] OpenCV bump
  2015-06-26 18:47 ` Thomas Petazzoni
@ 2015-07-04 13:34   ` Thomas Petazzoni
  2015-07-04 19:00     ` Samuel Martin
  0 siblings, 1 reply; 44+ messages in thread
From: Thomas Petazzoni @ 2015-07-04 13:34 UTC (permalink / raw)
  To: buildroot

Samuel,

On Fri, 26 Jun 2015 20:47:15 +0200, Thomas Petazzoni wrote:

> For the other patches, I'm waiting for some more review (and some of
> the patches have comments from Yann).

The remaining patches had comments from Yann, so I marked the remaining
one as Changes Requested. Could you resend them soon so that we can
finally close this OpenCV series?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 14/16] package/opencv: add gtk3 support
  2015-06-26 23:00   ` Yann E. MORIN
@ 2015-07-04 17:51     ` Samuel Martin
  0 siblings, 0 replies; 44+ messages in thread
From: Samuel Martin @ 2015-07-04 17:51 UTC (permalink / raw)
  To: buildroot

Yann,

On Sat, Jun 27, 2015 at 1:00 AM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
[...]
>>  ifeq ($(BR2_PACKAGE_OPENCV_WITH_GTK),y)
>>  OPENCV_CONF_OPTS += -DWITH_GTK=ON -DWITH_GTK_2_X=ON
>>  OPENCV_DEPENDENCIES += libgtk2
>> -else
>> -OPENCV_CONF_OPTS += -DWITH_GTK=OFF
>> +endif
>> +
>> +ifeq ($(BR2_PACKAGE_OPENCV_WITH_GTK3),y)
>> +OPENCV_CONF_OPTS += -DWITH_GTK=ON -DWITH_GTK_2_X=OFF
>> +OPENCV_DEPENDENCIES += libgtk3
>>  endif
>
> So, have you tried a build with both gtk2 and gtk3 enabled, but with
> OpenCV using gtk2?

Yes I did and it works as expected :-)

Regards,

-- 
Samuel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 00/16] OpenCV bump
  2015-07-04 13:34   ` Thomas Petazzoni
@ 2015-07-04 19:00     ` Samuel Martin
  0 siblings, 0 replies; 44+ messages in thread
From: Samuel Martin @ 2015-07-04 19:00 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Sat, Jul 4, 2015 at 3:34 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Samuel,
>
> On Fri, 26 Jun 2015 20:47:15 +0200, Thomas Petazzoni wrote:
>
>> For the other patches, I'm waiting for some more review (and some of
>> the patches have comments from Yann).
>
> The remaining patches had comments from Yann, so I marked the remaining
> one as Changes Requested. Could you resend them soon so that we can
> finally close this OpenCV series?

I will, I was just waiting a bit for other feedbacks...
Thanks,


-- 
Samuel

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [Buildroot] [PATCH v6 07/16] package/opencv: disable all modules by default
  2015-06-26 15:36   ` Yann E. MORIN
@ 2015-07-06 22:19     ` Arnout Vandecappelle
  0 siblings, 0 replies; 44+ messages in thread
From: Arnout Vandecappelle @ 2015-07-06 22:19 UTC (permalink / raw)
  To: buildroot

On 06/26/15 17:36, Yann E. MORIN wrote:
> Samuel, All,
> 
> On 2015-06-25 21:59 +0200, Samuel Martin spake thusly:
>> This change allows to reduce the size of the default OpenCV package, so
>> the final root filesystem.
>>
>> However, this will break any existing defconfig enabling OpenCV. Indeed,
>> a minimal OpenCV  package will be built, whereas, prior to applying this
>> patches, a full-featured one would have been built instead.
>>
>> Cc: "Yann E. Morin" <yann.morin.1998@free.fr>
>> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> 
> Although I'm usually not opposed to getting the smallest possible config
> as a default, however as you say this one breaks existing defconfigs.
> 
> OTOH, do we really care?

 I think we break defconfigs (as in, the result of 'make savedefconfig') fairly
often without really noticing. An obvious example is the kernel headers version.
But also for example with the ARM ABI rework (I'm not 100% sure but I think
there are defconfigs that would have changed).

 So I think breaking defconfigs is OK. To update to a new buildroot version you
should start from a full .config, not a defconfig.

 Regards,
 Arnout


> 
> Anyway, I won't ack this one, but I am not opposed to it being merged
> either.

[snip]


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2015-07-06 22:19 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-25 19:59 [Buildroot] [PATCH v6 00/16] OpenCV bump Samuel Martin
2015-06-25 19:59 ` [Buildroot] [PATCH v6 01/16] package/opencv: alphabetically sorted each _CONF_OPTS group Samuel Martin
2015-06-25 22:00   ` Yann E. MORIN
2015-06-26 18:35   ` Thomas Petazzoni
2015-06-25 19:59 ` [Buildroot] [PATCH v6 02/16] package/opencv: bump to version 3.0 Samuel Martin
2015-06-26 14:51   ` Yann E. MORIN
2015-06-26 15:22     ` Yann E. MORIN
2015-06-26 18:39   ` Thomas Petazzoni
2015-06-25 19:59 ` [Buildroot] [PATCH v6 03/16] package/gstreamer1/gst1-plugins-bad: disable opencv plugin with opencv-3 Samuel Martin
2015-06-25 19:59 ` [Buildroot] [PATCH v6 04/16] package/opencv: define modules inter-dependencies Samuel Martin
2015-06-26 15:20   ` Yann E. MORIN
2015-06-25 19:59 ` [Buildroot] [PATCH v6 05/16] package/opencv: reword modules' prompt and help text Samuel Martin
2015-06-26 15:27   ` Yann E. MORIN
2015-06-25 19:59 ` [Buildroot] [PATCH v6 06/16] package/opencv: reduce modules on by default Samuel Martin
2015-06-26 15:30   ` Yann E. MORIN
2015-06-26 15:34   ` Yann E. MORIN
2015-06-26 15:35     ` Yann E. MORIN
2015-06-25 19:59 ` [Buildroot] [PATCH v6 07/16] package/opencv: disable all modules " Samuel Martin
2015-06-26 15:36   ` Yann E. MORIN
2015-07-06 22:19     ` Arnout Vandecappelle
2015-06-25 19:59 ` [Buildroot] [PATCH v6 08/16] package/opencv: add python support Samuel Martin
2015-06-26 17:51   ` Yann E. MORIN
2015-06-26 17:59   ` Yann E. MORIN
2015-06-25 19:59 ` [Buildroot] [PATCH v6 09/16] package/opencv: add a choice for selecting gstreamer support Samuel Martin
2015-06-26 18:11   ` Yann E. MORIN
2015-06-25 19:59 ` [Buildroot] [PATCH v6 10/16] package/opencv: add gstreamer-1.x support Samuel Martin
2015-06-26 18:12   ` Yann E. MORIN
2015-06-26 20:01   ` Yann E. MORIN
2015-06-25 19:59 ` [Buildroot] [PATCH v6 11/16] package/opencv: add openmp support Samuel Martin
2015-06-25 19:59 ` [Buildroot] [PATCH v6 12/16] package/opencv: add a choice for selecting the gui toolkit Samuel Martin
2015-06-26 21:31   ` Yann E. MORIN
2015-06-26 22:47   ` Yann E. MORIN
2015-06-25 19:59 ` [Buildroot] [PATCH v6 13/16] package/opencv: add qt5 support Samuel Martin
2015-06-26 22:40   ` Yann E. MORIN
2015-06-25 19:59 ` [Buildroot] [PATCH v6 14/16] package/opencv: add gtk3 support Samuel Martin
2015-06-26 23:00   ` Yann E. MORIN
2015-07-04 17:51     ` Samuel Martin
2015-06-25 19:59 ` [Buildroot] [PATCH v6 15/16] package/opencv: add opengl support Samuel Martin
2015-06-27  7:55   ` Yann E. MORIN
2015-06-25 19:59 ` [Buildroot] [PATCH v6 16/16] package/vlc: add opencv support Samuel Martin
2015-06-25 20:04 ` [Buildroot] [PATCH v6 00/16] OpenCV bump Samuel Martin
2015-06-26 18:47 ` Thomas Petazzoni
2015-07-04 13:34   ` Thomas Petazzoni
2015-07-04 19:00     ` Samuel Martin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.