buildroot.buildroot.org archive mirror
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 00/11] Scientific libraries
@ 2014-02-16 21:59 Samuel Martin
  2014-02-16 21:59 ` [Buildroot] [PATCH 01/11] opencv: bump to version 2.4.8 Samuel Martin
                   ` (10 more replies)
  0 siblings, 11 replies; 28+ messages in thread
From: Samuel Martin @ 2014-02-16 21:59 UTC (permalink / raw)
  To: buildroot

Hi all,


Here is a series containing the bump of OpenCV and some new scientific
packages, among these python Numpy.

The OpenCV bump comes with a couple of refactoring and fixes (in
OpenCV itself and some of its reverse-dependencies).

This series targets (and has been rebased on) the branch next, but
prior to its integration, it also requires:
- cherry-picking the following commit in then branch next:
  commit e78d357551f3191fee7b6bcc18dfd8514819cab
    opencv: always enable opencv_core module when opencv is enabled
- and applying the following patches:
  http://patchwork.ozlabs.org/patch/312315/
  http://patchwork.ozlabs.org/patch/312316/


Yours,
Samuel


Samuel Martin (11):
  opencv: bump to version 2.4.8
  opencv: rework V4L/libv4l support
  opencv: add jasper support
  opencv: add Qt5 support
  clapack: new package
  armadillo: new package
  python-numpy: new package
  python-numpy: add install-staging command
  opencv: add python/numpy support
  opencv: define modules inter-dependencies
  vlc: add opencv support

 package/Config.in                                  |   3 +
 package/armadillo/Config.in                        |   9 ++
 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                         |  20 +++
 package/opencv/Config.in                           | 146 ++++++++++++++++----
 ...t-run-python-for-numpy-detection-when-cro.patch |  77 +++++++++++
 package/opencv/opencv.mk                           | 152 ++++++++++++++++-----
 package/python-numpy/Config.in                     |  14 ++
 package/python-numpy/python-numpy.mk               |  48 +++++++
 package/vlc/vlc.mk                                 |   7 +
 16 files changed, 671 insertions(+), 67 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-cmake-do-not-run-python-for-numpy-detection-when-cro.patch
 create mode 100644 package/python-numpy/Config.in
 create mode 100644 package/python-numpy/python-numpy.mk

--
1.8.5.4

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

* [Buildroot] [PATCH 01/11] opencv: bump to version 2.4.8
  2014-02-16 21:59 [Buildroot] [PATCH 00/11] Scientific libraries Samuel Martin
@ 2014-02-16 21:59 ` Samuel Martin
  2014-03-05 22:49   ` Yann E. MORIN
  2014-02-16 21:59 ` [Buildroot] [PATCH 02/11] opencv: rework V4L/libv4l support Samuel Martin
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 28+ messages in thread
From: Samuel Martin @ 2014-02-16 21:59 UTC (permalink / raw)
  To: buildroot

This patch bumps OpenCV version and does a number of cleanup in the
opencv.mk files:
- add an extract command because the source archive is only available
  under zip format since this 2.4.8 release. Since there is no default
  extract command for zip archive, we have to define it;
- add license details;
- add new modules options and update existing ones;
- update SSE support;
- sort and reorder the configure options (to make easier future package
  update);
- clean redundant C++ dependency (in the Qt knob).

However, it does not add any new 3rd-party support for the followings:
- jasper support;
- python/numpy support;
- Qt4 and Qt5 support (since the 2.4.6 release), so only Qt4 support is
  supported in this patch;
- optional libv4l dependency (since 2.4.7 release).
These will be addressed in followup patches.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
 package/opencv/Config.in |  12 +++--
 package/opencv/opencv.mk | 120 ++++++++++++++++++++++++++++++++++-------------
 2 files changed, 97 insertions(+), 35 deletions(-)

diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index ffb0916..c3273fd 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
 
@@ -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
@@ -164,8 +171,7 @@ 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
+	bool "qt4 backend support"
 	depends on !BR2_avr32 # qt
 	select BR2_PACKAGE_QT
 	select BR2_PACKAGE_QT_STL
diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index 42f9b0a..43aef62 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -4,23 +4,34 @@
 #
 ################################################################################
 
-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_SOURCE = opencv-$(OPENCV_VERSION).zip
+OPENCV_SITE = http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/$(OPENCV_VERSION)
 OPENCV_INSTALL_STAGING = YES
+OPENCV_LICENSE = BSD-3c
+OPENCV_LICENSE_FILES = doc/license.txt
+
+define OPENCV_EXTRACT_CMDS
+    unzip -d $(BUILD_DIR) $(DL_DIR)/$(OPENCV_SOURCE)
+endef
 
 OPENCV_CONF_OPT += \
 	-DCMAKE_BUILD_TYPE=$(if $(BR2_ENABLE_DEBUG),Debug,Release)   \
-	-DBUILD_WITH_STATIC_CRT=OFF                                  \
+	-DBUILD_WITH_DEBUG_INFO=OFF                                  \
+	\
 	-DBUILD_DOCS=OFF                                             \
 	-DBUILD_EXAMPLES=OFF                                         \
-	-DBUILD_PACKAGE=OFF                                          \
-	-DBUILD_TESTS=$(if $(BR2_PACKAGE_OPENCV_BUILD_TESTS),ON,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) \
+	-DBUILD_WITH_STATIC_CRT=OFF                                  \
+	\
+	-DBUILD_PACKAGE=OFF                     \
+	-DINSTALL_CREATE_DISTRIB=OFF            \
+	\
 	-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          \
@@ -32,9 +43,11 @@ 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                                                  \
+	-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)           \
@@ -45,9 +58,11 @@ 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) \
+	-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) \
@@ -62,45 +77,86 @@ 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)
 
-# 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
+
+# Non-Linux support (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	       \
+	\
+	-DWITH_AVFOUNDATION=OFF	  \
+	-DWITH_CARBON=OFF         \
+	-DWITH_QUICKTIME=OFF      \
+	\
+	-DWITH_VFW=OFF            \
+	-DWITH_WIN32UI=OFF        \
+	-DWITH_CSTRIPES=OFF       \
+	-DWITH_DSHOW=OFF          \
+	-DWITH_MSMF=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 \
+	-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_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_OPENCL=OFF         \
 	-DWITH_OPENEXR=OFF        \
 	-DWITH_OPENGL=OFF         \
+	-DWITH_OPENMP=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
+	-DWITH_XINE=OFF           \
 
 OPENCV_DEPENDENCIES += zlib
 
@@ -140,7 +196,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 +210,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.8.5.4

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

* [Buildroot] [PATCH 02/11] opencv: rework V4L/libv4l support
  2014-02-16 21:59 [Buildroot] [PATCH 00/11] Scientific libraries Samuel Martin
  2014-02-16 21:59 ` [Buildroot] [PATCH 01/11] opencv: bump to version 2.4.8 Samuel Martin
