All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 00/24] Scientific libraries
@ 2014-04-22 23:15 Samuel Martin
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 01/24] qt: add an option to install the test module Samuel Martin
                   ` (24 more replies)
  0 siblings, 25 replies; 57+ messages in thread
From: Samuel Martin @ 2014-04-22 23:15 UTC (permalink / raw)
  To: buildroot

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

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

* [Buildroot] [PATCH v2 01/24] qt: add an option to install the test module
  2014-04-22 23:15 [Buildroot] [PATCH v2 00/24] Scientific libraries Samuel Martin
@ 2014-04-22 23:15 ` Samuel Martin
  2014-05-03 16:58   ` Yann E. MORIN
  2014-05-03 21:10   ` Peter Korsgaard
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 02/24] opencv: fix qt selection when highgui is enable Samuel Martin
                   ` (23 subsequent siblings)
  24 siblings, 2 replies; 57+ messages in thread
From: Samuel Martin @ 2014-04-22 23:15 UTC (permalink / raw)
  To: buildroot

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>

---
changes v1 -> v2:
- rebase
- change default value to n
---
 package/qt/Config.in | 5 +++++
 package/qt/qt.mk     | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/package/qt/Config.in b/package/qt/Config.in
index eed25c8..9faf2cd 100644
--- a/package/qt/Config.in
+++ b/package/qt/Config.in
@@ -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
diff --git a/package/qt/qt.mk b/package/qt/qt.mk
index 507e0db..bb065f3 100644
--- a/package/qt/qt.mk
+++ b/package/qt/qt.mk
@@ -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
 
-- 
1.9.2

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

* [Buildroot] [PATCH v2 02/24] opencv: fix qt selection when highgui is enable
  2014-04-22 23:15 [Buildroot] [PATCH v2 00/24] Scientific libraries Samuel Martin
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 01/24] qt: add an option to install the test module Samuel Martin
@ 2014-04-22 23:15 ` Samuel Martin
  2014-05-03 17:01   ` Yann E. MORIN
  2014-05-03 21:11   ` Peter Korsgaard
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 03/24] armadillo: new package Samuel Martin
                   ` (22 subsequent siblings)
  24 siblings, 2 replies; 57+ messages in thread
From: Samuel Martin @ 2014-04-22 23:15 UTC (permalink / raw)
  To: buildroot

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>

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

diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index b40e141..49ada5d 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -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"
-- 
1.9.2

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

* [Buildroot] [PATCH v2 03/24] armadillo: new package
  2014-04-22 23:15 [Buildroot] [PATCH v2 00/24] Scientific libraries Samuel Martin
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 01/24] qt: add an option to install the test module Samuel Martin
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 02/24] opencv: fix qt selection when highgui is enable Samuel Martin
@ 2014-04-22 23:15 ` Samuel Martin
  2014-05-03 17:08   ` Yann E. MORIN
  2014-05-04 21:18   ` Peter Korsgaard
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 04/24] clapack: " Samuel Martin
                   ` (21 subsequent siblings)
  24 siblings, 2 replies; 57+ messages in thread
From: Samuel Martin @ 2014-04-22 23:15 UTC (permalink / raw)
  To: buildroot

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

diff --git a/package/Config.in b/package/Config.in
index 07fd166..4475b07 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/armadillo/Config.in b/package/armadillo/Config.in
new file mode 100644
index 0000000..8d7e9f3
--- /dev/null
+++ b/package/armadillo/Config.in
@@ -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/
diff --git a/package/armadillo/armadillo.mk b/package/armadillo/armadillo.mk
new file mode 100644
index 0000000..b2cfdfc
--- /dev/null
+++ b/package/armadillo/armadillo.mk
@@ -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))
-- 
1.9.2

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

* [Buildroot] [PATCH v2 04/24] clapack: new package
  2014-04-22 23:15 [Buildroot] [PATCH v2 00/24] Scientific libraries Samuel Martin
                   ` (2 preceding siblings ...)
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 03/24] armadillo: new package Samuel Martin
@ 2014-04-22 23:15 ` Samuel Martin
  2014-05-03 17:23   ` Yann E. MORIN
  2014-05-04  7:10   ` Peter Korsgaard
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 05/24] python-numpy: " Samuel Martin
                   ` (20 subsequent siblings)
  24 siblings, 2 replies; 57+ messages in thread
From: Samuel Martin @ 2014-04-22 23:15 UTC (permalink / raw)
  To: buildroot

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>

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

diff --git a/package/Config.in b/package/Config.in
index 4475b07..9c91844 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/clapack/Config.in b/package/clapack/Config.in
new file mode 100644
index 0000000..a4121ae
--- /dev/null
+++ b/package/clapack/Config.in
@@ -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.
diff --git a/package/clapack/clapack-0001-cmake-force-libf2c-to-be-built-as-a-static-library.patch b/package/clapack/clapack-0001-cmake-force-libf2c-to-be-built-as-a-static-library.patch
new file mode 100644
index 0000000..8fede9d
--- /dev/null
+++ b/package/clapack/clapack-0001-cmake-force-libf2c-to-be-built-as-a-static-library.patch
@@ -0,0 +1,32 @@
+From 4fe2f454e454d9e6b1e83b2ea67581990461ed36 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+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 <s.martin49@gmail.com>
+---
+ 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
+
diff --git a/package/clapack/clapack-0002-cmake-make-test-build-sensitive-to-BUILD_TESTING.patch b/package/clapack/clapack-0002-cmake-make-test-build-sensitive-to-BUILD_TESTING.patch
new file mode 100644
index 0000000..d56464c
--- /dev/null
+++ 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 <s.martin49@gmail.com>
+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 <s.martin49@gmail.com>
+---
+ 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
+
diff --git a/package/clapack/clapack-0003-cmake-do-not-try-to-run-arithchk-when-cross-compilin.patch b/package/clapack/clapack-0003-cmake-do-not-try-to-run-arithchk-when-cross-compilin.patch
new file mode 100644
index 0000000..1654c89
--- /dev/null
+++ b/package/clapack/clapack-0003-cmake-do-not-try-to-run-arithchk-when-cross-compilin.patch
@@ -0,0 +1,70 @@
+From a2f0669fac1f8e7183b15cf7d14f0e99a2d8b012 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+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 <s.martin49@gmail.com>
+---
+ 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
+
diff --git a/package/clapack/clapack-0004-cmake-blas-add-library-and-header-install-rules.patch b/package/clapack/clapack-0004-cmake-blas-add-library-and-header-install-rules.patch
new file mode 100644
index 0000000..e83b066
--- /dev/null
+++ b/package/clapack/clapack-0004-cmake-blas-add-library-and-header-install-rules.patch
@@ -0,0 +1,23 @@
+From 675111e8ffc179276a7e4950fe4a4eda4d38a703 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+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 <s.martin49@gmail.com>
+---
+ 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
+
diff --git a/package/clapack/clapack-0005-cmake-lapack-add-library-and-header-install-rules.patch b/package/clapack/clapack-0005-cmake-lapack-add-library-and-header-install-rules.patch
new file mode 100644
index 0000000..abba460
--- /dev/null
+++ b/package/clapack/clapack-0005-cmake-lapack-add-library-and-header-install-rules.patch
@@ -0,0 +1,24 @@
+From 9dfac0d55a31be59a856bad9d3a5071d65176597 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+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 <s.martin49@gmail.com>
+---
+ 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
+
diff --git a/package/clapack/clapack.mk b/package/clapack/clapack.mk
new file mode 100644
index 0000000..23d25fb
--- /dev/null
+++ b/package/clapack/clapack.mk
@@ -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))
-- 
1.9.2

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

