Skip to contentSkip to conversation

package: add opencv

PATCH Superseded Samuel Martin 2 participants 4 messages Aug 7, 2011 – Aug 18, 2011

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package: add opencv

OpenCV is a free, open-source, cross-platform computer vision library

---
 package/Config.in        |    1 +
 package/opencv/Config.in |  242 ++++++++++++++++++++++++++++++++++++++
 package/opencv/opencv.mk |  287 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 530 insertions(+), 0 deletions(-)
 create mode 100644 package/opencv/Config.in
 create mode 100644 package/opencv/opencv.mk
package/Config.in +1 -0
index 7112e05..d8b13b1 100644
@@ -291,6 +291,7 @@ source "package/libraw/Config.in"
 source "package/librsvg/Config.in"
 source "package/libsvgtiny/Config.in"
 source "package/libungif/Config.in"
+source "package/opencv/Config.in"
 source "package/pango/Config.in"
 source "package/pixman/Config.in"
 source "package/tiff/Config.in"
package/opencv/Config.in new file +242 -0

242 lines not on this page · raw message

package/opencv/opencv.mk new file +287 -0

287 lines not on this page · raw message

Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 1/1 package: add opencv

ping!

Sam

2011/8/7 Samuel Martin <[email protected]>:

Quoted 568 lines

OpenCV is a free, open-source, cross-platform computer vision library

---

?package/Config.in ? ? ? ?| ? ?1 +
?package/opencv/Config.in | ?242 ++++++++++++++++++++++++++++++++++++++
?package/opencv/opencv.mk | ?287 ++++++++++++++++++++++++++++++++++++++++++++++

?3 files changed, 530 insertions(+), 0 deletions(-) ?create mode 100644 package/opencv/Config.in ?create mode 100644 package/opencv/opencv.mk

package/Config.in +0 -0
index 7112e05..d8b13b1 100644
@@ -291,6 +291,7 @@ source "package/libraw/Config.in"

?source "package/librsvg/Config.in"
?source "package/libsvgtiny/Config.in"
?source "package/libungif/Config.in"
+source "package/opencv/Config.in"
?source "package/pango/Config.in"
?source "package/pixman/Config.in"
?source "package/tiff/Config.in"

