[packages/opencv] - fix build with vtk 7 - rel 3.1 for bootstrapp

baggins baggins at pld-linux.org
Tue Jan 24 07:47:28 CET 2017


commit 08b22f1887d068cc2e421cb37b0d389e2958babc
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Tue Jan 24 07:47:05 2017 +0100

    - fix build with vtk 7
    - rel 3.1 for bootstrapp

 opencv.spec | 17 ++++++++++-------
 vtk7.patch  | 18 ++++++++++++++++++
 2 files changed, 28 insertions(+), 7 deletions(-)
---
diff --git a/opencv.spec b/opencv.spec
index c3c3944..880163f 100644
--- a/opencv.spec
+++ b/opencv.spec
@@ -53,7 +53,7 @@ Summary:	A library of programming functions mainly aimed at real time computer v
 Summary(pl.UTF-8):	Biblioteka funkcji do grafiki komputerowej w czasie rzeczywistym
 Name:		opencv
 Version:	3.1.0
-Release:	3
+Release:	3.1
 Epoch:		1
 %if %{with unicap} || %{with xine}
 License:	GPL (enforced by used libraries), BSD (opencv itself)
@@ -66,9 +66,10 @@ Source0:	https://github.com/Itseez/opencv/archive/%{version}/%{name}-%{version}.
 Source1:	https://github.com/Itseez/opencv_contrib/archive/%{version}/%{name}_contrib-%{version}.tar.gz
 # Source1-md5:	a822839ad3ab79ff837c16785ea9dd10
 Patch0:		%{name}-cflags.patch
-Patch5:		%{name}-ximea.patch
-Patch7:		java-ant-sourcelevel.patch
-Patch10:	cmake-install-path.patch
+Patch1:		%{name}-ximea.patch
+Patch2:		java-ant-sourcelevel.patch
+Patch3:		cmake-install-path.patch
+Patch4:		vtk7.patch
 URL:		http://www.opencv.org/
 %{?with_pvapi:BuildRequires:	AVT_GigE_SDK-devel}
 %{?with_opencl:BuildRequires:	OpenCL-devel}
@@ -290,9 +291,10 @@ Wiązania Pythona 3 do OpenCV.
 %undos CMakeLists.txt
 
 %patch0 -p1
-%patch5 -p1
-%patch7 -p1
-%patch10 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
 
 %build
 install -d build
@@ -311,6 +313,7 @@ fi
 
 %cmake .. \
 	$ccache \
+	-DENABLE_PRECOMPILED_HEADERS=OFF \
 	-DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-%{version}/modules \
 	-DENABLE_AVX=%{?with_avx:ON}%{!?with_avx:OFF} \
 	-DENABLE_SSE=%{?with_sse:ON}%{!?with_sse:OFF} \
diff --git a/vtk7.patch b/vtk7.patch
new file mode 100644
index 0000000..a3a5598
--- /dev/null
+++ b/vtk7.patch
@@ -0,0 +1,18 @@
+--- opencv-3.1.0/cmake/OpenCVDetectVTK.cmake.orig	2015-12-18 16:02:16.000000000 +0100
++++ opencv-3.1.0/cmake/OpenCVDetectVTK.cmake	2017-01-24 07:33:14.029499623 +0100
+@@ -3,7 +3,14 @@
+ endif()
+ 
+ # VTK 6.x components
+-find_package(VTK QUIET COMPONENTS vtkRenderingOpenGL vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport NO_MODULE)
++find_package(VTK QUIET COMPONENTS vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport NO_MODULE)
++IF(VTK_FOUND)
++  IF(VTK_RENDERING_BACKEND) #in vtk 7, the rendering backend is exported as a var.
++    find_package(VTK QUIET COMPONENTS vtkRendering${VTK_RENDERING_BACKEND} vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport vtkIOGeometry NO_MODULE)
++  ELSE(VTK_RENDERING_BACKEND)
++    find_package(VTK QUIET COMPONENTS vtkRenderingOpenGL vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport NO_MODULE)
++  ENDIF(VTK_RENDERING_BACKEND)
++ENDIF(VTK_FOUND)
+ 
+ # VTK 5.x components
+ if(NOT VTK_FOUND)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/opencv.git/commitdiff/08b22f1887d068cc2e421cb37b0d389e2958babc



More information about the pld-cvs-commit mailing list