@ 2014-02-16 21:59 ` Samuel Martin
  2014-03-03 22:38   ` Thomas Petazzoni
  2014-03-05 22:55   ` Yann E. MORIN
  2014-02-16 21:59 ` [Buildroot] [PATCH 03/11] opencv: add jasper support Samuel Martin
                   ` (8 subsequent siblings)
  10 siblings, 2 replies; 28+ messages in thread
From: Samuel Martin @ 2014-02-16 21:59 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.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
 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 c3273fd..2acbe19 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -189,14 +189,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 43aef62..fb56769 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -210,10 +210,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.8.5.4

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

* [Buildroot] [PATCH 03/11] opencv: add jasper support
  2014-02-16 21:59 [Buildroot] [PATCH 00/11] Scientific libraries Samuel Martin
  2014-02-16 21:59 ` [Buildroot] [PATCH 01/11] opencv: bump to version 2.4.8 Samuel Martin
  2014-02-16 21:59 ` [Buildroot] [PATCH 02/11] opencv: rework V4L/libv4l support Samuel Martin
@ 2014-02-16 21:59 ` Samuel Martin
  2014-03-05 22:59   ` Yann E. MORIN
  2014-02-16 21:59 ` [Buildroot] [PATCH 04/11] opencv: add Qt5 support Samuel Martin
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 28+ messages in thread
From: Samuel Martin @ 2014-02-16 21:59 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
 package/opencv/Config.in | 6 ++++++
 package/opencv/opencv.mk | 8 +++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 2acbe19..73f03e1 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -158,6 +158,12 @@ config BR2_PACKAGE_OPENCV_WITH_GTK
 	depends on BR2_INSTALL_LIBSTDCPP
 	select BR2_PACKAGE_LIBGTK2
 
+config BR2_PACKAGE_OPENCV_WITH_JASPER
+	bool "jasper (jpeg 2000) support"
+	select BR2_PACKAGE_JASPER
+	help
+	  Use shared libjasper from the target system.
+
 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 fb56769..ff11f1c 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -149,7 +149,6 @@ OPENCV_CONF_OPT += \
 	-DWITH_1394=OFF           \
 	-DWITH_EIGEN=OFF          \
 	-DWITH_IMAGEIO=OFF        \
-	-DWITH_JASPER=OFF         \
 	-DWITH_OPENCL=OFF         \
 	-DWITH_OPENEXR=OFF        \
 	-DWITH_OPENGL=OFF         \
@@ -181,6 +180,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.8.5.4

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

* [Buildroot] [PATCH 04/11] opencv: add Qt5 support
  2014-02-16 21:59 [Buildroot] [PATCH 00/11] Scientific libraries Samuel Martin
                   ` (2 preceding siblings ...)
  2014-02-16 21:59 ` [Buildroot] [PATCH 03/11] opencv: add jasper support Samuel Martin
@ 2014-02-16 21:59 ` Samuel Martin
  2014-03-05 23:22   ` Yann E. MORIN
  2014-02-16 21:59 ` [Buildroot] [PATCH 05/11] clapack: new package Samuel Martin
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 28+ messages in thread
From: Samuel Martin @ 2014-02-16 21:59 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>
---
 package/opencv/Config.in | 41 ++++++++++++++++++++++++++++++++---------
 package/opencv/opencv.mk |  4 ++--
 2 files changed, 34 insertions(+), 11 deletions(-)

diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 73f03e1..b6192dc 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -177,15 +177,38 @@ config BR2_PACKAGE_OPENCV_WITH_PNG
 	  Use shared libpng from the target system.
 
 config BR2_PACKAGE_OPENCV_WITH_QT
-	bool "qt4 backend support"
-	depends on !BR2_avr32 # 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)
+	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
+endif
 
 config BR2_PACKAGE_OPENCV_WITH_TIFF
 	bool "tiff support"
diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index ff11f1c..51255aa 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -202,8 +202,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.8.5.4

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

* [Buildroot] [PATCH 05/11] clapack: new package
  2014-02-16 21:59 [Buildroot] [PATCH 00/11] Scientific libraries Samuel Martin
                   ` (3 preceding siblings ...)
  2014-02-16 21:59 ` [Buildroot] [PATCH 04/11] opencv: add Qt5 support Samuel Martin
@ 2014-02-16 21:59 ` Samuel Martin
  2014-03-06 19:30   ` Yann E. MORIN
  2014-02-16 21:59 ` [Buildroot] [PATCH 06/11] armadillo: " Samuel Martin
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 28+ messages in thread
From: Samuel Martin @ 2014-02-16 21:59 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>
---
 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                         | 20 ++++++
 8 files changed, 268 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 b8b2f4e..d843961 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -727,6 +727,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..fc81d43
--- /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 optimized BLAS library for the hardware an 'arith.h' header should
+	  be provided.
+
+	  If empty, the library wil just be not optimized by the compiler.
+
+	  In any case an 'arithchk' program is built (but not installed), to be run
+	  on the target for generating 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..d8ca3be
--- /dev/null
+++ b/package/clapack/clapack.mk
@@ -0,0 +1,20 @@
+################################################################################
+#
+# clapack
+#
+################################################################################
+
+CLAPACK_VERSION = 3.2.1
+CLAPACK_SOURCE = clapack-$(CLAPACK_VERSION)-CMAKE.tgz
+# This package provides 3 libraries:
+# - libf2c.a (not installed)
+# - libblas (linking against libf2c.a)
+# - liblapack (linking against libf2c.a)
+CLAPACK_LICENSE = HPND (libf2c), BSD-3c (libblas and lapack)
+CLAPACK_LICENSE_FILES = F2CLIBS/libf2c/Notice, COPYING
+CLAPACK_SITE = http://www.netlib.org/clapack
+CLAPACK_INSTALL_STAGING = YES
+CLAPACK_CONF_OPT = -DBUILD_TESTING=OFF \
+	$(if $(BR2_PACKAGE_CLAPACK_ARITH_H),-DARITH_H=$(BR2_PACKAGE_CLAPACK_ARITH_H))
+
+$(eval $(cmake-package))
-- 
1.8.5.4

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

* [Buildroot] [PATCH 06/11] armadillo: new package
  2014-02-16 21:59 [Buildroot] [PATCH 00/11] Scientific libraries Samuel Martin
                   ` (4 preceding siblings ...)
  2014-02-16 21:59 ` [Buildroot] [PATCH 05/11] clapack: new package Samuel Martin
