Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 May 2018 17:54:46 +0000 (UTC)
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r471059 - head/science/paraview/files
Message-ID:  <201805281754.w4SHskx7040178@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yuri
Date: Mon May 28 17:54:46 2018
New Revision: 471059
URL: https://svnweb.freebsd.org/changeset/ports/471059

Log:
  science/paraview: Fix build on FreeBSD-CURRENT
  
  Add patches that fix null pointer representations in C++.
  
  PR:		228569
  Submitted by:	devel@stasyan.com <maintainer>

Added:
  head/science/paraview/files/patch-vtkOpenGLGlyph3DHelper.cxx   (contents, props changed)
  head/science/paraview/files/patch-vtkOpenGLPolyDataMapper.cxx   (contents, props changed)
  head/science/paraview/files/patch-vtkOpenGLPolyDataMapper2D.cxx   (contents, props changed)
  head/science/paraview/files/patch-vtkOpenGLProjectedTetrahedraMapper.cxx   (contents, props changed)
  head/science/paraview/files/patch-vtkOpenGLRenderUtilities.cxx   (contents, props changed)
  head/science/paraview/files/patch-vtkOpenGLStickMapper.cxx   (contents, props changed)
  head/science/paraview/files/patch-vtkPhastaReader.cxx   (contents, props changed)
  head/science/paraview/files/patch-vtkXOpenGLRenderWindow.cxx   (contents, props changed)

Added: head/science/paraview/files/patch-vtkOpenGLGlyph3DHelper.cxx
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/paraview/files/patch-vtkOpenGLGlyph3DHelper.cxx	Mon May 28 17:54:46 2018	(r471059)
@@ -0,0 +1,20 @@
+--- VTK/Rendering/OpenGL2/vtkOpenGLGlyph3DHelper.cxx.orig	2018-05-27 16:13:23.631718000 +0700
++++ VTK/Rendering/OpenGL2/vtkOpenGLGlyph3DHelper.cxx	2018-05-27 16:21:35.310777000 +0700
+@@ -449,7 +449,7 @@
+                         static_cast<GLuint>(this->VBO->VertexCount - 1),
+                         static_cast<GLsizei>(this->Primitives[PrimitiveTris].IBO->IndexCount),
+                         GL_UNSIGNED_INT,
+-                        reinterpret_cast<const GLvoid *>(NULL));
++                        nullptr);
+   }
+   if (primed)
+   {
+@@ -579,7 +579,7 @@
+     glDrawElementsInstancedARB(GL_TRIANGLES,
+       static_cast<GLsizei>(this->Primitives[PrimitiveTris].IBO->IndexCount),
+       GL_UNSIGNED_INT,
+-      reinterpret_cast<const GLvoid *>(NULL),
++      nullptr,
+       numPts);
+   }
+ #endif

Added: head/science/paraview/files/patch-vtkOpenGLPolyDataMapper.cxx
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/paraview/files/patch-vtkOpenGLPolyDataMapper.cxx	Mon May 28 17:54:46 2018	(r471059)
@@ -0,0 +1,11 @@
+--- VTK/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx.orig	2018-05-27 16:24:15.569847000 +0700
++++ VTK/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx	2018-05-27 16:24:49.235720000 +0700
+@@ -2534,7 +2534,7 @@
+                           static_cast<GLuint>(this->VBO->VertexCount - 1),
+                           static_cast<GLsizei>(this->Primitives[i].IBO->IndexCount),
+                           GL_UNSIGNED_INT,
+-                          reinterpret_cast<const GLvoid *>(NULL));
++                          nullptr);
+       this->Primitives[i].IBO->Release();
+ 
+       int stride = (mode == GL_POINTS ? 1 : (mode == GL_LINES ? 2 : 3));

