FreeBSD Bugzilla – Attachment 226094 Details for
Bug 256876
math/vtk9: do not pollute namespace with Xutil.h
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch b3b088e8 from upstream
math_vtk9.diff (text/plain), 3.15 KB, created by
Thierry Thomas
on 2021-06-28 20:54:15 UTC
(
hide
)
Description:
Patch b3b088e8 from upstream
Filename:
MIME Type:
Creator:
Thierry Thomas
Created:
2021-06-28 20:54:15 UTC
Size:
3.15 KB
patch
obsolete
>commit dcd10c1ff91864c3d50218bda3b003266fd0bd2f >Author: Thierry Thomas <thierry@FreeBSD.org> >Date: Sun Jun 20 22:06:41 2021 +0200 > > math/vtk9: do not pollute namespace with Xutil.h > > Add the patch b3b088e8 from upstream, in order to permit cad/opencascade > to switch to VTK-9. > >diff --git a/math/vtk9/files/patch-Rendering_OpenGL2_vtkXOpenGLRenderWindow.cxx b/math/vtk9/files/patch-Rendering_OpenGL2_vtkXOpenGLRenderWindow.cxx >new file mode 100644 >index 000000000000..b3870218a2f8 >--- /dev/null >+++ b/math/vtk9/files/patch-Rendering_OpenGL2_vtkXOpenGLRenderWindow.cxx >@@ -0,0 +1,44 @@ >+--- Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx.orig 2020-06-26 13:24:40 UTC >++++ Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx >+@@ -61,10 +61,22 @@ typedef ptrdiff_t GLsizeiptr; >+ >+ #include <sstream> >+ >++// Patch from upstream b3b088e8 >++#include <X11/Xatom.h> >++#include <X11/cursorfont.h> >++ >+ #include <X11/Xlib.h> >+ #include <X11/Xutil.h> >+-#include <X11/cursorfont.h> >+ >++/* >++ * Work-around to get forward declarations of C typedef of anonymous >++ * structs working. We do not want to include XUtil.h in the header as >++ * it populates the global namespace. >++ */ >++struct vtkXVisualInfo : public XVisualInfo >++{ >++}; >++ >+ #define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091 >+ #define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092 >+ typedef GLXContext (*glXCreateContextAttribsARBProc)( >+@@ -224,7 +236,7 @@ int XEventTypeEquals(Display*, XEvent* event, XPointer >+ return event->type == EventType; >+ } >+ >+-XVisualInfo* vtkXOpenGLRenderWindow::GetDesiredVisualInfo() >++vtkXVisualInfo* vtkXOpenGLRenderWindow::GetDesiredVisualInfo() >+ { >+ XVisualInfo* v = nullptr; >+ >+@@ -258,7 +270,7 @@ XVisualInfo* vtkXOpenGLRenderWindow::GetDesiredVisualI >+ vtkErrorMacro(<< "Could not find a decent visual\n"); >+ } >+ } >+- return (v); >++ return reinterpret_cast<vtkXVisualInfo*>(v); >+ } >+ >+ vtkXOpenGLRenderWindow::vtkXOpenGLRenderWindow() >diff --git a/math/vtk9/files/patch-Rendering_OpenGL2_vtkXOpenGLRenderWindow.h b/math/vtk9/files/patch-Rendering_OpenGL2_vtkXOpenGLRenderWindow.h >new file mode 100644 >index 000000000000..59457634d2ba >--- /dev/null >+++ b/math/vtk9/files/patch-Rendering_OpenGL2_vtkXOpenGLRenderWindow.h >@@ -0,0 +1,24 @@ >+--- Rendering/OpenGL2/vtkXOpenGLRenderWindow.h.orig 2020-06-26 13:24:40 UTC >++++ Rendering/OpenGL2/vtkXOpenGLRenderWindow.h >+@@ -28,11 +28,11 @@ >+ #include "vtkOpenGLRenderWindow.h" >+ #include "vtkRenderingOpenGL2Module.h" // For export macro >+ #include <X11/Xlib.h> // Needed for X types used in the public interface >+-#include <X11/Xutil.h> // Needed for X types used in the public interface >+ #include <stack> // for ivar >+ >+ class vtkIdList; >+ class vtkXOpenGLRenderWindowInternal; >++struct vtkXVisualInfo; >+ >+ class VTKRENDERINGOPENGL2_EXPORT vtkXOpenGLRenderWindow : public vtkOpenGLRenderWindow >+ { >+@@ -112,7 +112,7 @@ class VTKRENDERINGOPENGL2_EXPORT vtkXOpenGLRenderWindo >+ */ >+ virtual Colormap GetDesiredColormap(); >+ virtual Visual* GetDesiredVisual(); >+- virtual XVisualInfo* GetDesiredVisualInfo(); >++ virtual vtkXVisualInfo* GetDesiredVisualInfo(); >+ virtual int GetDesiredDepth(); >+ //@} >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 256876
: 226094