package/opencv/Config.in new file +242 -0
new file mode 100644
index 0000000..4007847
@@ -0,0 +1,242 @@
+menuconfig BR2_PACKAGE_OPENCV
+ ? ? ? bool "opencv"
+ ? ? ? select BR2_PACKAGE_ZLIB
+ ? ? ? help
+ ? ? ? ? OpenCV (Open Source Computer Vision) is a library of programming
+ ? ? ? ? functions for real time computer vision.
+
+ ? ? ? ? http://opencv.willowgarage.com/wiki/
+
+if BR2_PACKAGE_OPENCV
+
+choice
+ ? ? ? prompt "Build type"
+ ? ? ? default BR2_PACKAGE_OPENCV_BUILD_TYPE_RELEASE
+config BR2_PACKAGE_OPENCV_BUILD_TYPE_NONE
+ ? ? ? bool "None"
+config BR2_PACKAGE_OPENCV_BUILD_TYPE_RELEASE
+ ? ? ? bool "Release"
+config BR2_PACKAGE_OPENCV_BUILD_TYPE_DEBUG
+ ? ? ? bool "Debug"
+config BR2_PACKAGE_OPENCV_BUILD_TYPE_RELWITHDEBINFO
+ ? ? ? bool "Release with debug info"
+ ? ? ? depends on SUPPORTED
+config BR2_PACKAGE_OPENCV_BUILD_TYPE_MINSIZEREL
+ ? ? ? bool "Minimal Size Release"
+ ? ? ? depends on SUPPORTED
+endchoice
+
+
+comment "Built targets"
+
+config BR2_PACKAGE_OPENCV_BUILD_DOCS
+ ? ? ? bool "OpenCV Documentation"
+ ? ? ? depends on SUPPORTED
+ ? ? ? default n
+
+config BR2_PACKAGE_OPENCV_BUILD_EXAMPLES
+ ? ? ? bool "All examples"
+ ? ? ? default n
+
+config BR2_PACKAGE_OPENCV_BUILD_NEW_PYTHON_SUPPORT
+ ? ? ? bool "Python support"
+ ? ? ? select BR2_PACKAGE_PYTHON
+ ? ? ? default n
+
+config BR2_PACKAGE_OPENCV_BUILD_PACKAGE
+ ? ? ? bool "Enables 'make package_source' command"
+ ? ? ? depends on SUPPORTED
+ ? ? ? default n
+
+config BR2_PACKAGE_OPENCV_BUILD_TESTS
+ ? ? ? bool "Tests"
+ ? ? ? default n
+
+config BR2_PACKAGE_OPENCV_BUILD_WITH_DEBUG_INFO
+ ? ? ? bool "Include debug info into debug libs"
+ ? ? ? default n
+
+config BR2_PACKAGE_OPENCV_OPENCV_BUILD_3RDPARTY_LIBS
+ ? ? ? bool "3rd party libraries"
+ ? ? ? default n
+ ? ? ? help
+ ? ? ? ? If set, allow to build and use the 3rd party libraries *only* if
+ ? ? ? ? they are not already provided by/in the target system.
+
+ ? ? ? ? Packages provided as 3rd party are:
+ ? ? ? ? ? libjpeg, libpng, libtiff, zlib ,jasper-1.900.1 (aka. jpeg2k),
+ ? ? ? ? ? openexr-1.4.0, ffmpeg-0.6.0, videoInput-0.1995
+
+comment "Build options"
+
+config BR2_PACKAGE_OPENCV_ENABLE_PROFILING
+ ? ? ? bool "Enable profiling in the GCC compiler (Add flags: -g -pg)"
+ ? ? ? default n
+
+config BR2_PACKAGE_OPENCV_CMAKE_SKIP_RPATH
+ ? ? ? bool "Skip rpath"
+ ? ? ? default n
+ ? ? ? help
+ ? ? ? ? If set, runtime paths are not added when using shared libraries.
+
+config BR2_PACKAGE_OPENCV_USE_FAST_MATH
+ ? ? ? bool "Enable -ffast-math"
+ ? ? ? default y
+
+config BR2_PACKAGE_OPENCV_USE_OMIT_FRAME_POINTER
+ ? ? ? bool "Enable -fomit-frame-pointer for GCC"
+ ? ? ? default y
+
+config BR2_PACKAGE_OPENCV_USE_PRECOMPILED_HEADERS
+ ? ? ? bool "Use precompiled headers"
+ ? ? ? default y
+
+config BR2_PACKAGE_OPENCV_WITH_1394
+ ? ? ? bool "IEEE1394 support"
+ ? ? ? depends on SUPPORTED
+ ? ? ? default n
+
+menuconfig BR2_PACKAGE_OPENCV_WITH_CUDA
+ ? ? ? bool "Include NVidia Cuda Runtime support"
+ ? ? ? depends on SUPPORTED
+ ? ? ? default n
+
+if BR2_PACKAGE_OPENCV_WITH_CUDA
+
+config BR2_PACKAGE_OPENCV_CUDA_64_BIT_DEVICE_CODE
+ ? ? ? bool "Compile device code in 64 bit mode"
+ ? ? ? default n
+
+config BR2_PACKAGE_OPENCV_CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE
+ ? ? ? bool "Attach the build rule to the CUDA source file"
+ ? ? ? default n
+ ? ? ? help
+ ? ? ? ? Enable only when the CUDA source file is added to at most one target.
+
+config BR2_PACKAGE_OPENCV_CUDA_BUILD_CUBIN
+ ? ? ? bool "Generate and parse .cubin files in Device mode"
+ ? ? ? default n
+
+config BR2_PACKAGE_OPENCV_CUDA_BUILD_EMULATION
+ ? ? ? bool "Build in Emulation mode"
+ ? ? ? default n
+
+config BR2_PACKAGE_OPENCV_CUDA_HOST_COMPILATION_CPP
+ ? ? ? bool "Generated file extension"
+ ? ? ? default n
+
+config BR2_PACKAGE_OPENCV_CUDA_PROPAGATE_HOST_FLAGS
+ ? ? ? bool "Propage C/CXX_FLAGS and friends to the host compiler via -Xcompile"
+ ? ? ? default n
+
+endif
+
+config BR2_PACKAGE_OPENCV_WITH_FFMPEG
+ ? ? ? bool "FFMPEG support"
+ ? ? ? select BR2_PACKAGE_FFMPEG
+ ? ? ? select BR2_PACKAGE_FFMPEG_SWSCALE
+ ? ? ? help
+ ? ? ? ? Use ffmpeg from the target system.
+
+config BR2_PACKAGE_OPENCV_WITH_GSTREAMER
+ ? ? ? bool "Gstreamer support"
+ ? ? ? select BR2_PACKAGE_GSTREAMER
+ ? ? ? select BR2_PACKAGE_GST_PLUGINS_BASE
+ ? ? ? select BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_APP
+ ? ? ? default y
+
+config BR2_PACKAGE_OPENCV_WITH_GTK
+ ? ? ? bool "GTK support"
+ ? ? ? depends on BR2_PACKAGE_LIBGTK2 && BR2_PACKAGE_LIBGLIB2
+ ? ? ? default n
+
+comment "GTK support not available (requires libgtk2 and libglib2)"
+ ? ? ? depends on ! ( BR2_PACKAGE_LIBGTK2 && BR2_PACKAGE_LIBGLIB2 )
+
+config BR2_PACKAGE_OPENCV_WITH_IPP
+ ? ? ? bool "Intel IPP support"
+ ? ? ? depends on SUPPORTED
+ ? ? ? default n
+
+config BR2_PACKAGE_OPENCV_WITH_JASPER
+ ? ? ? bool ?"JASPER (JPEG2K) support"
+ ? ? ? depends on BR2_PACKAGE_OPENCV_OPENCV_BUILD_3RDPARTY_LIBS
+ ? ? ? help
+ ? ? ? ? Build jasper provided within OpenCV.
+
+config BR2_PACKAGE_OPENCV_WITH_JPEG
+ ? ? ? bool "JPEG support"
+ ? ? ? select BR2_PACKAGE_JPEG
+ ? ? ? help
+ ? ? ? ? Use shared libjpeg from the target system.
+
+config BR2_PACKAGE_OPENCV_WITH_OPENEXR
+ ? ? ? bool "ILM support via OpenEXR"
+ ? ? ? depends on BR2_PACKAGE_OPENCV_OPENCV_BUILD_3RDPARTY_LIBS
+ ? ? ? help
+ ? ? ? ? Build openexr provided within OpenCV.
+
+config BR2_PACKAGE_OPENCV_WITH_OPENNI
+ ? ? ? bool "OpenNI support"
+ ? ? ? depends on SUPPORTED
+ ? ? ? default n
+
+config BR2_PACKAGE_OPENCV_WITH_PNG
+ ? ? ? bool "PNG support"
+ ? ? ? select BR2_PACKAGE_LIBPNG
+ ? ? ? help
+ ? ? ? ? Use shared libpng from the target system.
+
+config BR2_PACKAGE_OPENCV_WITH_PVAPI
+ ? ? ? bool "Prosilica GigE support"
+ ? ? ? depends on SUPPORTED
+ ? ? ? default n
+
+config BR2_PACKAGE_OPENCV_WITH_QT
+ ? ? ? bool "Qt Backend support"
+ ? ? ? select BR2_PACKAGE_QT
+ ? ? ? default n
+
+config BR2_PACKAGE_OPENCV_WITH_QT_OPENGL
+ ? ? ? bool "Add OpenGL extension to Qt"
+ ? ? ? depends on BR2_PACKAGE_OPENCV_WITH_QT && SUPPORTED
+ ? ? ? default n
+
+config BR2_PACKAGE_OPENCV_WITH_TBB
+ ? ? ? bool "Intel TBB support"
+ ? ? ? depends on SUPPORTED
+ ? ? ? default n
+
+config BR2_PACKAGE_OPENCV_WITH_TIFF
+ ? ? ? bool "TIFF support"
+ ? ? ? select BR2_PACKAGE_TIFF
+ ? ? ? help
+ ? ? ? ? Use shared libtiff from the target system.
+
+config BR2_PACKAGE_OPENCV_WITH_UNICAP
+ ? ? ? bool "Unicap support (GPL)"
+ ? ? ? depends on SUPPORTED
+ ? ? ? default n
+
+config BR2_PACKAGE_OPENCV_WITH_V4L
+ ? ? ? bool "Video 4 Linux support"
+ ? ? ? select BR2_PACKAGE_LIBV4L
+ ? ? ? default y
+
+config BR2_PACKAGE_OPENCV_WITH_XINE
+ ? ? ? bool "Xine support (GPL)"
+ ? ? ? depends on SUPPORTED
+ ? ? ? default n
+
+comment "Install options"
+
+config BR2_PACKAGE_OPENCV_INSTALL_C_EXAMPLES
+ ? ? ? bool "C examples"
+ ? ? ? default n
+
+config BR2_PACKAGE_OPENCV_INSTALL_PYTHON_EXAMPLES
+ ? ? ? bool "Python examples"
+ ? ? ? default n
+ ? ? ? depends on BR2_PACKAGE_OPENCV_BUILD_NEW_PYTHON_SUPPORT
+
+endif
package/opencv/opencv.mk new file +287 -1
new file mode 100644
index 0000000..9923059
@@ -0,0 +1,287 @@
+#############################################################
+#
+# OpenCV (Open Source Computer Vision)
+#
+#############################################################
+OPENCV_SERIES ?= 2.3
+OPENCV_VERSION = $(OPENCV_SERIES).0
+OPENCV_SITE ? ?= http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/$(OPENCV_SERIES)
+OPENCV_SOURCE ?= OpenCV-$(OPENCV_VERSION).tar.bz2
+
+OPENCV_INSTALL_STAGING ? = YES
+
+OPENCV_CONF_OPT ? ? ? ? ?=
+
+OPENCV_DEPENDENCIES ? ? ?=
+HOST_OPENCV_DEPENDENCIES =
+
+# Build type
+ifeq ($(BR2_PACKAGE_OPENCV_BUILD_TYPE_RELEASE),y)
+OPENCV_CONF_OPT += -DBUILD_TYPE_RELEASE=Release
+else ifeq ($(BR2_PACKAGE_OPENCV_BUILD_TYPE_DEBUG),y)
+OPENCV_CONF_OPT += -DBUILD_TYPE_DEBUG=Debug
+else ifeq ($(BR2_PACKAGE_OPENCV_BUILD_TYPE_RELWITHDEBINFO),y)
+OPENCV_CONF_OPT += -DBUILD_TYPE_RELWITHDEBINFO=RelWithDebInfo
+else ifeq ($(BR2_PACKAGE_OPENCV_BUILD_TYPE_MINSIZEREL),y)
+OPENCV_CONF_OPT += -DBUILD_TYPE_MINSIZEREL=MinSizeRel
+endif
+
+# Built targets
+ifeq ($(BR2_PACKAGE_OPENCV_BUILD_DOCS),y)
+OPENCV_CONF_OPT += -DBUILD_DOCS=ON
+else
+OPENCV_CONF_OPT += -DBUILD_DOCS=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_BUILD_EXAMPLES),y)
+OPENCV_CONF_OPT += -DBUILD_EXAMPLES=ON
+else
+OPENCV_CONF_OPT += -DBUILD_EXAMPLES=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_BUILD_NEW_PYTHON_SUPPORT),y)
+OPENCV_CONF_OPT ? ? ? ? ?+= -DBUILD_NEW_PYTHON_SUPPORT=ON
+OPENCV_DEPENDENCIES ? ? ?+= python
+HOST_OPENCV_DEPENDENCIES += host-python
+else
+OPENCV_CONF_OPT ? ? ? ? ?+= -DBUILD_NEW_PYTHON_SUPPORT=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_BUILD_PACKAGE),y)
+OPENCV_CONF_OPT += -DBUILD_PACKAGE=ON
+else
+OPENCV_CONF_OPT += -DBUILD_PACKAGE=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_BUILD_TESTS),y)
+OPENCV_CONF_OPT += -DBUILD_TESTS=ON
+else
+OPENCV_CONF_OPT += -DBUILD_TESTS=OFF
+endif
+
+
+# Build options
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+OPENCV_CONF_OPT += -DBUILD_SHARED_LIBS=OFF
+else
+OPENCV_CONF_OPT += -DBUILD_SHARED_LIBS=ON
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_BUILD_WITH_DEBUG_INFO),y)
+OPENCV_CONF_OPT += -DBUILD_WITH_DEBUG_INFO=ON
+else
+OPENCV_CONF_OPT += -DBUILD_WITH_DEBUG_INFO=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_OPENCV_BUILD_3RDPARTY_LIBS),y)
+OPENCV_CONF_OPT += -DOPENCV_BUILD_3RDPARTY_LIBS=ON
+else
+OPENCV_CONF_OPT += -DOPENCV_BUILD_3RDPARTY_LIBS=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_ENABLE_PROFILING),y)
+OPENCV_CONF_OPT += -DENABLE_PROFILING=ON
+else
+OPENCV_CONF_OPT += -DENABLE_PROFILING=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_CMAKE_SKIP_RPATH),y)
+OPENCV_CONF_OPT += -DCMAKE_SKIP_RPATH=ON
+else
+OPENCV_CONF_OPT += -DCMAKE_SKIP_RPATH=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_USE_FAST_MATH),y)
+OPENCV_CONF_OPT += -DUSE_FAST_MATH=ON
+else
+OPENCV_CONF_OPT += -DUSE_FAST_MATH=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_USE_OMIT_FRAME_POINTER),y)
+OPENCV_CONF_OPT += -DUSE_OMIT_FRAME_POINTER=ON
+else
+OPENCV_CONF_OPT += -DUSE_OMIT_FRAME_POINTER=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_USE_PRECOMPILED_HEADERS),y)
+OPENCV_CONF_OPT += -DUSE_PRECOMPILED_HEADERS=ON
+else
+OPENCV_CONF_OPT += -DUSE_PRECOMPILED_HEADERS=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_1394),y)
+OPENCV_CONF_OPT += -DWITH_1394=ON
+else
+OPENCV_CONF_OPT += -DWITH_1394=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_CUDA),y)
+OPENCV_CONF_OPT += -DWITH_CUDA=ON
+# Cuda options
+ifeq ($(BR2_PACKAGE_OPENCV_CUDA_64_BIT_DEVICE_CODE),y)
+OPENCV_CONF_OPT += -DCUDA_64_BIT_DEVICE_CODE=ON
+else
+OPENCV_CONF_OPT += -DCUDA_64_BIT_DEVICE_CODE=OFF
+endif
+ifeq ($(BR2_PACKAGE_OPENCV_CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE),y)
+OPENCV_CONF_OPT += -DCUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE=ON
+else
+OPENCV_CONF_OPT += -DCUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE=OFF
+endif
+ifeq ($(BR2_PACKAGE_OPENCV_CUDA_BUILD_CUBIN),y)
+OPENCV_CONF_OPT += -DCUDA_BUILD_CUBIN=ON
+else
+OPENCV_CONF_OPT += -DCUDA_BUILD_CUBIN=OFF
+endif
+ifeq ($(BR2_PACKAGE_OPENCV_CUDA_BUILD_EMULATION),y)
+OPENCV_CONF_OPT += -DCUDA_BUILD_EMULATION=ON
+else
+OPENCV_CONF_OPT += -DCUDA_BUILD_EMULATION=OFF
+endif
+ifeq ($(BR2_PACKAGE_OPENCV_CUDA_HOST_COMPILATION_CPP),y)
+OPENCV_CONF_OPT += -DCUDA_HOST_COMPILATION_CPP=ON
+else
+OPENCV_CONF_OPT += -DCUDA_HOST_COMPILATION_CPP=OFF
+endif
+ifeq ($(BR2_PACKAGE_OPENCV_CUDA_PROPAGATE_HOST_FLAGS),y)
+OPENCV_CONF_OPT += -DCUDA_PROPAGATE_HOST_FLAGS=ON
+else
+OPENCV_CONF_OPT += -DCUDA_PROPAGATE_HOST_FLAGS=OFF
+endif
+else
+OPENCV_CONF_OPT += -DWITH_CUDA=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_EIGEN),y)
+OPENCV_CONF_OPT ? ? += -DWITH_EIGEN=ON
+OPENCV_DEPENDENCIES += eigen
+else
+OPENCV_CONF_OPT ? ? += -DWITH_EIGEN=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_FFMPEG),y)
+OPENCV_CONF_OPT ? ? += -DWITH_FFMPEG=ON
+OPENCV_DEPENDENCIES += ffmpeg
+else
+OPENCV_CONF_OPT ? ? += -DWITH_FFMPEG=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_GSTREAMER),y)
+OPENCV_CONF_OPT ? ? += -DWITH_GSTREAMER=ON
+OPENCV_DEPENDENCIES += gstreamer gst-plugins-base
+else
+OPENCV_CONF_OPT ? ? += -DWITH_GSTREAMER=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_GTK),y)
+OPENCV_CONF_OPT ? ? += -DWITH_GTK=ON
+OPENCV_DEPENDENCIES += libgtk2 libglib2
+else
+OPENCV_CONF_OPT ? ? += -DWITH_GTK=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_IPP),y)
+OPENCV_CONF_OPT += -DWITH_IPP=ON
+else
+OPENCV_CONF_OPT += -DWITH_IPP=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_JASPER),y)
+OPENCV_CONF_OPT += -DWITH_JASPER=ON
+else
+OPENCV_CONF_OPT += -DWITH_JASPER=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_JPEG),y)
+OPENCV_CONF_OPT ? ? += -DWITH_JPEG=ON
+OPENCV_DEPENDENCIES += jpeg
+else
+OPENCV_CONF_OPT ? ? += -DWITH_JPEG=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_OPENEXR),y)
+OPENCV_CONF_OPT += -DWITH_OPENEXR=ON
+else
+OPENCV_CONF_OPT += -DWITH_OPENEXR=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_OPENNI),y)
+OPENCV_CONF_OPT += -DWITH_OPENNI=ON
+else
+OPENCV_CONF_OPT += -DWITH_OPENNI=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_PNG),y)
+OPENCV_CONF_OPT ? ? += -DWITH_PNG=ON
+OPENCV_DEPENDENCIES += libpng
+else
+OPENCV_CONF_OPT += -DWITH_PNG=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_PVAPI),y)
+OPENCV_CONF_OPT += -DWITH_PVAPI=ON
+else
+OPENCV_CONF_OPT += -DWITH_PVAPI=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT),y)
+OPENCV_CONF_OPT ? ? += -DWITH_QT=ON
+OPENCV_DEPENDENCIES += qt
+else
+OPENCV_CONF_OPT ? ? += -DWITH_QT=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT_OPENGL),y)
+OPENCV_CONF_OPT += -DWITH_QT_OPENGL=ON
+else
+OPENCV_CONF_OPT += -DWITH_QT_OPENGL=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_TBB),y)
+OPENCV_CONF_OPT += -DWITH_TBB=ON
+else
+OPENCV_CONF_OPT += -DWITH_TBB=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_TIFF),y)
+OPENCV_CONF_OPT ? ? += -DWITH_TIFF=ON
+OPENCV_DEPENDENCIES += tiff
+else
+OPENCV_CONF_OPT ? ? += -DWITH_TIFF=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_UNICAP),y)
+OPENCV_CONF_OPT += -DWITH_UNICAP=ON
+else
+OPENCV_CONF_OPT += -DWITH_UNICAP=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_V4L),y)
+OPENCV_CONF_OPT ? ? += -DWITH_V4L=ON
+OPENCV_DEPENDENCIES += libv4l
+else
+OPENCV_CONF_OPT ? ? += -DWITH_V4L=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_XINE),y)
+OPENCV_CONF_OPT += -DWITH_XINE=ON
+else
+OPENCV_CONF_OPT += -DWITH_XINE=OFF
+endif
+
+# Install options
+ifeq ($(BR2_PACKAGE_OPENCV_INSTALL_C_EXAMPLES),y)
+OPENCV_CONF_OPT += -DINSTALL_C_EXAMPLES=ON
+else
+OPENCV_CONF_OPT += -DINSTALL_C_EXAMPLES=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_INSTALL_PYTHON_EXAMPLES),y)
+OPENCV_CONF_OPT += -DINSTALL_PYTHON_EXAMPLES=ON
+else
+OPENCV_CONF_OPT += -DINSTALL_PYTHON_EXAMPLES=OFF
+endif
+
+
+$(eval $(call CMAKETARGETS,package,opencv))
+$(eval $(call CMAKETARGETS,package,opencv,host))
--