@ 2014-02-16 21:59 ` Samuel Martin
  2014-03-02 10:04   ` Samuel Martin
  2014-02-16 22:00 ` [Buildroot] [PATCH 07/11] python-numpy: " Samuel Martin
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 28+ messages in thread
From: Samuel Martin @ 2014-02-16 21:59 UTC (permalink / raw)
  To: buildroot

Armadillo is a C++ linear algebra library.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
 package/Config.in              |  1 +
 package/armadillo/Config.in    |  9 +++++++++
 package/armadillo/armadillo.mk | 15 +++++++++++++++
 3 files changed, 25 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 d843961..5c3226e 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -723,6 +723,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..bbb1142
--- /dev/null
+++ b/package/armadillo/Config.in
@@ -0,0 +1,9 @@
+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.8.5.4

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

* [Buildroot] [PATCH 07/11] python-numpy: new package
  2014-02-16 21:59 [Buildroot] [PATCH 00/11] Scientific libraries Samuel Martin
                   ` (5 preceding siblings ...)
  2014-02-16 21:59 ` [Buildroot] [PATCH 06/11] armadillo: " Samuel Martin
@ 2014-02-16 22:00 ` Samuel Martin
  2014-03-03 22:40   ` Thomas Petazzoni
  2014-02-16 22:00 ` [Buildroot] [PATCH 08/11] python-numpy: add install-staging command Samuel Martin
                   ` (3 subsequent siblings)
  10 siblings, 1 reply; 28+ messages in thread
From: Samuel Martin @ 2014-02-16 22:00 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.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
 package/Config.in                    |  1 +
 package/python-numpy/Config.in       | 14 ++++++++++++++
 package/python-numpy/python-numpy.mk | 31 +++++++++++++++++++++++++++++++
 3 files changed, 46 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 5c3226e..15460a9 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -427,6 +427,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..52d8da9
--- /dev/null
+++ b/package/python-numpy/Config.in
@@ -0,0 +1,14 @@
+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/
+
+if BR2_PACKAGE_PYTHON_NUMPY
+config BR2_PACKAGE_PYTHON_NUMPY_BLAS_LAPACK_SUPPORT
+	bool "blas/lapack support"
+	select BR2_PACKAGE_CLAPACK
+endif
diff --git a/package/python-numpy/python-numpy.mk b/package/python-numpy/python-numpy.mk
new file mode 100644
index 0000000..c082045
--- /dev/null
+++ b/package/python-numpy/python-numpy.mk
@@ -0,0 +1,31 @@
+################################################################################
+#
+# 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_DEPENDENCIES = \
+	$(if BR2_PACKAGE_PYTHON_NUMPY_BLAS_LAPACK_SUPPORT,clapack)
+
+PYTHON_NUMPY_SITE_CFG_LIBS = \
+	$(if $(BR2_PACKAGE_PYTHON_NUMPY_BLAS_LAPACK_SUPPORT),blas lapack)
+
+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
+	$(foreach lib,$(PYTHON_NUMPY_SITE_CFG_LIBS),\
+		echo "    $(lib)" >> $(@D)/site.cfg ;)
+endef
+
+$(eval $(python-package))
-- 
1.8.5.4

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

* [Buildroot] [PATCH 08/11] python-numpy: add install-staging command
  2014-02-16 21:59 [Buildroot] [PATCH 00/11] Scientific libraries Samuel Martin
                   ` (6 preceding siblings ...)
  2014-02-16 22:00 ` [Buildroot] [PATCH 07/11] python-numpy: " Samuel Martin
@ 2014-02-16 22:00 ` Samuel Martin
  2014-03-03 22:42   ` Thomas Petazzoni
  2014-02-16 22:00 ` [Buildroot] [PATCH 09/11] opencv: add python/numpy support Samuel Martin
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 28+ messages in thread
From: Samuel Martin @ 2014-02-16 22:00 UTC (permalink / raw)
  To: buildroot

Some packages may include headers provided by python-numpy package.
So, also install it in the sysroot.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
 package/python-numpy/python-numpy.mk | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/package/python-numpy/python-numpy.mk b/package/python-numpy/python-numpy.mk
index c082045..ff70cfe 100644
--- a/package/python-numpy/python-numpy.mk
+++ b/package/python-numpy/python-numpy.mk
@@ -28,4 +28,21 @@ define PYTHON_NUMPY_CONFIGURE_CMDS
 		echo "    $(lib)" >> $(@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.8.5.4

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

* [Buildroot] [PATCH 09/11] opencv: add python/numpy support
  2014-02-16 21:59 [Buildroot] [PATCH 00/11] Scientific libraries Samuel Martin
                   ` (7 preceding siblings ...)
  2014-02-16 22:00 ` [Buildroot] [PATCH 08/11] python-numpy: add install-staging command Samuel Martin
@ 2014-02-16 22:00 ` Samuel Martin
  2014-03-06 23:04   ` Yann E. MORIN
  2014-02-16 22:00 ` [Buildroot] [PATCH 10/11] opencv: define modules inter-dependencies Samuel Martin
  2014-02-16 22:00 ` [Buildroot] [PATCH 11/11] vlc: add opencv support Samuel Martin
  10 siblings, 1 reply; 28+ messages in thread
From: Samuel Martin @ 2014-02-16 22:00 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>
---
 package/opencv/Config.in                           |  7 +-
 ...t-run-python-for-numpy-detection-when-cro.patch | 77 ++++++++++++++++++++++
 package/opencv/opencv.mk                           | 16 ++++-
 3 files changed, 97 insertions(+), 3 deletions(-)
 create mode 100644 package/opencv/opencv-0001-cmake-do-not-run-python-for-numpy-detection-when-cro.patch

diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index b6192dc..be0b660 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-cmake-do-not-run-python-for-numpy-detection-when-cro.patch b/package/opencv/opencv-0001-cmake-do-not-run-python-for-numpy-detection-when-cro.patch
new file mode 100644
index 0000000..bff14eb
--- /dev/null
+++ b/package/opencv/opencv-0001-cmake-do-not-run-python-for-numpy-detection-when-cro.patch
@@ -0,0 +1,77 @@
+From 2ab6c54a6c466c3cb577cacbbace659fe55c2a4f Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+Date: Fri, 10 Jan 2014 23:39:59 +0100
+Subject: [PATCH] cmake: do not run python for numpy detection when
+ cross-compiling
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+---
+ cmake/OpenCVDetectPython.cmake | 45 +++++++++++++++++++++++++++++++-----------
+ 1 file changed, 33 insertions(+), 12 deletions(-)
+
+diff --git a/cmake/OpenCVDetectPython.cmake b/cmake/OpenCVDetectPython.cmake
+index 3326bcd..78052ed 100644
+--- a/cmake/OpenCVDetectPython.cmake
++++ b/cmake/OpenCVDetectPython.cmake
+@@ -80,25 +80,46 @@ 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(PYTHON_NUMPY_PROCESS EQUAL 0)
++    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)
++          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()
+     endif()
+ 
++
+     if(PYTHON_NUMPY_INCLUDE_DIR)
+       set(PYTHON_USE_NUMPY TRUE)
+-      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)
++      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.8.5.2
+
diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index 51255aa..52a2b42 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -60,7 +60,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)             \
@@ -138,7 +138,6 @@ OPENCV_CONF_OPT += \
 	-DBUILD_TIFF=OFF          \
 	-DBUILD_ZLIB=OFF          \
 	\