* [Buildroot] [PATCH v2 05/24] python-numpy: new package
  2014-04-22 23:15 [Buildroot] [PATCH v2 00/24] Scientific libraries Samuel Martin
                   ` (3 preceding siblings ...)
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 04/24] clapack: " Samuel Martin
@ 2014-04-22 23:15 ` Samuel Martin
  2014-05-03 17:40   ` Yann E. MORIN
  2014-07-16 20:30   ` Thomas Petazzoni
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 06/24] python-numpy: add optional blas/lapack support Samuel Martin
                   ` (19 subsequent siblings)
  24 siblings, 2 replies; 57+ messages in thread
From: Samuel Martin @ 2014-04-22 23:15 UTC (permalink / raw)
  To: buildroot

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>

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

diff --git a/package/Config.in b/package/Config.in
index 9c91844..7d8ca95 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/python-numpy/Config.in b/package/python-numpy/Config.in
new file mode 100644
index 0000000..c80e5c4
--- /dev/null
+++ b/package/python-numpy/Config.in
@@ -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/
diff --git a/package/python-numpy/python-numpy.mk b/package/python-numpy/python-numpy.mk
new file mode 100644
index 0000000..e7c91c4
--- /dev/null
+++ b/package/python-numpy/python-numpy.mk
@@ -0,0 +1,41 @@
+################################################################################
+#
+# python-numpy
+#
+################################################################################
+
+PYTHON_NUMPY_VERSION = 1.8.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
+	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.
+#
+# 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))
-- 
1.9.2

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

* [Buildroot] [PATCH v2 06/24] python-numpy: add optional blas/lapack support
  2014-04-22 23:15 [Buildroot] [PATCH v2 00/24] Scientific libraries Samuel Martin
                   ` (4 preceding siblings ...)
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 05/24] python-numpy: " Samuel Martin
@ 2014-04-22 23:15 ` Samuel Martin
  2014-05-03 20:05   ` Yann E. MORIN
  2014-07-16 20:50   ` Thomas Petazzoni
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 07/24] opencv: bump to version 2.4.8 Samuel Martin
                   ` (18 subsequent siblings)
  24 siblings, 2 replies; 57+ messages in thread
From: Samuel Martin @ 2014-04-22 23:15 UTC (permalink / raw)
  To: buildroot

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

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

---
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(+)

diff --git a/package/python-numpy/python-numpy.mk b/package/python-numpy/python-numpy.mk
index e7c91c4..b0ab031 100644
--- a/package/python-numpy/python-numpy.mk
+++ b/package/python-numpy/python-numpy.mk
@@ -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
-- 
1.9.2

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

* [Buildroot] [PATCH v2 07/24] opencv: bump to version 2.4.8
  2014-04-22 23:15 [Buildroot] [PATCH v2 00/24] Scientific libraries Samuel Martin
                   ` (5 preceding siblings ...)
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 06/24] python-numpy: add optional blas/lapack support Samuel Martin
@ 2014-04-22 23:15 ` Samuel Martin
  2014-05-03 21:28   ` Yann E. MORIN
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 08/24] opencv: add license details Samuel Martin
                   ` (17 subsequent siblings)
  24 siblings, 1 reply; 57+ messages in thread
From: Samuel Martin @ 2014-04-22 23:15 UTC (permalink / raw)
  To: buildroot

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.

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

---
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(-)

diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 49ada5d..2c6200c 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -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
 
diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index 42f9b0a..10f11cf 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -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:
-- 
1.9.2

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

* [Buildroot] [PATCH v2 08/24] opencv: add license details
  2014-04-22 23:15 [Buildroot] [PATCH v2 00/24] Scientific libraries Samuel Martin
                   ` (6 preceding siblings ...)
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 07/24] opencv: bump to version 2.4.8 Samuel Martin
@ 2014-04-22 23:15 ` Samuel Martin
  2014-05-03 21:31   ` Yann E. MORIN
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 09/24] opencv: sort and reorder CMake configuration flags Samuel Martin
                   ` (16 subsequent siblings)
  24 siblings, 1 reply; 57+ messages in thread
From: Samuel Martin @ 2014-04-22 23:15 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
changes v1 -> v2:
- new patch (splitting suggested by Yann)
---
 package/opencv/opencv.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index 10f11cf..a4d2ee0 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -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)   \
-- 
1.9.2

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

* [Buildroot] [PATCH v2 09/24] opencv: sort and reorder CMake configuration flags
  2014-04-22 23:15 [Buildroot] [PATCH v2 00/24] Scientific libraries Samuel Martin
                   ` (7 preceding siblings ...)
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 08/24] opencv: add license details Samuel Martin
@ 2014-04-22 23:15 ` Samuel Martin
  2014-05-03 21:40   ` Yann E. MORIN
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 10/24] opencv: sort and reorder HW support options Samuel Martin
                   ` (15 subsequent siblings)
  24 siblings, 1 reply; 57+ messages in thread
From: Samuel Martin @ 2014-04-22 23:15 UTC (permalink / raw)
  To: buildroot

To make easier future package update.

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

---
changes v1 -> v2:
- new patch (split suggested by Yann)
---
 package/opencv/opencv.mk | 39 +++++++++++++++++++++++++--------------
 1 file changed, 25 insertions(+), 14 deletions(-)

diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index a4d2ee0..ae89577 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -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 += \
-- 
1.9.2

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

* [Buildroot] [PATCH v2 10/24] opencv: sort and reorder HW support options
  2014-04-22 23:15 [Buildroot] [PATCH v2 00/24] Scientific libraries Samuel Martin
                   ` (8 preceding siblings ...)
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 09/24] opencv: sort and reorder CMake configuration flags Samuel Martin
@ 2014-04-22 23:15 ` Samuel Martin
  2014-05-03 22:15   ` Yann E. MORIN
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 11/24] opencv: sort and reorder SW " Samuel Martin
                   ` (14 subsequent siblings)
  24 siblings, 1 reply; 57+ messages in thread
From: Samuel Martin @ 2014-04-22 23:15 UTC (permalink / raw)
  To: buildroot

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)
---
 package/opencv/opencv.mk | 37 ++++++++++++++++++++++++++++++-------
 1 file changed, 30 insertions(+), 7 deletions(-)

diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index ae89577..046b847 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -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
-- 
1.9.2

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

* [Buildroot] [PATCH v2 11/24] opencv: sort and reorder SW support options
  2014-04-22 23:15 [Buildroot] [PATCH v2 00/24] Scientific libraries Samuel Martin
                   ` (9 preceding siblings ...)
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 10/24] opencv: sort and reorder HW support options Samuel Martin
@ 2014-04-22 23:15 ` Samuel Martin
  2014-05-03 22:19   ` Yann E. MORIN
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 12/24] opencv: add superres module knob Samuel Martin
                   ` (13 subsequent siblings)
  24 siblings, 1 reply; 57+ messages in thread
From: Samuel Martin @ 2014-04-22 23:15 UTC (permalink / raw)
  To: buildroot

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)
---
 package/opencv/opencv.mk | 62 +++++++++++++++++++++++++++++++-----------------
 1 file changed, 40 insertions(+), 22 deletions(-)

diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index 046b847..264507c 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -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
-- 
1.9.2

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

* [Buildroot] [PATCH v2 12/24] opencv: add superres module knob
  2014-04-22 23:15 [Buildroot] [PATCH v2 00/24] Scientific libraries Samuel Martin
                   ` (10 preceding siblings ...)
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 11/24] opencv: sort and reorder SW " Samuel Martin
@ 2014-04-22 23:15 ` Samuel Martin
  2014-05-03 22:23   ` Yann E. MORIN
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 13/24] opencv: disable apps module Samuel Martin
                   ` (12 subsequent siblings)
  24 siblings, 1 reply; 57+ messages in thread
From: Samuel Martin @ 2014-04-22 23:15 UTC (permalink / raw)
  To: buildroot

This new module has been introduced in opencv-2.4.8.

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

---
changes v1 -> v2:
- new patch (split suggested by Yann)
---
 package/opencv/Config.in | 7 +++++++
 package/opencv/opencv.mk | 1 +
 2 files changed, 8 insertions(+)

diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 2c6200c..129e0aa 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -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
diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index 264507c..f129dc3 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -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) \
-- 
1.9.2

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

* [Buildroot] [PATCH v2 13/24] opencv: disable apps module
  2014-04-22 23:15 [Buildroot] [PATCH v2 00/24] Scientific libraries Samuel Martin
                   ` (11 preceding siblings ...)
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 12/24] opencv: add superres module knob Samuel Martin
@ 2014-04-22 23:15 ` Samuel Martin
  2014-05-03 22:28   ` Yann E. MORIN
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 14/24] opencv: disable opencl support/module Samuel Martin
                   ` (11 subsequent siblings)
  24 siblings, 1 reply; 57+ messages in thread
From: Samuel Martin @ 2014-04-22 23:15 UTC (permalink / raw)
  To: buildroot

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)
---
 package/opencv/opencv.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index f129dc3..b87eddc 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -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                                                  \
-- 
1.9.2

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