1.7.0.4

#2 lore raw

PATCH 1/1 package: add opencv

In reply to Samuel Martin

Le Sun, 7 Aug 2011 20:09:41 +0200,
Samuel Martin <[email protected]> a ?crit :

Quoted 3 lines

OpenCV is a free, open-source, cross-platform computer vision library

Good to see a package for OpenCV!

Quoted 9 lines
package/opencv/Config.in new file +3 -0
new file mode 100644
index 0000000..4007847
@@ -0,0 +1,242 @@
+menuconfig BR2_PACKAGE_OPENCV
+	bool "opencv"
+	select BR2_PACKAGE_ZLIB

package/opencv/Config.in line 13

Quoted 10 lines
package/opencv/Config.in new file +10 -0
+	help
+	  OpenCV (Open Source Computer Vision) is a library of programming
+	  functions for real time computer vision.
+
+	  http://opencv.willowgarage.com/wiki/
+
+if BR2_PACKAGE_OPENCV
+
+choice
+	prompt "Build type"

Do we really need this selection ?

I think selecting the release build by default is fine, and select the debug build if BR2_ENABLE_DEBUG is enabled. This should be sufficient.

package/opencv/Config.in line 34

Quoted 5 lines
package/opencv/Config.in new file +5 -0
+comment "Built targets"
+
+config BR2_PACKAGE_OPENCV_BUILD_DOCS
+	bool "OpenCV Documentation"
+	depends on SUPPORTED