-	-DBUILD_NEW_PYTHON_SUPPORT=OFF \
 	-DINSTALL_C_EXAMPLES=OFF       \
 	-DINSTALL_PYTHON_EXAMPLES=OFF  \
 	-DINSTALL_TO_MANGLED_PATHS=OFF
@@ -226,6 +225,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.8.5.4

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

* [Buildroot] [PATCH 10/11] opencv: define modules inter-dependencies
  2014-02-16 21:59 [Buildroot] [PATCH 00/11] Scientific libraries Samuel Martin
                   ` (8 preceding siblings ...)
  2014-02-16 22:00 ` [Buildroot] [PATCH 09/11] opencv: add python/numpy support Samuel Martin
@ 2014-02-16 22:00 ` Samuel Martin
  2014-02-16 22:00 ` [Buildroot] [PATCH 11/11] vlc: add opencv support Samuel Martin
  10 siblings, 0 replies; 28+ messages in thread
From: Samuel Martin @ 2014-02-16 22:00 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>
---
 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 be0b660..74c0a38 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.8.5.4

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

* [Buildroot] [PATCH 11/11] vlc: add opencv support
  2014-02-16 21:59 [Buildroot] [PATCH 00/11] Scientific libraries Samuel Martin
                   ` (9 preceding siblings ...)
  2014-02-16 22:00 ` [Buildroot] [PATCH 10/11] opencv: define modules inter-dependencies Samuel Martin
@ 2014-02-16 22:00 ` Samuel Martin
  10 siblings, 0 replies; 28+ messages in thread
From: Samuel Martin @ 2014-02-16 22:00 UTC (permalink / raw)
  To: buildroot

opencv support for video filter in vlc requires a couple of opencv
features to be enabled.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
 package/vlc/vlc.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/vlc/vlc.mk b/package/vlc/vlc.mk
index ad7d9ff..14d6538 100644
--- a/package/vlc/vlc.mk
+++ b/package/vlc/vlc.mk
@@ -108,6 +108,13 @@ else
 VLC_CONF_OPT += --disable-glx
 endif
 
+ifeq ($(BR2_PACKAGE_OPENCV_LIB_LEGACY)$(BR2_PACKAGE_OPENCV_LIB_OBJDETECT),yy)
+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 += opus
-- 
1.8.5.4

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

* [Buildroot] [PATCH 06/11] armadillo: new package
  2014-02-16 21:59 ` [Buildroot] [PATCH 06/11] armadillo: " Samuel Martin
@ 2014-03-02 10:04   ` Samuel Martin
  2014-03-02 13:04     ` Thomas De Schampheleire
  0 siblings, 1 reply; 28+ messages in thread
From: Samuel Martin @ 2014-03-02 10:04 UTC (permalink / raw)
  To: buildroot

Hi all,

On Sun, Feb 16, 2014 at 10:59 PM, Samuel Martin <s.martin49@gmail.com> wrote:
> Armadillo is a C++ linear algebra library.
>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> ---
>  package/Config.in              |  1 +
>  package/armadillo/Config.in    |  9 +++++++++
>  package/armadillo/armadillo.mk | 15 +++++++++++++++
>  3 files changed, 25 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 d843961..5c3226e 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -723,6 +723,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..bbb1142
> --- /dev/null
> +++ b/package/armadillo/Config.in
> @@ -0,0 +1,9 @@
> +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/

I forgot the comment when the toolchain has no C++ support.
I'm just waiting for other reviews on the "scientific libraries"
series before reposting the patches.

Regards,

-- 
Samuel

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

* [Buildroot] [PATCH 06/11] armadillo: new package
  2014-03-02 10:04   ` Samuel Martin
@ 2014-03-02 13:04     ` Thomas De Schampheleire
  0 siblings, 0 replies; 28+ messages in thread
From: Thomas De Schampheleire @ 2014-03-02 13:04 UTC (permalink / raw)
  To: buildroot

Samuel Martin <s.martin49@gmail.com> schreef:
>Hi all,
>
>On Sun, Feb 16, 2014 at 10:59 PM, Samuel Martin <s.martin49@gmail.com> wrote:
>> Armadillo is a C++ linear algebra library.
>>
>> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
>> ---
>>  package/Config.in              |  1 +
>>  package/armadillo/Config.in    |  9 +++++++++
>>  package/armadillo/armadillo.mk | 15 +++++++++++++++
>>  3 files changed, 25 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 d843961..5c3226e 100644
>> --- a/package/Config.in
>> +++ b/package/Config.in
>> @@ -723,6 +723,7 @@ source "package/zyre/Config.in"
>>  endmenu
>>
>>  menu "Other"
>> +source "package/armadillo/Config.in"
>>  source "package/apr/Config.in"

Alphabetical order is not correct here.

>>  source "package/apr-util/Config.in"
>>  source "package/argp-standalone/Config.in"

Best regards,
Thomas

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

* [Buildroot] [PATCH 02/11] opencv: rework V4L/libv4l support
  2014-02-16 21:59 ` [Buildroot] [PATCH 02/11] opencv: rework V4L/libv4l support Samuel Martin
@ 2014-03-03 22:38   ` Thomas Petazzoni
  2014-03-05 22:55   ` Yann E. MORIN
  1 sibling, 0 replies; 28+ messages in thread
From: Thomas Petazzoni @ 2014-03-03 22:38 UTC (permalink / raw)
  To: buildroot

Thomas,

Can you have a look at the below dependency tricks, and tell me your
opinion about how they are expressed in terms of comments and al. ?

Thanks,

Thomas

On Sun, 16 Feb 2014 22:59:55 +0100, Samuel Martin wrote:
> Starting with the 2.4.7 release, for V4L support, OpenCV does not
> requires a libv4l dependency for its V4L support.
> 
> So, it now provides 2 distincts knobs for this: WITH_V4L and a new
> one: WITH_LIBV4L.
> 
> This patch takes advantage of this new knob and libv4l support is
> now automatically enabled if only the libv4l package is enabled.
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> ---
>  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 c3273fd..2acbe19 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -189,14 +189,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 43aef62..fb56769 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -210,10 +210,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:



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

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

* [Buildroot] [PATCH 07/11] python-numpy: new package
  2014-02-16 22:00 ` [Buildroot] [PATCH 07/11] python-numpy: " Samuel Martin