Added: head/science/paraview/files/patch-vtkOpenGLPolyDataMapper2D.cxx
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/paraview/files/patch-vtkOpenGLPolyDataMapper2D.cxx	Mon May 28 17:54:46 2018	(r471059)
@@ -0,0 +1,38 @@
+--- VTK/Rendering/OpenGL2/vtkOpenGLPolyDataMapper2D.cxx.orig	2018-05-27 16:27:25.256918000 +0700
++++ VTK/Rendering/OpenGL2/vtkOpenGLPolyDataMapper2D.cxx	2018-05-27 16:29:21.344983000 +0700
+@@ -860,7 +860,7 @@
+                         static_cast<GLuint>(this->VBO->VertexCount - 1),
+                         static_cast<GLsizei>(this->Points.IBO->IndexCount),
+                         GL_UNSIGNED_INT,
+-                        reinterpret_cast<const GLvoid *>(NULL));
++                        nullptr);
+     this->Points.IBO->Release();
+     this->PrimitiveIDOffset += (int)this->Points.IBO->IndexCount;
+   }
+@@ -881,7 +881,7 @@
+                           static_cast<GLuint>(this->VBO->VertexCount - 1),
+                           static_cast<GLsizei>(this->Lines.IBO->IndexCount),
+                           GL_UNSIGNED_INT,
+-                          reinterpret_cast<const GLvoid *>(NULL));
++                          nullptr);
+       this->Lines.IBO->Release();
+     }
+     this->PrimitiveIDOffset += (int)this->Lines.IBO->IndexCount/2;
+@@ -899,7 +899,7 @@
+                           static_cast<GLuint>(this->VBO->VertexCount - 1),
+                           static_cast<GLsizei>(this->Tris.IBO->IndexCount),
+                           GL_UNSIGNED_INT,
+-                          reinterpret_cast<const GLvoid *>(NULL));
++                          nullptr);
+       this->Tris.IBO->Release();
+       this->PrimitiveIDOffset += (int)this->Tris.IBO->IndexCount/3;
+     }
+@@ -916,7 +916,7 @@
+                           static_cast<GLuint>(this->VBO->VertexCount - 1),
+                           static_cast<GLsizei>(this->TriStrips.IBO->IndexCount),
+                           GL_UNSIGNED_INT,
+-                          reinterpret_cast<const GLvoid *>(NULL));
++                          nullptr);
+       this->TriStrips.IBO->Release();
+     }
+   }

Added: head/science/paraview/files/patch-vtkOpenGLProjectedTetrahedraMapper.cxx
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/paraview/files/patch-vtkOpenGLProjectedTetrahedraMapper.cxx	Mon May 28 17:54:46 2018	(r471059)
@@ -0,0 +1,11 @@
+--- VTK/Rendering/VolumeOpenGL2/vtkOpenGLProjectedTetrahedraMapper.cxx.orig	2018-05-27 19:37:01.700537000 +0700
++++ VTK/Rendering/VolumeOpenGL2/vtkOpenGLProjectedTetrahedraMapper.cxx	2018-05-27 19:37:40.189362000 +0700
+@@ -1100,7 +1100,7 @@
+                         static_cast<GLuint>(this->VBO->VertexCount - 1),
+                         static_cast<GLsizei>(this->Tris.IBO->IndexCount),
+                         GL_UNSIGNED_INT,
+-                        reinterpret_cast<const GLvoid *>(NULL));
++                        nullptr);
+     this->Tris.IBO->Release();
+     this->Tris.VAO->Release();
+     this->VBO->Release();

Added: head/science/paraview/files/patch-vtkOpenGLRenderUtilities.cxx
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/paraview/files/patch-vtkOpenGLRenderUtilities.cxx	Mon May 28 17:54:46 2018	(r471059)
@@ -0,0 +1,12 @@
+--- VTK/Rendering/OpenGL2/vtkOpenGLRenderUtilities.cxx.orig	2018-05-27 16:31:22.687702000 +0700
++++ VTK/Rendering/OpenGL2/vtkOpenGLRenderUtilities.cxx	2018-05-27 16:32:03.881401000 +0700
+@@ -93,8 +93,7 @@
+   vtkNew<vtkOpenGLBufferObject> ibo;
+   vao->Bind();
+   ibo->Upload(iboData, numIndices, vtkOpenGLBufferObject::ElementArrayBuffer);
+-  glDrawElements(GL_TRIANGLES, numIndices, GL_UNSIGNED_INT,
+-    reinterpret_cast<const GLvoid *>(NULL));
++  glDrawElements(GL_TRIANGLES, numIndices, GL_UNSIGNED_INT, nullptr);
+   ibo->Release();
+   ibo->ReleaseGraphicsResources();
+   vao->RemoveAttributeArray("vertexMC");

