Skip to contentSkip to conversation

Scientific libraries

PATCH New Samuel Martin 4 participants 57 messages Apr 22, 2014 – Jul 16, 2014

lore
Share & tools
lore
#0 lore raw

v2 cover Scientific libraries

Hi all,

Here is the 2nd round of the Scientific libraries series, which contains a couple of new scientific packages, among these python Numpy, a bump of OpenCV and some fixes/refactoring in OpenCV reverse dependencies.

Unlike the 1st post of this series, this new round is largely dominated by OpenCV change sets, which have been heavily chainsawed to make easier the review process. ;)

Yours,
Samuel

Samuel Martin (24):
qt: add an option to install the test module
opencv: fix qt selection when highgui is enable
armadillo: new package
clapack: new package
python-numpy: new package
python-numpy: add optional blas/lapack support
opencv: bump to version 2.4.8
opencv: add license details
opencv: sort and reorder CMake configuration flags
opencv: sort and reorder HW support options
opencv: sort and reorder SW support options
opencv: add superres module knob
opencv: disable apps module
opencv: disable opencl support/module
opencv: disable OpenMP support
opencv: enable SSE4.1 SSE4.2 support when available
opencv: rework V4L/libv4l support
opencv: add jasper support
opencv: add Qt5 support
opencv: add python/numpy support
opencv: define modules inter-dependencies
opencv: add hidden symbol BR2_PACKAGE_OPENCV_USE_DEPRECATED_HEADERS
vlc: add opencv support
gst1-plugins-bad: rework opencv plugin dependencies

 package/Config.in                                  |   3 +
 package/armadillo/Config.in                        |  12 ++
 package/armadillo/armadillo.mk                     |  15 ++
 package/clapack/Config.in                          |  18 ++
 ...ce-libf2c-to-be-built-as-a-static-library.patch |  32 ++++
 ...ake-test-build-sensitive-to-BUILD_TESTING.patch |  80 +++++++++
 ...t-try-to-run-arithchk-when-cross-compilin.patch |  70 ++++++++
 ...blas-add-library-and-header-install-rules.patch |  23 +++
 ...pack-add-library-and-header-install-rules.patch |  24 +++
 package/clapack/clapack.mk                         |  23 +++
 package/gstreamer1/gst1-plugins-bad/Config.in      |  10 +-
 package/opencv/Config.in                           | 161 ++++++++++++++----
 ...01-fix-cross-compilation-issue-with-Numpy.patch |  71 ++++++++
 package/opencv/opencv.mk                           | 189 +++++++++++++++------
 package/python-numpy/Config.in                     |   8 +
 package/python-numpy/python-numpy.mk               |  48 ++++++
 package/qt/Config.in                               |   5 +
 package/qt/qt.mk                                   |   3 +
 package/vlc/Config.in                              |   1 +
 package/vlc/vlc.mk                                 |   7 +
 20 files changed, 712 insertions(+), 91 deletions(-)
 create mode 100644 package/armadillo/Config.in
 create mode 100644 package/armadillo/armadillo.mk
 create mode 100644 package/clapack/Config.in
 create mode 100644 package/clapack/clapack-0001-cmake-force-libf2c-to-be-built-as-a-static-library.patch
 create mode 100644 package/clapack/clapack-0002-cmake-make-test-build-sensitive-to-BUILD_TESTING.patch
 create mode 100644 package/clapack/clapack-0003-cmake-do-not-try-to-run-arithchk-when-cross-compilin.patch
 create mode 100644 package/clapack/clapack-0004-cmake-blas-add-library-and-header-install-rules.patch
 create mode 100644 package/clapack/clapack-0005-cmake-lapack-add-library-and-header-install-rules.patch
 create mode 100644 package/clapack/clapack.mk
 create mode 100644 package/opencv/opencv-0001-fix-cross-compilation-issue-with-Numpy.patch
 create mode 100644 package/python-numpy/Config.in
 create mode 100644 package/python-numpy/python-numpy.mk

--
1.9.2

#1 lore raw

PATCH v2 1/24 qt: add an option to install the test module

When building Qt in a minimal configuration, a couple of Qt modules (QtNetwork, QtSql, QtTest and QtXml) are built in addition to QtCore, so they are installed in the sysroot but they are not copied into the target tree.

Among these modules that could be built but optionally installed, only QtTest had no option to allow being installed in the target fs.

Thus, programs linking against QtTest would successfully build, but would miserably fail at runtime due to this missing dependency.

So far, the only package triggering this issue is OpenCV (the highgui module built with Qt support).

A followup patch will add this missing dependency in OpenCV using this new option.

---
changes v1 -> v2:
- rebase
- change default value to n

---
 package/qt/Config.in | 5 +++++
 package/qt/qt.mk     | 3 +++
 2 files changed, 8 insertions(+)
package/qt/Config.in +5 -0
index eed25c8..9faf2cd 100644
@@ -415,4 +415,9 @@ config BR2_PACKAGE_QT_DECLARATIVE
 	  Build the Qt Declarative Module for qml support
 	  if unsure, say n.
 
+config BR2_PACKAGE_QT_TEST
+	bool "Test Module"
+	help
+	  Install the Test module.
+
 endif # BR2_PACKAGE_QT
package/qt/qt.mk +3 -0
index 507e0db..bb065f3 100644
@@ -586,6 +586,9 @@ endif
 ifeq ($(BR2_PACKAGE_QT_GFX_POWERVR),y)
 QT_INSTALL_LIBS    += pvrQWSWSEGL
 endif
+ifeq ($(BR2_PACKAGE_QT_TEST),y)
+QT_INSTALL_LIBS    += QtTest
+endif
 
 QT_CONF_FILE=$(HOST_DIR)/usr/bin/qt.conf
 
Signature · 1 line
1.9.2
#2 lore raw

PATCH v2 1/24 qt: add an option to install the test module

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:

Quoted 11 lines

When building Qt in a minimal configuration, a couple of Qt modules (QtNetwork, QtSql, QtTest and QtXml) are built in addition to QtCore, so they are installed in the sysroot but they are not copied into the target tree.

Among these modules that could be built but optionally installed, only QtTest had no option to allow being installed in the target fs.

Thus, programs linking against QtTest would successfully build, but would miserably fail at runtime due to this missing dependency.

Quoted 7 lines

So far, the only package triggering this issue is OpenCV (the highgui module built with Qt support).

A followup patch will add this missing dependency in OpenCV using this new option.

Regards,
Yann E. MORIN.

Quoted 44 lines

---
changes v1 -> v2:
- rebase
- change default value to n

---
 package/qt/Config.in | 5 +++++
 package/qt/qt.mk     | 3 +++
 2 files changed, 8 insertions(+)
package/qt/Config.in +5 -0
index eed25c8..9faf2cd 100644
@@ -415,4 +415,9 @@ config BR2_PACKAGE_QT_DECLARATIVE
 	  Build the Qt Declarative Module for qml support
 	  if unsure, say n.
 
+config BR2_PACKAGE_QT_TEST
+	bool "Test Module"
+	help
+	  Install the Test module.
+
 endif # BR2_PACKAGE_QT
package/qt/qt.mk +3 -0
index 507e0db..bb065f3 100644
@@ -586,6 +586,9 @@ endif
 ifeq ($(BR2_PACKAGE_QT_GFX_POWERVR),y)
 QT_INSTALL_LIBS    += pvrQWSWSEGL
 endif
+ifeq ($(BR2_PACKAGE_QT_TEST),y)
+QT_INSTALL_LIBS    += QtTest
+endif
 
 QT_CONF_FILE=$(HOST_DIR)/usr/bin/qt.conf
 
Signature · 6 lines
1.9.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH v2 1/24 qt: add an option to install the test module

In reply to Samuel Martin
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Samuel" == Samuel Martin <[email protected]> writes:

When building Qt in a minimal configuration, a couple of Qt modules (QtNetwork, QtSql, QtTest and QtXml) are built in addition to QtCore, so they are installed in the sysroot but they are not copied into the target tree.

Among these modules that could be built but optionally installed, only QtTest had no option to allow being installed in the target fs.

Thus, programs linking against QtTest would successfully build, but would miserably fail at runtime due to this missing dependency.

Quoted 7 lines

So far, the only package triggering this issue is OpenCV (the highgui module built with Qt support).

A followup patch will add this missing dependency in OpenCV using this new option.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#4 lore raw

PATCH v2 2/24 opencv: fix qt selection when highgui is enable

In reply to Samuel Martin

The OpenCV highgui module links against QtGui and QtTest. The latter is built by default but was never installed. Thanks to the previous patch on Qt, this can be rectified.

So, update the OpenCV Config.in with the missing Qt module selection.

---
changes v1 -> v2:
- rebase

---
 package/opencv/Config.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
package/opencv/Config.in +3 -1
index b40e141..49ada5d 100644
@@ -173,9 +173,11 @@ config BR2_PACKAGE_OPENCV_WITH_QT
 	depends on BR2_USE_MMU # qt
 	select BR2_PACKAGE_QT
 	select BR2_PACKAGE_QT_STL
+	select BR2_PACKAGE_QT_GUI_MODULE if BR2_PACKAGE_OPENCV_LIB_HIGHGUI
+	select BR2_PACKAGE_QT_TEST       if BR2_PACKAGE_OPENCV_LIB_HIGHGUI
 	default y
 	help
-	  Use Qt with STL support
+	  Use Qt with QtTest module and STL support
 
 config BR2_PACKAGE_OPENCV_WITH_TIFF
 	bool "tiff support"
Signature · 1 line
1.9.2
#5 lore raw

PATCH v2 2/24 opencv: fix qt selection when highgui is enable

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:

Quoted 7 lines

The OpenCV highgui module links against QtGui and QtTest. The latter is built by default but was never installed. Thanks to the previous patch on Qt, this can be rectified.

So, update the OpenCV Config.in with the missing Qt module selection.

Regards,
Yann E. MORIN.

Quoted 31 lines

---
changes v1 -> v2:
- rebase

---
 package/opencv/Config.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
package/opencv/Config.in +3 -1
index b40e141..49ada5d 100644
@@ -173,9 +173,11 @@ config BR2_PACKAGE_OPENCV_WITH_QT
 	depends on BR2_USE_MMU # qt
 	select BR2_PACKAGE_QT
 	select BR2_PACKAGE_QT_STL
+	select BR2_PACKAGE_QT_GUI_MODULE if BR2_PACKAGE_OPENCV_LIB_HIGHGUI
+	select BR2_PACKAGE_QT_TEST       if BR2_PACKAGE_OPENCV_LIB_HIGHGUI
 	default y
 	help
-	  Use Qt with STL support
+	  Use Qt with QtTest module and STL support
 
 config BR2_PACKAGE_OPENCV_WITH_TIFF
 	bool "tiff support"
Signature · 6 lines
1.9.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#6 lore raw

PATCH v2 2/24 opencv: fix qt selection when highgui is enable

In reply to Samuel Martin
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Samuel" == Samuel Martin <[email protected]> writes:

The OpenCV highgui module links against QtGui and QtTest. The latter is built by default but was never installed. Thanks to the previous patch on Qt, this can be rectified.

So, update the OpenCV Config.in with the missing Qt module selection.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#7 lore raw

PATCH v2 3/24 armadillo: new package

In reply to Samuel Martin

Armadillo is a C++ linear algebra library.

---
changes v1 -> v2:
- rebase
- add comment when toolchain has not C++

---
 package/Config.in              |  1 +
 package/armadillo/Config.in    | 12 ++++++++++++
 package/armadillo/armadillo.mk | 15 +++++++++++++++
 3 files changed, 28 insertions(+)
 create mode 100644 package/armadillo/Config.in
 create mode 100644 package/armadillo/armadillo.mk
package/Config.in +1 -0
index 07fd166..4475b07 100644
@@ -766,6 +766,7 @@ source "package/zyre/Config.in"
 endmenu
 
 menu "Other"
+source "package/armadillo/Config.in"
 source "package/apr/Config.in"
 source "package/apr-util/Config.in"
 source "package/argp-standalone/Config.in"
package/armadillo/Config.in new file +12 -0
new file mode 100644
index 0000000..8d7e9f3
@@ -0,0 +1,12 @@
+comment "armadillo needs a toolchain w/ C++"
+	depends on !BR2_INSTALL_LIBSTDCPP
+
+config BR2_PACKAGE_ARMADILLO
+	bool "armadillo"
+	depends on BR2_INSTALL_LIBSTDCPP
+	select BR2_PACKAGE_CLAPACK
+	help
+	  Armadillo: An Open Source C++ Linear Algebra Library for
+	  Fast Prototyping and Computationally Intensive Experiments.
+
+	  http://arma.sourceforge.net/
package/armadillo/armadillo.mk new file +15 -0
new file mode 100644
index 0000000..b2cfdfc
@@ -0,0 +1,15 @@
+################################################################################
+#
+# armadillo
+#
+################################################################################
+
+ARMADILLO_VERSION_MAJOR = 4.000
+ARMADILLO_VERSION = $(ARMADILLO_VERSION_MAJOR).4
+ARMADILLO_SITE = http://downloads.sourceforge.net/project/arma/
+ARMADILLO_DEPENDENCIES = clapack
+ARMADILLO_INSTALL_STAGING = YES
+ARMADILLO_LICENSE = MPLv2.0
+ARMADILLO_LICENSE_FILES = LICENSE.txt
+
+$(eval $(cmake-package))
Signature · 1 line
1.9.2
#8 lore raw

PATCH v2 3/24 armadillo: new package

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:

Quoted 3 lines

Armadillo is a C++ linear algebra library.

This should come _after_ you add the clapack package, since it is a dependency of armadillo.

Some other comments below...

[--SNIP--]

package/Config.in source "package/zyre/Config.in" · line 772

Quoted 12 lines
package/Config.in +1 -0
index 07fd166..4475b07 100644
@@ -766,6 +766,7 @@ source "package/zyre/Config.in"
 endmenu
 
 menu "Other"
+source "package/armadillo/Config.in"
 source "package/apr/Config.in"
 source "package/apr-util/Config.in"
 source "package/argp-standalone/Config.in"

Alphabetical order, please.

[--SNIP--]

Quoted 6 lines
package/armadillo/armadillo.mk new file +0 -0
new file mode 100644
index 0000000..b2cfdfc

package/armadillo/armadillo.mk line 8

Quoted 8 lines
package/armadillo/armadillo.mk new file +8 -0
@@ -0,0 +1,15 @@
+################################################################################
+#
+# armadillo
+#
+################################################################################
+
+ARMADILLO_VERSION_MAJOR = 4.000
+ARMADILLO_VERSION = $(ARMADILLO_VERSION_MAJOR).4

There's now 4.300 availble. If 4.000 is a requirement, there's now 4.000.5.

With the patch re-ordering, plus the alphabetical sort, you can add my reviewed tag (not added here, so patchwork does not catch it.)

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#9 lore raw

PATCH v2 3/24 armadillo: new package

Yann, all,

Quoted 9 lines · Yann E. MORIN

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:

Quoted 3 lines

Armadillo is a C++ linear algebra library.

This should come _after_ you add the clapack package, since it is a dependency of armadillo.

Ah! right! i rebased it too much :-/

Quoted 11 lines

Some other comments below...

[--SNIP--]

Quoted 7 lines
package/Config.in +0 -0
index 07fd166..4475b07 100644
@@ -766,6 +766,7 @@ source "package/zyre/Config.in"
 endmenu
 
Quoted 7 lines

package/Config.in source "package/zyre/Config.in" · line 772

Quoted 5 lines
package/Config.in +1 -0
 menu "Other"
+source "package/armadillo/Config.in"
 source "package/apr/Config.in"
 source "package/apr-util/Config.in"
 source "package/argp-standalone/Config.in"

Alphabetical order, please.

good catch!

Quoted 11 lines

[--SNIP--]

Quoted 9 lines
package/armadillo/armadillo.mk new file +3 -0
new file mode 100644
index 0000000..b2cfdfc
@@ -0,0 +1,15 @@
+################################################################################
+#
+# armadillo
Quoted 8 lines

package/armadillo/armadillo.mk line 8

Quoted 5 lines
package/armadillo/armadillo.mk new file +5 -0
+#
+################################################################################
+
+ARMADILLO_VERSION_MAJOR = 4.000
+ARMADILLO_VERSION = $(ARMADILLO_VERSION_MAJOR).4

There's now 4.300 availble. If 4.000 is a requirement, there's now 4.000.5.

Yep, i think bumping packages is often easier than getting them integrated, so i keep it for later (the same is true for opencv, numpy, and maybe others ;-])

Quoted 4 lines

With the patch re-ordering, plus the alphabetical sort, you can add my reviewed tag (not added here, so patchwork does not catch it.)

Thanks,

Quoted 10 lines

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.  |

'------------------------------^-------^------------------^--------------------'

Signature · 1 line
Samuel
#10 lore raw

PATCH v2 3/24 armadillo: new package

In reply to Samuel Martin
Quoted 35 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Samuel" == Samuel Martin <[email protected]> writes:

Armadillo is a C++ linear algebra library.

---
changes v1 -> v2:
- rebase
- add comment when toolchain has not C++

---
 package/Config.in              |  1 +
 package/armadillo/Config.in    | 12 ++++++++++++
 package/armadillo/armadillo.mk | 15 +++++++++++++++
 3 files changed, 28 insertions(+)
 create mode 100644 package/armadillo/Config.in
 create mode 100644 package/armadillo/armadillo.mk
package/Config.in +1 -0
index 07fd166..4475b07 100644
@@ -766,6 +766,7 @@ source "package/zyre/Config.in"
 endmenu
 
 menu "Other"
+source "package/armadillo/Config.in"
 source "package/apr/Config.in"
 source "package/apr-util/Config.in"
 source "package/argp-standalone/Config.in"
package/armadillo/Config.in new file +0 -0
new file mode 100644
index 0000000..8d7e9f3

package/armadillo/Config.in line 2

