diff options
author | David Spencer <baildon.research@googlemail.com> | 2018-01-12 22:59:16 +0000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2018-01-13 07:13:05 +0700 |
commit | b692a82ac2700b0a3020a08c350482ddfed311c4 (patch) | |
tree | c799f6b0fb5c53ac4292416c293f5c1f2e517c2c | |
parent | 08da4a154dfcf2a0b187b0a3a4f467eeb3b3b1e5 (diff) |
graphics/OpenCASCADE: Patched for VTK-8.1.0 compatibility.
Thanks to Chris Willing.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
-rw-r--r-- | graphics/OpenCASCADE/020_vtk_InsertNextTupleValue.diff | 64 | ||||
-rw-r--r-- | graphics/OpenCASCADE/OpenCASCADE.SlackBuild | 5 |
2 files changed, 68 insertions, 1 deletions
diff --git a/graphics/OpenCASCADE/020_vtk_InsertNextTupleValue.diff b/graphics/OpenCASCADE/020_vtk_InsertNextTupleValue.diff new file mode 100644 index 0000000000000..25e99d568daa1 --- /dev/null +++ b/graphics/OpenCASCADE/020_vtk_InsertNextTupleValue.diff @@ -0,0 +1,64 @@ +--- src/IVtkVTK/IVtkVTK_ShapeData.cxx.orig 2015-09-26 00:18:54.000000000 +1000 ++++ src/IVtkVTK/IVtkVTK_ShapeData.cxx 2018-01-11 09:16:59.734906202 +1000 +@@ -80,9 +80,15 @@ + vtkIdType aPointIdVTK = thePointId; + myPolyData->InsertNextCell (VTK_VERTEX, 1, &aPointIdVTK); + const vtkIdType aShapeIDVTK = theShapeID; ++#if (VTK_MAJOR_VERSION < 7 ) || (VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION == 0) + mySubShapeIDs->InsertNextTupleValue (&aShapeIDVTK); + const vtkIdType aType = theMeshType; + myMeshTypes->InsertNextTupleValue (&aType); ++#else ++ mySubShapeIDs->InsertNextTypedTuple (&aShapeIDVTK); ++ const vtkIdType aType = theMeshType; ++ myMeshTypes->InsertNextTypedTuple (&aType); ++#endif + } + + //================================================================ +@@ -97,9 +103,15 @@ + vtkIdType aPoints[2] = { thePointId1, thePointId2 }; + myPolyData->InsertNextCell (VTK_LINE, 2, aPoints); + const vtkIdType aShapeIDVTK = theShapeID; ++#if (VTK_MAJOR_VERSION < 7 ) || (VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION == 0) + mySubShapeIDs->InsertNextTupleValue (&aShapeIDVTK); + const vtkIdType aType = theMeshType; + myMeshTypes->InsertNextTupleValue (&aType); ++#else ++ mySubShapeIDs->InsertNextTypedTuple (&aShapeIDVTK); ++ const vtkIdType aType = theMeshType; ++ myMeshTypes->InsertNextTypedTuple (&aType); ++#endif + } + + //================================================================ +@@ -124,9 +136,15 @@ + + myPolyData->InsertNextCell (VTK_POLY_LINE, anIdList); + const vtkIdType aShapeIDVTK = theShapeID; ++#if (VTK_MAJOR_VERSION < 7 ) || (VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION == 0) + mySubShapeIDs->InsertNextTupleValue (&aShapeIDVTK); + const vtkIdType aType = theMeshType; + myMeshTypes->InsertNextTupleValue (&aType); ++#else ++ mySubShapeIDs->InsertNextTypedTuple (&aShapeIDVTK); ++ const vtkIdType aType = theMeshType; ++ myMeshTypes->InsertNextTypedTuple (&aType); ++#endif + anIdList->Delete(); + } + } +@@ -144,7 +162,13 @@ + vtkIdType aPoints[3] = { thePointId1, thePointId2, thePointId3 }; + myPolyData->InsertNextCell (VTK_TRIANGLE, 3, aPoints); + const vtkIdType aShapeIDVTK = theShapeID; ++#if (VTK_MAJOR_VERSION < 7 ) || (VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION == 0) + mySubShapeIDs->InsertNextTupleValue (&aShapeIDVTK); + const vtkIdType aType = theMeshType; + myMeshTypes->InsertNextTupleValue (&aType); ++#else ++ mySubShapeIDs->InsertNextTypedTuple (&aShapeIDVTK); ++ const vtkIdType aType = theMeshType; ++ myMeshTypes->InsertNextTypedTuple (&aType); ++#endif + } diff --git a/graphics/OpenCASCADE/OpenCASCADE.SlackBuild b/graphics/OpenCASCADE/OpenCASCADE.SlackBuild index cd7a56a46a7a5..4f0e2fd4ace4f 100644 --- a/graphics/OpenCASCADE/OpenCASCADE.SlackBuild +++ b/graphics/OpenCASCADE/OpenCASCADE.SlackBuild @@ -26,7 +26,7 @@ PRGNAM=OpenCASCADE VERSION=${VERSION:-6.9.1} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} SRCNAM=$(echo $PRGNAM | tr '[:upper:]' '[:lower:]') @@ -85,6 +85,9 @@ sed -i \ -e '/CSF_VTK_LIB/s/-6\.1//g' \ configure.ac +# Thanks to Chris Willing for the fix for VTK-8.1.0 compatibility. +patch -p0 < $CWD/020_vtk_InsertNextTupleValue.diff + ./build_configure CFLAGS="$SLKCFLAGS" \ |