Added: head/science/paraview/files/patch-vtkOpenGLStickMapper.cxx
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/paraview/files/patch-vtkOpenGLStickMapper.cxx	Mon May 28 17:54:46 2018	(r471059)
@@ -0,0 +1,11 @@
+--- VTK/Rendering/OpenGL2/vtkOpenGLStickMapper.cxx.orig	2018-05-27 16:48:40.625194000 +0700
++++ VTK/Rendering/OpenGL2/vtkOpenGLStickMapper.cxx	2018-05-27 16:48:53.507986000 +0700
+@@ -614,7 +614,7 @@
+                         static_cast<GLuint>(this->VBO->VertexCount - 1),
+                         static_cast<GLsizei>(this->Primitives[PrimitiveTris].IBO->IndexCount),
+                         GL_UNSIGNED_INT,
+-                        reinterpret_cast<const GLvoid *>(NULL));
++                        nullptr);
+     this->Primitives[PrimitiveTris].IBO->Release();
+   }
+ }

Added: head/science/paraview/files/patch-vtkPhastaReader.cxx
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/paraview/files/patch-vtkPhastaReader.cxx	Mon May 28 17:54:46 2018	(r471059)
@@ -0,0 +1,11 @@
+--- ParaViewCore/VTKExtensions/Default/vtkPhastaReader.cxx.orig	2018-05-27 20:05:20.868911000 +0700
++++ ParaViewCore/VTKExtensions/Default/vtkPhastaReader.cxx	2018-05-27 20:05:16.469487000 +0700
+@@ -200,7 +200,7 @@
+     {
+       text_header = new char[real_length + 1];
+       strncpy(text_header, Line, real_length);
+-      text_header[real_length] = static_cast<char>(NULL);
++      text_header[real_length] = static_cast<char>(0);
+       token = strtok(text_header, ":");
+       if (cscompare(phrase, token))
+       {

Added: head/science/paraview/files/patch-vtkXOpenGLRenderWindow.cxx
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/paraview/files/patch-vtkXOpenGLRenderWindow.cxx	Mon May 28 17:54:46 2018	(r471059)
@@ -0,0 +1,40 @@
+--- VTK/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx.orig	2018-05-27 16:56:49.463432000 +0700
++++ VTK/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx	2018-05-27 16:58:36.068069000 +0700
+@@ -333,7 +333,7 @@
+ 
+ vtkXOpenGLRenderWindow::vtkXOpenGLRenderWindow()
+ {
+-  this->ParentId = static_cast<Window>(NULL);
++  this->ParentId = static_cast<Window>(0);
+   this->ScreenSize[0] = 0;
+   this->ScreenSize[1] = 0;
+   this->OwnDisplay = 0;
+@@ -341,8 +341,8 @@
+   this->ForceMakeCurrent = 0;
+   this->UsingHardware = 0;
+   this->DisplayId = static_cast<Display *>(NULL);
+-  this->WindowId = static_cast<Window>(NULL);
+-  this->NextWindowId = static_cast<Window>(NULL);
++  this->WindowId = static_cast<Window>(0);
++  this->NextWindowId = static_cast<Window>(0);
+   this->ColorMap = static_cast<Colormap>(0);
+   this->OwnWindow = 0;
+ 
+@@ -762,7 +762,7 @@
+   if (this->OwnWindow && this->DisplayId && this->WindowId)
+   {
+     XDestroyWindow(this->DisplayId,this->WindowId);
+-    this->WindowId = static_cast<Window>(NULL);
++    this->WindowId = static_cast<Window>(0);
+   }
+ 
+   this->CloseDisplay();
+@@ -1157,7 +1157,7 @@
+ 
+   // set the default windowid
+   this->WindowId = this->NextWindowId;
+-  this->NextWindowId = static_cast<Window>(NULL);
++  this->NextWindowId = static_cast<Window>(0);
+ 
+   // set everything up again
+   this->Initialize();



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805281754.w4SHskx7040178>