What is this "SUPPORTED" dependency ? If something is not supported, please do not include any Kconfig option for it.

package/opencv/Config.in line 19

Quoted 1 line
package/opencv/Config.in new file +1 -0
+	default n

All the "default n" are useless, this is the default.

package/opencv/Config.in line 47

Quoted 2 lines
package/opencv/Config.in new file +2 -0
+config BR2_PACKAGE_OPENCV_BUILD_PACKAGE
+	bool "Enables 'make package_source' command"

Hum ? What does that mean ?

package/opencv/Config.in line 57

Quoted 3 lines
package/opencv/Config.in new file +3 -0
+config BR2_PACKAGE_OPENCV_BUILD_WITH_DEBUG_INFO
+	bool "Include debug info into debug libs"
+	default n

What's the difference with the debug build above ?

package/opencv/Config.in line 68

Quoted 10 lines
package/opencv/Config.in new file +10 -0
+config BR2_PACKAGE_OPENCV_OPENCV_BUILD_3RDPARTY_LIBS
+	bool "3rd party libraries"
+	default n
+	help
+	  If set, allow to build and use the 3rd party libraries *only* if
+	  they are not already provided by/in the target system.
+
+	  Packages provided as 3rd party are:
+	    libjpeg, libpng, libtiff, zlib ,jasper-1.900.1 (aka. jpeg2k),
+	    openexr-1.4.0, ffmpeg-0.6.0, videoInput-0.1995