@ 2014-03-03 22:40   ` Thomas Petazzoni
  0 siblings, 0 replies; 28+ messages in thread
From: Thomas Petazzoni @ 2014-03-03 22:40 UTC (permalink / raw)
  To: buildroot

Dear Samuel Martin,

On Sun, 16 Feb 2014 23:00:00 +0100, Samuel Martin wrote:

> +if BR2_PACKAGE_PYTHON_NUMPY
> +config BR2_PACKAGE_PYTHON_NUMPY_BLAS_LAPACK_SUPPORT
> +	bool "blas/lapack support"
> +	select BR2_PACKAGE_CLAPACK
> +endif

Any reason why we don't automatically enable blas/lapack support when
available? Also, I'd prefer to have the optional blas/lapack support
available as a separate patch from the package addition itself, so that
python-numpy can be applied independently from blas/lapack.

Thanks,

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

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

* [Buildroot] [PATCH 08/11] python-numpy: add install-staging command
  2014-02-16 22:00 ` [Buildroot] [PATCH 08/11] python-numpy: add install-staging command Samuel Martin
@ 2014-03-03 22:42   ` Thomas Petazzoni
  0 siblings, 0 replies; 28+ messages in thread
From: Thomas Petazzoni @ 2014-03-03 22:42 UTC (permalink / raw)
  To: buildroot

Dear Samuel Martin,

On Sun, 16 Feb 2014 23:00:01 +0100, Samuel Martin wrote:
> Some packages may include headers provided by python-numpy package.
> So, also install it in the sysroot.
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> ---
>  package/python-numpy/python-numpy.mk | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/package/python-numpy/python-numpy.mk b/package/python-numpy/python-numpy.mk
> index c082045..ff70cfe 100644
> --- a/package/python-numpy/python-numpy.mk
> +++ b/package/python-numpy/python-numpy.mk
> @@ -28,4 +28,21 @@ define PYTHON_NUMPY_CONFIGURE_CMDS
>  		echo "    $(lib)" >> $(@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)/; \

This can be $(@D), no ?

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

Also, any reason for having this separated from the package addition
itself?

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

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

* [Buildroot] [PATCH 01/11] opencv: bump to version 2.4.8
  2014-02-16 21:59 ` [Buildroot] [PATCH 01/11] opencv: bump to version 2.4.8 Samuel Martin
@ 2014-03-05 22:49   ` Yann E. MORIN
  0 siblings, 0 replies; 28+ messages in thread
From: Yann E. MORIN @ 2014-03-05 22:49 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-02-16 22:59 +0100, Samuel Martin spake thusly:
> This patch bumps OpenCV version and does a number of cleanup in the
> opencv.mk files:
> - add an extract command because the source archive is only available
>   under zip format since this 2.4.8 release. Since there is no default
>   extract command for zip archive, we have to define it;
> - add license details;
> - add new modules options and update existing ones;
> - update SSE support;
> - sort and reorder the configure options (to make easier future package
>   update);
> - clean redundant C++ dependency (in the Qt knob).

As said on IRC (and repeated here for posterity ;-] ) : it would have
been easier to review if you had split the patch:
  - shufle options around
  - bump the version (with its own options added/removed/updated)
  - add licensing info
  - add sse4/sse42 support
  - add superres config knob
  - ...

> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index 42f9b0a..43aef62 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -4,23 +4,34 @@
>  #
>  ################################################################################
>  
> -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_SOURCE = opencv-$(OPENCV_VERSION).zip
> +OPENCV_SITE = http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/$(OPENCV_VERSION)
>  OPENCV_INSTALL_STAGING = YES
> +OPENCV_LICENSE = BSD-3c
> +OPENCV_LICENSE_FILES = doc/license.txt
> +
> +define OPENCV_EXTRACT_CMDS
> +    unzip -d $(BUILD_DIR) $(DL_DIR)/$(OPENCV_SOURCE)
> +endef
>  
>  OPENCV_CONF_OPT += \
>  	-DCMAKE_BUILD_TYPE=$(if $(BR2_ENABLE_DEBUG),Debug,Release)   \
> -	-DBUILD_WITH_STATIC_CRT=OFF                                  \
> +	-DBUILD_WITH_DEBUG_INFO=OFF                                  \
> +	\

Why do you add such separating empty lines? If needed, add as many
option groups as needed. But separating options in a single group is not
really useful.

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] 28+ messages in thread

* [Buildroot] [PATCH 02/11] opencv: rework V4L/libv4l support
  2014-02-16 21:59 ` [Buildroot] [PATCH 02/11] opencv: rework V4L/libv4l support Samuel Martin
  2014-03-03 22:38   ` Thomas Petazzoni
@ 2014-03-05 22:55   ` Yann E. MORIN
  1 sibling, 0 replies; 28+ messages in thread
From: Yann E. MORIN @ 2014-03-05 22:55 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-02-16 22:59 +0100, 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.

So, if I understood correctly:
  - v4l support in openCV does not require libv4l
  - if libv4l is present, openCV can use it
  - use of libv4l or not, openCV support v4l the same

Right?

> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> ---
>  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 c3273fd..2acbe19 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -189,14 +189,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 guess we do not need a comment for an optional dependency, especially
since you added a blurb in the help text.

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] 28+ messages in thread

* [Buildroot] [PATCH 03/11] opencv: add jasper support
  2014-02-16 21:59 ` [Buildroot] [PATCH 03/11] opencv: add jasper support Samuel Martin
@ 2014-03-05 22:59   ` Yann E. MORIN
  2014-03-05 23:08     ` Samuel Martin
  0 siblings, 1 reply; 28+ messages in thread
From: Yann E. MORIN @ 2014-03-05 22:59 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-02-16 22:59 +0100, Samuel Martin spake thusly:
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> ---
>  package/opencv/Config.in | 6 ++++++
>  package/opencv/opencv.mk | 8 +++++++-
>  2 files changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index 2acbe19..73f03e1 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -158,6 +158,12 @@ config BR2_PACKAGE_OPENCV_WITH_GTK
>  	depends on BR2_INSTALL_LIBSTDCPP
>  	select BR2_PACKAGE_LIBGTK2
>  
> +config BR2_PACKAGE_OPENCV_WITH_JASPER
> +	bool "jasper (jpeg 2000) support"
> +	select BR2_PACKAGE_JASPER
> +	help
> +	  Use shared libjasper from the target system.

What do you mean by "from the target system?"

I would expect to read something like:

    config BR2_PACKAGE_OPENCV_WITH_JASPER
        bool "jpeg2000 support"
        select BR2_PACKAGE_JASPER
        help
          Use libjasper to provide support for jpeg2000.

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] 28+ messages in thread

* [Buildroot] [PATCH 03/11] opencv: add jasper support
  2014-03-05 22:59   ` Yann E. MORIN