Quoted 2 lines
package/armadillo/Config.in new file +2 -0
@@ -0,0 +1,12 @@
+comment "armadillo needs a toolchain w/ C++"
+	depends on !BR2_INSTALL_LIBSTDCPP

As clapack needs largefile, then so does armadillo.

Committed with this and Yann's ordering comment fixed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#11 lore raw

PATCH v2 4/24 clapack: new package

In reply to Samuel Martin

This package provides BLAS and LAPACK libraries.

Though it is common to find implementation of these two libraries in Fortran, this package provides a C-implementation for both, because:
- Fortran support has been deprecated in Buildroot since the 2013.11 release;
- most of the external toolchains do not provide a Fortran compiler.

Often BLAS build-systems build some test programs and run them to generate some source files or adjust some build optimizations, naively assuming they are building the library for the build-machine. This does not play well when cross-compiling.

This implementation has this defect too, by building and running a tool generating a header.
However, the build-system allows to pass an empty header. So, we have to patch the CMake to build the generator (but never install it) and correctly support building with and without this header provided by the user.

Also, few CMake patches are needed to fix the build and install rules.

---
changes v1 -> v2:
- rebase
- fix typos (Yann)

---
 package/Config.in                                  |  1 +
 package/clapack/Config.in                          | 18 +++++
 ...ce-libf2c-to-be-built-as-a-static-library.patch | 32 +++++++++
 ...ake-test-build-sensitive-to-BUILD_TESTING.patch | 80 ++++++++++++++++++++++
 ...t-try-to-run-arithchk-when-cross-compilin.patch | 70 +++++++++++++++++++
 ...blas-add-library-and-header-install-rules.patch | 23 +++++++
 ...pack-add-library-and-header-install-rules.patch | 24 +++++++
 package/clapack/clapack.mk                         | 23 +++++++
 8 files changed, 271 insertions(+)
 create mode 100644 package/clapack/Config.in
 create mode 100644 package/clapack/clapack-0001-cmake-force-libf2c-to-be-built-as-a-static-library.patch
 create mode 100644 package/clapack/clapack-0002-cmake-make-test-build-sensitive-to-BUILD_TESTING.patch
 create mode 100644 package/clapack/clapack-0003-cmake-do-not-try-to-run-arithchk-when-cross-compilin.patch
 create mode 100644 package/clapack/clapack-0004-cmake-blas-add-library-and-header-install-rules.patch
 create mode 100644 package/clapack/clapack-0005-cmake-lapack-add-library-and-header-install-rules.patch
 create mode 100644 package/clapack/clapack.mk
package/Config.in +1 -0
index 4475b07..9c91844 100644
@@ -771,6 +771,7 @@ source "package/apr/Config.in"
 source "package/apr-util/Config.in"
 source "package/argp-standalone/Config.in"
 source "package/boost/Config.in"
+source "package/clapack/Config.in"
 source "package/classpath/Config.in"
 source "package/cppcms/Config.in"
 source "package/eigen/Config.in"
