[pcl] Add patch for vtk 6 support
Orion Poplawski
orion at fedoraproject.org
Fri Jul 12 22:25:12 UTC 2013
commit 361e7d56976c6493520b6738b02b88971858e099
Author: Orion Poplawski <orion at nwra.com>
Date: Fri Jul 12 16:25:03 2013 -0600
Add patch for vtk 6 support
pcl-vtk6.patch | 12 ++++++++++++
pcl.spec | 4 ++++
2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/pcl-vtk6.patch b/pcl-vtk6.patch
new file mode 100644
index 0000000..afafd3b
--- /dev/null
+++ b/pcl-vtk6.patch
@@ -0,0 +1,12 @@
+diff -up PCL-1.6.0-Source/io/src/vtk_lib_io.cpp.vtk6 PCL-1.6.0-Source/io/src/vtk_lib_io.cpp
+--- PCL-1.6.0-Source/io/src/vtk_lib_io.cpp.vtk6 2012-07-17 17:11:32.000000000 -0600
++++ PCL-1.6.0-Source/io/src/vtk_lib_io.cpp 2013-07-12 16:21:59.025435299 -0600
+@@ -420,7 +420,7 @@ pcl::io::saveRangeImagePlanarFilePNG (
+
+ vtkSmartPointer<vtkImageShiftScale> shiftScaleFilter = vtkSmartPointer<vtkImageShiftScale>::New();
+ shiftScaleFilter->SetOutputScalarTypeToUnsignedChar();
+- shiftScaleFilter->SetInputConnection(image->GetProducerPort());
++ shiftScaleFilter->SetInputData(image);
+ shiftScaleFilter->SetShift(-1.0f * image->GetScalarRange()[0]); // brings the lower bound to 0
+ shiftScaleFilter->SetScale(newRange/oldRange);
+ shiftScaleFilter->Update();
diff --git a/pcl.spec b/pcl.spec
index d205132..0846394 100644
--- a/pcl.spec
+++ b/pcl.spec
@@ -10,6 +10,8 @@ Source0: http://www.pointclouds.org/assets/files/1.6.0/PCL-1.6.0-Source.t
Patch0: PCL-1.4.0-Source-fedora.patch
Patch1: pcl-1.6.0-boost153.patch
Patch2: pcl-1.6.0-arm.patch
+# Patch to compile against vtk 6.0.0
+Patch3: pcl-vtk6.patch
# For plain building
BuildRequires: cmake, gcc-c++, boost-devel
@@ -79,6 +81,7 @@ Library.
%patch0 -p2 -b .fedora
%patch1 -p0 -b .boost153
%patch2 -p0 -b .arm
+%patch3 -p1 -b .vtk6
# Just to make it obvious we're not using any of these
rm -rf 3rdparty
@@ -187,6 +190,7 @@ rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-1.6
%changelog
* Fri Jul 12 2013 Orion Poplawski <orion at cora.nwra.com> - 1.6.0-6
- Rebuild for vtk 6.0.0
+- Add patch for vtk 6 support
* Sat Jun 29 2013 Rich Mattes <richmattes at gmail.com> - 1.6.0-5
- Rebuild for new eigen3
More information about the scm-commits
mailing list