* [Buildroot] [PATCH v2 14/24] opencv: disable opencl support/module
  2014-04-22 23:15 [Buildroot] [PATCH v2 00/24] Scientific libraries Samuel Martin
                   ` (12 preceding siblings ...)
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 13/24] opencv: disable apps module Samuel Martin
@ 2014-04-22 23:15 ` Samuel Martin
  2014-05-03 22:34   ` Yann E. MORIN
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 15/24] opencv: disable OpenMP support Samuel Martin
                   ` (10 subsequent siblings)
  24 siblings, 1 reply; 57+ messages in thread
From: Samuel Martin @ 2014-04-22 23:15 UTC (permalink / raw)
  To: buildroot

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

---
changes v1 -> v2:
- new patch (split suggested by Yann)
---
 package/opencv/opencv.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index b87eddc..a4bdd39 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -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  \
-- 
1.9.2

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

* [Buildroot] [PATCH v2 15/24] opencv: disable OpenMP support
  2014-04-22 23:15 [Buildroot] [PATCH v2 00/24] Scientific libraries Samuel Martin
                   ` (13 preceding siblings ...)
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 14/24] opencv: disable opencl support/module Samuel Martin
@ 2014-04-22 23:15 ` Samuel Martin
  2014-05-04  9:24   ` Yann E. MORIN
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 16/24] opencv: enable SSE4.1 SSE4.2 support when available Samuel Martin
                   ` (9 subsequent siblings)
  24 siblings, 1 reply; 57+ messages in thread
From: Samuel Martin @ 2014-04-22 23:15 UTC (permalink / raw)
  To: buildroot

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)
---
 package/opencv/opencv.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index a4bdd39..eed5338 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -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
-- 
1.9.2

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

* [Buildroot] [PATCH v2 16/24] opencv: enable SSE4.1 SSE4.2 support when available
  2014-04-22 23:15 [Buildroot] [PATCH v2 00/24] Scientific libraries Samuel Martin
                   ` (14 preceding siblings ...)
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 15/24] opencv: disable OpenMP support Samuel Martin
@ 2014-04-22 23:15 ` Samuel Martin
  2014-05-04  9:24   ` Yann E. MORIN
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 17/24] opencv: rework V4L/libv4l support Samuel Martin
                   ` (8 subsequent siblings)
  24 siblings, 1 reply; 57+ messages in thread
From: Samuel Martin @ 2014-04-22 23:15 UTC (permalink / raw)
  To: buildroot

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

---
changes v1 -> v2:
- new patch (split suggested by Yann)
---
 package/opencv/opencv.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index eed5338..14a095c 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -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
-- 
1.9.2

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

* [Buildroot] [PATCH v2 17/24] opencv: rework V4L/libv4l support
  2014-04-22 23:15 [Buildroot] [PATCH v2 00/24] Scientific libraries Samuel Martin
                   ` (15 preceding siblings ...)
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 16/24] opencv: enable SSE4.1 SSE4.2 support when available Samuel Martin
@ 2014-04-22 23:15 ` Samuel Martin
  2014-05-04  9:32   ` Yann E. MORIN
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 18/24] opencv: add jasper support Samuel Martin
                   ` (7 subsequent siblings)
  24 siblings, 1 reply; 57+ messages in thread
From: Samuel Martin @ 2014-04-22 23:15 UTC (permalink / raw)
  To: buildroot

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.

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

---
changes v1 -> v2:
- rebase
- extend commit message
---
 package/opencv/Config.in | 11 ++++++-----
 package/opencv/opencv.mk | 10 +++++++---
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 129e0aa..0db239e 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -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"
 
diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index 14a095c..e6de252 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -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:
-- 
1.9.2

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

* [Buildroot] [PATCH v2 18/24] opencv: add jasper support
  2014-04-22 23:15 [Buildroot] [PATCH v2 00/24] Scientific libraries Samuel Martin
                   ` (16 preceding siblings ...)
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 17/24] opencv: rework V4L/libv4l support Samuel Martin
@ 2014-04-22 23:15 ` Samuel Martin
  2014-05-04  9:40   ` Yann E. MORIN
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 19/24] opencv: add Qt5 support Samuel Martin
                   ` (6 subsequent siblings)
  24 siblings, 1 reply; 57+ messages in thread
From: Samuel Martin @ 2014-04-22 23:15 UTC (permalink / raw)
  To: buildroot

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

---
changes v1 -> v2:
- reword the option help text (Yann)
---
 package/opencv/Config.in | 7 +++++++
 package/opencv/opencv.mk | 7 +++++++
 2 files changed, 14 insertions(+)

diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 0db239e..2f47869 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -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
diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index e6de252..c4aa967 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -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
-- 
1.9.2

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

* [Buildroot] [PATCH v2 19/24] opencv: add Qt5 support
  2014-04-22 23:15 [Buildroot] [PATCH v2 00/24] Scientific libraries Samuel Martin
                   ` (17 preceding siblings ...)
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 18/24] opencv: add jasper support Samuel Martin
@ 2014-04-22 23:15 ` Samuel Martin
  2014-05-04  9:51   ` Yann E. MORIN
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 20/24] opencv: add python/numpy support Samuel Martin
                   ` (5 subsequent siblings)
  24 siblings, 1 reply; 57+ messages in thread
From: Samuel Martin @ 2014-04-22 23:15 UTC (permalink / raw)
  To: buildroot

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.

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

---
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(-)

diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 2f47869..8825060 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -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"
diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index c4aa967..58bc5c0 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -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
-- 
1.9.2

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

* [Buildroot] [PATCH v2 20/24] opencv: add python/numpy support
  2014-04-22 23:15 [Buildroot] [PATCH v2 00/24] Scientific libraries Samuel Martin
                   ` (18 preceding siblings ...)
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 19/24] opencv: add Qt5 support Samuel Martin
@ 2014-04-22 23:15 ` Samuel Martin
  2014-05-04 10:00   ` Yann E. MORIN
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 21/24] opencv: define modules inter-dependencies Samuel Martin
                   ` (4 subsequent siblings)
  24 siblings, 1 reply; 57+ messages in thread
From: Samuel Martin @ 2014-04-22 23:15 UTC (permalink / raw)
  To: buildroot

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.

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

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

diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 8825060..e52f22a 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -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"
diff --git a/package/opencv/opencv-0001-fix-cross-compilation-issue-with-Numpy.patch b/package/opencv/opencv-0001-fix-cross-compilation-issue-with-Numpy.patch
new file mode 100644
index 0000000..aff1872
--- /dev/null
+++ b/package/opencv/opencv-0001-fix-cross-compilation-issue-with-Numpy.patch
@@ -0,0 +1,71 @@
+From 6cb90c0e976ff24af85167e71d88c9d9b2ed06c7 Mon Sep 17 00:00:00 2001
+From: Vincent Rabaud <vrabaud@aldebaran-robotics.com>
+Date: Mon, 20 Jan 2014 10:23:46 +0100
+Subject: [PATCH] fix cross-compilation issue with Numpy
+
+---
+ cmake/OpenCVDetectPython.cmake | 37 +++++++++++++++++++++++++++++--------
+ 1 file changed, 29 insertions(+), 8 deletions(-)
+
+diff --git a/cmake/OpenCVDetectPython.cmake b/cmake/OpenCVDetectPython.cmake
+index 3326bcd..8c488e6 100644
+--- a/cmake/OpenCVDetectPython.cmake
++++ b/cmake/OpenCVDetectPython.cmake
+@@ -80,14 +80,29 @@ if(PYTHON_EXECUTABLE)
+     endif()
+     SET(PYTHON_PACKAGES_PATH "${_PYTHON_PACKAGES_PATH}" CACHE PATH "Where to install the python packages.")
+ 
+-    if(NOT PYTHON_NUMPY_INCLUDE_DIR)
+-      # Attempt to discover the NumPy include directory. If this succeeds, then build python API with NumPy
+-      execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import os; os.environ['DISTUTILS_USE_SDK']='1'; import numpy.distutils; print numpy.distutils.misc_util.get_numpy_include_dirs()[0]"
+-                      RESULT_VARIABLE PYTHON_NUMPY_PROCESS
+-                      OUTPUT_VARIABLE PYTHON_NUMPY_INCLUDE_DIR
+-                      OUTPUT_STRIP_TRAILING_WHITESPACE)
++    if(NOT CMAKE_CROSSCOMPILING)
++      if(NOT PYTHON_NUMPY_INCLUDE_DIR)
++        # Attempt to discover the NumPy include directory. If this succeeds, then build python API with NumPy
++        execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import os; os.environ['DISTUTILS_USE_SDK']='1'; import numpy.distutils; print numpy.distutils.misc_util.get_numpy_include_dirs()[0]"
++                        RESULT_VARIABLE PYTHON_NUMPY_PROCESS
++                        OUTPUT_VARIABLE PYTHON_NUMPY_INCLUDE_DIR
++                        OUTPUT_STRIP_TRAILING_WHITESPACE)
+ 
+-      if(PYTHON_NUMPY_PROCESS EQUAL 0)
++        if(PYTHON_NUMPY_PROCESS EQUAL 0)
++          file(TO_CMAKE_PATH "${PYTHON_NUMPY_INCLUDE_DIR}" _PYTHON_NUMPY_INCLUDE_DIR)
++          set(PYTHON_NUMPY_INCLUDE_DIR ${_PYTHON_NUMPY_INCLUDE_DIR} CACHE PATH "Path to numpy headers")
++        endif()
++      endif()
++    else()
++      if(NOT PYTHON_NUMPY_INCLUDE_DIR)
++        message(STATUS "Cannot probe for Python/Numpy support (because we are cross-compiling OpenCV)")
++        message(STATUS "If you want to enable Python/Numpy support, set the following variables:")
++        message(STATUS "  PYTHON_EXECUTABLE")
++        message(STATUS "  PYTHON_INCLUDE_DIR")
++        message(STATUS "  PYTHON_LIBRARY")
++        message(STATUS "  PYTHON_NUMPY_INCLUDE_DIR")
++        message(STATUS "  PYTHON_NUMPY_VERSION")
++      else()
+         file(TO_CMAKE_PATH "${PYTHON_NUMPY_INCLUDE_DIR}" _PYTHON_NUMPY_INCLUDE_DIR)
+         set(PYTHON_NUMPY_INCLUDE_DIR ${_PYTHON_NUMPY_INCLUDE_DIR} CACHE PATH "Path to numpy headers")
+       endif()
+@@ -95,10 +110,16 @@ if(PYTHON_EXECUTABLE)
+ 
+     if(PYTHON_NUMPY_INCLUDE_DIR)
+       set(PYTHON_USE_NUMPY TRUE)
+-      execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import numpy; print numpy.version.version"
++      if(NOT CMAKE_CROSSCOMPILING)
++        execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import numpy; print numpy.version.version"
+                         RESULT_VARIABLE PYTHON_NUMPY_PROCESS
+                         OUTPUT_VARIABLE PYTHON_NUMPY_VERSION
+                         OUTPUT_STRIP_TRAILING_WHITESPACE)
++      else()
++        if(NOT PYTHON_NUMPY_VERSION)
++          set(PYTHON_NUMPY_VERSION "undefined - cannot be probed because of the cross-compilation")
++        endif()
++      endif()
+     endif()
+   endif(NOT ANDROID AND NOT IOS)
+ 
+-- 
+1.9.0
+
diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index 58bc5c0..5f28448 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -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
-- 
1.9.2

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

* [Buildroot] [PATCH v2 21/24] opencv: define modules inter-dependencies
  2014-04-22 23:15 [Buildroot] [PATCH v2 00/24] Scientific libraries Samuel Martin
                   ` (19 preceding siblings ...)
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 20/24] opencv: add python/numpy support Samuel Martin
@ 2014-04-22 23:15 ` Samuel Martin
  2014-05-04 10:04   ` Yann E. MORIN
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 22/24] opencv: add hidden symbol BR2_PACKAGE_OPENCV_USE_DEPRECATED_HEADERS Samuel Martin
                   ` (3 subsequent siblings)
  24 siblings, 1 reply; 57+ messages in thread
From: Samuel Martin @ 2014-04-22 23:15 UTC (permalink / raw)
  To: buildroot

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.

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

---
changes v1 -> v2:
- rebase
---
 package/opencv/Config.in | 75 ++++++++++++++++++++++++++++++++++++++----------
 1 file changed, 60 insertions(+), 15 deletions(-)

diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index e52f22a..31732a6 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -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.
 
-- 
1.9.2

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

* [Buildroot] [PATCH v2 22/24] opencv: add hidden symbol BR2_PACKAGE_OPENCV_USE_DEPRECATED_HEADERS
  2014-04-22 23:15 [Buildroot] [PATCH v2 00/24] Scientific libraries Samuel Martin
                   ` (20 preceding siblings ...)
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 21/24] opencv: define modules inter-dependencies Samuel Martin
@ 2014-04-22 23:15 ` Samuel Martin
  2014-05-04 10:06   ` Yann E. MORIN
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 23/24] vlc: add opencv support Samuel Martin
                   ` (2 subsequent siblings)
  24 siblings, 1 reply; 57+ messages in thread
From: Samuel Martin @ 2014-04-22 23:15 UTC (permalink / raw)
  To: buildroot

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

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

---
changes v1 -> v2:
- new patch
---
 package/opencv/Config.in | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 31732a6..628c8f3 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -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
-- 
1.9.2

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

* [Buildroot] [PATCH v2 23/24] vlc: add opencv support
  2014-04-22 23:15 [Buildroot] [PATCH v2 00/24] Scientific libraries Samuel Martin
                   ` (21 preceding siblings ...)
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 22/24] opencv: add hidden symbol BR2_PACKAGE_OPENCV_USE_DEPRECATED_HEADERS Samuel Martin
@ 2014-04-22 23:15 ` Samuel Martin
  2014-05-04 10:08   ` Yann E. MORIN
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 24/24] gst1-plugins-bad: rework opencv plugin dependencies Samuel Martin
  2014-07-16 21:03 ` [Buildroot] [PATCH v2 00/24] Scientific libraries Thomas Petazzoni
  24 siblings, 1 reply; 57+ messages in thread
From: Samuel Martin @ 2014-04-22 23:15 UTC (permalink / raw)
  To: buildroot

Add OpenCV support for video filter in vlc.

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

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

---
changes v1 -> v2:
- new patch
---
 package/vlc/Config.in | 1 +
 package/vlc/vlc.mk    | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/package/vlc/Config.in b/package/vlc/Config.in
index cdb0d16..ede9269 100644
--- a/package/vlc/Config.in
+++ b/package/vlc/Config.in
@@ -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,
diff --git a/package/vlc/vlc.mk b/package/vlc/vlc.mk
index e14c9c3..6e0f61d 100644
--- a/package/vlc/vlc.mk
+++ b/package/vlc/vlc.mk
@@ -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
-- 
1.9.2

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

* [Buildroot] [PATCH v2 24/24] gst1-plugins-bad: rework opencv plugin dependencies
  2014-04-22 23:15 [Buildroot] [PATCH v2 00/24] Scientific libraries Samuel Martin
                   ` (22 preceding siblings ...)
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 23/24] vlc: add opencv support Samuel Martin
@ 2014-04-22 23:15 ` Samuel Martin
  2014-05-04 10:10   ` Yann E. MORIN
  2014-07-16 21:03 ` [Buildroot] [PATCH v2 00/24] Scientific libraries Thomas Petazzoni
  24 siblings, 1 reply; 57+ messages in thread
From: Samuel Martin @ 2014-04-22 23:15 UTC (permalink / raw)
  To: buildroot

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.

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

---
changes v1 -> v2:
- new patch
---
 package/gstreamer1/gst1-plugins-bad/Config.in | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/package/gstreamer1/gst1-plugins-bad/Config.in b/package/gstreamer1/gst1-plugins-bad/Config.in
index 02fa18c..e8bc110 100644
--- a/package/gstreamer1/gst1-plugins-bad/Config.in
+++ b/package/gstreamer1/gst1-plugins-bad/Config.in
@@ -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
 
-- 
1.9.2

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

* [Buildroot] [PATCH v2 01/24] qt: add an option to install the test module
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 01/24] qt: add an option to install the test module Samuel Martin
@ 2014-05-03 16:58   ` Yann E. MORIN
  2014-05-03 21:10   ` Peter Korsgaard
  1 sibling, 0 replies; 57+ messages in thread
From: Yann E. MORIN @ 2014-05-03 16:58 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:
> 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>

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

Regards,
Yann E. MORIN.

> ---
> changes v1 -> v2:
> - rebase
> - change default value to n
> ---
>  package/qt/Config.in | 5 +++++
>  package/qt/qt.mk     | 3 +++
>  2 files changed, 8 insertions(+)
> 
> diff --git a/package/qt/Config.in b/package/qt/Config.in
> index eed25c8..9faf2cd 100644
> --- a/package/qt/Config.in
> +++ b/package/qt/Config.in
> @@ -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
> diff --git a/package/qt/qt.mk b/package/qt/qt.mk
> index 507e0db..bb065f3 100644
> --- a/package/qt/qt.mk
> +++ b/package/qt/qt.mk
> @@ -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
>  
> -- 
> 1.9.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