package/clapack/Config.in new file +18 -0
new file mode 100644
index 0000000..a4121ae
@@ -0,0 +1,18 @@
+config BR2_PACKAGE_CLAPACK
+	bool "cblas/clapack"
+	help
+	  BLAS and LAPACK C implementation (f2c'ed version of).
+
+	  http://www.netlib.org/clapack/
+
+config BR2_PACKAGE_CLAPACK_ARITH_H
+	string "Custom BLAS arith.h"
+	depends on BR2_PACKAGE_CLAPACK
+	help
+	  To optimize BLAS library for the hardware, an 'arith.h' header should
+	  be provided.
+
+	  If empty, the library will not be optimized by the compiler.
+
+	  In any case an 'arithchk' program is built (but not installed), to be run
+	  on the target to generate this arith.h header.
package/clapack/clapack-0001-cmake-force-libf2c-to-be-built-as-a-static-library.patch new file +32 -0
new file mode 100644
index 0000000..8fede9d
@@ -0,0 +1,32 @@
+From 4fe2f454e454d9e6b1e83b2ea67581990461ed36 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <[email protected]>
+Date: Sat, 11 Jan 2014 22:05:25 +0100
+Subject: [PATCH 1/6] cmake: force libf2c to be built as a static library
+
+As stated in INSTALL/LAPACK_version.c, liblapack requires to be linked
+against the static library of libf2c.
+
+Signed-off-by: Samuel Martin <[email protected]>
+---
+ F2CLIBS/libf2c/CMakeLists.txt | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/F2CLIBS/libf2c/CMakeLists.txt b/F2CLIBS/libf2c/CMakeLists.txt
+index 43d7b3f..f98d66a 100644
+--- a/F2CLIBS/libf2c/CMakeLists.txt
++++ b/F2CLIBS/libf2c/CMakeLists.txt
+@@ -58,5 +58,10 @@ if(WIN32)
+ endif()
+ include_directories(${CLAPACK_SOURCE_DIR}/F2CLIBS/libf2c)
+ include_directories(${CLAPACK_BINARY_DIR}/F2CLIBS/libf2c)
+-add_library(f2c ${OFILES} ${CMAKE_CURRENT_BINARY_DIR}/arith.h)
++add_library(f2c STATIC ${OFILES} ${CMAKE_CURRENT_BINARY_DIR}/arith.h)
+ set_property(TARGET f2c PROPERTY PREFIX lib)
++# Set fPIC on the library when build shared libraries is enabled, because
++# libf2c.a will most likely be included by some shared libraries in such cases.
++if(UNIX AND BUILD_SHARED_LIBS)
++  set_target_properties(f2c PROPERTIES COMPILE_FLAGS "-fPIC")
++endif()
+-- 
+1.8.5.3
+
package/clapack/clapack-0002-cmake-make-test-build-sensitive-to-BUILD_TESTING.patch new file +80 -0

80 lines not on this page · raw message

package/clapack/clapack-0003-cmake-do-not-try-to-run-arithchk-when-cross-compilin.patch new file +70 -0

70 lines not on this page · raw message

package/clapack/clapack-0004-cmake-blas-add-library-and-header-install-rules.patch new file +23 -0
new file mode 100644
index 0000000..e83b066
@@ -0,0 +1,23 @@
+From 675111e8ffc179276a7e4950fe4a4eda4d38a703 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <[email protected]>
+Date: Sat, 11 Jan 2014 21:48:32 +0100
+Subject: [PATCH 4/6] cmake: blas: add library and header install rules
+
+Signed-off-by: Samuel Martin <[email protected]>
+---
+ BLAS/SRC/CMakeLists.txt | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/BLAS/SRC/CMakeLists.txt b/BLAS/SRC/CMakeLists.txt
+index d1caff8..a5de5a1 100644
+--- a/BLAS/SRC/CMakeLists.txt
++++ b/BLAS/SRC/CMakeLists.txt
+@@ -141,3 +141,5 @@ if(UNIX)
+   target_link_libraries(blas m)
+ endif()
+ target_link_libraries(blas f2c)
++install(TARGETS blas LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
++install(FILES "${CLAPACK_SOURCE_DIR}/INCLUDE/blaswrap.h" DESTINATION include)
+-- 
+1.8.5.3
+
package/clapack/clapack-0005-cmake-lapack-add-library-and-header-install-rules.patch new file +24 -0
new file mode 100644
index 0000000..abba460
@@ -0,0 +1,24 @@
+From 9dfac0d55a31be59a856bad9d3a5071d65176597 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <[email protected]>
+Date: Sat, 11 Jan 2014 21:49:22 +0100
+Subject: [PATCH 5/6] cmake: lapack: add library and header install rules
+
+Signed-off-by: Samuel Martin <[email protected]>
+---
+ SRC/CMakeLists.txt | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/SRC/CMakeLists.txt b/SRC/CMakeLists.txt
+index ac4cce3..aa60555 100644
+--- a/SRC/CMakeLists.txt
++++ b/SRC/CMakeLists.txt
+@@ -377,4 +377,5 @@ if(BUILD_COMPLEX16)
+ endif()
+ add_library(lapack ${ALLOBJ} ${ALLXOBJ})
+ target_link_libraries(lapack blas)
+-
++install(TARGETS lapack LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
++install(FILES "${CLAPACK_SOURCE_DIR}/INCLUDE/clapack.h" DESTINATION include)
+-- 
+1.8.5.3
+
package/clapack/clapack.mk new file +23 -0
new file mode 100644
index 0000000..23d25fb
@@ -0,0 +1,23 @@
+################################################################################
+#
+# clapack
+#
+################################################################################
+
+CLAPACK_VERSION = 3.2.1
+CLAPACK_SOURCE = clapack-$(CLAPACK_VERSION)-CMAKE.tgz
+# This package provides 3 libraries:
+# - libf2c.a (not installed)
+# - libblas (statically linked with libf2c.a)
+# - liblapack (statically linked with libf2c.a)
+CLAPACK_LICENSE = HPND (libf2c), BSD-3c (libblas and liblapack)
+CLAPACK_LICENSE_FILES = F2CLIBS/libf2c/Notice, COPYING
+CLAPACK_SITE = http://www.netlib.org/clapack
+CLAPACK_INSTALL_STAGING = YES
+CLAPACK_CONF_OPT = -DBUILDTESTING=OFF
+
+ifneq ($(BR2_PACKAGE_CLAPACK_ARITH_H),)
+CLAPACK_CONF_OPT += -DARITH_H=$(BR2_PACKAGE_CLAPACK_ARITH_H)
+endif
+
+$(eval $(cmake-package))
Signature · 1 line
1.9.2
#12 lore raw

PATCH v2 4/24 clapack: new package

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:

Quoted 13 lines

This package provides BLAS and LAPACK libraries.

Though it is common to find implementation of these two libraries in Fortran, this package provides a C-implementation for both, because:
- Fortran support has been deprecated in Buildroot since the 2013.11 release;
- most of the external toolchains do not provide a Fortran compiler.

Often BLAS build-systems build some test programs and run them to generate some source files or adjust some build optimizations, naively assuming they are building the library for the build-machine. This does not play well when cross-compiling.

Quoted 8 lines

This implementation has this defect too, by building and running a tool generating a header.
However, the build-system allows to pass an empty header. So, we have to patch the CMake to build the generator (but never install it) and correctly support building with and without this header provided by the user.

Also, few CMake patches are needed to fix the build and install rules.

In case something else requires you to resend this patch:

    s/few/some/  ;-)

The way you wrote it implies that it is unusual there are so few required patches, and that ususally more are needed. Hehe! ;-)

Quoted 1 line
[yann.morin.1998 at free.fr: reviewed except for the cmake changes]

Regards,
Yann E. MORIN.

Quoted 353 lines

---
changes v1 -> v2:
- rebase
- fix typos (Yann)

---
 package/Config.in                                  |  1 +
 package/clapack/Config.in                          | 18 +++++
 ...ce-libf2c-to-be-built-as-a-static-library.patch | 32 +++++++++
 ...ake-test-build-sensitive-to-BUILD_TESTING.patch | 80 ++++++++++++++++++++++
 ...t-try-to-run-arithchk-when-cross-compilin.patch | 70 +++++++++++++++++++
 ...blas-add-library-and-header-install-rules.patch | 23 +++++++
 ...pack-add-library-and-header-install-rules.patch | 24 +++++++
 package/clapack/clapack.mk                         | 23 +++++++
 8 files changed, 271 insertions(+)
 create mode 100644 package/clapack/Config.in
 create mode 100644 package/clapack/clapack-0001-cmake-force-libf2c-to-be-built-as-a-static-library.patch
 create mode 100644 package/clapack/clapack-0002-cmake-make-test-build-sensitive-to-BUILD_TESTING.patch
 create mode 100644 package/clapack/clapack-0003-cmake-do-not-try-to-run-arithchk-when-cross-compilin.patch
 create mode 100644 package/clapack/clapack-0004-cmake-blas-add-library-and-header-install-rules.patch
 create mode 100644 package/clapack/clapack-0005-cmake-lapack-add-library-and-header-install-rules.patch
 create mode 100644 package/clapack/clapack.mk
package/Config.in +1 -0
index 4475b07..9c91844 100644
@@ -771,6 +771,7 @@ source "package/apr/Config.in"
 source "package/apr-util/Config.in"
 source "package/argp-standalone/Config.in"
 source "package/boost/Config.in"
+source "package/clapack/Config.in"
 source "package/classpath/Config.in"
 source "package/cppcms/Config.in"
 source "package/eigen/Config.in"
package/clapack/Config.in new file +18 -0
new file mode 100644
index 0000000..a4121ae
@@ -0,0 +1,18 @@
+config BR2_PACKAGE_CLAPACK
+	bool "cblas/clapack"
+	help
+	  BLAS and LAPACK C implementation (f2c'ed version of).
+
+	  http://www.netlib.org/clapack/
+
+config BR2_PACKAGE_CLAPACK_ARITH_H
+	string "Custom BLAS arith.h"
+	depends on BR2_PACKAGE_CLAPACK
+	help
+	  To optimize BLAS library for the hardware, an 'arith.h' header should
+	  be provided.
+
+	  If empty, the library will not be optimized by the compiler.
+
+	  In any case an 'arithchk' program is built (but not installed), to be run
+	  on the target to generate this arith.h header.
package/clapack/clapack-0001-cmake-force-libf2c-to-be-built-as-a-static-library.patch new file +32 -0
new file mode 100644
index 0000000..8fede9d
@@ -0,0 +1,32 @@
+From 4fe2f454e454d9e6b1e83b2ea67581990461ed36 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <[email protected]>
+Date: Sat, 11 Jan 2014 22:05:25 +0100
+Subject: [PATCH 1/6] cmake: force libf2c to be built as a static library
+
+As stated in INSTALL/LAPACK_version.c, liblapack requires to be linked
+against the static library of libf2c.
+
+Signed-off-by: Samuel Martin <[email protected]>
+---
+ F2CLIBS/libf2c/CMakeLists.txt | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/F2CLIBS/libf2c/CMakeLists.txt b/F2CLIBS/libf2c/CMakeLists.txt
+index 43d7b3f..f98d66a 100644
+--- a/F2CLIBS/libf2c/CMakeLists.txt
++++ b/F2CLIBS/libf2c/CMakeLists.txt
+@@ -58,5 +58,10 @@ if(WIN32)
+ endif()
+ include_directories(${CLAPACK_SOURCE_DIR}/F2CLIBS/libf2c)
+ include_directories(${CLAPACK_BINARY_DIR}/F2CLIBS/libf2c)
+-add_library(f2c ${OFILES} ${CMAKE_CURRENT_BINARY_DIR}/arith.h)
++add_library(f2c STATIC ${OFILES} ${CMAKE_CURRENT_BINARY_DIR}/arith.h)
+ set_property(TARGET f2c PROPERTY PREFIX lib)
++# Set fPIC on the library when build shared libraries is enabled, because
++# libf2c.a will most likely be included by some shared libraries in such cases.
++if(UNIX AND BUILD_SHARED_LIBS)
++  set_target_properties(f2c PROPERTIES COMPILE_FLAGS "-fPIC")
++endif()
+-- 
+1.8.5.3
+
package/clapack/clapack-0002-cmake-make-test-build-sensitive-to-BUILD_TESTING.patch new file +80 -0
new file mode 100644
index 0000000..d56464c
@@ -0,0 +1,80 @@
+From 834c221936d9c460b44e3a65b6fedfb3193f491b Mon Sep 17 00:00:00 2001
+From: Samuel Martin <[email protected]>
+Date: Sat, 11 Jan 2014 21:33:12 +0100
+Subject: [PATCH 2/6] cmake: make test build sensitive to BUILD_TESTING
+
+This patch prevent from wasting time building the tests if it's our
+wish.
+
+The test build takes a significant amount of time, and the binaries
+not installed.
+
+Signed-off-by: Samuel Martin <[email protected]>
+---
+ BLAS/TESTING/CMakeLists.txt | 3 +++
+ CMakeLists.txt              | 9 ++++++---
+ TESTING/CMakeLists.txt      | 4 ++++
+ 3 files changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/BLAS/TESTING/CMakeLists.txt b/BLAS/TESTING/CMakeLists.txt
+index ec2c587..e7dc0b7 100644
+--- a/BLAS/TESTING/CMakeLists.txt
++++ b/BLAS/TESTING/CMakeLists.txt
+@@ -25,6 +25,9 @@
+ #       make single FRC=FRC
+ #
+ #######################################################################
++if(NOT BUILD_TESTING)
++  return()
++endif()
+ 
+ macro(add_blas_test name src)
+   get_filename_component(baseNAME ${src} NAME_WE)
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 320ccc6..0a362c0 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,6 +1,5 @@
+ cmake_minimum_required(VERSION 2.6)
+ project(CLAPACK C)
+-enable_testing()
+ include(CTest)
+ 
+ if(WIN32 AND NOT CYGWIN)
+@@ -11,7 +10,9 @@ else()
+   set(SECOND_SRC  ${CLAPACK_SOURCE_DIR}/INSTALL/second.c)
+   set(DSECOND_SRC  ${CLAPACK_SOURCE_DIR}/INSTALL/dsecnd.c)
+ endif()
+-enable_testing()
++if(NOT BUILD_TESTING)
++  enable_testing()
++endif()
+ option(USE_BLAS_WRAP "pre-pend f2c_ to each function in blas" OFF)
+ if(NOT USE_BLAS_WRAP)
+ # _zrotg_ seems to be missing in the wrap header
+@@ -21,7 +22,9 @@ include_directories(${CLAPACK_SOURCE_DIR}/INCLUDE)
+ add_subdirectory(F2CLIBS)
+ add_subdirectory(BLAS)
+ add_subdirectory(SRC)
+-add_subdirectory(TESTING)
++if(NOT BUILD_TESTING)
++  add_subdirectory(TESTING)
++endif()
+ set(CLAPACK_VERSION 3.2.1)
+ set(CPACK_PACKAGE_VERSION_MAJOR 3)
+ set(CPACK_PACKAGE_VERSION_MINOR 2)
+diff --git a/TESTING/CMakeLists.txt b/TESTING/CMakeLists.txt
+index d59359d..f6b083a 100644
+--- a/TESTING/CMakeLists.txt
++++ b/TESTING/CMakeLists.txt
+@@ -1,3 +1,7 @@
++if(NOT BUILD_TESTING)
++  return()
++endif()
++
+ if(MSVC_VERSION)
+ #  string(REPLACE "/STACK:10000000" "/STACK:900000000000000000"
+ #    CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
+-- 
+1.8.5.3
+
package/clapack/clapack-0003-cmake-do-not-try-to-run-arithchk-when-cross-compilin.patch new file +70 -0
new file mode 100644
index 0000000..1654c89
@@ -0,0 +1,70 @@
+From a2f0669fac1f8e7183b15cf7d14f0e99a2d8b012 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <[email protected]>
+Date: Sat, 11 Jan 2014 21:47:39 +0100
+Subject: [PATCH 3/6] cmake: do not try to run arithchk when cross-compiling to
+ generate sources
+
+Instead, use a predefined arith.h if provided, or generate a default one.
+
+The arithchk binary is still built (but not install) to allow the user to
+run it on its target and use it; so then allowing to build an optimized
+blas library.
+
+Signed-off-by: Samuel Martin <[email protected]>
+---
+ F2CLIBS/libf2c/CMakeLists.txt | 38 ++++++++++++++++++++++++++++----------
+ 1 file changed, 28 insertions(+), 10 deletions(-)
+
+diff --git a/F2CLIBS/libf2c/CMakeLists.txt b/F2CLIBS/libf2c/CMakeLists.txt
+index f98d66a..45a0804 100644
+--- a/F2CLIBS/libf2c/CMakeLists.txt
++++ b/F2CLIBS/libf2c/CMakeLists.txt
+@@ -38,17 +38,35 @@ set(TIME dtime_.c etime_.c)
+ 
+ # For INTEGER*8 support (which requires system-dependent adjustments to
+ # f2c.h), add ${QINT} to the OFILES  assignment below...
+-add_executable(arithchk arithchk.c)
+-if(UNIX)
+-  target_link_libraries(arithchk m)
++if(CMAKE_CROSSCOMPILING)
++  if(ARITH_H)
++    message(STATUS "Using the user-defined '${ARITH_H}' as arith.h header.")
++    configure_file("${ARITH_H}" "${CMAKE_CURRENT_BINARY_DIR}/arith.h" COPYONLY)
++  else()
++    message(STATUS "No user-defined arith.h header.")
++    if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/arith.h")
++      message(WARNING "Generating the default non-optimized 'arith.h' header.
++
++To generate and provide a custom arith.h header:
++run the cross-compiled arithchk binary on your target,
++and use its output to fill your custom arith.h header.")
++      file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/arith.h"
++        "/* default, not optimized arith.h */")
++    endif()
++  endif()
++else()
++  add_executable(arithchk arithchk.c)
++  if(UNIX)
++    target_link_libraries(arithchk m)
++  endif()
++  set_target_properties(arithchk PROPERTIES COMPILE_DEFINITIONS
++    "NO_FPINIT;NO_LONG_LONG")
++  ADD_CUSTOM_COMMAND(
++     OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/arith.h
++     COMMAND arithchk > ${CMAKE_CURRENT_BINARY_DIR}/arith.h
++     DEPENDS arithchk
++     )
+ endif()
+-set_target_properties(arithchk PROPERTIES COMPILE_DEFINITIONS 
+-  "NO_FPINIT;NO_LONG_LONG")
+-ADD_CUSTOM_COMMAND(
+-   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/arith.h
+-   COMMAND arithchk > ${CMAKE_CURRENT_BINARY_DIR}/arith.h
+-   DEPENDS arithchk
+-   )
+ 
+ 
+ set(OFILES  ${MISC} ${POW} ${CX} ${DCX} ${REAL} ${DBL} ${INT} 
+-- 
+1.8.5.3
+
package/clapack/clapack-0004-cmake-blas-add-library-and-header-install-rules.patch new file +23 -0
new file mode 100644
index 0000000..e83b066
@@ -0,0 +1,23 @@
+From 675111e8ffc179276a7e4950fe4a4eda4d38a703 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <[email protected]>
+Date: Sat, 11 Jan 2014 21:48:32 +0100
+Subject: [PATCH 4/6] cmake: blas: add library and header install rules
+
+Signed-off-by: Samuel Martin <[email protected]>
+---
+ BLAS/SRC/CMakeLists.txt | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/BLAS/SRC/CMakeLists.txt b/BLAS/SRC/CMakeLists.txt
+index d1caff8..a5de5a1 100644
+--- a/BLAS/SRC/CMakeLists.txt
++++ b/BLAS/SRC/CMakeLists.txt
+@@ -141,3 +141,5 @@ if(UNIX)
+   target_link_libraries(blas m)
+ endif()
+ target_link_libraries(blas f2c)
++install(TARGETS blas LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
++install(FILES "${CLAPACK_SOURCE_DIR}/INCLUDE/blaswrap.h" DESTINATION include)
+-- 
+1.8.5.3
+
package/clapack/clapack-0005-cmake-lapack-add-library-and-header-install-rules.patch new file +24 -0
new file mode 100644
index 0000000..abba460
@@ -0,0 +1,24 @@
+From 9dfac0d55a31be59a856bad9d3a5071d65176597 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <[email protected]>
+Date: Sat, 11 Jan 2014 21:49:22 +0100
+Subject: [PATCH 5/6] cmake: lapack: add library and header install rules
+
+Signed-off-by: Samuel Martin <[email protected]>
+---
+ SRC/CMakeLists.txt | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/SRC/CMakeLists.txt b/SRC/CMakeLists.txt
+index ac4cce3..aa60555 100644
+--- a/SRC/CMakeLists.txt
++++ b/SRC/CMakeLists.txt
+@@ -377,4 +377,5 @@ if(BUILD_COMPLEX16)
+ endif()
+ add_library(lapack ${ALLOBJ} ${ALLXOBJ})
+ target_link_libraries(lapack blas)
+-
++install(TARGETS lapack LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
++install(FILES "${CLAPACK_SOURCE_DIR}/INCLUDE/clapack.h" DESTINATION include)
+-- 
+1.8.5.3
+
package/clapack/clapack.mk new file +23 -0
new file mode 100644
index 0000000..23d25fb
@@ -0,0 +1,23 @@
+################################################################################
+#
+# clapack
+#
+################################################################################
+
+CLAPACK_VERSION = 3.2.1
+CLAPACK_SOURCE = clapack-$(CLAPACK_VERSION)-CMAKE.tgz
+# This package provides 3 libraries:
+# - libf2c.a (not installed)
+# - libblas (statically linked with libf2c.a)
+# - liblapack (statically linked with libf2c.a)
+CLAPACK_LICENSE = HPND (libf2c), BSD-3c (libblas and liblapack)
+CLAPACK_LICENSE_FILES = F2CLIBS/libf2c/Notice, COPYING
+CLAPACK_SITE = http://www.netlib.org/clapack
+CLAPACK_INSTALL_STAGING = YES
+CLAPACK_CONF_OPT = -DBUILDTESTING=OFF
+
+ifneq ($(BR2_PACKAGE_CLAPACK_ARITH_H),)
+CLAPACK_CONF_OPT += -DARITH_H=$(BR2_PACKAGE_CLAPACK_ARITH_H)
+endif
+
+$(eval $(cmake-package))
Signature · 6 lines
1.9.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#13 lore raw

PATCH v2 4/24 clapack: new package

In reply to Samuel Martin
Quoted 27 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Samuel" == Samuel Martin <[email protected]> writes:

This package provides BLAS and LAPACK libraries.
Though it is common to find implementation of these two libraries in Fortran, this package provides a C-implementation for both, because:
- Fortran support has been deprecated in Buildroot since the 2013.11 release;
- most of the external toolchains do not provide a Fortran compiler.

Often BLAS build-systems build some test programs and run them to generate some source files or adjust some build optimizations, naively assuming they are building the library for the build-machine. This does not play well when cross-compiling.

This implementation has this defect too, by building and running a tool generating a header.
However, the build-system allows to pass an empty header. So, we have to patch the CMake to build the generator (but never install it) and correctly support building with and without this header provided by the user.

Also, few CMake patches are needed to fix the build and install rules.

+++ b/package/clapack/Config.in

package/clapack/Config.in line 6

Quoted 6 lines
package/clapack/Config.in new file +6 -0
@@ -0,0 +1,18 @@
+config BR2_PACKAGE_CLAPACK
+	bool "cblas/clapack"
+	help
+	  BLAS and LAPACK C implementation (f2c'ed version of).
+
+	  http://www.netlib.org/clapack/

A testbuild shows it needs largefile (STAT_ST isn't defined for !LFS), so I've added that.

package/clapack/clapack-0002-cmake-make-test-build-sensitive-to-BUILD_TESTING.patch line 10

Quoted 12 lines
package/clapack/clapack-0002-cmake-make-test-build-sensitive-to-BUILD_TESTING.patch new file +11 -0
+++ b/package/clapack/clapack-0002-cmake-make-test-build-sensitive-to-BUILD_TESTING.patch
@@ -0,0 +1,80 @@
+From 834c221936d9c460b44e3a65b6fedfb3193f491b Mon Sep 17 00:00:00 2001
+From: Samuel Martin <[email protected]>
+Date: Sat, 11 Jan 2014 21:33:12 +0100
+Subject: [PATCH 2/6] cmake: make test build sensitive to BUILD_TESTING
+
+This patch prevent from wasting time building the tests if it's our
+wish.
+
+The test build takes a significant amount of time, and the binaries
+not installed.

s/not/are not/.

I've done similar small changes to some of the other patch descriptions. Have you sent them upstream? If so, have they been integrated?

Quoted 6 lines
package/clapack/clapack.mk new file +5 -0
+++ b/package/clapack/clapack.mk
@@ -0,0 +1,23 @@
+################################################################################
+#
+# clapack
+#

package/clapack/clapack.mk line 14

Quoted 10 lines
package/clapack/clapack.mk new file +10 -0
+################################################################################
+
+CLAPACK_VERSION = 3.2.1
+CLAPACK_SOURCE = clapack-$(CLAPACK_VERSION)-CMAKE.tgz
+# This package provides 3 libraries:
+# - libf2c.a (not installed)
+# - libblas (statically linked with libf2c.a)
+# - liblapack (statically linked with libf2c.a)
+CLAPACK_LICENSE = HPND (libf2c), BSD-3c (libblas and liblapack)
+CLAPACK_LICENSE_FILES = F2CLIBS/libf2c/Notice, COPYING

_LICENSE_FILES is a space seperated list, not comma seperated.

Committed with these fixes, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#14 lore raw

PATCH v2 5/24 python-numpy: new package

In reply to Samuel Martin

This patch add NumPy package for python.

Since Fortran support has been deprecated in Buildroot since the 2013.11 release, and because most of the external toolchains do not provide a Fortran compiler, it is necessary to explicity disable Fortran compiler to avoid catching the one from the host system if any.

We also need to fill a site.cfg file to tell NumPy build-system where it should looking for BLAS and LAPACK libraries.

Some packages may include headers provided by python-numpy package. Thus, python-numpy needs to be installed in the sysroot; so add and enable its install-staging command.

---
changes v1 -> v2:
- rebase
- automatic support of blas/lapack when clapack is enabled (ThomasP)
- split blas/lapack support in its own cset (ThomasP)
- merge python-numpy staging install cset within the python-numpy package integration (ThomasP)

---
 package/Config.in                    |  1 +
 package/python-numpy/Config.in       |  8 +++++++
 package/python-numpy/python-numpy.mk | 41 ++++++++++++++++++++++++++++++++++++
 3 files changed, 50 insertions(+)
 create mode 100644 package/python-numpy/Config.in
 create mode 100644 package/python-numpy/python-numpy.mk
package/Config.in +1 -0
index 9c91844..7d8ca95 100644
@@ -455,6 +455,7 @@ source "package/python-meld3/Config.in"
 source "package/python-msgpack/Config.in"
 source "package/python-netifaces/Config.in"
 source "package/python-nfc/Config.in"
+source "package/python-numpy/Config.in"
 source "package/python-posix-ipc/Config.in"
 source "package/python-protobuf/Config.in"
 source "package/python-pyasn/Config.in"
package/python-numpy/Config.in new file +8 -0
new file mode 100644
index 0000000..c80e5c4
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_PYTHON_NUMPY
+	bool "python-numpy"
+	help
+	  NumPy is the fundamental package for scientific computing with Python.
+
+	  Note that NumPy needs fenv.h fully supported by the C-library.
+
+	  http://www.numpy.org/
package/python-numpy/python-numpy.mk new file +41 -0

41 lines not on this page · raw message

Signature · 1 line
1.9.2
#15 lore raw

PATCH v2 5/24 python-numpy: new package

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:

Quoted 7 lines

This patch add NumPy package for python.

Since Fortran support has been deprecated in Buildroot since the 2013.11 release, and because most of the external toolchains do not provide a Fortran compiler, it is necessary to explicity disable Fortran compiler to avoid catching the one from the host system if any.

Quoted 8 lines

We also need to fill a site.cfg file to tell NumPy build-system where it should looking for BLAS and LAPACK libraries.

Some packages may include headers provided by python-numpy package. Thus, python-numpy needs to be installed in the sysroot; so add and enable its install-staging command.

[--SNIP--]

package/python-numpy/Config.in line 6

Quoted 12 lines
package/python-numpy/Config.in new file +6 -0
new file mode 100644
index 0000000..c80e5c4
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_PYTHON_NUMPY
+	bool "python-numpy"
+	help
+	  NumPy is the fundamental package for scientific computing with Python.
+
+	  Note that NumPy needs fenv.h fully supported by the C-library.

So, maybe we should:

    depends on uClibc && x86 || glibc

uClibc only really supports fenv.h for x86.

Quoted 7 lines
package/python-numpy/Config.in new file +1 -0
+	  http://www.numpy.org/
package/python-numpy/python-numpy.mk new file +0 -0
new file mode 100644
index 0000000..e7c91c4

package/python-numpy/python-numpy.mk line 7

Quoted 7 lines
package/python-numpy/python-numpy.mk new file +7 -0
@@ -0,0 +1,41 @@
+################################################################################
+#
+# python-numpy
+#
+################################################################################
+
+PYTHON_NUMPY_VERSION = 1.8.0

We've got 1.8.1 out now. Maybe use it?

Quoted 12 lines
package/python-numpy/python-numpy.mk new file +12 -0
+PYTHON_NUMPY_SOURCE = numpy-$(PYTHON_NUMPY_VERSION).tar.gz
+PYTHON_NUMPY_SITE = http://downloads.sourceforge.net/numpy
+PYTHON_NUMPY_LICENSE = BSD-3c
+PYTHON_NUMPY_LICENSE_FILES = LICENSE.txt
+PYTHON_NUMPY_SETUP_TYPE = distutils
+
+PYTHON_NUMPY_BUILD_OPT = --fcompiler=None
+
+define PYTHON_NUMPY_CONFIGURE_CMDS
+	-rm -f $(@D)/site.cfg
+	echo "[DEFAULT]" >> $(@D)/site.cfg
+	echo "library_dirs = $(STAGING_DIR)/usr/lib" >> $(@D)/site.cfg

package/python-numpy/python-numpy.mk line 29

Quoted 10 lines
package/python-numpy/python-numpy.mk new file +10 -0
+	echo "include_dirs = $(STAGING_DIR)/usr/include" >> $(@D)/site.cfg
+	echo "libraries =" >> $(@D)/site.cfg
+endef
+
+# Some package may include few headers from NumPy, so let's install it in the
+# staging area.
+PYTHON_NUMPY_INSTALL_STAGING = YES
+
+# This install staging commands is an adjusted and simplified version of the
+# install target commands vampirized from the python-package infrastructure.

Why not add it to the python-infra, then?

Regards,
Yann E. MORIN.

Quoted 18 lines
package/python-numpy/python-numpy.mk new file +11 -0
+# Note that the append '--prefix=...' parameter overrides the one set by the
+# python-package infrastructure in the PYTHON_NUMPY_INSTALL_OPT variable.
+define PYTHON_NUMPY_INSTALL_STAGING_CMDS
+	(cd $(PYTHON_NUMPY_BUILDDIR)/; \
+		$(PYTHON_NUMPY_BASE_ENV) $(PYTHON_NUMPY_ENV) \
+		$(HOST_DIR)/usr/bin/python setup.py install \
+		$(PYTHON_NUMPY_BASE_INSTALL_OPT) \
+		$(PYTHON_NUMPY_INSTALL_OPT) --prefix=$(STAGING_DIR)/usr)
+endef
+
+$(eval $(python-package))
Signature · 6 lines
1.9.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#16 lore raw

PATCH v2 5/24 python-numpy: new package

In reply to Samuel Martin

Dear Samuel Martin,

Quoted 7 lines · Samuel Martin

This patch add NumPy package for python.

Since Fortran support has been deprecated in Buildroot since the 2013.11 release, and because most of the external toolchains do not provide a Fortran compiler, it is necessary to explicity disable Fortran compiler to avoid catching the one from the host system if any.

Quoted 8 lines

We also need to fill a site.cfg file to tell NumPy build-system where it should looking for BLAS and LAPACK libraries.

Some packages may include headers provided by python-numpy package. Thus, python-numpy needs to be installed in the sysroot; so add and enable its install-staging command.

Thanks, applied, after changing the patch to use the python package infrastructure for staging installation, and adding the necessary dependencies to take into account the fenv.h requirement.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#17 lore raw

PATCH v2 6/24 python-numpy: add optional blas/lapack support

In reply to Samuel Martin

python-numpy can be linked with libblas and liblapack, so automatically do it when clapack is enabled.

---
changes v1 -> v2:
- rebase
- split blas/lapack support in its own cset (ThomasP)

---
 package/python-numpy/python-numpy.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/python-numpy/python-numpy.mk +7 -0
index e7c91c4..b0ab031 100644
@@ -10,6 +10,11 @@ PYTHON_NUMPY_SITE = http://downloads.sourceforge.net/numpy
 PYTHON_NUMPY_LICENSE = BSD-3c
 PYTHON_NUMPY_LICENSE_FILES = LICENSE.txt
 PYTHON_NUMPY_SETUP_TYPE = distutils
+PYTHON_NUMPY_DEPENDENCIES = \
+	$(if BR2_PACKAGE_CLAPACK,clapack)
+
+PYTHON_NUMPY_SITE_CFG_LIBS = \
+	$(if $(BR2_PACKAGE_CLAPACK),blas lapack)
 
 PYTHON_NUMPY_BUILD_OPT = --fcompiler=None
 
@@ -19,6 +24,8 @@ define PYTHON_NUMPY_CONFIGURE_CMDS
 	echo "library_dirs = $(STAGING_DIR)/usr/lib" >> $(@D)/site.cfg
 	echo "include_dirs = $(STAGING_DIR)/usr/include" >> $(@D)/site.cfg
 	echo "libraries =" >> $(@D)/site.cfg
+	$(foreach lib,$(PYTHON_NUMPY_SITE_CFG_LIBS),\
+		echo "    $(lib)" >> $(@D)/site.cfg ;)
 endef
 
 # Some package may include few headers from NumPy, so let's install it in the
Signature · 1 line
1.9.2
#18 lore raw

PATCH v2 6/24 python-numpy: add optional blas/lapack support

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:

Quoted 18 lines

python-numpy can be linked with libblas and liblapack, so automatically do it when clapack is enabled.

---
changes v1 -> v2:
- rebase
- split blas/lapack support in its own cset (ThomasP)

---
 package/python-numpy/python-numpy.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/python-numpy/python-numpy.mk +0 -0
index e7c91c4..b0ab031 100644

package/python-numpy/python-numpy.mk PYTHON_NUMPY_SITE = http://downloads.sourceforge.net/numpy · line 14

Quoted 5 lines
package/python-numpy/python-numpy.mk +2 -0
@@ -10,6 +10,11 @@ PYTHON_NUMPY_SITE = http://downloads.sourceforge.net/numpy
 PYTHON_NUMPY_LICENSE = BSD-3c
 PYTHON_NUMPY_LICENSE_FILES = LICENSE.txt
 PYTHON_NUMPY_SETUP_TYPE = distutils
+PYTHON_NUMPY_DEPENDENCIES = \
+	$(if BR2_PACKAGE_CLAPACK,clapack)

Uh? Did you forget to dereference the BR2_PACKAGE_CLAPACK variable? ;-) Anyway, see also below...

package/python-numpy/python-numpy.mk PYTHON_NUMPY_SITE = http://downloads.sourceforge.net/numpy · line 17

Quoted 2 lines
package/python-numpy/python-numpy.mk +2 -0
+PYTHON_NUMPY_SITE_CFG_LIBS = \
+	$(if $(BR2_PACKAGE_CLAPACK),blas lapack)

We prefer using multi-line syntax. See:
http://buildroot.net/downloads/manual/manual.html#writing-rules-mk

So:

    ifeq ($(BR2_PACKAGE_CLAPACK),y)
    PYTHON_NUMPY_DEPENDENCIES += clapack
    PYTHON_NUMPY_SITE_CFG_LIBS += blas lapack
    endif

Regards,
Yann E. MORIN.

Quoted 18 lines
package/python-numpy/python-numpy.mk +2 -0
 PYTHON_NUMPY_BUILD_OPT = --fcompiler=None
 
@@ -19,6 +24,8 @@ define PYTHON_NUMPY_CONFIGURE_CMDS
 	echo "library_dirs = $(STAGING_DIR)/usr/lib" >> $(@D)/site.cfg
 	echo "include_dirs = $(STAGING_DIR)/usr/include" >> $(@D)/site.cfg
 	echo "libraries =" >> $(@D)/site.cfg
+	$(foreach lib,$(PYTHON_NUMPY_SITE_CFG_LIBS),\
+		echo "    $(lib)" >> $(@D)/site.cfg ;)
 endef
 
 # Some package may include few headers from NumPy, so let's install it in the
Signature · 6 lines
1.9.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#19 lore raw

PATCH v2 6/24 python-numpy: add optional blas/lapack support

In reply to Samuel Martin

Dear Samuel Martin,

package/python-numpy/python-numpy.mk PYTHON_NUMPY_SITE = http://downloads.sourceforge.net/numpy · line 17

Quoted 5 lines · Samuel Martin
package/python-numpy/python-numpy.mk +5 -0
+PYTHON_NUMPY_DEPENDENCIES = \
+	$(if BR2_PACKAGE_CLAPACK,clapack)
+
+PYTHON_NUMPY_SITE_CFG_LIBS = \
+	$(if $(BR2_PACKAGE_CLAPACK),blas lapack)

I've changed this as suggested by Yann E. Morin.

package/python-numpy/python-numpy.mk define PYTHON_NUMPY_CONFIGURE_CMDS · line 28

Quoted 6 lines
package/python-numpy/python-numpy.mk +2 -0
@@ -19,6 +24,8 @@ define PYTHON_NUMPY_CONFIGURE_CMDS
 	echo "library_dirs = $(STAGING_DIR)/usr/lib" >> $(@D)/site.cfg
 	echo "include_dirs = $(STAGING_DIR)/usr/include" >> $(@D)/site.cfg
 	echo "libraries =" >> $(@D)/site.cfg
+	$(foreach lib,$(PYTHON_NUMPY_SITE_CFG_LIBS),\
+		echo "    $(lib)" >> $(@D)/site.cfg ;)

In the example site.cfg file, the syntax is

libraries = library1,library2

so I've changed this logic to use this syntax, and I've applied your patch.

Can you check that things are working properly by testing the latest master? I've checked that things build properly, but I'm not sure how to test that python-numpy and the blas/lapack support work properly.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#20 lore raw

PATCH v2 7/24 opencv: bump to version 2.4.8

In reply to Samuel Martin

This patch bumps OpenCV version and address the minimal set of change to get the new version building correctly:
- update the download location;
- force Qt version to Qt 4 when support is enabled;
- naively fix the v4l support.

However, it does not address a couple improvements, among these:
- jasper support;
- python/numpy support;
- Qt4 and Qt5 support (since the 2.4.6 release), so only Qt4 support is supported in this patch;
- optional libv4l dependency (since 2.4.7 release);
- etc.
These will be addressed in followup patches.

---
changes v1 -> v2:
- rebase
- use github *.tar.gz source location
- split the big patch in several atomic ones (Yann)

---
 package/opencv/Config.in |  2 +-
 package/opencv/opencv.mk | 11 +++++------
 2 files changed, 6 insertions(+), 7 deletions(-)
package/opencv/Config.in +1 -1
index 49ada5d..2c6200c 100644
@@ -8,7 +8,7 @@ menuconfig BR2_PACKAGE_OPENCV
 	  OpenCV (Open Source Computer Vision) is a library of programming
 	  functions for real time computer vision.
 
-	  http://opencv.willowgarage.com/wiki/
+	  http://opencv.org/
 
 if BR2_PACKAGE_OPENCV
 
package/opencv/opencv.mk +5 -6
index 42f9b0a..10f11cf 100644
@@ -4,9 +4,8 @@
 #
 ################################################################################
 
-OPENCV_VERSION = 2.4.2
-OPENCV_SITE    = http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/$(OPENCV_VERSION)
-OPENCV_SOURCE  = OpenCV-$(OPENCV_VERSION).tar.bz2
+OPENCV_VERSION = 2.4.8
+OPENCV_SITE = $(call github,itseez,opencv,$(OPENCV_VERSION))
 OPENCV_INSTALL_STAGING = YES
 
 OPENCV_CONF_OPT += \
@@ -140,7 +139,7 @@ OPENCV_CONF_OPT += -DWITH_PNG=OFF
 endif
 
 ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT),y)
-OPENCV_CONF_OPT += -DWITH_QT=ON
+OPENCV_CONF_OPT += -DWITH_QT=4
 OPENCV_DEPENDENCIES += qt
 else
 OPENCV_CONF_OPT += -DWITH_QT=OFF
@@ -154,10 +153,10 @@ OPENCV_CONF_OPT += -DWITH_TIFF=OFF
 endif
 
 ifeq ($(BR2_PACKAGE_OPENCV_WITH_V4L),y)
-OPENCV_CONF_OPT += -DWITH_V4L=ON
+OPENCV_CONF_OPT += -DWITH_V4L=ON -DWITH_LIBV4L=ON
 OPENCV_DEPENDENCIES += libv4l
 else
-OPENCV_CONF_OPT += -DWITH_V4L=OFF
+OPENCV_CONF_OPT += -DWITH_V4L=OFF -DWITH_LIBV4L=OFF
 endif
 
 # Installation hooks:
Signature · 1 line
1.9.2
#21 lore raw

PATCH v2 7/24 opencv: bump to version 2.4.8

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:

Quoted 15 lines

This patch bumps OpenCV version and address the minimal set of change to get the new version building correctly:
- update the download location;
- force Qt version to Qt 4 when support is enabled;
- naively fix the v4l support.

However, it does not address a couple improvements, among these:
- jasper support;
- python/numpy support;
- Qt4 and Qt5 support (since the 2.4.6 release), so only Qt4 support is supported in this patch;
- optional libv4l dependency (since 2.4.7 release);
- etc.
These will be addressed in followup patches.

Quoted 1 line

Regards,
Yann E. MORIN.

Quoted 68 lines

---
changes v1 -> v2:
- rebase
- use github *.tar.gz source location
- split the big patch in several atomic ones (Yann)

---
 package/opencv/Config.in |  2 +-
 package/opencv/opencv.mk | 11 +++++------
 2 files changed, 6 insertions(+), 7 deletions(-)
package/opencv/Config.in +1 -1
index 49ada5d..2c6200c 100644
@@ -8,7 +8,7 @@ menuconfig BR2_PACKAGE_OPENCV
 	  OpenCV (Open Source Computer Vision) is a library of programming
 	  functions for real time computer vision.
 
-	  http://opencv.willowgarage.com/wiki/
+	  http://opencv.org/
 
 if BR2_PACKAGE_OPENCV
 
package/opencv/opencv.mk +5 -6
index 42f9b0a..10f11cf 100644
@@ -4,9 +4,8 @@
 #
 ################################################################################
 
-OPENCV_VERSION = 2.4.2
-OPENCV_SITE    = http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/$(OPENCV_VERSION)
-OPENCV_SOURCE  = OpenCV-$(OPENCV_VERSION).tar.bz2
+OPENCV_VERSION = 2.4.8
+OPENCV_SITE = $(call github,itseez,opencv,$(OPENCV_VERSION))
 OPENCV_INSTALL_STAGING = YES
 
 OPENCV_CONF_OPT += \
@@ -140,7 +139,7 @@ OPENCV_CONF_OPT += -DWITH_PNG=OFF
 endif
 
 ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT),y)
-OPENCV_CONF_OPT += -DWITH_QT=ON
+OPENCV_CONF_OPT += -DWITH_QT=4
 OPENCV_DEPENDENCIES += qt
 else
 OPENCV_CONF_OPT += -DWITH_QT=OFF
@@ -154,10 +153,10 @@ OPENCV_CONF_OPT += -DWITH_TIFF=OFF
 endif
 
 ifeq ($(BR2_PACKAGE_OPENCV_WITH_V4L),y)
-OPENCV_CONF_OPT += -DWITH_V4L=ON
+OPENCV_CONF_OPT += -DWITH_V4L=ON -DWITH_LIBV4L=ON
 OPENCV_DEPENDENCIES += libv4l
 else
-OPENCV_CONF_OPT += -DWITH_V4L=OFF
+OPENCV_CONF_OPT += -DWITH_V4L=OFF -DWITH_LIBV4L=OFF
 endif
 
 # Installation hooks:
Signature · 6 lines
1.9.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#22 lore raw

PATCH v2 8/24 opencv: add license details

In reply to Samuel Martin

---
changes v1 -> v2:
- new patch (splitting suggested by Yann)

---
 package/opencv/opencv.mk | 2 ++
 1 file changed, 2 insertions(+)
package/opencv/opencv.mk +2 -0
index 10f11cf..a4d2ee0 100644
@@ -7,6 +7,8 @@
 OPENCV_VERSION = 2.4.8
 OPENCV_SITE = $(call github,itseez,opencv,$(OPENCV_VERSION))
 OPENCV_INSTALL_STAGING = YES
+OPENCV_LICENSE = BSD-3c
+OPENCV_LICENSE_FILES = doc/license.txt
 
 OPENCV_CONF_OPT += \
 	-DCMAKE_BUILD_TYPE=$(if $(BR2_ENABLE_DEBUG),Debug,Release)   \
Signature · 1 line
1.9.2
#23 lore raw

PATCH v2 8/24 opencv: add license details

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:

Quoted 1 line

Regards,
Yann E. MORIN.

Quoted 27 lines

---
changes v1 -> v2:
- new patch (splitting suggested by Yann)

---
 package/opencv/opencv.mk | 2 ++
 1 file changed, 2 insertions(+)
package/opencv/opencv.mk +2 -0
index 10f11cf..a4d2ee0 100644
@@ -7,6 +7,8 @@
 OPENCV_VERSION = 2.4.8
 OPENCV_SITE = $(call github,itseez,opencv,$(OPENCV_VERSION))
 OPENCV_INSTALL_STAGING = YES
+OPENCV_LICENSE = BSD-3c
+OPENCV_LICENSE_FILES = doc/license.txt
 
 OPENCV_CONF_OPT += \
 	-DCMAKE_BUILD_TYPE=$(if $(BR2_ENABLE_DEBUG),Debug,Release)   \
Signature · 6 lines
1.9.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#24 lore raw

PATCH v2 9/24 opencv: sort and reorder CMake configuration flags

In reply to Samuel Martin

To make easier future package update.

---
changes v1 -> v2:
- new patch (split suggested by Yann)

---
 package/opencv/opencv.mk | 39 +++++++++++++++++++++++++--------------
 1 file changed, 25 insertions(+), 14 deletions(-)
package/opencv/opencv.mk +25 -14
index a4d2ee0..ae89577 100644
@@ -10,25 +10,36 @@ OPENCV_INSTALL_STAGING = YES
 OPENCV_LICENSE = BSD-3c
 OPENCV_LICENSE_FILES = doc/license.txt
 
+# OpenCV component options
 OPENCV_CONF_OPT += \
 	-DCMAKE_BUILD_TYPE=$(if $(BR2_ENABLE_DEBUG),Debug,Release)   \
-	-DBUILD_WITH_STATIC_CRT=OFF                                  \
-	-DBUILD_DOCS=OFF                                             \
-	-DBUILD_EXAMPLES=OFF                                         \
-	-DBUILD_PACKAGE=OFF                                          \
-	-DBUILD_TESTS=$(if $(BR2_PACKAGE_OPENCV_BUILD_TESTS),ON,OFF) \
+	-DBUILD_WITH_DEBUG_INFO=OFF \
+	-DBUILD_DOCS=OFF            \
+	-DBUILD_EXAMPLES=OFF        \
 	-DBUILD_PERF_TESTS=$(if $(BR2_PACKAGE_OPENCV_BUILD_PERF_TESTS),ON,OFF) \
-	-DBUILD_WITH_DEBUG_INFO=OFF             \
+	-DBUILD_TESTS=$(if $(BR2_PACKAGE_OPENCV_BUILD_TESTS),ON,OFF)
+
+# OpenCV build options
+OPENCV_CONF_OPT += \
+	-DBUILD_WITH_STATIC_CRT=OFF      \
+	-DENABLE_FAST_MATH=ON            \
+	-DENABLE_NOISY_WARNINGS=OFF      \
+	-DENABLE_OMIT_FRAME_POINTER=ON   \
+	-DENABLE_PRECOMPILED_HEADERS=OFF \
+	-DENABLE_PROFILING=OFF           \
+	-DOPENCV_CAN_BREAK_BINARY_COMPATIBILITY=ON
+
+# OpenCV link options
+OPENCV_CONF_OPT += \
 	-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=OFF \
 	-DCMAKE_SKIP_RPATH=OFF                  \
-	-DCMAKE_USE_RELATIVE_PATHS=OFF          \
-	-DENABLE_FAST_MATH=ON                   \
-	-DENABLE_NOISY_WARNINGS=OFF             \
-	-DENABLE_OMIT_FRAME_POINTER=ON          \
-	-DENABLE_PRECOMPILED_HEADERS=OFF        \
-	-DENABLE_PROFILING=OFF                  \
-	-DENABLE_SOLUTION_FOLDERS=OFF           \
-	-DOPENCV_CAN_BREAK_BINARY_COMPATIBILITY=ON
+	-DCMAKE_USE_RELATIVE_PATHS=OFF
+
+# OpenCV packaging options:
+OPENCV_CONF_OPT += \
+	-DBUILD_PACKAGE=OFF           \
+	-DENABLE_SOLUTION_FOLDERS=OFF \
+	-DINSTALL_CREATE_DISTRIB=OFF
 
 # OpenCV module selection
 OPENCV_CONF_OPT += \
Signature · 1 line
1.9.2
#25 lore raw

PATCH v2 9/24 opencv: sort and reorder CMake configuration flags

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:

Quoted 53 lines

To make easier future package update.

---
changes v1 -> v2:
- new patch (split suggested by Yann)

---
 package/opencv/opencv.mk | 39 +++++++++++++++++++++++++--------------
 1 file changed, 25 insertions(+), 14 deletions(-)
package/opencv/opencv.mk +18 -11
index a4d2ee0..ae89577 100644
@@ -10,25 +10,36 @@ OPENCV_INSTALL_STAGING = YES
 OPENCV_LICENSE = BSD-3c
 OPENCV_LICENSE_FILES = doc/license.txt
 
+# OpenCV component options
 OPENCV_CONF_OPT += \
 	-DCMAKE_BUILD_TYPE=$(if $(BR2_ENABLE_DEBUG),Debug,Release)   \
-	-DBUILD_WITH_STATIC_CRT=OFF                                  \
-	-DBUILD_DOCS=OFF                                             \
-	-DBUILD_EXAMPLES=OFF                                         \
-	-DBUILD_PACKAGE=OFF                                          \
-	-DBUILD_TESTS=$(if $(BR2_PACKAGE_OPENCV_BUILD_TESTS),ON,OFF) \
+	-DBUILD_WITH_DEBUG_INFO=OFF \
+	-DBUILD_DOCS=OFF            \
+	-DBUILD_EXAMPLES=OFF        \
 	-DBUILD_PERF_TESTS=$(if $(BR2_PACKAGE_OPENCV_BUILD_PERF_TESTS),ON,OFF) \
-	-DBUILD_WITH_DEBUG_INFO=OFF             \
+	-DBUILD_TESTS=$(if $(BR2_PACKAGE_OPENCV_BUILD_TESTS),ON,OFF)
+
+# OpenCV build options
+OPENCV_CONF_OPT += \
+	-DBUILD_WITH_STATIC_CRT=OFF      \
+	-DENABLE_FAST_MATH=ON            \
+	-DENABLE_NOISY_WARNINGS=OFF      \
+	-DENABLE_OMIT_FRAME_POINTER=ON   \
+	-DENABLE_PRECOMPILED_HEADERS=OFF \
+	-DENABLE_PROFILING=OFF           \
+	-DOPENCV_CAN_BREAK_BINARY_COMPATIBILITY=ON
+
+# OpenCV link options
+OPENCV_CONF_OPT += \
 	-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=OFF \
 	-DCMAKE_SKIP_RPATH=OFF                  \
-	-DCMAKE_USE_RELATIVE_PATHS=OFF          \
-	-DENABLE_FAST_MATH=ON                   \
-	-DENABLE_NOISY_WARNINGS=OFF             \
-	-DENABLE_OMIT_FRAME_POINTER=ON          \
-	-DENABLE_PRECOMPILED_HEADERS=OFF        \

package/opencv/opencv.mk OPENCV_INSTALL_STAGING = YES · line 42

Quoted 10 lines
package/opencv/opencv.mk +7 -3
-	-DENABLE_PROFILING=OFF                  \
-	-DENABLE_SOLUTION_FOLDERS=OFF           \
-	-DOPENCV_CAN_BREAK_BINARY_COMPATIBILITY=ON
+	-DCMAKE_USE_RELATIVE_PATHS=OFF
+
+# OpenCV packaging options:
+OPENCV_CONF_OPT += \
+	-DBUILD_PACKAGE=OFF           \
+	-DENABLE_SOLUTION_FOLDERS=OFF \
+	-DINSTALL_CREATE_DISTRIB=OFF

That last one is a new one; the patch is thus not strictly about re-ordering.

Is it a left-over from a previous iteration? Can it rather be done in a separate patch?

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#26 lore raw

PATCH v2 10/24 opencv: sort and reorder HW support options

In reply to Samuel Martin

Sort per HW features and disable their support when it is not suppported by Buildroot.

---
changes v1 -> v2:
- new patch (split suggested by Yann)

---
 package/opencv/opencv.mk | 37 ++++++++++++++++++++++++++++++-------
 1 file changed, 30 insertions(+), 7 deletions(-)
package/opencv/opencv.mk +30 -7
index ae89577..046b847 100644
@@ -47,6 +47,7 @@ OPENCV_CONF_OPT += \
 	-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)           \
@@ -77,6 +78,35 @@ OPENCV_CONF_OPT += \
 	-DENABLE_SSSE3=$(if $(BR2_X86_CPU_HAS_SSSE3),ON,OFF)
 
 # Software/3rd-party support options.
+# Cuda stuff
+OPENCV_CONF_OPT += \
+	-DWITH_CUBLAS=OFF \
+	-DWITH_CUDA=OFF   \
+	-DWITH_CUFFT=OFF
+
+# NVidia stuff
+OPENCV_CONF_OPT += -DWITH_NVCUVID=OFF
+
+# AMD stuff
+OPENCV_CONF_OPT += \
+	-DWITH_OPENCLAMDFFT=OFF \
+	-DWITH_OPENCLAMDBLAS=OFF
+
+# Intel stuff
+OPENCV_CONF_OPT += \
+	-DWITH_INTELPERC=OFF \
+	-DWITH_IPP=OFF       \
+	-DWITH_TBB=OFF
+
+# Smartek stuff
+OPENCV_CONF_OPT += -DWITH_GIGEAPI=OFF
+
+# Prosilica stuff
+OPENCV_CONF_OPT += -DWITH_PVAPI=OFF
+
+# Ximea stuff
+OPENCV_CONF_OPT += -DWITH_XIMEA=OFF
+
 OPENCV_CONF_OPT += \
 	-DBUILD_JASPER=OFF \
 	-DBUILD_JPEG=OFF   \
@@ -96,22 +126,15 @@ OPENCV_CONF_OPT += \
 	-DWITH_ANDROID_CAMERA=OFF \
 	-DWITH_AVFOUNDATION=OFF	  \
 	-DWITH_CARBON=OFF         \
-	-DWITH_CUBLAS=OFF         \
-	-DWITH_CUDA=OFF           \
-	-DWITH_CUFFT=OFF          \
 	-DWITH_EIGEN=OFF          \
 	-DWITH_IMAGEIO=OFF        \
-	-DWITH_IPP=OFF            \
 	-DWITH_JASPER=OFF         \
 	-DWITH_OPENEXR=OFF        \
 	-DWITH_OPENGL=OFF         \
 	-DWITH_OPENNI=OFF         \
-	-DWITH_PVAPI=OFF          \
 	-DWITH_QUICKTIME=OFF      \
-	-DWITH_TBB=OFF            \
 	-DWITH_UNICAP=OFF         \
 	-DWITH_VIDEOINPUT=OFF     \
-	-DWITH_XIMEA=OFF          \
 	-DWITH_XINE=OFF
 
 OPENCV_DEPENDENCIES += zlib
Signature · 1 line
1.9.2
#27 lore raw

PATCH v2 10/24 opencv: sort and reorder HW support options

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:

Quoted 2 lines

Sort per HW features and disable their support when it is not suppported by Buildroot.

Strictly speaking, you are also adding some more config options. But it seems they are needed to properly work. Say so in the commit log.

An alternate solution would have been to really do only the re-ordering in those patches, and add a single new patch to add the missing bits?

Quoted 1 line

Add a bit more to the commit log, then:
--> Reviewed-by: "Yann E. MORIN" <[email protected]>

(I wonder if Patchwork is smart enough to not catch this?)

Regards,
Yann E. MORIN.

Quoted 85 lines

---
changes v1 -> v2:
- new patch (split suggested by Yann)

---
 package/opencv/opencv.mk | 37 ++++++++++++++++++++++++++++++-------
 1 file changed, 30 insertions(+), 7 deletions(-)
package/opencv/opencv.mk +30 -7
index ae89577..046b847 100644
@@ -47,6 +47,7 @@ OPENCV_CONF_OPT += \
 	-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)           \
