Greetings, I'm working on a Salomé package, which is taking a very long time for several reasons. * For some reason, make depend doesn't work, so I have to hand-enter the dependencies and many of the required sources * Upstream assumes modules are each configured, built and installed sequentially, instead of configuring them all, building them all, and installing them all * Upstream hasn't tested DESTDIR in a very long time * I had to port to new versions of VTK and sip (sip was easy, VTK 4 won't build in unstable or testing), and adjust some of the assumptions to Debian's version of MED (lib names and med_int size) * Lots of other random details...
I'm nearly done, but the thing that worries me most is the VTK4 -> 5 port. I'm not a C++ programmer, and have never touched VTK (nor sip, Qt, etc. until this), so if there are experts on the list, I'd appreciate a hand. I've ported the GUI module, whose patch is attached, and want to get some feedback before I try the others -- or build it and get strange behavior in testing. In particular, I'm wondering: * Are my pointer casts for GetInput methods legit? I suspect they're not, but in the absence of suitable constructors, how else does one do this? * Is the GetInput method a suitable replacement for old ->Inputs? * The vtkAppendFilter class lost its NumberOfInputs variable. Its GetTotalNumberOfInputConnections() method was the closest substitute I could find. Is this right? I'm putting up my -2 "package" at http://lyre.mit.edu/~powell/salome/ which is building now. It should build and install the KERNEL, HXX2SALOME, GUI, GEOM, MED, RANDOMIZER, SUPERV, HELLO, PYHELLO, CALCULATOR and PYCALCULATOR modules. (VISU and SMESH need to be ported to VTK 5, and I haven't finished COMPONENT or SIERPINSKY; NETGENPLUGIN is incompatible with Debian's netgen.) But it has build-dep issues: * It needs HDF5-OpenMPI packages, which require a fix to bug 457080, in progress by the Debian GIS team (they're packaging a new version) * It needs OpenMPI 1.2.5-1 in unstable * It needs omniORB 4.0.x, which is in testing, but unstable has 4.1.x; porting Salomé to the new omniORB is a much bigger task than I have time for now! When the package successfully builds and installs, I'll send a lot of my patches upstream. Hopefully they're doing the omniORB port, otherwise that will keep Salomé out of Debian for some time... :-( Thanks, -Adam -- GPG fingerprint: D54D 1AEE B11C CE9B A02B C5DD 526F 01E8 564E E4B6 Engineering consulting with open source tools http://www.opennovation.com/
--- salome-3.2.6.orig/GUI_SRC_3.2.6/adm_local/unix/config_files/check_vtk.m4 2007-04-24 12:41:04.000000000 -0400 +++ salome-3.2.6/GUI_SRC_3.2.6/adm_local/unix/config_files/check_vtk.m4 2008-01-11 13:39:11.000000000 -0500 @@ -76,7 +76,7 @@ if test -z $VTKHOME then AC_MSG_WARN(undefined VTKHOME variable which specify where vtk was compiled) - if test -f /usr/include/vtk/vtkPlane.h ; then + if test -f /usr/include/vtk-5.0/vtkPlane.h ; then AC_MSG_RESULT(trying /usr) VTKHOME="/usr" fi @@ -84,7 +84,7 @@ if test ! -z $VTKHOME then - LOCAL_INCLUDES="-I$VTKHOME/include/vtk $LOCAL_INCLUDES" + LOCAL_INCLUDES="-I$VTKHOME/include/vtk-5.0 $LOCAL_INCLUDES" LOCAL_LIBS="-L$VTKHOME/lib${LIB_LOCATION_SUFFIX}/vtk -L$VTKHOME/lib${LIB_LOCATION_SUFFIX}/vtk/python $LOCAL_LIBS" TRY_LINK_LIBS="-L$VTKHOME/lib${LIB_LOCATION_SUFFIX}/vtk -L$VTKHOME/lib${LIB_LOCATION_SUFFIX}/vtk/python $TRY_LINK_LIBS" fi @@ -142,4 +142,4 @@ # Save cache AC_CACHE_SAVE -])dnl \ No newline at end of file +])dnl --- salome-3.2.6/GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx~ 2007-04-24 12:41:04.000000000 -0400 +++ salome-3.2.6/GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx 2008-01-15 00:11:22.000000000 -0500 @@ -233,9 +233,8 @@ } } if((aNbElems = aConnectivity->GetNumberOfCells())){ - VTKViewer_CellLocationsArray* aCellLocationsArray = VTKViewer_CellLocationsArray::New(); - aCellLocationsArray->SetNumberOfComponents(1); - aCellLocationsArray->SetNumberOfTuples(aNbElems); + vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New(); + aCellLocationsArray->SetNumberOfValues(aNbElems); aConnectivity->InitTraversal(); for(vtkIdType i = 0, *pts, npts; aConnectivity->GetNextCell(npts,pts); i++){ aCellLocationsArray->SetValue(i,aConnectivity->GetTraversalLocation(npts)); @@ -322,9 +321,8 @@ } } if((aNbElems = aConnectivity->GetNumberOfCells())){ - VTKViewer_CellLocationsArray* aCellLocationsArray = VTKViewer_CellLocationsArray::New(); - aCellLocationsArray->SetNumberOfComponents(1); - aCellLocationsArray->SetNumberOfTuples(aNbElems); + vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New(); + aCellLocationsArray->SetNumberOfValues(aNbElems); aConnectivity->InitTraversal(); for(vtkIdType i = 0, *pts, npts; aConnectivity->GetNextCell(npts,pts); i++){ aCellLocationsArray->SetValue(i,aConnectivity->GetTraversalLocation(npts)); --- salome-3.2.6/GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_GeometryFilter.cxx~ 2007-04-24 12:41:04.000000000 -0400 +++ salome-3.2.6/GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_GeometryFilter.cxx 2008-01-15 00:22:24.000000000 -0500 @@ -80,7 +80,7 @@ VTKViewer_GeometryFilter ::Execute() { - vtkDataSet *input= this->GetInput(); + vtkDataSet *input= (vtkDataSet *)this->GetInput(); vtkIdType numCells=input->GetNumberOfCells(); if (numCells == 0) --- salome-3.2.6/GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_AppendFilter.cxx~ 2007-04-24 12:41:04.000000000 -0400 +++ salome-3.2.6/GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_AppendFilter.cxx 2008-01-15 00:44:07.000000000 -0500 @@ -119,8 +119,8 @@ vtkIdType aPntStartId = 0; vtkIdType aCellStartId = 0; - for(vtkIdType aDataSetId = 0; aDataSetId < this->NumberOfInputs; ++aDataSetId){ - vtkDataSet* aDataSet = (vtkDataSet *)(this->Inputs[aDataSetId]); + for(vtkIdType aDataSetId = 0; aDataSetId < this->GetTotalNumberOfInputConnections(); ++aDataSetId){ + vtkDataSet* aDataSet = this->GetInput(aDataSetId); // Do mapping of the nodes if(!GetSharedPointsDataSet()){ vtkIdType aNbPnts = aDataSet->GetNumberOfPoints(); @@ -265,11 +265,11 @@ numCells = 0; - vtkDataSetAttributes::FieldList cellList(this->NumberOfInputs); + vtkDataSetAttributes::FieldList cellList(this->GetTotalNumberOfInputConnections()); int firstCD=1; - for (idx = 0; idx < this->NumberOfInputs; ++idx) { - ds = (vtkDataSet *)(this->Inputs[idx]); + for (idx = 0; idx < this->GetTotalNumberOfInputConnections(); ++idx) { + ds = this->GetInput(idx); if (ds != NULL) { if ( ds->GetNumberOfPoints() <= 0 && ds->GetNumberOfCells() <= 0 ) { continue; //no input, just skip @@ -308,8 +308,8 @@ output->GetPointData()->PassData(GetSharedPointsDataSet()->GetPointData()); // 2.cells - for (idx = 0; idx < this->NumberOfInputs; ++idx) { - ds = (vtkDataSet *)(this->Inputs[idx]); + for (idx = 0; idx < this->GetTotalNumberOfInputConnections(); ++idx) { + ds = this->GetInput(idx); if (ds != NULL) { numCells = ds->GetNumberOfCells(); cd = ds->GetCellData(); --- salome-3.2.6/GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_ShrinkFilter.cxx~ 2007-04-24 12:41:04.000000000 -0400 +++ salome-3.2.6/GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_ShrinkFilter.cxx 2008-01-15 00:45:29.000000000 -0500 @@ -58,7 +58,7 @@ vtkFloatingPointType center[3], *p, pt[3]; vtkPointData *pd, *outPD;; vtkIdList *ptIds, *newPtIds; - vtkDataSet *input= this->GetInput(); + vtkDataSet *input= (vtkDataSet *)this->GetInput(); vtkUnstructuredGrid *output = this->GetOutput(); vtkIdType tenth; vtkFloatingPointType decimal; --- salome-3.2.6/GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_TransformFilter.cxx~ 2007-04-24 12:41:04.000000000 -0400 +++ salome-3.2.6/GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_TransformFilter.cxx 2008-01-15 11:59:35.000000000 -0500 @@ -43,7 +43,7 @@ vtkPoints *inPts; vtkPoints *newPts; int numPts, numCells; - vtkPointSet *input = this->GetInput(); + vtkPointSet *input = (vtkPointSet *)this->GetInput(); vtkPointSet *output = this->GetOutput(); vtkPointData *pd=input->GetPointData(), *outPD=output->GetPointData(); vtkCellData *cd=input->GetCellData(), *outCD=output->GetCellData();