* [Buildroot] [PATCH v2 02/24] opencv: fix qt selection when highgui is enable
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 02/24] opencv: fix qt selection when highgui is enable Samuel Martin
@ 2014-05-03 17:01   ` Yann E. MORIN
  2014-05-03 21:11   ` Peter Korsgaard
  1 sibling, 0 replies; 57+ messages in thread
From: Yann E. MORIN @ 2014-05-03 17:01 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:
> 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>

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

Regards,
Yann E. MORIN.

> ---
> changes v1 -> v2:
> - rebase
> ---
>  package/opencv/Config.in | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index b40e141..49ada5d 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -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"
> -- 
> 1.9.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

* [Buildroot] [PATCH v2 03/24] armadillo: new package
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 03/24] armadillo: new package Samuel Martin
@ 2014-05-03 17:08   ` Yann E. MORIN
  2014-05-03 19:50     ` Samuel Martin
  2014-05-04 21:18   ` Peter Korsgaard
  1 sibling, 1 reply; 57+ messages in thread
From: Yann E. MORIN @ 2014-05-03 17:08 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:
> Armadillo is a C++ linear algebra library.
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>

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

Some other comments below...

[--SNIP--]
> diff --git a/package/Config.in b/package/Config.in
> index 07fd166..4475b07 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -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--]
> diff --git a/package/armadillo/armadillo.mk b/package/armadillo/armadillo.mk
> new file mode 100644
> index 0000000..b2cfdfc
> --- /dev/null
> +++ b/package/armadillo/armadillo.mk
> @@ -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.

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

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

* [Buildroot] [PATCH v2 04/24] clapack: new package
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 04/24] clapack: " Samuel Martin
@ 2014-05-03 17:23   ` Yann E. MORIN
  2014-05-04  7:10   ` Peter Korsgaard
  1 sibling, 0 replies; 57+ messages in thread
From: Yann E. MORIN @ 2014-05-03 17:23 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:
> 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.

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! ;-)

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

[yann.morin.1998 at free.fr: reviewed except for the cmake changes]
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
> 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
> 
> diff --git a/package/Config.in b/package/Config.in
> index 4475b07..9c91844 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -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"
> diff --git a/package/clapack/Config.in b/package/clapack/Config.in
> new file mode 100644
> index 0000000..a4121ae
> --- /dev/null
> +++ b/package/clapack/Config.in
> @@ -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.
> diff --git a/package/clapack/clapack-0001-cmake-force-libf2c-to-be-built-as-a-static-library.patch b/package/clapack/clapack-0001-cmake-force-libf2c-to-be-built-as-a-static-library.patch
> new file mode 100644
> index 0000000..8fede9d
> --- /dev/null
> +++ b/package/clapack/clapack-0001-cmake-force-libf2c-to-be-built-as-a-static-library.patch
> @@ -0,0 +1,32 @@
> +From 4fe2f454e454d9e6b1e83b2ea67581990461ed36 Mon Sep 17 00:00:00 2001
> +From: Samuel Martin <s.martin49@gmail.com>
> +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 <s.martin49@gmail.com>
> +---
> + 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
> +
> diff --git a/package/clapack/clapack-0002-cmake-make-test-build-sensitive-to-BUILD_TESTING.patch b/package/clapack/clapack-0002-cmake-make-test-build-sensitive-to-BUILD_TESTING.patch
> new file mode 100644
> index 0000000..d56464c
> --- /dev/null
> +++ 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 <s.martin49@gmail.com>
> +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 <s.martin49@gmail.com>
> +---
> + 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
> +
> diff --git a/package/clapack/clapack-0003-cmake-do-not-try-to-run-arithchk-when-cross-compilin.patch b/package/clapack/clapack-0003-cmake-do-not-try-to-run-arithchk-when-cross-compilin.patch
> new file mode 100644
> index 0000000..1654c89
> --- /dev/null
> +++ b/package/clapack/clapack-0003-cmake-do-not-try-to-run-arithchk-when-cross-compilin.patch
> @@ -0,0 +1,70 @@
> +From a2f0669fac1f8e7183b15cf7d14f0e99a2d8b012 Mon Sep 17 00:00:00 2001
> +From: Samuel Martin <s.martin49@gmail.com>
> +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 <s.martin49@gmail.com>
> +---
> + 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
> +
> diff --git a/package/clapack/clapack-0004-cmake-blas-add-library-and-header-install-rules.patch b/package/clapack/clapack-0004-cmake-blas-add-library-and-header-install-rules.patch
> new file mode 100644
> index 0000000..e83b066
> --- /dev/null
> +++ b/package/clapack/clapack-0004-cmake-blas-add-library-and-header-install-rules.patch
> @@ -0,0 +1,23 @@
> +From 675111e8ffc179276a7e4950fe4a4eda4d38a703 Mon Sep 17 00:00:00 2001
> +From: Samuel Martin <s.martin49@gmail.com>
> +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 <s.martin49@gmail.com>
> +---
> + 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
> +
> diff --git a/package/clapack/clapack-0005-cmake-lapack-add-library-and-header-install-rules.patch b/package/clapack/clapack-0005-cmake-lapack-add-library-and-header-install-rules.patch
> new file mode 100644
> index 0000000..abba460
> --- /dev/null
> +++ b/package/clapack/clapack-0005-cmake-lapack-add-library-and-header-install-rules.patch
> @@ -0,0 +1,24 @@
> +From 9dfac0d55a31be59a856bad9d3a5071d65176597 Mon Sep 17 00:00:00 2001
> +From: Samuel Martin <s.martin49@gmail.com>
> +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 <s.martin49@gmail.com>
> +---
> + 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
> +
> diff --git a/package/clapack/clapack.mk b/package/clapack/clapack.mk
> new file mode 100644
> index 0000000..23d25fb
> --- /dev/null
> +++ b/package/clapack/clapack.mk
> @@ -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))
> -- 
> 1.9.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

* [Buildroot] [PATCH v2 05/24] python-numpy: new package
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 05/24] python-numpy: " Samuel Martin
@ 2014-05-03 17:40   ` Yann E. MORIN
  2014-07-16 20:30   ` Thomas Petazzoni
  1 sibling, 0 replies; 57+ messages in thread
From: Yann E. MORIN @ 2014-05-03 17:40 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:
> 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>

[--SNIP--]
> diff --git a/package/python-numpy/Config.in b/package/python-numpy/Config.in
> new file mode 100644
> index 0000000..c80e5c4
> --- /dev/null
> +++ b/package/python-numpy/Config.in
> @@ -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.

> +	  http://www.numpy.org/
> diff --git a/package/python-numpy/python-numpy.mk b/package/python-numpy/python-numpy.mk
> new file mode 100644
> index 0000000..e7c91c4
> --- /dev/null
> +++ b/package/python-numpy/python-numpy.mk
> @@ -0,0 +1,41 @@
> +################################################################################
> +#
> +# python-numpy
> +#
> +################################################################################
> +
> +PYTHON_NUMPY_VERSION = 1.8.0

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

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

> +# 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))
> -- 
> 1.9.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

* [Buildroot] [PATCH v2 03/24] armadillo: new package
  2014-05-03 17:08   ` Yann E. MORIN