@@ -77,6 +78,35 @@ OPENCV_CONF_OPT += \
 	-DENABLE_SSSE3=$(if $(BR2_X86_CPU_HAS_SSSE3),ON,OFF)
 
 # Software/3rd-party support options.
+# Cuda stuff
+OPENCV_CONF_OPT += \
+	-DWITH_CUBLAS=OFF \
+	-DWITH_CUDA=OFF   \
+	-DWITH_CUFFT=OFF
+
+# NVidia stuff
+OPENCV_CONF_OPT += -DWITH_NVCUVID=OFF
+
+# AMD stuff
+OPENCV_CONF_OPT += \
+	-DWITH_OPENCLAMDFFT=OFF \
+	-DWITH_OPENCLAMDBLAS=OFF
+
+# Intel stuff
+OPENCV_CONF_OPT += \
+	-DWITH_INTELPERC=OFF \
+	-DWITH_IPP=OFF       \
+	-DWITH_TBB=OFF
+
+# Smartek stuff
+OPENCV_CONF_OPT += -DWITH_GIGEAPI=OFF
+
+# Prosilica stuff
+OPENCV_CONF_OPT += -DWITH_PVAPI=OFF
+
+# Ximea stuff
+OPENCV_CONF_OPT += -DWITH_XIMEA=OFF
+
 OPENCV_CONF_OPT += \
 	-DBUILD_JASPER=OFF \
 	-DBUILD_JPEG=OFF   \
