pkg-cmake: globally drive the CMAKE_BUILD_TYPE flag using BR2_ENABLE_DEBUG

This CMake flag is usually used to adjust compiler flags (like: -Ox, -g,
etc).

So, it makes sense for Buildroot to globally drive this CMake flags in
the cmake-package infrastructure.

However, if a package prefer overriding this default setting, it still
can via the <PKG>_CONF_OPT variable.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
openpowerlink: do not override CMAKE_BUILD_TYPE

This flag is already correctly set by the cmake-package infrastructure.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
opencv: do not override CMAKE_BUILD_TYPE

This flag is already correctly set by the cmake-package infrastructure.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
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.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
opencv: fix qt selection when highgui is enable

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.

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

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.

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

Armadillo is a C++ linear algebra library.

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

---
changes v1 -> v2:
- rebase
- add comment when toolchain has not C++
python-numpy: new package

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.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
opencv: bump to version 2.4.8

This patch bumps OpenCV version and address the minimal set of change to
get the new version building correctly:
- add an extract command because the source archive is only available
  under zip format since this 2.4.8 release. Since there is no default
  extract command for zip archive, we have to define it;
- 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).
These will be addressed in followup patches.

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

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

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
changes v1 -> v2:
- new patch (splitting suggested by Yann)
opencv: sort and reorder CMake configuration flags

To make easier future package update.

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

---
changes v1 -> v2:
- new patch (split suggested by Yann)
opencv: sort and reorder HW support options

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

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

---
changes v1 -> v2:
- new patch (split suggested by Yann)
opencv: sort and reorder SW support options

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

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

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

t # Changes to be committed:
opencv: add superres module knob
opencv: disable apps module

This module is used to build programs for training classifiers.

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

---
changes v1 -> v2:
- new patch (split suggested by Yann)
opencv: disable opencl support/module

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

---
changes v1 -> v2:
- new patch (split suggested by Yann)
opencv: disable OpenMP support

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.

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

---
changes v1 -> v2:
- new patch (split suggested by Yann)
opencv: enable SSE4.1 SSE4.2 support when available

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

---
changes v1 -> v2:
- new patch (split suggested by Yann)
opencv: rework V4L/libv4l support

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.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
opencv: add jasper support

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