@ 2014-03-05 23:08     ` Samuel Martin
  2014-03-05 23:27       ` Yann E. MORIN
  0 siblings, 1 reply; 28+ messages in thread
From: Samuel Martin @ 2014-03-05 23:08 UTC (permalink / raw)
  To: buildroot

Yann, all,

On Wed, Mar 5, 2014 at 11:59 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> Samuel, All,
>
> On 2014-02-16 22:59 +0100, Samuel Martin spake thusly:
>> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
>> ---
>>  package/opencv/Config.in | 6 ++++++
>>  package/opencv/opencv.mk | 8 +++++++-
>>  2 files changed, 13 insertions(+), 1 deletion(-)
>>
>> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
>> index 2acbe19..73f03e1 100644
>> --- a/package/opencv/Config.in
>> +++ b/package/opencv/Config.in
>> @@ -158,6 +158,12 @@ config BR2_PACKAGE_OPENCV_WITH_GTK
>>       depends on BR2_INSTALL_LIBSTDCPP
>>       select BR2_PACKAGE_LIBGTK2
>>
>> +config BR2_PACKAGE_OPENCV_WITH_JASPER
>> +     bool "jasper (jpeg 2000) support"
>> +     select BR2_PACKAGE_JASPER
>> +     help
>> +       Use shared libjasper from the target system.
>
> What do you mean by "from the target system?"

OpenCV comes with many libs in its 3rdparty directory (ffmpeg, jinja2,
libjasper, libjpeg, libpng, libtiff, libwebp, openexr, tbb, zlib), and
can build these, or use those provided by the system or disabling
their support.

When I integrated opencv in BR for the first, it was requested to me
to only use the libs provided by the system. I stick to this ;-)

>
> I would expect to read something like:
>
>     config BR2_PACKAGE_OPENCV_WITH_JASPER
>         bool "jpeg2000 support"
>         select BR2_PACKAGE_JASPER
>         help
>           Use libjasper to provide support for jpeg2000.
>

Regards,

-- 
Samuel

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

* [Buildroot] [PATCH 04/11] opencv: add Qt5 support
  2014-02-16 21:59 ` [Buildroot] [PATCH 04/11] opencv: add Qt5 support Samuel Martin
@ 2014-03-05 23:22   ` Yann E. MORIN
  0 siblings, 0 replies; 28+ messages in thread
From: Yann E. MORIN @ 2014-03-05 23:22 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-02-16 22:59 +0100, 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.
[--SNIP--]
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index 73f03e1..b6192dc 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -177,15 +177,38 @@ config BR2_PACKAGE_OPENCV_WITH_PNG
>  	  Use shared libpng from the target system.
>  
>  config BR2_PACKAGE_OPENCV_WITH_QT
> -	bool "qt4 backend support"
> -	depends on !BR2_avr32 # 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)

Why do you repeat Qt4's and Qt5's dependencies? Since it 'depends on'
Qt4 or Qt5, you will also inherit forn their dependencies, so there is
no reason to bring them here...

But if those deps are needed for sub-modules (below), then add them as
separate line, like (eg.):
    depends on BR2_TOOLCHAIN_HAS_THREADS # qt-stl
    select BR2_PACKAGE_QT_TEST if BR2_PACKAGE_QT && HIGHGUI
    depends on BR2_INET_IPV6 # qt5-base
    select BR2_PACKAGE_QT5BASE if BR2_PACKAGE_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.

    For Qt4, this uses module QtSTL. Highgui supports also uses QtTest
    and QtGui.

> +	  If Qt5 is already enabled, then use Qt5 with the following components:
> +	  base, concurrent, test, gui and widgets.

    For Qt5, this uses modules Qt5Base, Qt5Concurrent, Qt5Test, Qt5Gui
    and Qt5Widgets.

> +if !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5
> +comment "qt support with Qt4 needs qt"

Here, you need to duplicate Qt4's deps. Also, you don;t want to show the
comment for Qt4 if Qt5 is enabled:

    comment "qt4 support needs a toolchain w/ C++, threads"
        depends on !avr32 && MMU
        depends on !LIBSTCPP || !THREADS
        depends on !QT5

    comment "qt5 support needs a toolchain w/ wchar, IPv6, threads"
        depends on !avr32 && _MMU
        depends on !WCHAR || !IPV6 || !THREADS
        depends on !QT4

[--SNIP--]
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index ff11f1c..51255aa 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -202,8 +202,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)

qt and qt5base are enough to build? Don;t you also need the Qt4/5
modules to be built first?

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] 28+ messages in thread

* [Buildroot] [PATCH 03/11] opencv: add jasper support
  2014-03-05 23:08     ` Samuel Martin
@ 2014-03-05 23:27       ` Yann E. MORIN
  0 siblings, 0 replies; 28+ messages in thread
From: Yann E. MORIN @ 2014-03-05 23:27 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-03-06 00:08 +0100, Samuel Martin spake thusly:
> On Wed, Mar 5, 2014 at 11:59 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> > Samuel, All,
> >
> > On 2014-02-16 22:59 +0100, Samuel Martin spake thusly:
> >> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> >> ---
> >>  package/opencv/Config.in | 6 ++++++
> >>  package/opencv/opencv.mk | 8 +++++++-
> >>  2 files changed, 13 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> >> index 2acbe19..73f03e1 100644
> >> --- a/package/opencv/Config.in
> >> +++ b/package/opencv/Config.in
> >> @@ -158,6 +158,12 @@ config BR2_PACKAGE_OPENCV_WITH_GTK
> >>       depends on BR2_INSTALL_LIBSTDCPP
> >>       select BR2_PACKAGE_LIBGTK2
> >>
> >> +config BR2_PACKAGE_OPENCV_WITH_JASPER
> >> +     bool "jasper (jpeg 2000) support"
> >> +     select BR2_PACKAGE_JASPER
> >> +     help
> >> +       Use shared libjasper from the target system.
> >
> > What do you mean by "from the target system?"
> 
> OpenCV comes with many libs in its 3rdparty directory (ffmpeg, jinja2,
> libjasper, libjpeg, libpng, libtiff, libwebp, openexr, tbb, zlib), and
> can build these, or use those provided by the system or disabling
> their support.
> 
> When I integrated opencv in BR for the first, it was requested to me
> to only use the libs provided by the system. I stick to this ;-)

Ah, OK I understand. But then, the help text is not clear enough.

I would expect to read something like:

    config BR2_PACKAGE_OPENCV_WITH_JASPER
        bool "jpeg2000 support"
        select BR2_PACKAGE_JASPER
        help
          Use the package 'libjasper' to provide support for jpeg2000.

          The copy of libjasper bundled in openCV is not used.