@@ -96,22 +126,15 @@ OPENCV_CONF_OPT += \
 	-DWITH_ANDROID_CAMERA=OFF \
 	-DWITH_AVFOUNDATION=OFF	  \
 	-DWITH_CARBON=OFF         \
-	-DWITH_CUBLAS=OFF         \
-	-DWITH_CUDA=OFF           \
-	-DWITH_CUFFT=OFF          \
 	-DWITH_EIGEN=OFF          \
 	-DWITH_IMAGEIO=OFF        \
-	-DWITH_IPP=OFF            \
 	-DWITH_JASPER=OFF         \
 	-DWITH_OPENEXR=OFF        \
 	-DWITH_OPENGL=OFF         \
 	-DWITH_OPENNI=OFF         \
-	-DWITH_PVAPI=OFF          \
 	-DWITH_QUICKTIME=OFF      \
-	-DWITH_TBB=OFF            \
 	-DWITH_UNICAP=OFF         \
 	-DWITH_VIDEOINPUT=OFF     \
-	-DWITH_XIMEA=OFF          \
 	-DWITH_XINE=OFF
 
 OPENCV_DEPENDENCIES += zlib
Signature · 6 lines
1.9.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#28 lore raw

PATCH v2 11/24 opencv: sort and reorder SW support options

In reply to Samuel Martin

Sort SW features by category and disable them when not supported by Buildroot.

---
changes v1 -> v2:
- new patch (split suggested by Yann)

---
 package/opencv/opencv.mk | 62 +++++++++++++++++++++++++++++++-----------------
 1 file changed, 40 insertions(+), 22 deletions(-)
package/opencv/opencv.mk +40 -22
index 046b847..264507c 100644
@@ -77,7 +77,6 @@ OPENCV_CONF_OPT += \
 	-DENABLE_SSE3=$(if $(BR2_X86_CPU_HAS_SSE3),ON,OFF)   \
 	-DENABLE_SSSE3=$(if $(BR2_X86_CPU_HAS_SSSE3),ON,OFF)
 
-# Software/3rd-party support options.
 # Cuda stuff
 OPENCV_CONF_OPT += \
 	-DWITH_CUBLAS=OFF \
@@ -107,34 +106,53 @@ OPENCV_CONF_OPT += -DWITH_PVAPI=OFF
 # Ximea stuff
 OPENCV_CONF_OPT += -DWITH_XIMEA=OFF
 
+# Non-Linux support (Android options) must remain OFF:
 OPENCV_CONF_OPT += \
-	-DBUILD_JASPER=OFF \
-	-DBUILD_JPEG=OFF   \
-	-DBUILD_PNG=OFF	   \
-	-DBUILD_TIFF=OFF   \
-	-DBUILD_ZLIB=OFF   \
+	-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
+
+# Non-Linux support (Mac OSX options) must remain OFF:
+OPENCV_CONF_OPT += \
+	-DWITH_AVFOUNDATION=OFF	\
+	-DWITH_CARBON=OFF       \
+	-DWITH_QUICKTIME=OFF
+
+# Non-Linux support (Windows options) must remain OFF:
+OPENCV_CONF_OPT += \
+	-DWITH_VFW=OFF      \
+	-DWITH_WIN32UI=OFF  \
+	-DWITH_CSTRIPES=OFF \
+	-DWITH_DSHOW=OFF    \
+	-DWITH_MSMF=OFF     \
+	-DWITH_VIDEOINPUT=OFF
+
+# Software/3rd-party support options.
+OPENCV_CONF_OPT += \
+	-DBUILD_JASPER=OFF  \
+	-DBUILD_JPEG=OFF    \
+	-DBUILD_OPENEXR=OFF \
+	-DBUILD_PNG=OFF	    \
+	-DBUILD_TIFF=OFF    \
+	-DBUILD_ZLIB=OFF    \
 	-DBUILD_NEW_PYTHON_SUPPORT=OFF \
-	-DINSTALL_ANDROID_EXAMPLES=OFF \
 	-DINSTALL_C_EXAMPLES=OFF       \
 	-DINSTALL_PYTHON_EXAMPLES=OFF  \
-	-DINSTALL_TO_MANGLED_PATHS=OFF \
-	-DWITH_1394=OFF           \
-	-DWITH_ANDROID_CAMERA=OFF \
-	-DWITH_AVFOUNDATION=OFF	  \
-	-DWITH_CARBON=OFF         \
-	-DWITH_EIGEN=OFF          \
-	-DWITH_IMAGEIO=OFF        \
-	-DWITH_JASPER=OFF         \
-	-DWITH_OPENEXR=OFF        \
-	-DWITH_OPENGL=OFF         \
-	-DWITH_OPENNI=OFF         \
-	-DWITH_QUICKTIME=OFF      \
-	-DWITH_UNICAP=OFF         \
-	-DWITH_VIDEOINPUT=OFF     \
+	-DINSTALL_TO_MANGLED_PATHS=OFF
+
+# Disabled features (mostly because they are not available in Buildroot), but
+# - eigen: OpenCV does not use it, not take any benefit from it.
+OPENCV_CONF_OPT += \
+	-DWITH_1394=OFF    \
+	-DWITH_EIGEN=OFF   \
+	-DWITH_IMAGEIO=OFF \
+	-DWITH_OPENEXR=OFF \
+	-DWITH_OPENGL=OFF  \
+	-DWITH_OPENNI=OFF  \
+	-DWITH_UNICAP=OFF  \
 	-DWITH_XINE=OFF
 
 OPENCV_DEPENDENCIES += zlib
Signature · 1 line
1.9.2
#29 lore raw

PATCH v2 11/24 opencv: sort and reorder SW support options

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:

Quoted 2 lines

Sort SW features by category and disable them when not supported by Buildroot.

... and add a few missing ones.

Quoted 1 line

With the commit log ammended:
--> Reviewed-by: "Yann E. MORIN" <[email protected]>

Regards,
Yann E. MORIN.

Quoted 101 lines

---
changes v1 -> v2:
- new patch (split suggested by Yann)

---
 package/opencv/opencv.mk | 62 +++++++++++++++++++++++++++++++-----------------
 1 file changed, 40 insertions(+), 22 deletions(-)
package/opencv/opencv.mk +40 -22
index 046b847..264507c 100644
@@ -77,7 +77,6 @@ OPENCV_CONF_OPT += \
 	-DENABLE_SSE3=$(if $(BR2_X86_CPU_HAS_SSE3),ON,OFF)   \
 	-DENABLE_SSSE3=$(if $(BR2_X86_CPU_HAS_SSSE3),ON,OFF)
 
-# Software/3rd-party support options.
 # Cuda stuff
 OPENCV_CONF_OPT += \
 	-DWITH_CUBLAS=OFF \
@@ -107,34 +106,53 @@ OPENCV_CONF_OPT += -DWITH_PVAPI=OFF
 # Ximea stuff
 OPENCV_CONF_OPT += -DWITH_XIMEA=OFF
 
+# Non-Linux support (Android options) must remain OFF:
 OPENCV_CONF_OPT += \
-	-DBUILD_JASPER=OFF \
-	-DBUILD_JPEG=OFF   \
-	-DBUILD_PNG=OFF	   \
-	-DBUILD_TIFF=OFF   \
-	-DBUILD_ZLIB=OFF   \
+	-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
+
+# Non-Linux support (Mac OSX options) must remain OFF:
+OPENCV_CONF_OPT += \
+	-DWITH_AVFOUNDATION=OFF	\
+	-DWITH_CARBON=OFF       \
+	-DWITH_QUICKTIME=OFF
+
+# Non-Linux support (Windows options) must remain OFF:
+OPENCV_CONF_OPT += \
+	-DWITH_VFW=OFF      \
+	-DWITH_WIN32UI=OFF  \
+	-DWITH_CSTRIPES=OFF \
+	-DWITH_DSHOW=OFF    \
+	-DWITH_MSMF=OFF     \
+	-DWITH_VIDEOINPUT=OFF
+
+# Software/3rd-party support options.
+OPENCV_CONF_OPT += \
+	-DBUILD_JASPER=OFF  \
+	-DBUILD_JPEG=OFF    \
+	-DBUILD_OPENEXR=OFF \
+	-DBUILD_PNG=OFF	    \
+	-DBUILD_TIFF=OFF    \
+	-DBUILD_ZLIB=OFF    \
 	-DBUILD_NEW_PYTHON_SUPPORT=OFF \
-	-DINSTALL_ANDROID_EXAMPLES=OFF \
 	-DINSTALL_C_EXAMPLES=OFF       \
 	-DINSTALL_PYTHON_EXAMPLES=OFF  \