I don't think we need this option, opencv should instead always use the system versions of those dependencies.

package/opencv/Config.in line 74

Quoted 5 lines
package/opencv/Config.in new file +5 -0
+comment "Build options"
+
+config BR2_PACKAGE_OPENCV_ENABLE_PROFILING
+	bool "Enable profiling in the GCC compiler (Add flags: -g -pg)"
+	default n

We don't have that for any package, I don't think it's very useful to have such an option.

package/opencv/Config.in line 80

Quoted 5 lines
package/opencv/Config.in new file +5 -0
+config BR2_PACKAGE_OPENCV_CMAKE_SKIP_RPATH
+	bool "Skip rpath"
+	default n
+	help
+	  If set, runtime paths are not added when using shared libraries.

The rpath should *never* be set on libraries installed to the target. Please remove this option and make this the default.

package/opencv/Config.in line 92

Quoted 11 lines
package/opencv/Config.in new file +11 -0
+config BR2_PACKAGE_OPENCV_USE_FAST_MATH
+	bool "Enable -ffast-math"
+	default y
+
+config BR2_PACKAGE_OPENCV_USE_OMIT_FRAME_POINTER
+	bool "Enable -fomit-frame-pointer for GCC"
+	default y
+
+config BR2_PACKAGE_OPENCV_USE_PRECOMPILED_HEADERS
+	bool "Use precompiled headers"
+	default y

For those three options, can't we find some sensible defaults, and hardcode them in the .mk file (and get rid of those kconfig options) ?

package/opencv/Config.in line 102

Quoted 9 lines
package/opencv/Config.in new file +9 -0
+config BR2_PACKAGE_OPENCV_WITH_1394
+	bool "IEEE1394 support"
+	depends on SUPPORTED
+	default n
+
+menuconfig BR2_PACKAGE_OPENCV_WITH_CUDA
+	bool "Include NVidia Cuda Runtime support"
+	depends on SUPPORTED
+	default n

Remove all those not supported options.

package/opencv/Config.in line 146

Quoted 13 lines
package/opencv/Config.in new file +13 -0
+config BR2_PACKAGE_OPENCV_WITH_FFMPEG
+	bool "FFMPEG support"
+	select BR2_PACKAGE_FFMPEG
+	select BR2_PACKAGE_FFMPEG_SWSCALE
+	help
+	  Use ffmpeg from the target system.
+
+config BR2_PACKAGE_OPENCV_WITH_GSTREAMER
+	bool "Gstreamer support"
+	select BR2_PACKAGE_GSTREAMER
+	select BR2_PACKAGE_GST_PLUGINS_BASE
+	select BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_APP
+	default y

Any reason to have gstreamer support enabled by default and not ffmpeg ?

package/opencv/Config.in line 154

Quoted 7 lines
package/opencv/Config.in new file +7 -0
+config BR2_PACKAGE_OPENCV_WITH_GTK
+	bool "GTK support"
+	depends on BR2_PACKAGE_LIBGTK2 && BR2_PACKAGE_LIBGLIB2
+	default n
+
+comment "GTK support not available (requires libgtk2 and libglib2)"
+	depends on ! ( BR2_PACKAGE_LIBGTK2 && BR2_PACKAGE_LIBGLIB2 )

We typically don't put comments for dependencies, except for non-obvious toolchain-related dependencies.

package/opencv/Config.in line 159

Quoted 4 lines
package/opencv/Config.in new file +4 -0
+config BR2_PACKAGE_OPENCV_WITH_IPP
+	bool "Intel IPP support"
+	depends on SUPPORTED
+	default n

Remove non supported options.

package/opencv/Config.in line 165

Quoted 5 lines
package/opencv/Config.in new file +5 -0
+config BR2_PACKAGE_OPENCV_WITH_JASPER
+	bool  "JASPER (JPEG2K) support"
+	depends on BR2_PACKAGE_OPENCV_OPENCV_BUILD_3RDPARTY_LIBS
+	help
+	  Build jasper provided within OpenCV.

I don't really like this 3RDPARTY_LIBS thing. Just don't include support for Jasper if the needed dependencies are not available in Buildroot (or create a package for those dependencies).

package/opencv/Config.in line 177

Quoted 11 lines
package/opencv/Config.in new file +11 -0
+config BR2_PACKAGE_OPENCV_WITH_JPEG
+	bool "JPEG support"
+	select BR2_PACKAGE_JPEG
+	help
+	  Use shared libjpeg from the target system.
+
+config BR2_PACKAGE_OPENCV_WITH_OPENEXR
+	bool "ILM support via OpenEXR"
+	depends on BR2_PACKAGE_OPENCV_OPENCV_BUILD_3RDPARTY_LIBS
+	help
+	  Build openexr provided within OpenCV.

Same as JASPER.

package/opencv/Config.in line 182

Quoted 4 lines
package/opencv/Config.in new file +4 -0
+config BR2_PACKAGE_OPENCV_WITH_OPENNI
+	bool "OpenNI support"
+	depends on SUPPORTED
+	default n

Remove non-supported options.

package/opencv/Config.in line 193

Quoted 10 lines
package/opencv/Config.in new file +10 -0
+config BR2_PACKAGE_OPENCV_WITH_PNG
+	bool "PNG support"
+	select BR2_PACKAGE_LIBPNG
+	help
+	  Use shared libpng from the target system.
+
+config BR2_PACKAGE_OPENCV_WITH_PVAPI
+	bool "Prosilica GigE support"
+	depends on SUPPORTED
+	default n

Remove non-supported options.

package/opencv/Config.in line 203

