Description: Update to work with VTK6
 Updates based on advice at:
 http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Replacement_of_SetInput
Author: Olly Betts <olly@survex.com>
Bug-Debian: http://bugs.debian.org/750088
Forwarded: no
Last-Update: 2014-08-16

--- a/loch/lxData.cxx
+++ b/loch/lxData.cxx
@@ -535,27 +535,27 @@
     this->m_textureSurface.Clear();
   }
 
-  this->scrapWallsNormals->SetInput(this->scrapWalls);
+  this->scrapWallsNormals->SetInputData(this->scrapWalls);
   this->scrapWallsNormals->SetFeatureAngle(360.0);
   this->scrapWallsNormals->SetAutoOrientNormals(false);
   this->scrapWallsNormals->Update();
 
   // COUNTER needed
   this->allWalls->RemoveAllInputs();
-  this->allWalls->AddInput(this->scrapWallsNormals->GetOutput());
-  this->allWalls->AddInput(this->lrudWalls);
+  this->allWalls->AddInputConnection(this->scrapWallsNormals->GetOutputPort());
+  this->allWalls->AddInputData(this->lrudWalls);
   this->allWalls->Update();
-  this->allWallsTriangle->SetInput(this->allWalls->GetOutput());
-  this->allWallsSorted->SetInput(this->allWallsTriangle->GetOutput());
+  this->allWallsTriangle->SetInputConnection(this->allWalls->GetOutputPort());
+  this->allWallsSorted->SetInputConnection(this->allWallsTriangle->GetOutputPort());
   this->allWallsSorted->Update();
-  this->allWallsStripped->SetInput(this->allWallsTriangle->GetOutput());
+  this->allWallsStripped->SetInputConnection(this->allWallsTriangle->GetOutputPort());
   this->allWallsStripped->Update();
 
-	this->surfaceNormals->SetInput(this->surface);
+	this->surfaceNormals->SetInputData(this->surface);
 	this->surfaceNormals->SetFeatureAngle(360);
 	this->surfaceNormals->Update();
-  this->surfaceTriangle->SetInput(this->surfaceNormals->GetOutput());
-  this->surfaceSorted->SetInput(this->surfaceTriangle->GetOutput());
+  this->surfaceTriangle->SetInputConnection(this->surfaceNormals->GetOutputPort());
+  this->surfaceSorted->SetInputConnection(this->surfaceTriangle->GetOutputPort());
   this->surfaceSorted->Update();
 
   sWpoints->Delete();
@@ -577,7 +577,7 @@
   vtkPolyDataWriter * w = vtkPolyDataWriter::New();
   w->SetFileName(fileName.mbc_str());
   w->SetFileTypeToBinary();
-  w->SetInput(this->allWallsStripped->GetOutput());
+  w->SetInputConnection(this->allWallsStripped->GetOutputPort());
   w->Write();
   w->Delete();
 }
--- a/loch/Makefile
+++ b/loch/Makefile
@@ -37,7 +37,8 @@
 CXX = c++
 CC = gcc
 POBJECTS = lxR2P.o
-VTKLIBS = -lvtkHybrid -lvtkImaging -lvtkIO -lvtkGraphics -lvtkFiltering -lvtkCommon -lfreetype
+# VTK5: VTKLIBS = -lvtkHybrid -lvtkImaging -lvtkIO -lvtkGraphics -lvtkFiltering -lvtkCommon -lfreetype
+VTKLIBS = -lvtkCommonExecutionModel-6.1 -lvtkCommonDataModel-6.1 -lvtkCommonCore-6.1 -lvtkFiltersCore-6.1 -lvtkFiltersHybrid-6.1 -lvtkIOLegacy-6.1 -lfreetype
 CXXPFLAGS = -DLXLINUX $(shell wx-config --cxxflags) $(shell freetype-config --cflags) -I$(VTKPATH)
 CCPFLAGS = -DLXLINUX  $(shell wx-config --cflags)
 LXLIBDIR = linux