-	-DINSTALL_TO_MANGLED_PATHS=OFF \
-	-DWITH_1394=OFF           \
-	-DWITH_ANDROID_CAMERA=OFF \
-	-DWITH_AVFOUNDATION=OFF	  \
-	-DWITH_CARBON=OFF         \
-	-DWITH_EIGEN=OFF          \
-	-DWITH_IMAGEIO=OFF        \
-	-DWITH_JASPER=OFF         \
-	-DWITH_OPENEXR=OFF        \
-	-DWITH_OPENGL=OFF         \
-	-DWITH_OPENNI=OFF         \
-	-DWITH_QUICKTIME=OFF      \
-	-DWITH_UNICAP=OFF         \
-	-DWITH_VIDEOINPUT=OFF     \
+	-DINSTALL_TO_MANGLED_PATHS=OFF
+
+# Disabled features (mostly because they are not available in Buildroot), but
+# - eigen: OpenCV does not use it, not take any benefit from it.
+OPENCV_CONF_OPT += \
+	-DWITH_1394=OFF    \
+	-DWITH_EIGEN=OFF   \
+	-DWITH_IMAGEIO=OFF \
+	-DWITH_OPENEXR=OFF \
+	-DWITH_OPENGL=OFF  \
+	-DWITH_OPENNI=OFF  \
+	-DWITH_UNICAP=OFF  \
 	-DWITH_XINE=OFF
 
 OPENCV_DEPENDENCIES += zlib
Signature · 6 lines
1.9.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#30 lore raw

PATCH v2 12/24 opencv: add superres module knob

In reply to Samuel Martin

This new module has been introduced in opencv-2.4.8.

---
changes v1 -> v2:
- new patch (split suggested by Yann)

---
 package/opencv/Config.in | 7 +++++++
 package/opencv/opencv.mk | 1 +
 2 files changed, 8 insertions(+)
package/opencv/Config.in +7 -0
index 2c6200c..129e0aa 100644
@@ -92,6 +92,13 @@ config BR2_PACKAGE_OPENCV_LIB_STITCHING
 	help
 	  Include opencv_stitching module into the OpenCV build.
 
+config BR2_PACKAGE_OPENCV_LIB_SUPERRES
+	bool "superres"
+	default y
+	help
+	  Include opencv_superres "super resolution" - module into the OpenCV
+	  build.
+
 config BR2_PACKAGE_OPENCV_LIB_TS
 	bool "ts (touchscreen)"
 	default y
package/opencv/opencv.mk +1 -0
index 264507c..f129dc3 100644
@@ -61,6 +61,7 @@ OPENCV_CONF_OPT += \
 	-DBUILD_opencv_photo=$(if $(BR2_PACKAGE_OPENCV_LIB_PHOTO),ON,OFF)       \
 	-DBUILD_opencv_python=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_videostab=$(if $(BR2_PACKAGE_OPENCV_LIB_VIDEOSTAB),ON,OFF) \
Signature · 1 line
1.9.2
#31 lore raw

PATCH v2 12/24 opencv: add superres module knob

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:

Quoted 17 lines

This new module has been introduced in opencv-2.4.8.

---
changes v1 -> v2:
- new patch (split suggested by Yann)

---
 package/opencv/Config.in | 7 +++++++
 package/opencv/opencv.mk | 1 +
 2 files changed, 8 insertions(+)
package/opencv/Config.in +0 -0
index 2c6200c..129e0aa 100644

package/opencv/Config.in config BR2_PACKAGE_OPENCV_LIB_STITCHING · line 97

Quoted 6 lines
package/opencv/Config.in +3 -0
@@ -92,6 +92,13 @@ config BR2_PACKAGE_OPENCV_LIB_STITCHING
 	help
 	  Include opencv_stitching module into the OpenCV build.
 
+config BR2_PACKAGE_OPENCV_LIB_SUPERRES
+	bool "superres"
+	default y

We usually do not set options to 'default y', unless there is a very stromg reason to do so.

With that 'default y' removed, or an explication why:
--> Reviewed-by: "Yann E. MORIN" <[email protected]>

Regards,
Yann E. MORIN.

Quoted 26 lines
package/opencv/Config.in +4 -0
+	help
+	  Include opencv_superres "super resolution" - module into the OpenCV
+	  build.
+
 config BR2_PACKAGE_OPENCV_LIB_TS
 	bool "ts (touchscreen)"
 	default y
package/opencv/opencv.mk +1 -0
index 264507c..f129dc3 100644
@@ -61,6 +61,7 @@ OPENCV_CONF_OPT += \
 	-DBUILD_opencv_photo=$(if $(BR2_PACKAGE_OPENCV_LIB_PHOTO),ON,OFF)       \
 	-DBUILD_opencv_python=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_videostab=$(if $(BR2_PACKAGE_OPENCV_LIB_VIDEOSTAB),ON,OFF) \
Signature · 6 lines
1.9.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#32 lore raw

PATCH v2 13/24 opencv: disable apps module

In reply to Samuel Martin

This module is used to build programs for training classifiers.

---
changes v1 -> v2:
- new patch (split suggested by Yann)

---
 package/opencv/opencv.mk | 1 +
 1 file changed, 1 insertion(+)
package/opencv/opencv.mk +1 -0
index f129dc3..b87eddc 100644
@@ -44,6 +44,7 @@ OPENCV_CONF_OPT += \
 # OpenCV module selection
 OPENCV_CONF_OPT += \
 	-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                                                  \
Signature · 1 line
1.9.2
#33 lore raw

PATCH v2 13/24 opencv: disable apps module

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:

Quoted 3 lines

This module is used to build programs for training classifiers.

Regards,
Yann E. MORIN.

Quoted 26 lines

---
changes v1 -> v2:
- new patch (split suggested by Yann)

---
 package/opencv/opencv.mk | 1 +
 1 file changed, 1 insertion(+)
package/opencv/opencv.mk +1 -0
index f129dc3..b87eddc 100644
@@ -44,6 +44,7 @@ OPENCV_CONF_OPT += \
 # OpenCV module selection
 OPENCV_CONF_OPT += \
 	-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                                                  \
Signature · 6 lines
1.9.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#34 lore raw

PATCH v2 14/24 opencv: disable opencl support/module

In reply to Samuel Martin

---
changes v1 -> v2:
- new patch (split suggested by Yann)

---
 package/opencv/opencv.mk | 2 ++
 1 file changed, 2 insertions(+)
package/opencv/opencv.mk +2 -0
index b87eddc..a4bdd39 100644
@@ -59,6 +59,7 @@ OPENCV_CONF_OPT += \
 	-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_stitching=$(if $(BR2_PACKAGE_OPENCV_LIB_STITCHING),ON,OFF) \
@@ -151,6 +152,7 @@ OPENCV_CONF_OPT += \
 	-DWITH_1394=OFF    \
 	-DWITH_EIGEN=OFF   \
 	-DWITH_IMAGEIO=OFF \
+	-DWITH_OPENCL=OFF  \
 	-DWITH_OPENEXR=OFF \
 	-DWITH_OPENGL=OFF  \
 	-DWITH_OPENNI=OFF  \
Signature · 1 line
1.9.2
#35 lore raw

PATCH v2 14/24 opencv: disable opencl support/module

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:

Quoted 1 line

However, I have a question, below.

Quoted 20 lines

---
changes v1 -> v2:
- new patch (split suggested by Yann)

---
 package/opencv/opencv.mk | 2 ++
 1 file changed, 2 insertions(+)
package/opencv/opencv.mk +1 -0
index b87eddc..a4bdd39 100644
@@ -59,6 +59,7 @@ OPENCV_CONF_OPT += \
 	-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_stitching=$(if $(BR2_PACKAGE_OPENCV_LIB_STITCHING),ON,OFF) \

package/opencv/opencv.mk OPENCV_CONF_OPT += \ · line 155

Quoted 4 lines
package/opencv/opencv.mk +1 -0
@@ -151,6 +152,7 @@ OPENCV_CONF_OPT += \
 	-DWITH_1394=OFF    \
 	-DWITH_EIGEN=OFF   \
 	-DWITH_IMAGEIO=OFF \
+	-DWITH_OPENCL=OFF  \

Here you have two options to disable it:
-DBUILD_opencv_ocl=OFF
-DWITH_OPENCL=OFF

But I did not see the same schema with other modules, such as the dynamic cuda, where you only have:
-DBUILD_opencv_dynamicuda=OFF

and not:
-DWITH_DYNAMIC_CUDA=OFF

You are the cmake guy, but I'd like to understand the discrepancy between the two, which when I look at the code, are defined in a similar way.

Regards,
Yann E. MORIN.

Quoted 10 lines
package/opencv/opencv.mk +0 -0
 	-DWITH_OPENEXR=OFF \
 	-DWITH_OPENGL=OFF  \
 	-DWITH_OPENNI=OFF  \
Signature · 6 lines
1.9.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#36 lore raw

PATCH v2 15/24 opencv: disable OpenMP support

In reply to Samuel Martin

Since there is currently no easy way to know if the current Buildroot configuration has a toolchain supporting OpenMP (especially for external toolchains), then just disable it.

---
changes v1 -> v2:
- new patch (split suggested by Yann)

---
 package/opencv/opencv.mk | 1 +
 1 file changed, 1 insertion(+)
package/opencv/opencv.mk +1 -0
index a4bdd39..eed5338 100644
@@ -155,6 +155,7 @@ OPENCV_CONF_OPT += \
 	-DWITH_OPENCL=OFF  \
 	-DWITH_OPENEXR=OFF \
 	-DWITH_OPENGL=OFF  \
+	-DWITH_OPENMP=OFF  \
 	-DWITH_OPENNI=OFF  \
 	-DWITH_UNICAP=OFF  \
 	-DWITH_XINE=OFF
Signature · 1 line
1.9.2
#37 lore raw

PATCH v2 15/24 opencv: disable OpenMP support

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:

Quoted 5 lines

Since there is currently no easy way to know if the current Buildroot configuration has a toolchain supporting OpenMP (especially for external toolchains), then just disable it.

A solution to that would be to add a config knob to enable/disable building openmp for the internal toolchain, and to state whether the external toolchain has/lacks openmp.

Regards,
Yann E. MORIN.

Quoted 26 lines

---
changes v1 -> v2:
- new patch (split suggested by Yann)

---
 package/opencv/opencv.mk | 1 +
 1 file changed, 1 insertion(+)
package/opencv/opencv.mk +1 -0
index a4bdd39..eed5338 100644
@@ -155,6 +155,7 @@ OPENCV_CONF_OPT += \
 	-DWITH_OPENCL=OFF  \
 	-DWITH_OPENEXR=OFF \
 	-DWITH_OPENGL=OFF  \
+	-DWITH_OPENMP=OFF  \
 	-DWITH_OPENNI=OFF  \
 	-DWITH_UNICAP=OFF  \
 	-DWITH_XINE=OFF
Signature · 6 lines
1.9.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#38 lore raw

PATCH v2 16/24 opencv: enable SSE4.1 SSE4.2 support when available

In reply to Samuel Martin

---
changes v1 -> v2:
- new patch (split suggested by Yann)

---
 package/opencv/opencv.mk | 2 ++
 1 file changed, 2 insertions(+)
package/opencv/opencv.mk +2 -0
index eed5338..14a095c 100644
@@ -78,6 +78,8 @@ OPENCV_CONF_OPT += \
 	-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_SSSE3=$(if $(BR2_X86_CPU_HAS_SSSE3),ON,OFF)
 
 # Cuda stuff
Signature · 1 line
1.9.2
#39 lore raw

PATCH v2 16/24 opencv: enable SSE4.1 SSE4.2 support when available

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:

Quoted 1 line

Regards,
Yann E. MORIN.

Quoted 27 lines

---
changes v1 -> v2:
- new patch (split suggested by Yann)

---
 package/opencv/opencv.mk | 2 ++
 1 file changed, 2 insertions(+)
package/opencv/opencv.mk +2 -0
index eed5338..14a095c 100644
@@ -78,6 +78,8 @@ OPENCV_CONF_OPT += \
 	-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_SSSE3=$(if $(BR2_X86_CPU_HAS_SSSE3),ON,OFF)
 
 # Cuda stuff
Signature · 6 lines
1.9.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#40 lore raw

PATCH v2 17/24 opencv: rework V4L/libv4l support

In reply to Samuel Martin

Starting with the 2.4.7 release, for V4L support, OpenCV does not requires a libv4l dependency for its V4L support.

So, it now provides 2 distincts knobs for this: WITH_V4L and a new
one: WITH_LIBV4L.

This patch takes advantage of this new knob and libv4l support is now automatically enabled if only the libv4l package is enabled.

In OpenCV, the logic behind this is:
- using libv4l if available,
- otherwise, use v4l2 or v4l API from the kernel if available.

---
changes v1 -> v2:
- rebase
- extend commit message

---
 package/opencv/Config.in | 11 ++++++-----
 package/opencv/opencv.mk | 10 +++++++---
 2 files changed, 13 insertions(+), 8 deletions(-)
package/opencv/Config.in +6 -5
index 129e0aa..0db239e 100644
@@ -194,14 +194,15 @@ config BR2_PACKAGE_OPENCV_WITH_TIFF
 
 config BR2_PACKAGE_OPENCV_WITH_V4L
 	bool "v4l support"
-	depends on BR2_LARGEFILE
-	depends on BR2_TOOLCHAIN_HAS_THREADS
-	select BR2_PACKAGE_LIBV4L
 	help
 	  Enable Video 4 Linux support.
 
-comment "v4l support needs a toolchain w/ largefile, threads"
-	depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS
+	  If the package libv4l is enabled, its support is automatically enabled.
+
+if BR2_PACKAGE_OPENCV_WITH_V4L && !(BR2_LARGEFILE && BR2_TOOLCHAIN_HAS_THREADS)
+comment "libv4l support will be disabled."
+comment "libv4l support needs a toolchain w/ largefile, threads"
+endif
 
 comment "Install options"
 
package/opencv/opencv.mk +7 -3
index 14a095c..e6de252 100644
@@ -214,10 +214,14 @@ OPENCV_CONF_OPT += -DWITH_TIFF=OFF
 endif
 
 ifeq ($(BR2_PACKAGE_OPENCV_WITH_V4L),y)
-OPENCV_CONF_OPT += -DWITH_V4L=ON -DWITH_LIBV4L=ON
-OPENCV_DEPENDENCIES += libv4l
+OPENCV_CONF_OPT += \
+	-DWITH_V4L=ON \
+	-DWITH_LIBV4L=$(if $(BR2_PACKAGE_LIBV4L),ON,OFF)
+OPENCV_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBV4L),libv4l)
 else
-OPENCV_CONF_OPT += -DWITH_V4L=OFF -DWITH_LIBV4L=OFF
+OPENCV_CONF_OPT += \
+	-DWITH_V4L=OFF \
+	-DWITH_LIBV4L=OFF
 endif
 
 # Installation hooks:
Signature · 1 line
1.9.2
#41 lore raw

PATCH v2 17/24 opencv: rework V4L/libv4l support

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:

Quoted 36 lines

Starting with the 2.4.7 release, for V4L support, OpenCV does not requires a libv4l dependency for its V4L support.

So, it now provides 2 distincts knobs for this: WITH_V4L and a new
one: WITH_LIBV4L.

This patch takes advantage of this new knob and libv4l support is now automatically enabled if only the libv4l package is enabled.

In OpenCV, the logic behind this is:
- using libv4l if available,
- otherwise, use v4l2 or v4l API from the kernel if available.

---
changes v1 -> v2:
- rebase
- extend commit message

---
 package/opencv/Config.in | 11 ++++++-----
 package/opencv/opencv.mk | 10 +++++++---
 2 files changed, 13 insertions(+), 8 deletions(-)
package/opencv/Config.in +0 -3
index 129e0aa..0db239e 100644
@@ -194,14 +194,15 @@ config BR2_PACKAGE_OPENCV_WITH_TIFF
 
 config BR2_PACKAGE_OPENCV_WITH_V4L
 	bool "v4l support"
-	depends on BR2_LARGEFILE
-	depends on BR2_TOOLCHAIN_HAS_THREADS
-	select BR2_PACKAGE_LIBV4L
 	help

package/opencv/Config.in config BR2_PACKAGE_OPENCV_WITH_TIFF · line 205

Quoted 10 lines
package/opencv/Config.in +6 -2
 	  Enable Video 4 Linux support.
 
-comment "v4l support needs a toolchain w/ largefile, threads"
-	depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS
+	  If the package libv4l is enabled, its support is automatically enabled.
+
+if BR2_PACKAGE_OPENCV_WITH_V4L && !(BR2_LARGEFILE && BR2_TOOLCHAIN_HAS_THREADS)
+comment "libv4l support will be disabled."
+comment "libv4l support needs a toolchain w/ largefile, threads"
+endif

I don't think we want to have such comments. As I said in my previous review, it is enough (INHO) to just state so in the help entry.

Except under rare circumstances, we do not warn the user that way. The usual way is to enable support if the needed package is selected, and to disable the support otherwise.

Regards,
Yann E. MORIN.

Quoted 31 lines
package/opencv/Config.in +0 -0
 comment "Install options"
 
package/opencv/opencv.mk +7 -3
index 14a095c..e6de252 100644
@@ -214,10 +214,14 @@ OPENCV_CONF_OPT += -DWITH_TIFF=OFF
 endif
 
 ifeq ($(BR2_PACKAGE_OPENCV_WITH_V4L),y)
-OPENCV_CONF_OPT += -DWITH_V4L=ON -DWITH_LIBV4L=ON
-OPENCV_DEPENDENCIES += libv4l
+OPENCV_CONF_OPT += \
+	-DWITH_V4L=ON \
+	-DWITH_LIBV4L=$(if $(BR2_PACKAGE_LIBV4L),ON,OFF)
+OPENCV_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBV4L),libv4l)
 else
-OPENCV_CONF_OPT += -DWITH_V4L=OFF -DWITH_LIBV4L=OFF
+OPENCV_CONF_OPT += \
+	-DWITH_V4L=OFF \
+	-DWITH_LIBV4L=OFF
 endif
 
 # Installation hooks:
Signature · 6 lines
1.9.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#42 lore raw

PATCH v2 18/24 opencv: add jasper support

In reply to Samuel Martin

---
changes v1 -> v2:
- reword the option help text (Yann)