@ 2014-05-03 19:50     ` Samuel Martin
  0 siblings, 0 replies; 57+ messages in thread
From: Samuel Martin @ 2014-05-03 19:50 UTC (permalink / raw)
  To: buildroot

Yann, all,

On Sat, May 3, 2014 at 7:08 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> Samuel, All,
>
> On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:
>> Armadillo is a C++ linear algebra library.
>>
>> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
>
> This should come _after_ you add the clapack package, since it is a
> dependency of armadillo.

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

>
> Some other comments below...
>
> [--SNIP--]
>> diff --git a/package/Config.in b/package/Config.in
>> index 07fd166..4475b07 100644
>> --- a/package/Config.in
>> +++ b/package/Config.in
>> @@ -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.
good catch!

>
> [--SNIP--]
>> diff --git a/package/armadillo/armadillo.mk b/package/armadillo/armadillo.mk
>> new file mode 100644
>> index 0000000..b2cfdfc
>> --- /dev/null
>> +++ b/package/armadillo/armadillo.mk
>> @@ -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.
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 ;-])

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

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



-- 
Samuel

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

* [Buildroot] [PATCH v2 06/24] python-numpy: add optional blas/lapack support
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 06/24] python-numpy: add optional blas/lapack support Samuel Martin
@ 2014-05-03 20:05   ` Yann E. MORIN
  2014-07-16 20:50   ` Thomas Petazzoni
  1 sibling, 0 replies; 57+ messages in thread
From: Yann E. MORIN @ 2014-05-03 20:05 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:
> python-numpy can be linked with libblas and liblapack, so automatically
> do it when clapack is enabled.
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> 
> ---
> 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(+)
> 
> diff --git a/package/python-numpy/python-numpy.mk b/package/python-numpy/python-numpy.mk
> index e7c91c4..b0ab031 100644
> --- a/package/python-numpy/python-numpy.mk
> +++ b/package/python-numpy/python-numpy.mk
> @@ -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...

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

>  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
> -- 
> 1.9.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

* [Buildroot] [PATCH v2 01/24] qt: add an option to install the test module
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 01/24] qt: add an option to install the test module Samuel Martin
  2014-05-03 16:58   ` Yann E. MORIN
@ 2014-05-03 21:10   ` Peter Korsgaard
  1 sibling, 0 replies; 57+ messages in thread
From: Peter Korsgaard @ 2014-05-03 21:10 UTC (permalink / raw)
  To: buildroot

>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> 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.

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

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH v2 02/24] opencv: fix qt selection when highgui is enable
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 02/24] opencv: fix qt selection when highgui is enable Samuel Martin
  2014-05-03 17:01   ` Yann E. MORIN
@ 2014-05-03 21:11   ` Peter Korsgaard
  1 sibling, 0 replies; 57+ messages in thread
From: Peter Korsgaard @ 2014-05-03 21:11 UTC (permalink / raw)
  To: buildroot

>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> 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.

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

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH v2 07/24] opencv: bump to version 2.4.8
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 07/24] opencv: bump to version 2.4.8 Samuel Martin
@ 2014-05-03 21:28   ` Yann E. MORIN
  0 siblings, 0 replies; 57+ messages in thread
From: Yann E. MORIN @ 2014-05-03 21:28 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:
> 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.
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>

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

Regards,
Yann E. MORIN.

> ---
> 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(-)
> 
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index 49ada5d..2c6200c 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -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
>  
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index 42f9b0a..10f11cf 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -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:
> -- 
> 1.9.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

* [Buildroot] [PATCH v2 08/24] opencv: add license details
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 08/24] opencv: add license details Samuel Martin
@ 2014-05-03 21:31   ` Yann E. MORIN
  0 siblings, 0 replies; 57+ messages in thread
From: Yann E. MORIN @ 2014-05-03 21:31 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>

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

Regards,
Yann E. MORIN.

> ---
> changes v1 -> v2:
> - new patch (splitting suggested by Yann)
> ---
>  package/opencv/opencv.mk | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index 10f11cf..a4d2ee0 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -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)   \
> -- 
> 1.9.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

* [Buildroot] [PATCH v2 09/24] opencv: sort and reorder CMake configuration flags
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 09/24] opencv: sort and reorder CMake configuration flags Samuel Martin
@ 2014-05-03 21:40   ` Yann E. MORIN
  0 siblings, 0 replies; 57+ messages in thread
From: Yann E. MORIN @ 2014-05-03 21:40 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:
> To make easier future package update.
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> 
> ---
> changes v1 -> v2:
> - new patch (split suggested by Yann)
> ---
>  package/opencv/opencv.mk | 39 +++++++++++++++++++++++++--------------
>  1 file changed, 25 insertions(+), 14 deletions(-)
> 
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index a4d2ee0..ae89577 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -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

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.

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

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

* [Buildroot] [PATCH v2 10/24] opencv: sort and reorder HW support options
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 10/24] opencv: sort and reorder HW support options Samuel Martin
@ 2014-05-03 22:15   ` Yann E. MORIN
  0 siblings, 0 replies; 57+ messages in thread
From: Yann E. MORIN @ 2014-05-03 22:15 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:
> 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?

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

Add a bit more to the commit log, then:
--> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

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

Regards,
Yann E. MORIN.

> ---
> changes v1 -> v2:
> - new patch (split suggested by Yann)
> ---
>  package/opencv/opencv.mk | 37 ++++++++++++++++++++++++++++++-------
>  1 file changed, 30 insertions(+), 7 deletions(-)
> 
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index ae89577..046b847 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -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
> -- 
> 1.9.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

* [Buildroot] [PATCH v2 11/24] opencv: sort and reorder SW support options
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 11/24] opencv: sort and reorder SW " Samuel Martin
@ 2014-05-03 22:19   ` Yann E. MORIN
  0 siblings, 0 replies; 57+ messages in thread
From: Yann E. MORIN @ 2014-05-03 22:19 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:
> Sort SW features by category and disable them when not supported by
> Buildroot.

... and add a few missing ones.

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

With the commit log ammended:
--> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
> changes v1 -> v2:
> - new patch (split suggested by Yann)
> ---
>  package/opencv/opencv.mk | 62 +++++++++++++++++++++++++++++++-----------------
>  1 file changed, 40 insertions(+), 22 deletions(-)
> 
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index 046b847..264507c 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -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
> -- 
> 1.9.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

* [Buildroot] [PATCH v2 12/24] opencv: add superres module knob
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 12/24] opencv: add superres module knob Samuel Martin
@ 2014-05-03 22:23   ` Yann E. MORIN
  0 siblings, 0 replies; 57+ messages in thread
From: Yann E. MORIN @ 2014-05-03 22:23 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:
> This new module has been introduced in opencv-2.4.8.
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> 
> ---
> changes v1 -> v2:
> - new patch (split suggested by Yann)
> ---
>  package/opencv/Config.in | 7 +++++++
>  package/opencv/opencv.mk | 1 +
>  2 files changed, 8 insertions(+)
> 
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index 2c6200c..129e0aa 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -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" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> +	help
> +	  Include opencv_superres "super resolution" - module into the OpenCV
> +	  build.
> +
>  config BR2_PACKAGE_OPENCV_LIB_TS
>  	bool "ts (touchscreen)"
>  	default y
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index 264507c..f129dc3 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -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) \
> -- 
> 1.9.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

* [Buildroot] [PATCH v2 13/24] opencv: disable apps module
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 13/24] opencv: disable apps module Samuel Martin
@ 2014-05-03 22:28   ` Yann E. MORIN
  0 siblings, 0 replies; 57+ messages in thread
From: Yann E. MORIN @ 2014-05-03 22:28 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:
> This module is used to build programs for training classifiers.
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>

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

Regards,
Yann E. MORIN.

> ---
> changes v1 -> v2:
> - new patch (split suggested by Yann)
> ---
>  package/opencv/opencv.mk | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index f129dc3..b87eddc 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -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                                                  \
> -- 
> 1.9.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

* [Buildroot] [PATCH v2 14/24] opencv: disable opencl support/module
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 14/24] opencv: disable opencl support/module Samuel Martin
@ 2014-05-03 22:34   ` Yann E. MORIN
  0 siblings, 0 replies; 57+ messages in thread
From: Yann E. MORIN @ 2014-05-03 22:34 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>

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

However, I have a question, below.

> ---
> changes v1 -> v2:
> - new patch (split suggested by Yann)
> ---
>  package/opencv/opencv.mk | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index b87eddc..a4bdd39 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -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  \

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.

>  	-DWITH_OPENEXR=OFF \
>  	-DWITH_OPENGL=OFF  \
>  	-DWITH_OPENNI=OFF  \
> -- 
> 1.9.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

* [Buildroot] [PATCH v2 04/24] clapack: new package
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 04/24] clapack: " Samuel Martin
  2014-05-03 17:23   ` Yann E. MORIN
@ 2014-05-04  7:10   ` Peter Korsgaard
  1 sibling, 0 replies; 57+ messages in thread
From: Peter Korsgaard @ 2014-05-04  7:10 UTC (permalink / raw)
  To: buildroot

>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> 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.

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

 > +++ b/package/clapack/Config.in
 > @@ -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.


 > +++ 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 <s.martin49@gmail.com>
 > +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?

 > +++ b/package/clapack/clapack.mk
 > @@ -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

_LICENSE_FILES is a space seperated list, not comma seperated.

Committed with these fixes, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH v2 15/24] opencv: disable OpenMP support
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 15/24] opencv: disable OpenMP support Samuel Martin
@ 2014-05-04  9:24   ` Yann E. MORIN
  0 siblings, 0 replies; 57+ messages in thread
