From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-lb0-x230.google.com ([2a00:1450:4010:c04::230]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1WW0JO-00052O-96 for ptxdist@pengutronix.de; Fri, 04 Apr 2014 11:21:23 +0200 Received: by mail-lb0-f176.google.com with SMTP id 10so2222565lbg.21 for ; Fri, 04 Apr 2014 02:21:16 -0700 (PDT) Received: from [46.246.43.95] ([46.246.43.95]) by mx.google.com with ESMTPSA id oy7sm5295609lbb.16.2014.04.04.02.21.14 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Fri, 04 Apr 2014 02:21:15 -0700 (PDT) From: Christoph Fritz In-Reply-To: <20140404075755.GA21196@omega.Speedport_W_921V_1_24_000> References: <1396118503.4914.22.camel@mars> <1396118944.4914.27.camel@mars> <20140331074545.GE10959@pengutronix.de> <1396557485.15210.54.camel@mars> <20140404075755.GA21196@omega.Speedport_W_921V_1_24_000> Date: Fri, 04 Apr 2014 11:21:13 +0200 Message-ID: <1396603273.6430.8.camel@mars> Mime-Version: 1.0 Subject: [ptxdist] [PATCH v4] opencv: add new package Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Signed-off-by: Christoph Fritz --- v2: use correct email of J.Weitzel v3: - rework v4l usage - fix gstreamer and qt4 dependency - use foreach at install stage v4: - add empty line after OPENCV_QT-help - concatenate OPENCV_CONF_OPT - tigthen init of OPENCV_LIBS-y --- rules/opencv.in | 179 +++++++++++++++++++++++++++++++++++++++++++++++++++++ rules/opencv.make | 160 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 339 insertions(+) create mode 100644 rules/opencv.in create mode 100644 rules/opencv.make diff --git a/rules/opencv.in b/rules/opencv.in new file mode 100644 index 0000000..0084006 --- /dev/null +++ b/rules/opencv.in @@ -0,0 +1,179 @@ +## SECTION=multimedia_libs + +menuconfig OPENCV + tristate + prompt "opencv" + select HOST_CMAKE + select GCCLIBS_CXX + select ZLIB + select LIBPNG + select LIBJPEG + select QT4 if OPENCV_QT + select QT4_BUILD_QTESTLIB if OPENCV_QT + select QT4_BUILD_GUI if OPENCV_QT + select QT4_STL if OPENCV_QT + select GSTREAMER if OPENCV_GSTREAMER + select V4L_UTILS if OPENCV_V4L_LIBV4L2 + select V4L_UTILS_LIBV4L2 if OPENCV_V4L_LIBV4L2 + help + Open Source Computer Vision Library + +if OPENCV + +config OPENCV_CALIB3D + bool + prompt "calib3d" + select OPENCV_FEATURES2D + help + Camera Calibration and 3D Reconstruction + +config OPENCV_CONTRIB + bool + prompt "contrib" + select OPENCV_CALIB3D + select OPENCV_IMGPROC + select OPENCV_ML + select OPENCV_OBJDETECT + select OPENCV_VIDEO + help + Contributed/Experimental Stuff + +config OPENCV_FEATURES2D + bool + prompt "features2d" + select OPENCV_FLANN + select OPENCV_IMGPROC + help + 2D Features Framework + +config OPENCV_FLANN + bool + prompt "flann" + help + Clustering and Search in Multi-Dimensional Spaces + +config OPENCV_GPU + bool + prompt "gpu" + select OPENCV_LEGACY + select OPENCV_PHOTO + select OPENCV_OBJDETECT + help + GPU-accelerated Computer Vision + +config OPENCV_HIGHGUI + bool + prompt "highgui" + select OPENCV_IMGPROC + help + High-level GUI and Media I/O + +config OPENCV_IMGPROC + bool + prompt "imgproc" + help + Image Processing + +config OPENCV_LEGACY + bool + prompt "legacy" + select OPENCV_CALIB3D + select OPENCV_ML + select OPENCV_VIDEO + help + Deprecated stuff + +config OPENCV_ML + bool + prompt "ml" + help + Machine Learning + +config OPENCV_NONFREE + bool + prompt "nonfree" + select OPENCV_CALIB3D + select OPENCV_IMGPROC + select OPENCV_FEATURES2D + help + Non-free functionality + +config OPENCV_OBJDETECT + bool + prompt "objdetect" + select OPENCV_IMGPROC + help + Object Detection + +config OPENCV_PHOTO + bool + prompt "photo" + select OPENCV_IMGPROC + help + Computational Photography + +config OPENCV_STITCHING + bool + prompt "stitching" + select OPENCV_CALIB3D + select OPENCV_FEATURES2D + select OPENCV_OBJDETECT + help + Images stitching + +config OPENCV_SUPERRES + bool + prompt "superres" + select OPENCV_IMGPROC + select OPENCV_VIDEO + help + Super Resolution + +config OPENCV_VIDEO + bool + prompt "video" + select OPENCV_IMGPROC + help + Video Analysis + +config OPENCV_VIDEOSTAB + bool + prompt "videostab" + select OPENCV_CALIB3D + select OPENCV_FEATURES2D + select OPENCV_HIGHGUI + select OPENCV_OBJDETECT + select OPENCV_PHOTO + select OPENCV_VIDEO + help + Video Stabilization + +config OPENCV_GSTREAMER + bool + prompt "gstreamer" + help + Gstreamer Support + +config OPENCV_V4L + bool + prompt "v4l" + select OPENCV_VIDEO + help + Video4Linux Support + +config OPENCV_V4L_LIBV4L2 + bool + prompt "libv4l2" + depends on OPENCV_V4L + help + For embedded use cases it often makes sense to explicitly not + use libv4l, because the colorspace conversions in software adds + unexpected overhead. + +config OPENCV_QT + bool + prompt "qt" + help + QT GUI Support + +endif diff --git a/rules/opencv.make b/rules/opencv.make new file mode 100644 index 0000000..8136a08 --- /dev/null +++ b/rules/opencv.make @@ -0,0 +1,160 @@ +# -*-makefile-*- +# +# Copyright (C) 2014 by Christoph Fritz +# Copyright (C) 2013 by Jan Weitzel +# loosely based on work by Roman Dosek +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_OPENCV) += opencv + +# +# Paths and names +# + +OPENCV_VERSION := 2.4.8 +OPENCV_MD5 := 50cc1433b3654074206f5b3dbfd49848 +OPENCV := opencv-$(OPENCV_VERSION) +OPENCV_SUFFIX := zip +OPENCV_URL := $(call ptx/mirror, SF, opencvlibrary/opencv-unix/$(OPENCV_VERSION)/$(OPENCV).$(OPENCV_SUFFIX)) +OPENCV_SOURCE := $(SRCDIR)/$(OPENCV).$(OPENCV_SUFFIX) +OPENCV_DIR := $(BUILDDIR)/$(OPENCV) +OPENCV_LICENSE := BSD + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +OPENCV_CONF_TOOL := cmake + +OPENCV_CONF_OPT := \ + $(CROSS_CMAKE_USR) \ + -DANT_EXECUTABLE:FILEPATH= \ + -DPYTHON_EXECUTABLE= \ + -DBUILD_DOCS:BOOL=OFF \ + -DBUILD_EXAMPLES:BOOL=OFF \ + -DBUILD_PACKAGE:BOOL=OFF \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS:BOOL=ON \ + -DBUILD_TESTS=OFF \ + -DBUILD_PERF_TESTS=OFF \ + -DBUILD_WITH_DEBUG_INFO=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 \ + -DENABLE_PRECOMPILED_HEADERS=OFF \ + -DENABLE_PROFILING=OFF \ + -DENABLE_SOLUTION_FOLDERS=OFF \ + -DOPENCV_CAN_BREAK_BINARY_COMPATIBILITY=ON \ + -DWITH_GTK:BOOL=OFF \ + -DWITH_TBB:BOOL=OFF \ + -DWITH_TIFF:BOOL=OFF \ + -DCMAKE_VERBOSE:BOOL=OFF \ + -DWITH_CUDA:BOOL=OFF \ + -DWITH_EIGEN:BOOL=OFF \ + -DENABLE_NEON:BOOL=$(call ptx/ifdef,PTXCONF_ARCH_ARM_NEON,ON,OFF) \ + -DENABLE_VFPV3:BOOL=OFF \ + -DWITH_GIGEAPI:BOOL=OFF \ + -DINSTALL_CREATE_DISTRIB:BOOL=OFF \ + -DINSTALL_C_EXAMPLES:BOOL=OFF \ + -DINSTALL_PYTHON_EXAMPLES:BOOL=OFF \ + -DINSTALL_TO_MANGLED_PATHS:BOOL=OFF \ + -DOPENCV_EXTRA_MODULES_PATH:PATH= \ + -DOPENCV_WARNINGS_ARE_ERRORS:BOOL=OFF \ + -DWITH_OPENEXR:BOOL=OFF \ + -DWITH_PVAPI:BOOL=OFF \ + -DWITH_1394:BOOL=OFF \ + -DWITH_CUBLAS:BOOL=OFF \ + -DWITH_CUDA:BOOL=OFF \ + -DWITH_CUFFT:BOOL=OFF \ + -DWITH_FFMPEG:BOOL=OFF \ + -DWITH_JASPER:BOOL=OFF \ + -DWITH_JPEG:BOOL=ON \ + -DWITH_PNG:BOOL=ON \ + -DWITH_NVCUVID:BOOL=OFF \ + -DWITH_OPENCL:BOOL=OFF \ + -DWITH_OPENCLAMDBLAS:BOOL=OFF \ + -DWITH_OPENCLAMDFFT:BOOL=OFF \ + -DWITH_OPENEXR:BOOL=OFF \ + -DWITH_OPENMP:BOOL=OFF \ + -DWITH_OPENNI:BOOL=OFF \ + -DWITH_PVAPI:BOOL=OFF \ + -DWITH_TBB:BOOL=OFF \ + -DWITH_UNICAP:BOOL=OFF \ + -DWITH_XIMEA:BOOL=OFF \ + -DWITH_XINE:BOOL=OFF \ + -DBUILD_opencv_apps:BOOL=OFF \ + -DBUILD_opencv_calib3d:BOOL=$(call ptx/ifdef,PTXCONF_OPENCV_CALIB3D,ON,OFF) \ + -DBUILD_opencv_contrib:BOOL=$(call ptx/ifdef,PTXCONF_OPENCV_CONTRIB,ON,OFF) \ + -DBUILD_opencv_core:BOOL=ON \ + -DBUILD_opencv_features2d:BOOL=$(call ptx/ifdef,PTXCONF_OPENCV_FEATURES2D,ON,OFF) \ + -DBUILD_opencv_flann:BOOL=$(call ptx/ifdef,PTXCONF_OPENCV_FLANN,ON,OFF) \ + -DBUILD_opencv_gpu:BOOL=$(call ptx/ifdef,PTXCONF_OPENCV_GPU,ON,OFF) \ + -DBUILD_opencv_highgui:BOOL=$(call ptx/ifdef,PTXCONF_OPENCV_HIGHGUI,ON,OFF) \ + -DBUILD_opencv_imgproc:BOOL=$(call ptx/ifdef,PTXCONF_OPENCV_IMGPROC,ON,OFF) \ + -DBUILD_opencv_legacy:BOOL=$(call ptx/ifdef,PTXCONF_OPENCV_LEGACY,ON,OFF) \ + -DBUILD_opencv_ml:BOOL=$(call ptx/ifdef,PTXCONF_OPENCV_ML,ON,OFF) \ + -DBUILD_opencv_nonfree:BOOL=$(call ptx/ifdef,PTXCONF_OPENCV_NONFREE,ON,OFF) \ + -DBUILD_opencv_objdetect:BOOL=$(call ptx/ifdef,PTXCONF_OPENCV_OBJDETECT,ON,OFF) \ + -DBUILD_opencv_photo:BOOL=$(call ptx/ifdef,PTXCONF_OPENCV_PHOTO,ON,OFF) \ + -DBUILD_opencv_stitching:BOOL=$(call ptx/ifdef,PTXCONF_OPENCV_STITCHING,ON,OFF) \ + -DBUILD_opencv_superres:BOOL=$(call ptx/ifdef,PTXCONF_OPENCV_SUPERRES,ON,OFF) \ + -DBUILD_opencv_ts:BOOL=OFF \ + -DBUILD_opencv_video:BOOL=$(call ptx/ifdef,PTXCONF_OPENCV_VIDEO,ON,OFF) \ + -DBUILD_opencv_videostab:BOOL=$(call ptx/ifdef,PTXCONF_OPENCV_VIDEOSTAB,ON,OFF) \ + -DBUILD_opencv_world:BOOL=OFF \ + -DWITH_GSTREAMER:BOOL=$(call ptx/ifdef,PTXCONF_OPENCV_GSTREAMER,ON,OFF) \ + -DWITH_V4L:BOOL=$(call ptx/ifdef,PTXCONF_OPENCV_V4L,ON,OFF) \ + -DWITH_LIBV4L:BOOL=$(call ptx/ifdef,PTXCONF_OPENCV_V4L_LIBV4L2,ON,OFF) \ + -DWITH_OPENGL:BOOL=OFF \ + -DWITH_QT:BOOL=$(call ptx/ifdef,PTXCONF_OPENCV_QT,4,OFF) + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +OPENCV_LIBS-$(PTXCONF_OPENCV) = libopencv_core +OPENCV_LIBS-$(PTXCONF_OPENCV_CALIB3D) += libopencv_calib3d +OPENCV_LIBS-$(PTXCONF_OPENCV_CONTRIB) += libopencv_contrib +OPENCV_LIBS-$(PTXCONF_OPENCV_FEATURES2D) += libopencv_features2d +OPENCV_LIBS-$(PTXCONF_OPENCV_FLANN) += libopencv_flann +OPENCV_LIBS-$(PTXCONF_OPENCV_GPU) += libopencv_gpu +OPENCV_LIBS-$(PTXCONF_OPENCV_HIGHGUI) += libopencv_highgui +OPENCV_LIBS-$(PTXCONF_OPENCV_IMGPROC) += libopencv_imgproc +OPENCV_LIBS-$(PTXCONF_OPENCV_LEGACY) += libopencv_legacy +OPENCV_LIBS-$(PTXCONF_OPENCV_ML) += libopencv_ml +OPENCV_LIBS-$(PTXCONF_OPENCV_NONFREE) += libopencv_nonfree +OPENCV_LIBS-$(PTXCONF_OPENCV_OBJDETECT) += libopencv_objdetect +OPENCV_LIBS-$(PTXCONF_OPENCV_PHOTO) += libopencv_photo +OPENCV_LIBS-$(PTXCONF_OPENCV_STITCHING) += libopencv_stitching +OPENCV_LIBS-$(PTXCONF_OPENCV_SUPERRES) += libopencv_superres +OPENCV_LIBS-$(PTXCONF_OPENCV_VIDEO) += libopencv_video +OPENCV_LIBS-$(PTXCONF_OPENCV_VIDEOSTAB) += libopencv_videostab + +$(STATEDIR)/opencv.targetinstall: + @$(call targetinfo) + + @$(call install_init, opencv) + @$(call install_fixup, opencv, PRIORITY, optional) + @$(call install_fixup, opencv, SECTION, base) + @$(call install_fixup, opencv, AUTHOR, "Christoph Fritz ") + @$(call install_fixup, opencv, DESCRIPTION, missing) + + @$(foreach lib, $(OPENCV_LIBS-y), \ + $(call install_lib, opencv, 0, 0, 0644, $(lib));) + + @$(call install_finish, opencv) + + @$(call touch) + +# vim: syntax=make -- 1.7.10.4 -- ptxdist mailing list ptxdist@pengutronix.de