---
 package/opencv/Config.in | 7 +++++++
 package/opencv/opencv.mk | 7 +++++++
 2 files changed, 14 insertions(+)
package/opencv/Config.in +7 -0
index 0db239e..2f47869 100644
@@ -161,6 +161,13 @@ config BR2_PACKAGE_OPENCV_WITH_GTK
 	depends on BR2_USE_MMU # libgtk2 -> glib2
 	select BR2_PACKAGE_LIBGTK2
 
+config BR2_PACKAGE_OPENCV_WITH_JASPER
+	bool "jpeg2000 support"
+	select BR2_PACKAGE_JASPER
+	help
+	  Use shared libjasper from the target system to provide support
+	  for jpeg2000.
+
 config BR2_PACKAGE_OPENCV_WITH_JPEG
 	bool "jpeg support"
 	select BR2_PACKAGE_JPEG
package/opencv/opencv.mk +7 -0
index e6de252..c4aa967 100644
@@ -185,6 +185,13 @@ else
 OPENCV_CONF_OPT += -DWITH_GTK=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_JASPER),y)
+OPENCV_CONF_OPT += -DWITH_JASPER=ON
+OPENCV_DEPENDENCIES += jasper
+else
+OPENCV_CONF_OPT += -DWITH_JASPER=OFF
+endif
+
 ifeq ($(BR2_PACKAGE_OPENCV_WITH_JPEG),y)
 OPENCV_CONF_OPT += -DWITH_JPEG=ON
 OPENCV_DEPENDENCIES += jpeg
Signature · 1 line
1.9.2
#43 lore raw

PATCH v2 18/24 opencv: add jasper support

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:

Quoted 15 lines

---
changes v1 -> v2:
- reword the option help text (Yann)

---
 package/opencv/Config.in | 7 +++++++
 package/opencv/opencv.mk | 7 +++++++
 2 files changed, 14 insertions(+)
package/opencv/Config.in +0 -0
index 0db239e..2f47869 100644

package/opencv/Config.in config BR2_PACKAGE_OPENCV_WITH_GTK · line 169

Quoted 9 lines
package/opencv/Config.in +6 -0
@@ -161,6 +161,13 @@ config BR2_PACKAGE_OPENCV_WITH_GTK
 	depends on BR2_USE_MMU # libgtk2 -> glib2
 	select BR2_PACKAGE_LIBGTK2
 
+config BR2_PACKAGE_OPENCV_WITH_JASPER
+	bool "jpeg2000 support"
+	select BR2_PACKAGE_JASPER
+	help
+	  Use shared libjasper from the target system to provide support
+	  for jpeg2000.

This is still a bit unclear. What about:

help
Enable jpeg2000 support.

Note: this does not use the libjasper bundled with opencv, but uses the libjasper package installed system-wide by Buildroot.

Regards,
Yann E. MORIN.

Quoted 28 lines
package/opencv/Config.in +0 -0
 config BR2_PACKAGE_OPENCV_WITH_JPEG
 	bool "jpeg support"
 	select BR2_PACKAGE_JPEG
package/opencv/opencv.mk +7 -0
index e6de252..c4aa967 100644
@@ -185,6 +185,13 @@ else
 OPENCV_CONF_OPT += -DWITH_GTK=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_JASPER),y)
+OPENCV_CONF_OPT += -DWITH_JASPER=ON
+OPENCV_DEPENDENCIES += jasper
+else
+OPENCV_CONF_OPT += -DWITH_JASPER=OFF
+endif
+
 ifeq ($(BR2_PACKAGE_OPENCV_WITH_JPEG),y)
 OPENCV_CONF_OPT += -DWITH_JPEG=ON
 OPENCV_DEPENDENCIES += jpeg
Signature · 6 lines
1.9.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#44 lore raw

PATCH v2 19/24 opencv: add Qt5 support

In reply to Samuel Martin

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

Since Buildroot does not support Qt4/Qt5 co-existence, we keep the Qt support knob as a boolean, but make it depend on BR2_PACKAGE_QT or BR2_PACKAGE_QT5, and automatically uses the enabled one.

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 a dependency. 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.

---
changes v1 -> v2:
- rebase
- update threads support dependency for qt5

---
 package/opencv/Config.in | 43 ++++++++++++++++++++++++++++++++-----------
 package/opencv/opencv.mk |  4 ++--
 2 files changed, 34 insertions(+), 13 deletions(-)
package/opencv/Config.in +32 -11
index 2f47869..8825060 100644
@@ -181,17 +181,38 @@ config BR2_PACKAGE_OPENCV_WITH_PNG
 	  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_avr32 # qt
-	depends on BR2_USE_MMU # qt
-	select BR2_PACKAGE_QT
-	select BR2_PACKAGE_QT_STL
-	select BR2_PACKAGE_QT_GUI_MODULE if BR2_PACKAGE_OPENCV_LIB_HIGHGUI
-	select BR2_PACKAGE_QT_TEST       if BR2_PACKAGE_OPENCV_LIB_HIGHGUI
-	default y
-	help
-	  Use Qt with QtTest module and STL support
+	bool "qt support"
+	depends on (BR2_PACKAGE_QT && !BR2_avr32) || \
+		(BR2_PACKAGE_QT5 && BR2_USE_MMU && BR2_INET_IPV6 && \
+		BR2_TOOLCHAIN_HAS_THREADS_NPTL)
+	select BR2_PACKAGE_QT_STL             if BR2_PACKAGE_QT
+	select BR2_PACKAGE_QT_GUI_MODULE      if BR2_PACKAGE_QT && \
+	                                          BR2_PACKAGE_OPENCV_LIB_HIGHGUI
+	select BR2_PACKAGE_QT_TEST            if BR2_PACKAGE_QT && \
+	                                          BR2_PACKAGE_OPENCV_LIB_HIGHGUI
+	select BR2_PACKAGE_QT5BASE            if BR2_PACKAGE_QT5
+	select BR2_PACKAGE_QT5BASE_CONCURRENT if BR2_PACKAGE_QT5
+	select BR2_PACKAGE_QT5BASE_TEST       if BR2_PACKAGE_QT5
+	select BR2_PACKAGE_QT5BASE_GUI        if BR2_PACKAGE_QT5
+	select BR2_PACKAGE_QT5BASE_WIDGETS    if BR2_PACKAGE_QT5
+	help
+	  Enable Qt support for OpenCV.
+
+	  If Qt4 is already enabled, then use Qt4 with QtTest module and STL
+	  support.
+
+	  If Qt5 is already enabled, then use Qt5 with the following components:
+	  base, concurrent, test, gui and widgets.
+
+if !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5
+comment "qt support with Qt4 needs qt"
+
+comment "qt support with Qt5 needs qt5"
+	depends on BR2_USE_MMU && BR2_INET_IPV6 && BR2_TOOLCHAIN_HAS_THREADS
+
+comment "qt support with Qt5 needs a toolchain w/ wchar, IPv6, theads"
+	depends on !BR2_USE_MMU || !BR2_INET_IPV6 || !BR2_TOOLCHAIN_HAS_THREADS_NPTL
+endif
 
 config BR2_PACKAGE_OPENCV_WITH_TIFF
 	bool "tiff support"
package/opencv/opencv.mk +2 -2
index c4aa967..58bc5c0 100644
@@ -207,8 +207,8 @@ OPENCV_CONF_OPT += -DWITH_PNG=OFF
 endif
 
 ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT),y)
-OPENCV_CONF_OPT += -DWITH_QT=4
-OPENCV_DEPENDENCIES += qt
+OPENCV_CONF_OPT += -DWITH_QT=$(if $(BR2_PACKAGE_QT),4,5)
+OPENCV_DEPENDENCIES += $(if $(BR2_PACKAGE_QT),qt,qt5base)
 else
 OPENCV_CONF_OPT += -DWITH_QT=OFF
 endif
Signature · 1 line
1.9.2
#45 lore raw

PATCH v2 19/24 opencv: add Qt5 support

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:

Quoted 43 lines

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

Since Buildroot does not support Qt4/Qt5 co-existence, we keep the Qt support knob as a boolean, but make it depend on BR2_PACKAGE_QT or BR2_PACKAGE_QT5, and automatically uses the enabled one.

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 a dependency. 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.

---
changes v1 -> v2:
- rebase
- update threads support dependency for qt5

---
 package/opencv/Config.in | 43 ++++++++++++++++++++++++++++++++-----------
 package/opencv/opencv.mk |  4 ++--
 2 files changed, 34 insertions(+), 13 deletions(-)
package/opencv/Config.in +0 -5
index 2f47869..8825060 100644
@@ -181,17 +181,38 @@ config BR2_PACKAGE_OPENCV_WITH_PNG
 	  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_avr32 # qt
-	depends on BR2_USE_MMU # qt
-	select BR2_PACKAGE_QT

package/opencv/Config.in config BR2_PACKAGE_OPENCV_WITH_PNG · line 187

Quoted 10 lines
package/opencv/Config.in +4 -6
-	select BR2_PACKAGE_QT_STL
-	select BR2_PACKAGE_QT_GUI_MODULE if BR2_PACKAGE_OPENCV_LIB_HIGHGUI
-	select BR2_PACKAGE_QT_TEST       if BR2_PACKAGE_OPENCV_LIB_HIGHGUI
-	default y
-	help
-	  Use Qt with QtTest module and STL support
+	bool "qt support"
+	depends on (BR2_PACKAGE_QT && !BR2_avr32) || \
+		(BR2_PACKAGE_QT5 && BR2_USE_MMU && BR2_INET_IPV6 && \
+		BR2_TOOLCHAIN_HAS_THREADS_NPTL)

Same comment as my previous review: why do you repeat the Qt4/Qt5 dependencies since you already depend on Qt4/Qt5 ?

Quoted 18 lines
package/opencv/Config.in +18 -0
+	select BR2_PACKAGE_QT_STL             if BR2_PACKAGE_QT
+	select BR2_PACKAGE_QT_GUI_MODULE      if BR2_PACKAGE_QT && \
+	                                          BR2_PACKAGE_OPENCV_LIB_HIGHGUI
+	select BR2_PACKAGE_QT_TEST            if BR2_PACKAGE_QT && \
+	                                          BR2_PACKAGE_OPENCV_LIB_HIGHGUI
+	select BR2_PACKAGE_QT5BASE            if BR2_PACKAGE_QT5
+	select BR2_PACKAGE_QT5BASE_CONCURRENT if BR2_PACKAGE_QT5
+	select BR2_PACKAGE_QT5BASE_TEST       if BR2_PACKAGE_QT5
+	select BR2_PACKAGE_QT5BASE_GUI        if BR2_PACKAGE_QT5
+	select BR2_PACKAGE_QT5BASE_WIDGETS    if BR2_PACKAGE_QT5
+	help
+	  Enable Qt support for OpenCV.
+
+	  If Qt4 is already enabled, then use Qt4 with QtTest module and STL
+	  support.
+
+	  If Qt5 is already enabled, then use Qt5 with the following components:
+	  base, concurrent, test, gui and widgets.

package/opencv/Config.in config BR2_PACKAGE_OPENCV_WITH_PNG · line 215

Quoted 10 lines
package/opencv/Config.in +10 -0
+
+if !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5
+comment "qt support with Qt4 needs qt"
+
+comment "qt support with Qt5 needs qt5"
+	depends on BR2_USE_MMU && BR2_INET_IPV6 && BR2_TOOLCHAIN_HAS_THREADS
+
+comment "qt support with Qt5 needs a toolchain w/ wchar, IPv6, theads"
+	depends on !BR2_USE_MMU || !BR2_INET_IPV6 || !BR2_TOOLCHAIN_HAS_THREADS_NPTL
+endif

Eeew...

What about:

config BR2_PACKAGE_OPENCV_WITH_QT
bool "Qt backend"
depends on BR2_PACKAGE_QT || BR2_PACKAGE_QT5 select BR2_PACKAGE_OPENCV_QT4_BACKEND if BR2_PACKAGE_QT select BR2_PACKAGE_OPENCV_QT5_BACKEND if BR2_PACKAGE_QT5 help
Enable Qt support for OpenCV.

This uses whatever Qt version you enabled: Qt4 or Qt5.

config BR2_PACKAGE_OPENCV_QT4_BACKEND
bool
select BR2_PACKAGE_QT_STL
select BR2_PACKAGE_QT_GUI_MODULE if BR2_PACKAGE_OPENCV_LIB_HIGHGUI
select BR2_PACKAGE_QT_TEST if BR2_PACKAGE_OPENCV_LIB_HIGHGUI

config BR2_PACKAGE_OPENCV_QT5_BACKEND
bool
select BR2_PACKAGE_QT5BASE
select BR2_PACKAGE_QT5BASE_CONCURRENT
select BR2_PACKAGE_QT5BASE_TEST
select BR2_PACKAGE_QT5BASE_GUI
select BR2_PACKAGE_QT5BASE_WIDGETS

comment "Qt backend needs either Qt4 or Qt5"
depends on !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5

Then, as soon as one or the other is selected, the comment disapears, and the option becomes visible.

Quoted 7 lines
package/opencv/Config.in +0 -0
 config BR2_PACKAGE_OPENCV_WITH_TIFF
 	bool "tiff support"
package/opencv/opencv.mk +0 -0
index c4aa967..58bc5c0 100644

package/opencv/opencv.mk OPENCV_CONF_OPT += -DWITH_PNG=OFF · line 211

Quoted 7 lines
package/opencv/opencv.mk +2 -2
@@ -207,8 +207,8 @@ OPENCV_CONF_OPT += -DWITH_PNG=OFF
 endif
 
 ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT),y)
-OPENCV_CONF_OPT += -DWITH_QT=4
-OPENCV_DEPENDENCIES += qt
+OPENCV_CONF_OPT += -DWITH_QT=$(if $(BR2_PACKAGE_QT),4,5)
+OPENCV_DEPENDENCIES += $(if $(BR2_PACKAGE_QT),qt,qt5base)

We prefer using multi-line. But I agree, this single-line is clear and concise, so I don;t much care.

See:
http://buildroot.net/downloads/manual/manual.html#writing-rules-mk

Regards,
Yann E. MORIN.

Quoted 10 lines
package/opencv/opencv.mk +0 -0
 else
 OPENCV_CONF_OPT += -DWITH_QT=OFF
 endif
Signature · 6 lines
1.9.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#46 lore raw

PATCH v2 20/24 opencv: add python/numpy support

In reply to Samuel Martin

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

A patch in the OpenCV's build-system is also needed to prevent it from trying to run python for numpy detection. This patch has already been integrated upstream.

---
changes v1 -> v2:
- rebase
- use patch merged upstream

---
 package/opencv/Config.in                           |  7 ++-
 ...01-fix-cross-compilation-issue-with-Numpy.patch | 71 ++++++++++++++++++++++
 package/opencv/opencv.mk                           | 16 ++++-
 3 files changed, 91 insertions(+), 3 deletions(-)
 create mode 100644 package/opencv/opencv-0001-fix-cross-compilation-issue-with-Numpy.patch
package/opencv/Config.in +6 -1
index 8825060..e52f22a 100644
@@ -84,7 +84,12 @@ config BR2_PACKAGE_OPENCV_LIB_PHOTO
 	help
 	  Include opencv_photo 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
+	help
+	  Include opencv_python module into the OpenCV build.
+	  No python example is installed.
 
 config BR2_PACKAGE_OPENCV_LIB_STITCHING
 	bool "stitching"
package/opencv/opencv-0001-fix-cross-compilation-issue-with-Numpy.patch new file +71 -0

71 lines not on this page · raw message

package/opencv/opencv.mk +14 -2
index 58bc5c0..5f28448 100644
@@ -61,7 +61,7 @@ OPENCV_CONF_OPT += \
 	-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_python=$(if $(BR2_PACKAGE_OPENCV_LIB_PYTHON),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)             \
@@ -143,7 +143,6 @@ OPENCV_CONF_OPT += \
 	-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
@@ -231,6 +230,19 @@ OPENCV_CONF_OPT += \
 	-DWITH_LIBV4L=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_OPENCV_LIB_PYTHON),y)
+OPENCV_CONF_OPT += \
+	-DBUILD_NEW_PYTHON_SUPPORT=ON \
+	-DPYTHON_EXECUTABLE=$(HOST_DIR)/usr/bin/python2                               \
+	-DPYTHON_INCLUDE_DIR=$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) \
+	-DPYTHON_LIBRARY=$(STAGING_DIR)/usr/lib/libpython$(PYTHON_VERSION_MAJOR).so   \
+	-DPYTHON_NUMPY_INCLUDE_DIR=$(STAGING_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/numpy/core/include \
+	-DPYTHON_NUMPY_VERSION=$(PYTHON_NUMPY_VERSION)
+OPENCV_DEPENDENCIES += python python-numpy
+else
+OPENCV_CONF_OPT += -DBUILD_NEW_PYTHON_SUPPORT=OFF
+endif
+
 # Installation hooks:
 define OPENCV_CLEAN_INSTALL_DOC
 	$(RM) -fr $(TARGET_DIR)/usr/share/OpenCV/doc
Signature · 1 line
1.9.2
#47 lore raw

PATCH v2 20/24 opencv: add python/numpy support

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:

Quoted 8 lines

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

A patch in the OpenCV's build-system is also needed to prevent it from trying to run python for numpy detection. This patch has already been integrated upstream.

[--SNIP--]

package/opencv/opencv-0001-fix-cross-compilation-issue-with-Numpy.patch line 4

Quoted 10 lines
package/opencv/opencv-0001-fix-cross-compilation-issue-with-Numpy.patch new file +4 -0
new file mode 100644
index 0000000..aff1872
@@ -0,0 +1,71 @@
+From 6cb90c0e976ff24af85167e71d88c9d9b2ed06c7 Mon Sep 17 00:00:00 2001
+From: Vincent Rabaud <[email protected]>
+Date: Mon, 20 Jan 2014 10:23:46 +0100
+Subject: [PATCH] fix cross-compilation issue with Numpy

Could you please add a pointer to upstream's patch:

    https://github.com/Itseez/opencv/commit/6cb90c0e976ff24af85167e71d88c9d9b2ed06c7

[--SNIP--]

package/opencv/opencv.mk OPENCV_CONF_OPT += \ · line 64

Quoted 10 lines
package/opencv/opencv.mk +1 -1
index 58bc5c0..5f28448 100644
@@ -61,7 +61,7 @@ OPENCV_CONF_OPT += \
 	-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_python=$(if $(BR2_PACKAGE_OPENCV_LIB_PYTHON),ON,OFF)     \

Since you are adding a multi-line below, this should in there...

Quoted 12 lines
package/opencv/opencv.mk +0 -1
 	-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)             \