From: Yann E. MORIN @ 2014-05-04  9:24 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:
> 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>

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

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.

> ---
> changes v1 -> v2:
> - new patch (split suggested by Yann)
> ---
>  package/opencv/opencv.mk | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index a4bdd39..eed5338 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -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
> -- 
> 1.9.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

* [Buildroot] [PATCH v2 16/24] opencv: enable SSE4.1 SSE4.2 support when available
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 16/24] opencv: enable SSE4.1 SSE4.2 support when available Samuel Martin
@ 2014-05-04  9:24   ` Yann E. MORIN
  0 siblings, 0 replies; 57+ messages in thread
From: Yann E. MORIN @ 2014-05-04  9:24 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>

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

Regards,
Yann E. MORIN.

> ---
> changes v1 -> v2:
> - new patch (split suggested by Yann)
> ---
>  package/opencv/opencv.mk | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index eed5338..14a095c 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -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
> -- 
> 1.9.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

* [Buildroot] [PATCH v2 17/24] opencv: rework V4L/libv4l support
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 17/24] opencv: rework V4L/libv4l support Samuel Martin
@ 2014-05-04  9:32   ` Yann E. MORIN
  0 siblings, 0 replies; 57+ messages in thread
From: Yann E. MORIN @ 2014-05-04  9:32 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:
> 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.
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> 
> ---
> changes v1 -> v2:
> - rebase
> - extend commit message
> ---
>  package/opencv/Config.in | 11 ++++++-----
>  package/opencv/opencv.mk | 10 +++++++---
>  2 files changed, 13 insertions(+), 8 deletions(-)
> 
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index 129e0aa..0db239e 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -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

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.

>  comment "Install options"
>  
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index 14a095c..e6de252 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -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:
> -- 
> 1.9.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

* [Buildroot] [PATCH v2 18/24] opencv: add jasper support
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 18/24] opencv: add jasper support Samuel Martin
@ 2014-05-04  9:40   ` Yann E. MORIN
  0 siblings, 0 replies; 57+ messages in thread
From: Yann E. MORIN @ 2014-05-04  9:40 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> 
> ---
> changes v1 -> v2:
> - reword the option help text (Yann)
> ---
>  package/opencv/Config.in | 7 +++++++
>  package/opencv/opencv.mk | 7 +++++++
>  2 files changed, 14 insertions(+)
> 
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index 0db239e..2f47869 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -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.

>  config BR2_PACKAGE_OPENCV_WITH_JPEG
>  	bool "jpeg support"
>  	select BR2_PACKAGE_JPEG
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index e6de252..c4aa967 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -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
> -- 
> 1.9.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

* [Buildroot] [PATCH v2 19/24] opencv: add Qt5 support
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 19/24] opencv: add Qt5 support Samuel Martin
@ 2014-05-04  9:51   ` Yann E. MORIN
  0 siblings, 0 replies; 57+ messages in thread
From: Yann E. MORIN @ 2014-05-04  9:51 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:
> 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.
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> 
> ---
> 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(-)
> 
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index 2f47869..8825060 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -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)

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

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

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.

>  config BR2_PACKAGE_OPENCV_WITH_TIFF
>  	bool "tiff support"
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index c4aa967..58bc5c0 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -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.

>  else
>  OPENCV_CONF_OPT += -DWITH_QT=OFF
>  endif
> -- 
> 1.9.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

* [Buildroot] [PATCH v2 20/24] opencv: add python/numpy support
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 20/24] opencv: add python/numpy support Samuel Martin
@ 2014-05-04 10:00   ` Yann E. MORIN
  0 siblings, 0 replies; 57+ messages in thread
From: Yann E. MORIN @ 2014-05-04 10:00 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:
> 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.
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
[--SNIP--]
> diff --git a/package/opencv/opencv-0001-fix-cross-compilation-issue-with-Numpy.patch b/package/opencv/opencv-0001-fix-cross-compilation-issue-with-Numpy.patch
> new file mode 100644
> index 0000000..aff1872
> --- /dev/null
> +++ b/package/opencv/opencv-0001-fix-cross-compilation-issue-with-Numpy.patch
> @@ -0,0 +1,71 @@
> +From 6cb90c0e976ff24af85167e71d88c9d9b2ed06c7 Mon Sep 17 00:00:00 2001
> +From: Vincent Rabaud <vrabaud@aldebaran-robotics.com>
> +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--]
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index 58bc5c0..5f28448 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -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...

>  	-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 += \

...here:
        -DBUILD_opencv_python=ON

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

> +endif
> +
>  # Installation hooks:
>  define OPENCV_CLEAN_INSTALL_DOC
>  	$(RM) -fr $(TARGET_DIR)/usr/share/OpenCV/doc
> -- 
> 1.9.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

* [Buildroot] [PATCH v2 21/24] opencv: define modules inter-dependencies
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 21/24] opencv: define modules inter-dependencies Samuel Martin
@ 2014-05-04 10:04   ` Yann E. MORIN
  0 siblings, 0 replies; 57+ messages in thread
From: Yann E. MORIN @ 2014-05-04 10:04 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:
> 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

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

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

With the small nit in the commit log above fixed:
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
> changes v1 -> v2:
> - rebase
> ---
>  package/opencv/Config.in | 75 ++++++++++++++++++++++++++++++++++++++----------
>  1 file changed, 60 insertions(+), 15 deletions(-)
> 
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index e52f22a..31732a6 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -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.
>  
> -- 
> 1.9.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

* [Buildroot] [PATCH v2 22/24] opencv: add hidden symbol BR2_PACKAGE_OPENCV_USE_DEPRECATED_HEADERS
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 22/24] opencv: add hidden symbol BR2_PACKAGE_OPENCV_USE_DEPRECATED_HEADERS Samuel Martin
@ 2014-05-04 10:06   ` Yann E. MORIN
  0 siblings, 0 replies; 57+ messages in thread
From: Yann E. MORIN @ 2014-05-04 10:06 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:
> This new hidden symbol aims to automatically select all OpenCV modules
> required when another package use the deprecated OpenCV 'cv.h' headers.
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>

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

Regards,
Yann E. MORIN.

> ---
> changes v1 -> v2:
> - new patch
> ---
>  package/opencv/Config.in | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index 31732a6..628c8f3 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -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
> -- 
> 1.9.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

* [Buildroot] [PATCH v2 23/24] vlc: add opencv support
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 23/24] vlc: add opencv support Samuel Martin
@ 2014-05-04 10:08   ` Yann E. MORIN
  0 siblings, 0 replies; 57+ messages in thread
From: Yann E. MORIN @ 2014-05-04 10:08 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:
> Add OpenCV support for video filter in vlc.
> 
> vlc source code still includes the headers from the deprecated OpenCV
> API.
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>

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

Regards,
Yann E. MORIN.

> ---
> changes v1 -> v2:
> - new patch
> ---
>  package/vlc/Config.in | 1 +
>  package/vlc/vlc.mk    | 7 +++++++
>  2 files changed, 8 insertions(+)
> 
> diff --git a/package/vlc/Config.in b/package/vlc/Config.in
> index cdb0d16..ede9269 100644
> --- a/package/vlc/Config.in
> +++ b/package/vlc/Config.in
> @@ -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,
> diff --git a/package/vlc/vlc.mk b/package/vlc/vlc.mk
> index e14c9c3..6e0f61d 100644
> --- a/package/vlc/vlc.mk
> +++ b/package/vlc/vlc.mk
> @@ -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
> -- 
> 1.9.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

* [Buildroot] [PATCH v2 24/24] gst1-plugins-bad: rework opencv plugin dependencies
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 24/24] gst1-plugins-bad: rework opencv plugin dependencies Samuel Martin
@ 2014-05-04 10:10   ` Yann E. MORIN
  0 siblings, 0 replies; 57+ messages in thread
From: Yann E. MORIN @ 2014-05-04 10:10 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-04-23 01:15 +0200, Samuel Martin spake thusly:
> 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.
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>

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

Regards,
Yann E. MORIN.

> ---
> changes v1 -> v2:
> - new patch
> ---
>  package/gstreamer1/gst1-plugins-bad/Config.in | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/package/gstreamer1/gst1-plugins-bad/Config.in b/package/gstreamer1/gst1-plugins-bad/Config.in
> index 02fa18c..e8bc110 100644
> --- a/package/gstreamer1/gst1-plugins-bad/Config.in
> +++ b/package/gstreamer1/gst1-plugins-bad/Config.in
> @@ -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
>  
> -- 
> 1.9.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

* [Buildroot] [PATCH v2 03/24] armadillo: new package
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 03/24] armadillo: new package Samuel Martin
  2014-05-03 17:08   ` Yann E. MORIN