But do we even want to state this in the help text?

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] 28+ messages in thread

* [Buildroot] [PATCH 05/11] clapack: new package
  2014-02-16 21:59 ` [Buildroot] [PATCH 05/11] clapack: new package Samuel Martin
@ 2014-03-06 19:30   ` Yann E. MORIN
  2014-03-06 19:42     ` Yann E. MORIN
  0 siblings, 1 reply; 28+ messages in thread
From: Yann E. MORIN @ 2014-03-06 19:30 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-02-16 22:59 +0100, Samuel Martin spake thusly:
> This package provides BLAS and LAPACK libraries.
[--SNIP--]
> diff --git a/package/clapack/Config.in b/package/clapack/Config.in
> new file mode 100644
> index 0000000..fc81d43
> --- /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 optimized BLAS library for the hardware an 'arith.h' header should
> +	  be provided.

    To optimize the BLAS library for the hardware, an [...]

> +	  If empty, the library wil just be not optimized by the compiler.

s/wil just be not/will not be/

> +	  In any case an 'arithchk' program is built (but not installed), to be run
> +	  on the target for generating this arith.h header.

to generate

[-- SNIP Cmake stuff, I expect you know what you're doing there! ;-) --]
> diff --git a/package/clapack/clapack.mk b/package/clapack/clapack.mk
> new file mode 100644
> index 0000000..d8ca3be
> --- /dev/null
> +++ b/package/clapack/clapack.mk
> @@ -0,0 +1,20 @@
> +################################################################################
> +#
> +# clapack
> +#
> +################################################################################
> +
> +CLAPACK_VERSION = 3.2.1
> +CLAPACK_SOURCE = clapack-$(CLAPACK_VERSION)-CMAKE.tgz

What the difference between this ^^^^ and clapack-3.2.1.tgz at the same site:
    http://www.netlib.org/clapack/clapack-3.2.1.tgz

(Note: only http://www.netlib.org/clapack/clapack.tgz is listed on the
main page, but both URLs do download the same file. The one without the
version string is of course unusable, in case they bump but we don't.)

> +# This package provides 3 libraries:
> +# - libf2c.a (not installed)
> +# - libblas (linking against libf2c.a)
> +# - liblapack (linking against libf2c.a)

s/linking against/staticaly linked with/

> +CLAPACK_LICENSE = HPND (libf2c), BSD-3c (libblas and lapack)

s/lapack/liblapack/  to keep a coherent naming scheme.

> +CLAPACK_LICENSE_FILES = F2CLIBS/libf2c/Notice, COPYING
> +CLAPACK_SITE = http://www.netlib.org/clapack
> +CLAPACK_INSTALL_STAGING = YES
> +CLAPACK_CONF_OPT = -DBUILD_TESTING=OFF \
> +	$(if $(BR2_PACKAGE_CLAPACK_ARITH_H),-DARITH_H=$(BR2_PACKAGE_CLAPACK_ARITH_H))
> +
> +$(eval $(cmake-package))

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] 28+ messages in thread

* [Buildroot] [PATCH 05/11] clapack: new package
  2014-03-06 19:30   ` Yann E. MORIN
@ 2014-03-06 19:42     ` Yann E. MORIN
  2014-03-06 20:16       ` Samuel Martin
  0 siblings, 1 reply; 28+ messages in thread
From: Yann E. MORIN @ 2014-03-06 19:42 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-03-06 20:30 +0100, Yann E. MORIN spake thusly:
> On 2014-02-16 22:59 +0100, Samuel Martin spake thusly:
> > This package provides BLAS and LAPACK libraries.
[--SNIP--]
> > diff --git a/package/clapack/clapack.mk b/package/clapack/clapack.mk
> > new file mode 100644
> > index 0000000..d8ca3be
> > --- /dev/null
> > +++ b/package/clapack/clapack.mk
> > @@ -0,0 +1,20 @@
> > +################################################################################
> > +#
> > +# clapack
> > +#
> > +################################################################################
> > +
> > +CLAPACK_VERSION = 3.2.1
> > +CLAPACK_SOURCE = clapack-$(CLAPACK_VERSION)-CMAKE.tgz
> 
> What the difference between this ^^^^ and clapack-3.2.1.tgz at the same site:
>     http://www.netlib.org/clapack/clapack-3.2.1.tgz

Sorry, I was not clear. Here's what I meant:

Why don't we use the non-cmake tarball?

If the non-cmake *and* the build-system in there is flexible enough,
that would allow us to not carry patches against the cmake build system.

Of course, that eans we have to use generic-package instead, and provide
the configure, build and install commands.

But if we can avoid carying patches, I think it can be a good trade-off.
At least, I think it is worthwhile investigating.

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] 28+ messages in thread

* [Buildroot] [PATCH 05/11] clapack: new package
  2014-03-06 19:42     ` Yann E. MORIN
@ 2014-03-06 20:16       ` Samuel Martin
  2014-03-06 20:50         ` Yann E. MORIN
  0 siblings, 1 reply; 28+ messages in thread
From: Samuel Martin @ 2014-03-06 20:16 UTC (permalink / raw)
  To: buildroot

Yann, all,

On Thu, Mar 6, 2014 at 8:42 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> Samuel, All,
>
> On 2014-03-06 20:30 +0100, Yann E. MORIN spake thusly:
>> On 2014-02-16 22:59 +0100, Samuel Martin spake thusly:
>> > This package provides BLAS and LAPACK libraries.
> [--SNIP--]
>> > diff --git a/package/clapack/clapack.mk b/package/clapack/clapack.mk
>> > new file mode 100644
>> > index 0000000..d8ca3be
>> > --- /dev/null
>> > +++ b/package/clapack/clapack.mk
>> > @@ -0,0 +1,20 @@
>> > +################################################################################
>> > +#
>> > +# clapack
>> > +#
>> > +################################################################################
>> > +
>> > +CLAPACK_VERSION = 3.2.1
>> > +CLAPACK_SOURCE = clapack-$(CLAPACK_VERSION)-CMAKE.tgz
>>
>> What the difference between this ^^^^ and clapack-3.2.1.tgz at the same site:
>>     http://www.netlib.org/clapack/clapack-3.2.1.tgz
>
> Sorry, I was not clear. Here's what I meant:

I got it! ;-)

>
> Why don't we use the non-cmake tarball?

Because I prefer/know better/am more confident in hacking CMake code
than handwritten makefiles.
So, I chose what is easier to me to maintain. Is it a valid argument? ;-)

>
> If the non-cmake *and* the build-system in there is flexible enough,
> that would allow us to not carry patches against the cmake build system.

I have to admit I have not even tried (and sorry, I don't really feel
like trying it).

>
> Of course, that eans we have to use generic-package instead, and provide
> the configure, build and install commands.
>
> But if we can avoid carying patches, I think it can be a good trade-off.
> At least, I think it is worthwhile investigating.
>
> Regards,
> Yann E. MORIN.

Regards,

-- 
Samuel

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

* [Buildroot] [PATCH 05/11] clapack: new package
  2014-03-06 20:16       ` Samuel Martin
