From owner-dev-commits-ports-main@freebsd.org Tue Jun 29 10:21:28 2021 Return-Path: Delivered-To: dev-commits-ports-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E1C46480D0; Tue, 29 Jun 2021 10:21:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDgVw0sjDz4dq2; Tue, 29 Jun 2021 10:21:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 072D41788E; Tue, 29 Jun 2021 10:21:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15TALRK0007233; Tue, 29 Jun 2021 10:21:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TALRxq007232; Tue, 29 Jun 2021 10:21:27 GMT (envelope-from git) Date: Tue, 29 Jun 2021 10:21:27 GMT Message-Id: <202106291021.15TALRxq007232@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Thierry Thomas Subject: git: e67606b6b191 - main - math/vtk9: do not pollute namespace with Xutil.h MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: thierry X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e67606b6b191a590ef2e373ab5e3f0e32aedae05 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the main branch of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 10:21:28 -0000 The branch main has been updated by thierry: URL: https://cgit.FreeBSD.org/ports/commit/?id=e67606b6b191a590ef2e373ab5e3f0e32aedae05 commit e67606b6b191a590ef2e373ab5e3f0e32aedae05 Author: Thierry Thomas AuthorDate: 2021-06-20 20:06:41 +0000 Commit: Thierry Thomas CommitDate: 2021-06-29 10:20:38 +0000 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. PR: 256876 Approved by: yuri (maintainer) --- math/vtk9/Makefile | 2 +- ...ch-Rendering_OpenGL2_vtkXOpenGLRenderWindow.cxx | 44 ++++++++++++++++++++++ ...atch-Rendering_OpenGL2_vtkXOpenGLRenderWindow.h | 24 ++++++++++++ 3 files changed, 69 insertions(+), 1 deletion(-) diff --git a/math/vtk9/Makefile b/math/vtk9/Makefile index 13dba74c3eaf..7268fab0eb9c 100644 --- a/math/vtk9/Makefile +++ b/math/vtk9/Makefile @@ -1,6 +1,6 @@ PORTNAME= vtk DISTVERSION= 9.0.1 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= math graphics MASTER_SITES= https://vtk.org/files/release/${VTK_SHORT_VER}/ PKGNAMESUFFIX= 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 + ++// Patch from upstream b3b088e8 ++#include ++#include ++ + #include + #include +-#include + ++/* ++ * 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(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 // Needed for X types used in the public interface +-#include // Needed for X types used in the public interface + #include // 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(); + //@} +