@ 2014-05-04 21:18   ` Peter Korsgaard
  1 sibling, 0 replies; 57+ messages in thread
From: Peter Korsgaard @ 2014-05-04 21:18 UTC (permalink / raw)
  To: buildroot

>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:

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

 > diff --git a/package/Config.in b/package/Config.in
 > index 07fd166..4475b07 100644
 > --- a/package/Config.in
 > +++ b/package/Config.in
 > @@ -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"
 > diff --git a/package/armadillo/Config.in b/package/armadillo/Config.in
 > new file mode 100644
 > index 0000000..8d7e9f3
 > --- /dev/null
 > +++ b/package/armadillo/Config.in
 > @@ -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.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH v2 05/24] python-numpy: new package
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 05/24] python-numpy: " Samuel Martin
  2014-05-03 17:40   ` Yann E. MORIN
@ 2014-07-16 20:30   ` Thomas Petazzoni
  1 sibling, 0 replies; 57+ messages in thread
From: Thomas Petazzoni @ 2014-07-16 20:30 UTC (permalink / raw)
  To: buildroot

Dear Samuel Martin,

On Wed, 23 Apr 2014 01:15:37 +0200, Samuel Martin wrote:
> 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>

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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH v2 06/24] python-numpy: add optional blas/lapack support
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 06/24] python-numpy: add optional blas/lapack support Samuel Martin
  2014-05-03 20:05   ` Yann E. MORIN
@ 2014-07-16 20:50   ` Thomas Petazzoni
  1 sibling, 0 replies; 57+ messages in thread
From: Thomas Petazzoni @ 2014-07-16 20:50 UTC (permalink / raw)
  To: buildroot

Dear Samuel Martin,

On Wed, 23 Apr 2014 01:15:38 +0200, Samuel Martin wrote:

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

> @@ -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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH v2 00/24] Scientific libraries
  2014-04-22 23:15 [Buildroot] [PATCH v2 00/24] Scientific libraries Samuel Martin
                   ` (23 preceding siblings ...)
  2014-04-22 23:15 ` [Buildroot] [PATCH v2 24/24] gst1-plugins-bad: rework opencv plugin dependencies Samuel Martin
@ 2014-07-16 21:03 ` Thomas Petazzoni
  24 siblings, 0 replies; 57+ messages in thread
From: Thomas Petazzoni @ 2014-07-16 21:03 UTC (permalink / raw)
  To: buildroot

Dear Samuel Martin,

On Wed, 23 Apr 2014 01:15:32 +0200, Samuel Martin wrote:

>   opencv: bump to version 2.4.8

Applied.

>   opencv: add license details

Was already done by Gustavo.

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

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

>   opencv: add jasper support

Applied.

>   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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

end of thread, other threads:[~2014-07-16 21:03 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-22 23:15 [Buildroot] [PATCH v2 00/24] Scientific libraries Samuel Martin
2014-04-22 23:15 ` [Buildroot] [PATCH v2 01/24] qt: add an option to install the test module Samuel Martin
2014-05-03 16:58   ` Yann E. MORIN
2014-05-03 21:10   ` Peter Korsgaard
2014-04-22 23:15 ` [Buildroot] [PATCH v2 02/24] opencv: fix qt selection when highgui is enable Samuel Martin
2014-05-03 17:01   ` Yann E. MORIN
2014-05-03 21:11   ` Peter Korsgaard
2014-04-22 23:15 ` [Buildroot] [PATCH v2 03/24] armadillo: new package Samuel Martin
2014-05-03 17:08   ` Yann E. MORIN
2014-05-03 19:50     ` Samuel Martin
2014-05-04 21:18   ` Peter Korsgaard
2014-04-22 23:15 ` [Buildroot] [PATCH v2 04/24] clapack: " Samuel Martin
2014-05-03 17:23   ` Yann E. MORIN
2014-05-04  7:10   ` Peter Korsgaard
2014-04-22 23:15 ` [Buildroot] [PATCH v2 05/24] python-numpy: " Samuel Martin
2014-05-03 17:40   ` Yann E. MORIN
2014-07-16 20:30   ` Thomas Petazzoni
2014-04-22 23:15 ` [Buildroot] [PATCH v2 06/24] python-numpy: add optional blas/lapack support Samuel Martin
2014-05-03 20:05   ` Yann E. MORIN
2014-07-16 20:50   ` Thomas Petazzoni
2014-04-22 23:15 ` [Buildroot] [PATCH v2 07/24] opencv: bump to version 2.4.8 Samuel Martin
2014-05-03 21:28   ` Yann E. MORIN
2014-04-22 23:15 ` [Buildroot] [PATCH v2 08/24] opencv: add license details Samuel Martin
2014-05-03 21:31   ` Yann E. MORIN
2014-04-22 23:15 ` [Buildroot] [PATCH v2 09/24] opencv: sort and reorder CMake configuration flags Samuel Martin
2014-05-03 21:40   ` Yann E. MORIN
2014-04-22 23:15 ` [Buildroot] [PATCH v2 10/24] opencv: sort and reorder HW support options Samuel Martin
2014-05-03 22:15   ` Yann E. MORIN
2014-04-22 23:15 ` [Buildroot] [PATCH v2 11/24] opencv: sort and reorder SW " Samuel Martin
2014-05-03 22:19   ` Yann E. MORIN
2014-04-22 23:15 ` [Buildroot] [PATCH v2 12/24] opencv: add superres module knob Samuel Martin
2014-05-03 22:23   ` Yann E. MORIN
2014-04-22 23:15 ` [Buildroot] [PATCH v2 13/24] opencv: disable apps module Samuel Martin
2014-05-03 22:28   ` Yann E. MORIN
2014-04-22 23:15 ` [Buildroot] [PATCH v2 14/24] opencv: disable opencl support/module Samuel Martin
2014-05-03 22:34   ` Yann E. MORIN
2014-04-22 23:15 ` [Buildroot] [PATCH v2 15/24] opencv: disable OpenMP support Samuel Martin
2014-05-04  9:24   ` Yann E. MORIN
2014-04-22 23:15 ` [Buildroot] [PATCH v2 16/24] opencv: enable SSE4.1 SSE4.2 support when available Samuel Martin
2014-05-04  9:24   ` Yann E. MORIN
2014-04-22 23:15 ` [Buildroot] [PATCH v2 17/24] opencv: rework V4L/libv4l support Samuel Martin
2014-05-04  9:32   ` Yann E. MORIN
2014-04-22 23:15 ` [Buildroot] [PATCH v2 18/24] opencv: add jasper support Samuel Martin
2014-05-04  9:40   ` Yann E. MORIN
2014-04-22 23:15 ` [Buildroot] [PATCH v2 19/24] opencv: add Qt5 support Samuel Martin
2014-05-04  9:51   ` Yann E. MORIN
2014-04-22 23:15 ` [Buildroot] [PATCH v2 20/24] opencv: add python/numpy support Samuel Martin
2014-05-04 10:00   ` Yann E. MORIN
2014-04-22 23:15 ` [Buildroot] [PATCH v2 21/24] opencv: define modules inter-dependencies Samuel Martin
2014-05-04 10:04   ` Yann E. MORIN
2014-04-22 23:15 ` [Buildroot] [PATCH v2 22/24] opencv: add hidden symbol BR2_PACKAGE_OPENCV_USE_DEPRECATED_HEADERS Samuel Martin
2014-05-04 10:06   ` Yann E. MORIN
2014-04-22 23:15 ` [Buildroot] [PATCH v2 23/24] vlc: add opencv support Samuel Martin
2014-05-04 10:08   ` Yann E. MORIN
2014-04-22 23:15 ` [Buildroot] [PATCH v2 24/24] gst1-plugins-bad: rework opencv plugin dependencies Samuel Martin
2014-05-04 10:10   ` Yann E. MORIN
2014-07-16 21:03 ` [Buildroot] [PATCH v2 00/24] Scientific libraries Thomas Petazzoni

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