packages: opencv/opencv.spec, opencv/opencv-ximea-linux.patch (NEW) - added...

qboosh qboosh at pld-linux.org
Wed Feb 1 20:42:20 CET 2012


Author: qboosh                       Date: Wed Feb  1 19:42:20 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- added ximea-linux patch, allow building with XIMEA m3api support

---- Files affected:
packages/opencv:
   opencv.spec (1.38 -> 1.39) , opencv-ximea-linux.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/opencv/opencv.spec
diff -u packages/opencv/opencv.spec:1.38 packages/opencv/opencv.spec:1.39
--- packages/opencv/opencv.spec:1.38	Thu Jan 26 19:11:17 2012
+++ packages/opencv/opencv.spec	Wed Feb  1 20:42:15 2012
@@ -2,19 +2,21 @@
 #
 # TODO:
 # - CUDA support (on bcond)
-# - XIMEA? cmake file seems to be Win32-specific, but ximea.com has some Linux package
 #
 # Conditional build:
+# - general options:
+%bcond_with	tbb		# Threading Building Blocks support (everywhere)
+%bcond_with	sse		# use SSE instructions
+%bcond_with	sse2		# use SSE2 instructions
+# - highgui options:
 %bcond_without	gstreamer	# GStreamer support in highgui
 %bcond_with	openni		# OpenNI (Natural Interaction) support in highgui
-%bcond_with	pvapi		# PvAPI (AVT GigE cameras) support in highgui
+%bcond_with	pvapi		# PvAPI (AVT GigE cameras) support in highgui (proprietary)
 %bcond_with	qt		# Qt backend instead of GTK+ in highgui
-%bcond_with	tbb		# Threading Building Blocks support (everywhere)
 %bcond_with	unicap		# Unicap support in highgui (GPL)
-%bcond_with	v4l		# Video4Linux (even V4L2 support currently relies on V4L1 API)
+%bcond_with	v4l		# Video4Linux in highgui (even V4L2 support currently relies on V4L1 API)
+%bcond_with	ximea		# m3API (XIMEA cameras) support in highgui (proprietary)
 %bcond_with	xine		# XINE support in highgui (GPL)
-%bcond_with	sse		# use SSE instructions
-%bcond_with	sse2		# use SSE2 instructions
 #
 %ifarch pentium3 pentium4 %{x8664}
 %define		with_sse	1
@@ -42,11 +44,13 @@
 Patch3:		%{name}-c.patch
 Patch4:		%{name}-gcc.patch
 Patch5:		%{name}-multilib.patch
+Patch6:		%{name}-ximea-linux.patch
 URL:		http://opencv.willowgarage.com/
 %{?with_pvapi:BuildRequires:	AVT_GigE_SDK-devel}
 BuildRequires:	OpenEXR-devel
 # as of OpenCV 2.3.1 there is also check for OpenNI-sensor-PrimeSense, but the result is not used
 %{?with_openni:BuildRequires:	OpenNI-devel}
+%{?with_ximea:BuildRequires:	XIMEA-devel}
 BuildRequires:	cmake >= 2.4
 BuildRequires:	doxygen
 BuildRequires:	eigen >= 2
@@ -158,6 +162,7 @@
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 %build
 install -d build
@@ -174,6 +179,7 @@
 	%{?with_tbb:-DWITH_TBB=ON} \
 	%{?with_unicap:-DWITH_UNICAP=ON} \
 	%{!?with_v4l:-DWITH_V4L=OFF} \
+	%{?with_ximea:-DWITH_XIMEA=ON} \
 	%{?with_xine:-DWITH_XINE=ON}
 
 %{__make}
@@ -226,6 +232,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.39  2012/02/01 19:42:15  qboosh
+- added ximea-linux patch, allow building with XIMEA m3api support
+
 Revision 1.38  2012/01/26 18:11:17  qboosh
 - (optional) openni support
 - sse/sse2 as bconds

================================================================
Index: packages/opencv/opencv-ximea-linux.patch
diff -u /dev/null packages/opencv/opencv-ximea-linux.patch:1.1
--- /dev/null	Wed Feb  1 20:42:20 2012
+++ packages/opencv/opencv-ximea-linux.patch	Wed Feb  1 20:42:15 2012
@@ -0,0 +1,44 @@
+--- OpenCV-2.3.1/OpenCVFindXimea.cmake.orig	2011-09-12 20:45:38.000000000 +0200
++++ OpenCV-2.3.1/OpenCVFindXimea.cmake	2012-02-01 19:18:07.619900166 +0100
+@@ -14,15 +14,13 @@
+ set(XIMEA_PATH)
+ set(XIMEA_LIBRARY_DIR)
+ 
+-# Try to find the XIMEA API path in registry.
+-GET_FILENAME_COMPONENT(XIMEA_PATH "[HKEY_CURRENT_USER\\Software\\XIMEA\\CamSupport\\API;Path]" ABSOLUTE)                                                
++find_file(XIMEA_INC "m3Api.h" PATHS $ENV{XIMEA_INCLUDE} "/usr/include/ximea")
++find_library(XIMEA_LIB "m3api" PATHS $ENV{XIMEA_LIB} "/usr/lib${LIB_SUFFIX}")
+ 
+-if(XIMEA_PATH)
++if(XIMEA_INC AND XIMEA_LIB)
++  get_filename_component(XIMEA_LIBRARY_DIR "${XIMEA_LIB}" PATH CACHE)
++  get_filename_component(XIMEA_PATH "${XIMEA_INC}" PATH CACHE)
+   set(XIMEA_FOUND 1)
+-  
+-  # set LIB folders
+-  set(XIMEA_LIBRARY_DIR "${XIMEA_PATH}\\x86")
+-  
+ else()
+   set(XIMEA_FOUND 0)
+ endif()                                            
+--- OpenCV-2.3.1/modules/highgui/src/cap_ximea.cpp.orig	2011-09-12 20:41:29.000000000 +0200
++++ OpenCV-2.3.1/modules/highgui/src/cap_ximea.cpp	2012-02-01 20:12:54.750010230 +0100
+@@ -1,4 +1,4 @@
+-
++#include <cstdio>
+ #include "precomp.hpp"
+ 
+ #include "xiApi.h"
+@@ -245,9 +245,7 @@
+ 
+ void CvCaptureCAM_XIMEA::errMsg(char* msg, int errNum)
+ {
+-	char buf[512];
+-	sprintf( buf, "%s : %d\n", msg, errNum);
+-	OutputDebugString(buf);
++	fprintf(stderr, "%s : %d\n", msg, errNum);
+ }
+ 
+-/**********************************************************************************/
+\ No newline
++/**********************************************************************************/
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/opencv/opencv.spec?r1=1.38&r2=1.39&f=u



More information about the pld-cvs-commit mailing list