@ 2014-03-06 20:50         ` Yann E. MORIN
  0 siblings, 0 replies; 28+ messages in thread
From: Yann E. MORIN @ 2014-03-06 20:50 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-03-06 21:16 +0100, Samuel Martin spake thusly:
> On Thu, Mar 6, 2014 at 8:42 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> > Samuel, All,
> >
> > On 2014-03-06 20:30 +0100, Yann E. MORIN spake thusly:
> >> On 2014-02-16 22:59 +0100, Samuel Martin spake thusly:
> >> > This package provides BLAS and LAPACK libraries.
> > [--SNIP--]
> >> > diff --git a/package/clapack/clapack.mk b/package/clapack/clapack.mk
> >> > new file mode 100644
> >> > index 0000000..d8ca3be
> >> > --- /dev/null
> >> > +++ b/package/clapack/clapack.mk
> >> > @@ -0,0 +1,20 @@
> >> > +################################################################################
> >> > +#
> >> > +# clapack
> >> > +#
> >> > +################################################################################
> >> > +
> >> > +CLAPACK_VERSION = 3.2.1
> >> > +CLAPACK_SOURCE = clapack-$(CLAPACK_VERSION)-CMAKE.tgz
> >>
> >> What the difference between this ^^^^ and clapack-3.2.1.tgz at the same site:
> >>     http://www.netlib.org/clapack/clapack-3.2.1.tgz
> >
> > Why don't we use the non-cmake tarball?
> 
> Because I prefer/know better/am more confident in hacking CMake code
> than handwritten makefiles.
> So, I chose what is easier to me to maintain. Is it a valid argument? ;-)

Yes, of course! I expected you'd say that. ;-)

> > If the non-cmake *and* the build-system in there is flexible enough,
> > that would allow us to not carry patches against the cmake build system.
> 
> I have to admit I have not even tried (and sorry, I don't really feel
> like trying it).

Yes, sure. I had to ask. ;-)

But if possible, try to push those changes upstream.

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] 28+ messages in thread

* [Buildroot] [PATCH 09/11] opencv: add python/numpy support
  2014-02-16 22:00 ` [Buildroot] [PATCH 09/11] opencv: add python/numpy support Samuel Martin
@ 2014-03-06 23:04   ` Yann E. MORIN
  0 siblings, 0 replies; 28+ messages in thread
From: Yann E. MORIN @ 2014-03-06 23:04 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-02-16 23:00 +0100, 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.
[--SNIP--]
> diff --git a/package/opencv/opencv-0001-cmake-do-not-run-python-for-numpy-detection-when-cro.patch b/package/opencv/opencv-0001-cmake-do-not-run-python-for-numpy-detection-when-cro.patch
> new file mode 100644
> index 0000000..bff14eb
> --- /dev/null
> +++ b/package/opencv/opencv-0001-cmake-do-not-run-python-for-numpy-detection-when-cro.patch
> @@ -0,0 +1,77 @@
> +From 2ab6c54a6c466c3cb577cacbbace659fe55c2a4f Mon Sep 17 00:00:00 2001
> +From: Samuel Martin <s.martin49@gmail.com>
> +Date: Fri, 10 Jan 2014 23:39:59 +0100
> +Subject: [PATCH] cmake: do not run python for numpy detection when
> + cross-compiling

It would be nice if you were using exactly the same patch as upstream:
    6cb90c0e976ff24af85167e71d88c9d9b2ed06c7 fix cross-compilation issue with Numpy

Yours is slightly different.

Using the same patch as upstream would help spot it in a later bump.

> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index 51255aa..52a2b42 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
[--SNIP--]
> @@ -226,6 +225,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                               \

I hope this is only needed at build time, not at runtime?

Also, you specifically use 'python2', above. what about Python 2 vs.
Python 3 ? Care to shed some light on this, to the non-pythonist I am?
;-)

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] 28+ messages in thread

end of thread, other threads:[~2014-03-06 23:04 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-16 21:59 [Buildroot] [PATCH 00/11] Scientific libraries Samuel Martin
2014-02-16 21:59 ` [Buildroot] [PATCH 01/11] opencv: bump to version 2.4.8 Samuel Martin
2014-03-05 22:49   ` Yann E. MORIN
2014-02-16 21:59 ` [Buildroot] [PATCH 02/11] opencv: rework V4L/libv4l support Samuel Martin
2014-03-03 22:38   ` Thomas Petazzoni
2014-03-05 22:55   ` Yann E. MORIN
2014-02-16 21:59 ` [Buildroot] [PATCH 03/11] opencv: add jasper support Samuel Martin
2014-03-05 22:59   ` Yann E. MORIN
2014-03-05 23:08     ` Samuel Martin
2014-03-05 23:27       ` Yann E. MORIN
2014-02-16 21:59 ` [Buildroot] [PATCH 04/11] opencv: add Qt5 support Samuel Martin
2014-03-05 23:22   ` Yann E. MORIN
2014-02-16 21:59 ` [Buildroot] [PATCH 05/11] clapack: new package Samuel Martin
2014-03-06 19:30   ` Yann E. MORIN
2014-03-06 19:42     ` Yann E. MORIN
2014-03-06 20:16       ` Samuel Martin
2014-03-06 20:50         ` Yann E. MORIN
2014-02-16 21:59 ` [Buildroot] [PATCH 06/11] armadillo: " Samuel Martin
2014-03-02 10:04   ` Samuel Martin
2014-03-02 13:04     ` Thomas De Schampheleire
2014-02-16 22:00 ` [Buildroot] [PATCH 07/11] python-numpy: " Samuel Martin
2014-03-03 22:40   ` Thomas Petazzoni
2014-02-16 22:00 ` [Buildroot] [PATCH 08/11] python-numpy: add install-staging command Samuel Martin
2014-03-03 22:42   ` Thomas Petazzoni
2014-02-16 22:00 ` [Buildroot] [PATCH 09/11] opencv: add python/numpy support Samuel Martin
2014-03-06 23:04   ` Yann E. MORIN
2014-02-16 22:00 ` [Buildroot] [PATCH 10/11] opencv: define modules inter-dependencies Samuel Martin
2014-02-16 22:00 ` [Buildroot] [PATCH 11/11] vlc: add opencv support Samuel Martin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).