Quoted 9 lines
package/opencv/Config.in new file +9 -0
+config BR2_PACKAGE_OPENCV_WITH_QT
+	bool "Qt Backend support"
+	select BR2_PACKAGE_QT
+	default n
+
+config BR2_PACKAGE_OPENCV_WITH_QT_OPENGL
+	bool "Add OpenGL extension to Qt"
+	depends on BR2_PACKAGE_OPENCV_WITH_QT && SUPPORTED
+	default n

Remove non-supported options.

package/opencv/Config.in line 208

Quoted 4 lines
package/opencv/Config.in new file +4 -0
+config BR2_PACKAGE_OPENCV_WITH_TBB
+	bool "Intel TBB support"
+	depends on SUPPORTED
+	default n

Remove non-supported options.

package/opencv/Config.in line 219

Quoted 10 lines
package/opencv/Config.in new file +10 -0
+config BR2_PACKAGE_OPENCV_WITH_TIFF
+	bool "TIFF support"
+	select BR2_PACKAGE_TIFF
+	help
+	  Use shared libtiff from the target system.
+
+config BR2_PACKAGE_OPENCV_WITH_UNICAP
+	bool "Unicap support (GPL)"
+	depends on SUPPORTED
+	default n

Remove non-supported options.

package/opencv/Config.in line 229

Quoted 9 lines
package/opencv/Config.in new file +9 -0
+config BR2_PACKAGE_OPENCV_WITH_V4L
+	bool "Video 4 Linux support"
+	select BR2_PACKAGE_LIBV4L
+	default y
+
+config BR2_PACKAGE_OPENCV_WITH_XINE
+	bool "Xine support (GPL)"
+	depends on SUPPORTED
+	default n

Remove non-supported options.

package/opencv/Config.in line 242

Quoted 12 lines
package/opencv/Config.in new file +12 -0
+comment "Install options"
+
+config BR2_PACKAGE_OPENCV_INSTALL_C_EXAMPLES
+	bool "C examples"
+	default n
+
+config BR2_PACKAGE_OPENCV_INSTALL_PYTHON_EXAMPLES
+	bool "Python examples"
+	default n
+	depends on BR2_PACKAGE_OPENCV_BUILD_NEW_PYTHON_SUPPORT
+
+endif

Just don't install source code examples.

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

package/opencv/opencv.mk line 8

Quoted 8 lines
package/opencv/opencv.mk new file +8 -0
@@ -0,0 +1,287 @@
+#############################################################
+#
+# OpenCV (Open Source Computer Vision)
+#
+#############################################################
+OPENCV_SERIES  = 2.3
+OPENCV_VERSION = $(OPENCV_SERIES).0
+OPENCV_SITE    = http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/$(OPENCV_SERIES)

Use BR2_SOURCEFORGE_MIRROR

package/opencv/opencv.mk line 16

Quoted 8 lines
package/opencv/opencv.mk new file +8 -0
+OPENCV_SOURCE  = OpenCV-$(OPENCV_VERSION).tar.bz2
+
+OPENCV_INSTALL_STAGING   = YES
+
+OPENCV_CONF_OPT          =
+
+OPENCV_DEPENDENCIES      =
+HOST_OPENCV_DEPENDENCIES =

No need to define empty variables.

package/opencv/opencv.mk line 27

Quoted 10 lines
package/opencv/opencv.mk new file +10 -0
+# Build type
+ifeq ($(BR2_PACKAGE_OPENCV_BUILD_TYPE_RELEASE),y)
+OPENCV_CONF_OPT += -DBUILD_TYPE_RELEASE=Release
+else ifeq ($(BR2_PACKAGE_OPENCV_BUILD_TYPE_DEBUG),y)
+OPENCV_CONF_OPT += -DBUILD_TYPE_DEBUG=Debug
+else ifeq ($(BR2_PACKAGE_OPENCV_BUILD_TYPE_RELWITHDEBINFO),y)
+OPENCV_CONF_OPT += -DBUILD_TYPE_RELWITHDEBINFO=RelWithDebInfo
+else ifeq ($(BR2_PACKAGE_OPENCV_BUILD_TYPE_MINSIZEREL),y)
+OPENCV_CONF_OPT += -DBUILD_TYPE_MINSIZEREL=MinSizeRel
+endif

As said above, simplify this build type thing.

package/opencv/opencv.mk line 34

Quoted 6 lines
package/opencv/opencv.mk new file +6 -0
+# Built targets
+ifeq ($(BR2_PACKAGE_OPENCV_BUILD_DOCS),y)
+OPENCV_CONF_OPT += -DBUILD_DOCS=ON
+else
+OPENCV_CONF_OPT += -DBUILD_DOCS=OFF
+endif

You can also write:

OPENCV_CONF_OPT += -DBUILD_DOCS=$(if $(BR2_PACKAGE_OPENCV_BUILD_DOCS),ON,OFF)

to do the same thing on one line.

Generally speaking, it seems that you have listed all configuration options of OpenCV and tried to provide corresponding configuration options in Buildroot. We typically try not to do this, but instead only support the configuration options that are actually useful and the one that have been tested.

Regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#3 lore raw

PATCH 1/1 package: add opencv

2011/8/17 Thomas Petazzoni <[email protected]>:

Quoted 8 lines

Le Sun, ?7 Aug 2011 20:09:41 +0200,
Samuel Martin <[email protected]> a ?crit :

Quoted 3 lines

OpenCV is a free, open-source, cross-platform computer vision library

Good to see a package for OpenCV!

thanks for the review.

Quoted 42 lines
Quoted 10 lines
package/opencv/Config.in new file +3 -0
new file mode 100644
index 0000000..4007847
@@ -0,0 +1,242 @@
+menuconfig BR2_PACKAGE_OPENCV
+ ? ? bool "opencv"
+ ? ? select BR2_PACKAGE_ZLIB

package/opencv/Config.in line 13

Quoted 10 lines
package/opencv/Config.in new file +10 -0
+ ? ? help
+ ? ? ? OpenCV (Open Source Computer Vision) is a library of programming
+ ? ? ? functions for real time computer vision.
+
+ ? ? ? http://opencv.willowgarage.com/wiki/
+
+if BR2_PACKAGE_OPENCV
+
+choice
+ ? ? prompt "Build type"

Do we really need this selection ?

I think selecting the release build by default is fine, and select the debug build if BR2_ENABLE_DEBUG is enabled. This should be sufficient.

package/opencv/Config.in

Quoted 5 lines
package/opencv/Config.in new file +5 -0
+comment "Built targets"
+
+config BR2_PACKAGE_OPENCV_BUILD_DOCS
+ ? ? bool "OpenCV Documentation"
+ ? ? depends on SUPPORTED