@@ -143,7 +143,6 @@ OPENCV_CONF_OPT += \
 	-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

package/opencv/opencv.mk OPENCV_CONF_OPT += \ · line 234

Quoted 5 lines
package/opencv/opencv.mk +2 -0
@@ -231,6 +230,19 @@ OPENCV_CONF_OPT += \
 	-DWITH_LIBV4L=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_OPENCV_LIB_PYTHON),y)
+OPENCV_CONF_OPT += \

...here:
-DBUILD_opencv_python=ON

package/opencv/opencv.mk OPENCV_CONF_OPT += \ · line 243

Quoted 9 lines
package/opencv/opencv.mk +9 -0
+	-DBUILD_NEW_PYTHON_SUPPORT=ON \
+	-DPYTHON_EXECUTABLE=$(HOST_DIR)/usr/bin/python2                               \
+	-DPYTHON_INCLUDE_DIR=$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) \
+	-DPYTHON_LIBRARY=$(STAGING_DIR)/usr/lib/libpython$(PYTHON_VERSION_MAJOR).so   \
+	-DPYTHON_NUMPY_INCLUDE_DIR=$(STAGING_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/numpy/core/include \
+	-DPYTHON_NUMPY_VERSION=$(PYTHON_NUMPY_VERSION)
+OPENCV_DEPENDENCIES += python python-numpy
+else
+OPENCV_CONF_OPT += -DBUILD_NEW_PYTHON_SUPPORT=OFF

...and here:
-DBUILD_opencv_python=OFF

Regards,
Yann E. MORIN.

Quoted 12 lines
package/opencv/opencv.mk +2 -0
+endif
+
 # Installation hooks:
 define OPENCV_CLEAN_INSTALL_DOC
 	$(RM) -fr $(TARGET_DIR)/usr/share/OpenCV/doc
Signature · 6 lines
1.9.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#48 lore raw

PATCH v2 21/24 opencv: define modules inter-dependencies

In reply to Samuel Martin

OpenCV allows to enable/disable the selection of modules (a.k.a. opencv libraries). These modules depend one from 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 module dependencies.

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

---
changes v1 -> v2:
- rebase

---
 package/opencv/Config.in | 75 ++++++++++++++++++++++++++++++++++++++----------
 1 file changed, 60 insertions(+), 15 deletions(-)
package/opencv/Config.in +60 -15
index e52f22a..31732a6 100644
@@ -8,6 +8,8 @@ menuconfig BR2_PACKAGE_OPENCV
 	  OpenCV (Open Source Computer Vision) is a library of programming
 	  functions for real time computer vision.
 
+	  Note that the opencv_core module is automatically enabled.
+
 	  http://opencv.org/
 
 if BR2_PACKAGE_OPENCV
@@ -16,109 +18,152 @@ comment "OpenCV modules"
 
 config BR2_PACKAGE_OPENCV_LIB_CALIB3D
 	bool "calib3d"
-	default y
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
+	select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
 	help
 	  Include opencv_calib3d module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_CONTRIB
 	bool "contrib"
-	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_ML
+	select BR2_PACKAGE_OPENCV_LIB_OBJDETECT
+	select BR2_PACKAGE_OPENCV_LIB_VIDEO
 	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"
-	default y
+	select BR2_PACKAGE_OPENCV_LIB_FLANN
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	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.
 
 config BR2_PACKAGE_OPENCV_LIB_GPU
 	bool "gpu"
+	select BR2_PACKAGE_OPENCV_LIB_CALIB3D
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
+	select BR2_PACKAGE_OPENCV_LIB_LEGACY
+	select BR2_PACKAGE_OPENCV_LIB_OBJDETECT
+	select BR2_PACKAGE_OPENCV_LIB_PHOTO
+	select BR2_PACKAGE_OPENCV_LIB_VIDEO
 	help
 	  Include opencv_gpu module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_HIGHGUI
 	bool "highgui"
-	default y
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	help
 	  Include opencv_highgui 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 module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_LEGACY
 	bool "legacy"
-	default y
+	select BR2_PACKAGE_OPENCV_LIB_CALIB3D
+	select BR2_PACKAGE_OPENCV_LIB_ML
+	select BR2_PACKAGE_OPENCV_LIB_VIDEO
 	help
 	  Include opencv_legacy 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_NONFREE
 	bool "nonfree"
+	select BR2_PACKAGE_OPENCV_LIB_CALIB3D
+	select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	help
 	  Include opencv_nonfree 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
 	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.
 
 config BR2_PACKAGE_OPENCV_LIB_PYTHON
 	bool "python"
 	depends on BR2_PACKAGE_PYTHON
+	# opencv_core dependency is already enabled
+	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_HIGHGUI
+	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_PHOTO
+	select BR2_PACKAGE_OPENCV_LIB_VIDEO
 	help
 	  Include opencv_python module into the OpenCV build.
 	  No python example is installed.
 
 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)"
-	default y
+	# opencv_core dependency is already enabled
+	select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
 	help
 	  Include opencv_ts 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_HIGHGUI
+	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.
 
Signature · 1 line
1.9.2
#49 lore raw

PATCH v2 21/24 opencv: define modules inter-dependencies

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:

Quoted 2 lines

OpenCV allows to enable/disable the selection of modules (a.k.a. opencv libraries). These modules depend one from the others; these

... one on the others

Quoted 9 lines

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 module dependencies.

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

I'll trust you on this dependency chain. ;-)

Quoted 1 line

With the small nit in the commit log above fixed:

Regards,
Yann E. MORIN.

Quoted 195 lines

---
changes v1 -> v2:
- rebase

---
 package/opencv/Config.in | 75 ++++++++++++++++++++++++++++++++++++++----------
 1 file changed, 60 insertions(+), 15 deletions(-)
package/opencv/Config.in +60 -15
index e52f22a..31732a6 100644
@@ -8,6 +8,8 @@ menuconfig BR2_PACKAGE_OPENCV
 	  OpenCV (Open Source Computer Vision) is a library of programming
 	  functions for real time computer vision.
 
+	  Note that the opencv_core module is automatically enabled.
+
 	  http://opencv.org/
 
 if BR2_PACKAGE_OPENCV
@@ -16,109 +18,152 @@ comment "OpenCV modules"
 
 config BR2_PACKAGE_OPENCV_LIB_CALIB3D
 	bool "calib3d"
-	default y
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
+	select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
 	help
 	  Include opencv_calib3d module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_CONTRIB
 	bool "contrib"
-	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_ML
+	select BR2_PACKAGE_OPENCV_LIB_OBJDETECT
+	select BR2_PACKAGE_OPENCV_LIB_VIDEO
 	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"
-	default y
+	select BR2_PACKAGE_OPENCV_LIB_FLANN
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	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.
 
 config BR2_PACKAGE_OPENCV_LIB_GPU
 	bool "gpu"
+	select BR2_PACKAGE_OPENCV_LIB_CALIB3D
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
+	select BR2_PACKAGE_OPENCV_LIB_LEGACY
+	select BR2_PACKAGE_OPENCV_LIB_OBJDETECT
+	select BR2_PACKAGE_OPENCV_LIB_PHOTO
+	select BR2_PACKAGE_OPENCV_LIB_VIDEO
 	help
 	  Include opencv_gpu module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_HIGHGUI
 	bool "highgui"
-	default y
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	help
 	  Include opencv_highgui 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 module into the OpenCV build.
 
 config BR2_PACKAGE_OPENCV_LIB_LEGACY
 	bool "legacy"
-	default y
+	select BR2_PACKAGE_OPENCV_LIB_CALIB3D
+	select BR2_PACKAGE_OPENCV_LIB_ML
+	select BR2_PACKAGE_OPENCV_LIB_VIDEO
 	help
 	  Include opencv_legacy 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_NONFREE
 	bool "nonfree"
+	select BR2_PACKAGE_OPENCV_LIB_CALIB3D
+	select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	help
 	  Include opencv_nonfree 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
 	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.
 
 config BR2_PACKAGE_OPENCV_LIB_PYTHON
 	bool "python"
 	depends on BR2_PACKAGE_PYTHON
+	# opencv_core dependency is already enabled
+	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_HIGHGUI
+	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_PHOTO
+	select BR2_PACKAGE_OPENCV_LIB_VIDEO
 	help
 	  Include opencv_python module into the OpenCV build.
 	  No python example is installed.
 
 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)"
-	default y
+	# opencv_core dependency is already enabled
+	select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
 	help
 	  Include opencv_ts 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_HIGHGUI
+	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.
 
Signature · 6 lines
1.9.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#50 lore raw

PATCH v2 22/24 opencv: add hidden symbol BR2_PACKAGE_OPENCV_USE_DEPRECATED_HEADERS

In reply to Samuel Martin

This new hidden symbol aims to automatically select all OpenCV modules required when another package use the deprecated OpenCV 'cv.h' headers.

---
changes v1 -> v2:
- new patch

---
 package/opencv/Config.in | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
package/opencv/Config.in +15 -0
index 31732a6..628c8f3 100644
@@ -14,6 +14,21 @@ menuconfig BR2_PACKAGE_OPENCV
 
 if BR2_PACKAGE_OPENCV
 
+config BR2_PACKAGE_OPENCV_USE_DEPRECATED_HEADERS
+	bool
+	select BR2_PACKAGE_OPENCV_LIB_CALIB3D
+	select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
+	select BR2_PACKAGE_OPENCV_LIB_HIGHGUI
+	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_PHOTO
+	select BR2_PACKAGE_OPENCV_LIB_VIDEO
+	help
+	  Select all required modules needed by the deprecated OpenCV API
+	  (cv.h, cvaux.h, cxcore.h, etc).
+
 comment "OpenCV modules"
 
 config BR2_PACKAGE_OPENCV_LIB_CALIB3D
Signature · 1 line
1.9.2
#51 lore raw

PATCH v2 22/24 opencv: add hidden symbol BR2_PACKAGE_OPENCV_USE_DEPRECATED_HEADERS

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:

Quoted 4 lines

This new hidden symbol aims to automatically select all OpenCV modules required when another package use the deprecated OpenCV 'cv.h' headers.

Regards,
Yann E. MORIN.

Quoted 40 lines

---
changes v1 -> v2:
- new patch

---
 package/opencv/Config.in | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
package/opencv/Config.in +15 -0
index 31732a6..628c8f3 100644
@@ -14,6 +14,21 @@ menuconfig BR2_PACKAGE_OPENCV
 
 if BR2_PACKAGE_OPENCV
 
+config BR2_PACKAGE_OPENCV_USE_DEPRECATED_HEADERS
+	bool
+	select BR2_PACKAGE_OPENCV_LIB_CALIB3D
+	select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
+	select BR2_PACKAGE_OPENCV_LIB_HIGHGUI
+	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_PHOTO
+	select BR2_PACKAGE_OPENCV_LIB_VIDEO
+	help
+	  Select all required modules needed by the deprecated OpenCV API
+	  (cv.h, cvaux.h, cxcore.h, etc).
+
 comment "OpenCV modules"
 
 config BR2_PACKAGE_OPENCV_LIB_CALIB3D
Signature · 6 lines
1.9.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#52 lore raw

PATCH v2 23/24 vlc: add opencv support

In reply to Samuel Martin

Add OpenCV support for video filter in vlc.

vlc source code still includes the headers from the deprecated OpenCV API.

---
changes v1 -> v2:
- new patch

---
 package/vlc/Config.in | 1 +
 package/vlc/vlc.mk    | 7 +++++++
 2 files changed, 8 insertions(+)
package/vlc/Config.in +1 -0
index cdb0d16..ede9269 100644
@@ -11,6 +11,7 @@ config BR2_PACKAGE_VLC
 	depends on BR2_USE_WCHAR
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_PACKAGE_LIBVORBIS if BR2_PACKAGE_OPUS
+	select BR2_PACKAGE_OPENCV_USE_DEPRECATED_HEADERS 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,
package/vlc/vlc.mk +7 -0
index e14c9c3..6e0f61d 100644
@@ -125,6 +125,13 @@ else
 VLC_CONF_OPT += --disable-glx
 endif
 
+ifeq ($(BR2_PACKAGE_OPENCV),y)
+VCL_CONF_OPT += --with-opencv
+VLC_DEPENDENCIES += opencv
+else
+VLC_CONF_OPT += --without-opencv
+endif
+
 ifeq ($(BR2_PACKAGE_OPUS),y)
 VLC_CONF_OPT += --enable-opus
 VLC_DEPENDENCIES += libvorbis opus
Signature · 1 line
1.9.2
#53 lore raw

PATCH v2 23/24 vlc: add opencv support

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:

Quoted 6 lines

Add OpenCV support for video filter in vlc.

vlc source code still includes the headers from the deprecated OpenCV API.

Regards,
Yann E. MORIN.

Quoted 45 lines

---
changes v1 -> v2:
- new patch

---
 package/vlc/Config.in | 1 +
 package/vlc/vlc.mk    | 7 +++++++
 2 files changed, 8 insertions(+)
package/vlc/Config.in +1 -0
index cdb0d16..ede9269 100644
@@ -11,6 +11,7 @@ config BR2_PACKAGE_VLC
 	depends on BR2_USE_WCHAR
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_PACKAGE_LIBVORBIS if BR2_PACKAGE_OPUS
+	select BR2_PACKAGE_OPENCV_USE_DEPRECATED_HEADERS 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,
package/vlc/vlc.mk +7 -0
index e14c9c3..6e0f61d 100644
@@ -125,6 +125,13 @@ else
 VLC_CONF_OPT += --disable-glx
 endif
 
+ifeq ($(BR2_PACKAGE_OPENCV),y)
+VCL_CONF_OPT += --with-opencv
+VLC_DEPENDENCIES += opencv
+else
+VLC_CONF_OPT += --without-opencv
+endif
+
 ifeq ($(BR2_PACKAGE_OPUS),y)
 VLC_CONF_OPT += --enable-opus
 VLC_DEPENDENCIES += libvorbis opus
Signature · 6 lines
1.9.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#54 lore raw

PATCH v2 24/24 gst1-plugins-bad: rework opencv plugin dependencies

In reply to Samuel Martin

gst1 opencv plugin source code still include OpenCV's headers from its deprecated API.

Use the newly introduced BR2_PACKAGE_OPENCV_USE_DEPRECATED_HEADERS to select all required OpenCV module dependencies.

---
changes v1 -> v2:
- new patch

---
 package/gstreamer1/gst1-plugins-bad/Config.in | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
package/gstreamer1/gst1-plugins-bad/Config.in +1 -9
index 02fa18c..e8bc110 100644
@@ -429,15 +429,7 @@ config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_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
+	select BR2_PACKAGE_OPENCV_USE_DEPRECATED_HEADERS
 	help
 	  GStreamer OpenCV Plugins
 
Signature · 1 line
1.9.2
#55 lore raw

PATCH v2 24/24 gst1-plugins-bad: rework opencv plugin dependencies

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:

Quoted 7 lines

gst1 opencv plugin source code still include OpenCV's headers from its deprecated API.

Use the newly introduced BR2_PACKAGE_OPENCV_USE_DEPRECATED_HEADERS to select all required OpenCV module dependencies.

Regards,
Yann E. MORIN.

Quoted 35 lines

---
changes v1 -> v2:
- new patch

---
 package/gstreamer1/gst1-plugins-bad/Config.in | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
package/gstreamer1/gst1-plugins-bad/Config.in +1 -9
index 02fa18c..e8bc110 100644
@@ -429,15 +429,7 @@ config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_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
+	select BR2_PACKAGE_OPENCV_USE_DEPRECATED_HEADERS
 	help
 	  GStreamer OpenCV Plugins
 
Signature · 6 lines
1.9.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#56 lore raw

v2 cover Scientific libraries

In reply to Samuel Martin

Dear Samuel Martin,

Quoted 1 line · Samuel Martin

opencv: bump to version 2.4.8

Applied.

Quoted 1 line

opencv: add license details

Was already done by Gustavo.

Quoted 8 lines

opencv: sort and reorder CMake configuration flags
opencv: sort and reorder HW support options
opencv: sort and reorder SW support options
opencv: add superres module knob
opencv: disable apps module
opencv: disable opencl support/module
opencv: disable OpenMP support
opencv: enable SSE4.1 SSE4.2 support when available

All these ones applied.

Quoted 1 line

opencv: rework V4L/libv4l support

This one had comments from Yann that have never been addressed. Please resend an updated version that takes into account these comments. In the mean time, I've marked this patch as "Changes Requested" in patchwork.

Quoted 1 line

opencv: add jasper support

Applied.

Quoted 6 lines

opencv: add Qt5 support
opencv: add python/numpy support
opencv: define modules inter-dependencies
opencv: add hidden symbol BR2_PACKAGE_OPENCV_USE_DEPRECATED_HEADERS
vlc: add opencv support
gst1-plugins-bad: rework opencv plugin dependencies

All those patches have pending comments from the review made by Yann a long time ago, and those comments were never addressed. Could you please address those comments, and send a new version of the patch series on top of master? In the mean time, I've marked those patches as "Changes Requested" in patchwork.

Also, please look for the autobuilder results in the next days to fix any numpy or opencv related failure.

Thanks,

Thomas

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