projects/guix·blob python-team · refs

64 lines · 2.6 KiB

1This patch has been taken from
2https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1012689
3--- a/addons/vtk/CMakeLists.txt
4+++ b/addons/vtk/CMakeLists.txt
5@@ -20,9 +20,9 @@
6
7 IF(WITH_VTKIO)
8 if (STRICT_DEPENDECIES)
9- FIND_PACKAGE(VTK REQUIRED COMPONENTS vtkIOImage vtkIOXML vtkIOLegacy)
10+ FIND_PACKAGE(VTK REQUIRED COMPONENTS IOImage IOXML IOLegacy)
11 else (STRICT_DEPENDECIES)
12- FIND_PACKAGE(VTK COMPONENTS vtkIOImage vtkIOXML vtkIOLegacy)
13+ FIND_PACKAGE(VTK COMPONENTS IOImage IOXML IOLegacy)
14 endif (STRICT_DEPENDECIES)
15 IF(VTK_FOUND)
16 DEFINE_PROPERTY(GLOBAL PROPERTY HAVE_VTK_PROP BRIEF_DOCS "yeah" FULL_DOCS "yeah")
17@@ -41,8 +41,17 @@
18 SET(VTK_LINK_LIBS_3D ${SELECTED_VTK_LIBS} mia3d)
19
20 PLUGIN_WITH_TEST_AND_PREFIX2("mesh" "io" vtkmesh "${VTK_LINK_LIBS_MESH}")
21+ target_link_libraries(mesh-io-vtkmesh ${VTK_LIBRARIES})
22+ target_link_libraries(mesh-io-vtkmesh-common ${VTK_LIBRARIES})
23+ target_link_libraries(test-mesh-io-vtkmesh ${VTK_LIBRARIES})
24 PLUGIN_WITH_TEST_AND_PREFIX2("3dvf" "io" vtkvf "${VTK_LINK_LIBS_3D}")
25+ target_link_libraries(3dvf-io-vtkvf ${VTK_LIBRARIES})
26+ target_link_libraries(3dvf-io-vtkvf-common ${VTK_LIBRARIES})
27+ target_link_libraries(test-3dvf-io-vtkvf ${VTK_LIBRARIES})
28 PLUGIN_WITH_TEST_AND_PREFIX2("3dimage" "io" vtkimage "${VTK_LINK_LIBS_3D}")
29+ target_link_libraries(3dimage-io-vtkimage ${VTK_LIBRARIES})
30+ target_link_libraries(3dimage-io-vtkimage-common ${VTK_LIBRARIES})
31+ target_link_libraries(test-3dimage-io-vtkimage ${VTK_LIBRARIES})
32
33 ELSEIF(VTK_FOUND)
34 MESSAGE(MESSAGE "VTK not found, disabled")
35--- a/addons/vtk/vtkmesh.cc
36+++ b/addons/vtk/vtkmesh.cc
37@@ -78,7 +78,8 @@
38 // read all cells, if a cell is formed of more than 3 corners, then triangulate,
39 // if it hes less then 3 corners, ignore it (no wireframes supported here
40 auto triangles = CVtkMeshIO::PTrianglefield(new CVtkMeshIO::CTrianglefield ());
41- vtkIdType npts, *pts;
42+ vtkIdType npts;
43+ vtkIdType const *pts;
44 auto strips = mesh.GetStrips();
45
46 while (strips->GetNextCell(npts, pts)) {
47@@ -183,7 +184,7 @@
48 auto is = mesh.normals_begin();
49
50 for (auto i = 0; i < n_normals; ++i, ++is) {
51- normals->GetTupleValue(i, &is->x);
52+ normals->GetTypedTuple(i, &is->x);
53 cvdebug() << i << ": read normal " << *is << "\n";
54 }
55 }
56@@ -217,7 +218,7 @@
57 auto is = mesh.color_begin();
58
59 for (auto i = 0; i < n_colors; ++i, ++is)
60- colors->GetTupleValue(i, &is->x);
61+ colors->GetTypedTuple(i, &is->x);
62 }
63
64 PTriangleMesh CVtkMeshIO::do_load(string const& filename) const