What is this "SUPPORTED" dependency ? If something is not supported, please do not include any Kconfig option for it.

package/opencv/Config.in line 19

Quoted 1 line
package/opencv/Config.in new file +1 -0
+ ? ? default n

All the "default n" are useless, this is the default.

package/opencv/Config.in line 21

Quoted 2 lines
package/opencv/Config.in new file +2 -0
+config BR2_PACKAGE_OPENCV_BUILD_PACKAGE
+ ? ? bool "Enables 'make package_source' command"
Quoted 7 lines

Hum ? What does that mean ?

package/opencv/Config.in line 24

Quoted 3 lines
package/opencv/Config.in new file +3 -0
+config BR2_PACKAGE_OPENCV_BUILD_WITH_DEBUG_INFO
+ ? ? bool "Include debug info into debug libs"
+ ? ? default n

What's the difference with the debug build above ?

I don't remember exactly what OpenCV guys do, but it seems they play with some strip options to extract debug info into new "libs" (or kind of), then the libs with no debug info can provide debug support (so link against) only when these debug "libs" are installed

Quoted 249 lines

package/opencv/Config.in line 34

Quoted 11 lines
package/opencv/Config.in new file +10 -0
+config BR2_PACKAGE_OPENCV_OPENCV_BUILD_3RDPARTY_LIBS
+ ? ? bool "3rd party libraries"
+ ? ? default n
+ ? ? help
+ ? ? ? If set, allow to build and use the 3rd party libraries *only* if
+ ? ? ? they are not already provided by/in the target system.
+
+ ? ? ? Packages provided as 3rd party are:
+ ? ? ? ? libjpeg, libpng, libtiff, zlib ,jasper-1.900.1 (aka. jpeg2k),
+ ? ? ? ? openexr-1.4.0, ffmpeg-0.6.0, videoInput-0.1995

I don't think we need this option, opencv should instead always use the system versions of those dependencies.

package/opencv/Config.in

Quoted 5 lines
package/opencv/Config.in new file +5 -0
+comment "Build options"
+
+config BR2_PACKAGE_OPENCV_ENABLE_PROFILING
+ ? ? bool "Enable profiling in the GCC compiler (Add flags: -g -pg)"
+ ? ? default n

We don't have that for any package, I don't think it's very useful to have such an option.

package/opencv/Config.in line 44

Quoted 5 lines
package/opencv/Config.in new file +5 -0
+config BR2_PACKAGE_OPENCV_CMAKE_SKIP_RPATH
+ ? ? bool "Skip rpath"
+ ? ? default n
+ ? ? help
+ ? ? ? If set, runtime paths are not added when using shared libraries.

The rpath should *never* be set on libraries installed to the target. Please remove this option and make this the default.

package/opencv/Config.in line 55

Quoted 11 lines
package/opencv/Config.in new file +11 -0
+config BR2_PACKAGE_OPENCV_USE_FAST_MATH
+ ? ? bool "Enable -ffast-math"
+ ? ? default y
+
+config BR2_PACKAGE_OPENCV_USE_OMIT_FRAME_POINTER
+ ? ? bool "Enable -fomit-frame-pointer for GCC"
+ ? ? default y
+
+config BR2_PACKAGE_OPENCV_USE_PRECOMPILED_HEADERS
+ ? ? bool "Use precompiled headers"
+ ? ? default y

For those three options, can't we find some sensible defaults, and hardcode them in the .mk file (and get rid of those kconfig options) ?

package/opencv/Config.in line 64

Quoted 9 lines
package/opencv/Config.in new file +9 -0
+config BR2_PACKAGE_OPENCV_WITH_1394
+ ? ? bool "IEEE1394 support"
+ ? ? depends on SUPPORTED
+ ? ? default n
+
+menuconfig BR2_PACKAGE_OPENCV_WITH_CUDA
+ ? ? bool "Include NVidia Cuda Runtime support"
+ ? ? depends on SUPPORTED
+ ? ? default n

Remove all those not supported options.

package/opencv/Config.in line 77

Quoted 13 lines
package/opencv/Config.in new file +13 -0
+config BR2_PACKAGE_OPENCV_WITH_FFMPEG
+ ? ? bool "FFMPEG support"
+ ? ? select BR2_PACKAGE_FFMPEG
+ ? ? select BR2_PACKAGE_FFMPEG_SWSCALE
+ ? ? help
+ ? ? ? Use ffmpeg from the target system.
+
+config BR2_PACKAGE_OPENCV_WITH_GSTREAMER
+ ? ? bool "Gstreamer support"
+ ? ? select BR2_PACKAGE_GSTREAMER
+ ? ? select BR2_PACKAGE_GST_PLUGINS_BASE
+ ? ? select BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_APP
+ ? ? default y

Any reason to have gstreamer support enabled by default and not ffmpeg ?

package/opencv/Config.in line 84

Quoted 7 lines
package/opencv/Config.in new file +7 -0
+config BR2_PACKAGE_OPENCV_WITH_GTK
+ ? ? bool "GTK support"
+ ? ? depends on BR2_PACKAGE_LIBGTK2 && BR2_PACKAGE_LIBGLIB2
+ ? ? default n
+
+comment "GTK support not available (requires libgtk2 and libglib2)"
+ ? ? depends on ! ( BR2_PACKAGE_LIBGTK2 && BR2_PACKAGE_LIBGLIB2 )

We typically don't put comments for dependencies, except for non-obvious toolchain-related dependencies.

package/opencv/Config.in line 88

Quoted 4 lines
package/opencv/Config.in new file +4 -0
+config BR2_PACKAGE_OPENCV_WITH_IPP
+ ? ? bool "Intel IPP support"
+ ? ? depends on SUPPORTED
+ ? ? default n

Remove non supported options.

package/opencv/Config.in line 93

Quoted 5 lines
package/opencv/Config.in new file +5 -0
+config BR2_PACKAGE_OPENCV_WITH_JASPER
+ ? ? bool ?"JASPER (JPEG2K) support"
+ ? ? depends on BR2_PACKAGE_OPENCV_OPENCV_BUILD_3RDPARTY_LIBS
+ ? ? help
+ ? ? ? Build jasper provided within OpenCV.

I don't really like this 3RDPARTY_LIBS thing. Just don't include support for Jasper if the needed dependencies are not available in Buildroot (or create a package for those dependencies).

package/opencv/Config.in line 104

Quoted 11 lines
package/opencv/Config.in new file +11 -0
+config BR2_PACKAGE_OPENCV_WITH_JPEG
+ ? ? bool "JPEG support"
+ ? ? select BR2_PACKAGE_JPEG
+ ? ? help
+ ? ? ? Use shared libjpeg from the target system.
+
+config BR2_PACKAGE_OPENCV_WITH_OPENEXR
+ ? ? bool "ILM support via OpenEXR"
+ ? ? depends on BR2_PACKAGE_OPENCV_OPENCV_BUILD_3RDPARTY_LIBS
+ ? ? help
+ ? ? ? Build openexr provided within OpenCV.

Same as JASPER.

package/opencv/Config.in line 108

Quoted 4 lines
package/opencv/Config.in new file +4 -0
+config BR2_PACKAGE_OPENCV_WITH_OPENNI
+ ? ? bool "OpenNI support"
+ ? ? depends on SUPPORTED
+ ? ? default n

Remove non-supported options.

package/opencv/Config.in line 118

Quoted 10 lines
package/opencv/Config.in new file +10 -0
+config BR2_PACKAGE_OPENCV_WITH_PNG
+ ? ? bool "PNG support"
+ ? ? select BR2_PACKAGE_LIBPNG
+ ? ? help
+ ? ? ? Use shared libpng from the target system.
+
+config BR2_PACKAGE_OPENCV_WITH_PVAPI
+ ? ? bool "Prosilica GigE support"
+ ? ? depends on SUPPORTED
+ ? ? default n

Remove non-supported options.

package/opencv/Config.in line 127

Quoted 9 lines
package/opencv/Config.in new file +9 -0
+config BR2_PACKAGE_OPENCV_WITH_QT
+ ? ? bool "Qt Backend support"
+ ? ? select BR2_PACKAGE_QT
+ ? ? default n
+
+config BR2_PACKAGE_OPENCV_WITH_QT_OPENGL
+ ? ? bool "Add OpenGL extension to Qt"
+ ? ? depends on BR2_PACKAGE_OPENCV_WITH_QT && SUPPORTED
+ ? ? default n

Remove non-supported options.

package/opencv/Config.in line 131

Quoted 4 lines
package/opencv/Config.in new file +4 -0
+config BR2_PACKAGE_OPENCV_WITH_TBB
+ ? ? bool "Intel TBB support"
+ ? ? depends on SUPPORTED
+ ? ? default n

Remove non-supported options.

package/opencv/Config.in line 141

Quoted 10 lines
package/opencv/Config.in new file +10 -0
+config BR2_PACKAGE_OPENCV_WITH_TIFF
+ ? ? bool "TIFF support"
+ ? ? select BR2_PACKAGE_TIFF
+ ? ? help
+ ? ? ? Use shared libtiff from the target system.
+
+config BR2_PACKAGE_OPENCV_WITH_UNICAP
+ ? ? bool "Unicap support (GPL)"
+ ? ? depends on SUPPORTED
+ ? ? default n

Remove non-supported options.

package/opencv/Config.in line 150

Quoted 9 lines
package/opencv/Config.in new file +9 -0
+config BR2_PACKAGE_OPENCV_WITH_V4L
+ ? ? bool "Video 4 Linux support"
+ ? ? select BR2_PACKAGE_LIBV4L
+ ? ? default y
+
+config BR2_PACKAGE_OPENCV_WITH_XINE
+ ? ? bool "Xine support (GPL)"
+ ? ? depends on SUPPORTED
+ ? ? default n

Remove non-supported options.

package/opencv/Config.in line 242

Quoted 12 lines
package/opencv/Config.in new file +12 -0
+comment "Install options"
+
+config BR2_PACKAGE_OPENCV_INSTALL_C_EXAMPLES
+ ? ? bool "C examples"
+ ? ? default n
+
+config BR2_PACKAGE_OPENCV_INSTALL_PYTHON_EXAMPLES
+ ? ? bool "Python examples"
+ ? ? default n
+ ? ? depends on BR2_PACKAGE_OPENCV_BUILD_NEW_PYTHON_SUPPORT
+
+endif

Just don't install source code examples.

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

package/opencv/opencv.mk line 8

Quoted 8 lines
package/opencv/opencv.mk new file +8 -0
@@ -0,0 +1,287 @@
+#############################################################
+#
+# OpenCV (Open Source Computer Vision)
+#
+#############################################################
+OPENCV_SERIES ?= 2.3
+OPENCV_VERSION = $(OPENCV_SERIES).0
+OPENCV_SITE ? ?= http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/$(OPENCV_SERIES)

Use BR2_SOURCEFORGE_MIRROR

package/opencv/opencv.mk line 16

Quoted 8 lines
package/opencv/opencv.mk new file +8 -0
+OPENCV_SOURCE ?= OpenCV-$(OPENCV_VERSION).tar.bz2
+
+OPENCV_INSTALL_STAGING ? = YES
+
+OPENCV_CONF_OPT ? ? ? ? ?=
+
+OPENCV_DEPENDENCIES ? ? ?=
+HOST_OPENCV_DEPENDENCIES =

No need to define empty variables.

package/opencv/opencv.mk line 27

Quoted 10 lines
package/opencv/opencv.mk new file +10 -0
+# Build type
+ifeq ($(BR2_PACKAGE_OPENCV_BUILD_TYPE_RELEASE),y)
+OPENCV_CONF_OPT += -DBUILD_TYPE_RELEASE=Release
+else ifeq ($(BR2_PACKAGE_OPENCV_BUILD_TYPE_DEBUG),y)
+OPENCV_CONF_OPT += -DBUILD_TYPE_DEBUG=Debug
+else ifeq ($(BR2_PACKAGE_OPENCV_BUILD_TYPE_RELWITHDEBINFO),y)
+OPENCV_CONF_OPT += -DBUILD_TYPE_RELWITHDEBINFO=RelWithDebInfo
+else ifeq ($(BR2_PACKAGE_OPENCV_BUILD_TYPE_MINSIZEREL),y)
+OPENCV_CONF_OPT += -DBUILD_TYPE_MINSIZEREL=MinSizeRel
+endif

As said above, simplify this build type thing.

package/opencv/opencv.mk line 34

Quoted 6 lines
package/opencv/opencv.mk new file +6 -0
+# Built targets
+ifeq ($(BR2_PACKAGE_OPENCV_BUILD_DOCS),y)
+OPENCV_CONF_OPT += -DBUILD_DOCS=ON
+else
+OPENCV_CONF_OPT += -DBUILD_DOCS=OFF
+endif

You can also write:

OPENCV_CONF_OPT += -DBUILD_DOCS=$(if $(BR2_PACKAGE_OPENCV_BUILD_DOCS),ON,OFF)

Quoted 8 lines

to do the same thing on one line.

Generally speaking, it seems that you have listed all configuration options of OpenCV and tried to provide corresponding configuration options in Buildroot. We typically try not to do this, but instead only support the configuration options that are actually useful and the one that have been tested.

ok, v2 is on its way...

Quoted 12 lines

Regards,

Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot