From 6775ff242279794e79d4738bfa3ce90bd1424d6ba5a120a059060ecc21038c9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= Date: Sat, 18 Jul 2020 22:18:35 +0000 Subject: [PATCH 1/2] Accepting request 821682 from home:StefanBruens:branches:science - Update to version 9.0.1: * Drop obsolete patches: + bundled_exodusii_add_missing_libpthread.patch + vtk-parallelgeometry-dependency.patch + vtk-qt-5.15-include-QPainterPath.patch - Explicitly enable module RenderingContextOpenGL2 required for PCL - Conditionally add pugixml-devel Requires in devel package - Make devel package installable even when built without Java - Remove CAPITALIZATION from comments - Drop obsolete TK build dependency - Drop unused wget build dependency - Wrap devel-doc generation in bcond (keep defaulted to off), and drop the essentially empty package when disabled. - Fix build on ARM/Qt GLES (boo#1172723): * set VTK_OPENGL_USE_GLES * Add 0001-clean-up-some-old-opengl-es-stuff.patch * Add 0001-Remove-duplicate-check-for-QOpenGLFunctions_3_2_Core.patch * Rebase 0001-Allow-compilation-on-GLES-platforms.patch * Add 0001-Replace-last-glDrawBuffer-call-with-glDrawBuffers-1.patch * Add 0001-Use-2D-textures-for-1D-texture-emulation-on-GLES.patch * Add 0001-Add-missing-guard-required-for-GLES-to-disable-stere.patch * Add 0001-Correct-GL_BACK-GL_BACK_LEFT-mapping-on-GLES.patch * Add 0002-Use-GL_DRAW_BUFFER0-instead-of-GL_DRAW_BUFFER-for-GL.patch * Add 0001-GL_POINT_SPRITE-is-only-available-for-Compatibility-.patch * Add 0002-Guard-GL_LINE_SMOOTH-for-GLES.patch * Add 0001-Guard-glPointSize-with-GL_ES_VERSION_3_0.patch - Add 0001-Fix-PyVTKAddFile_-function-signature-mismatch.patch - Add 0001-Replace-invalid-GL_LINE-with-GL_LINES-for-glDrawArra.patch OBS-URL: https://build.opensuse.org/request/show/821682 OBS-URL: https://build.opensuse.org/package/show/science/vtk?expand=0&rev=164 --- ...d-required-for-GLES-to-disable-stere.patch | 37 +++ ...-Allow-compilation-on-GLES-platforms.patch | 100 ++++--- ...GL_BACK-GL_BACK_LEFT-mapping-on-GLES.patch | 39 +++ ...AddFile_-function-signature-mismatch.patch | 36 +++ ...is-only-available-for-Compatibility-.patch | 46 ++++ ...d-glPointSize-with-GL_ES_VERSION_3_0.patch | 43 +++ ...-check-for-QOpenGLFunctions_3_2_Core.patch | 96 +++++++ ...GL_LINE-with-GL_LINES-for-glDrawArra.patch | 28 ++ ...DrawBuffer-call-with-glDrawBuffers-1.patch | 46 ++++ 0001-clean-up-some-old-opengl-es-stuff.patch | 247 ++++++++++++++++++ 0001-expose-1d-texture-options.patch | 35 +++ 0002-Guard-GL_LINE_SMOOTH-for-GLES.patch | 42 +++ ...ER0-instead-of-GL_DRAW_BUFFER-for-GL.patch | 150 +++++++++++ VTK-9.0.0.tar.gz | 3 - VTK-9.0.1.tar.gz | 3 + bundled_exodusii_add_missing_libpthread.patch | 63 ----- vtk-parallelgeometry-dependency.patch | 12 - vtk-qt-5.15-include-QPainterPath.patch | 36 --- vtk.changes | 32 +++ vtk.spec | 120 ++++++--- 20 files changed, 1025 insertions(+), 189 deletions(-) create mode 100644 0001-Add-missing-guard-required-for-GLES-to-disable-stere.patch create mode 100644 0001-Correct-GL_BACK-GL_BACK_LEFT-mapping-on-GLES.patch create mode 100644 0001-Fix-PyVTKAddFile_-function-signature-mismatch.patch create mode 100644 0001-GL_POINT_SPRITE-is-only-available-for-Compatibility-.patch create mode 100644 0001-Guard-glPointSize-with-GL_ES_VERSION_3_0.patch create mode 100644 0001-Remove-duplicate-check-for-QOpenGLFunctions_3_2_Core.patch create mode 100644 0001-Replace-invalid-GL_LINE-with-GL_LINES-for-glDrawArra.patch create mode 100644 0001-Replace-last-glDrawBuffer-call-with-glDrawBuffers-1.patch create mode 100644 0001-clean-up-some-old-opengl-es-stuff.patch create mode 100644 0001-expose-1d-texture-options.patch create mode 100644 0002-Guard-GL_LINE_SMOOTH-for-GLES.patch create mode 100644 0002-Use-GL_DRAW_BUFFER0-instead-of-GL_DRAW_BUFFER-for-GL.patch delete mode 100644 VTK-9.0.0.tar.gz create mode 100644 VTK-9.0.1.tar.gz delete mode 100644 bundled_exodusii_add_missing_libpthread.patch delete mode 100644 vtk-parallelgeometry-dependency.patch delete mode 100644 vtk-qt-5.15-include-QPainterPath.patch diff --git a/0001-Add-missing-guard-required-for-GLES-to-disable-stere.patch b/0001-Add-missing-guard-required-for-GLES-to-disable-stere.patch new file mode 100644 index 0000000..218fc11 --- /dev/null +++ b/0001-Add-missing-guard-required-for-GLES-to-disable-stere.patch @@ -0,0 +1,37 @@ +From a9c31af9e6edd45ae01fb2712ad7a3c0d3e3cc37 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20Br=C3=BCns?= +Date: Sat, 4 Jul 2020 21:04:52 +0200 +Subject: [PATCH] Add missing guard required for GLES to disable stereo + rendering + +fmt.stereo() will evaluate to false for GLES, guard the whole block +so GL_BACK_* is not used. +Qt already includes the OpenGL/GLES headers, so GL_ES_VERSION_2_0 will +be defined for Qt GLES builds. +--- + GUISupport/Qt/QVTKOpenGLWindow.cxx | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/GUISupport/Qt/QVTKOpenGLWindow.cxx b/GUISupport/Qt/QVTKOpenGLWindow.cxx +index 335feb581c..b692b5490a 100644 +--- a/GUISupport/Qt/QVTKOpenGLWindow.cxx ++++ b/GUISupport/Qt/QVTKOpenGLWindow.cxx +@@ -231,6 +231,7 @@ void QVTKOpenGLWindow::paintGL() + + const QSize deviceSize = this->size() * this->devicePixelRatioF(); + const auto fmt = this->context()->format(); ++#ifndef GL_ES_VERSION_2_0 + if (fmt.stereo() && this->RenderWindow->GetStereoRender() && + this->RenderWindow->GetStereoType() == VTK_STEREO_CRYSTAL_EYES) + { +@@ -240,6 +241,7 @@ void QVTKOpenGLWindow::paintGL() + this->defaultFramebufferObject(), GL_BACK_RIGHT, QRect(QPoint(0, 0), deviceSize)); + } + else ++#endif + { + this->RenderWindowAdapter->blit( + this->defaultFramebufferObject(), GL_BACK, QRect(QPoint(0, 0), deviceSize)); +-- +2.27.0 + diff --git a/0001-Allow-compilation-on-GLES-platforms.patch b/0001-Allow-compilation-on-GLES-platforms.patch index 112a158..c7189ee 100644 --- a/0001-Allow-compilation-on-GLES-platforms.patch +++ b/0001-Allow-compilation-on-GLES-platforms.patch @@ -1,55 +1,75 @@ -From 2d5a68b91f9d638aa408285d1608bc5d70060602 Mon Sep 17 00:00:00 2001 +From 5c4e4e5832613e758b7c1389a5dbcc1d57db7c6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= -Date: Fri, 1 Sep 2017 02:11:37 +0200 +Date: Tue, 9 Jun 2020 17:11:12 +0200 Subject: [PATCH] Allow compilation on GLES platforms -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit On GLES 2.0 platforms (more specifically, for Qt5 "opengl es2" builds), QOpenGLFunctions_3_2_Core does not exist. Since Qt 5.7, QOpenGlFramebufferObject has a static wrapper method for framebuffer -blitting, which in worst case is a noop. +blitting, which in worst case (i.e. no GL_EXT_framebuffer blit +extension) is a noop, but handles all GL platform differences otherwise +(3.2 Core context, GLES 3.0, or any earlier with required extensions). -Signed-off-by: Stefan Brüns +The code ignores the passed in targetId FBO handle, but relies on +the default framebuffer object of the context. As the calling code calls +QOpenGLWindow::makeCurrent() the context default FBO is the one returned +by QOpenGLWindow::defaultFramebufferObject(). --- - GUISupport/Qt/QVTKOpenGLNativeWidget.cxx | 12 ++++++++++++ - 1 file changed, 12 insertions(+) + GUISupport/Qt/QVTKRenderWindowAdapter.cxx | 21 ++++++++++++++++++++- + 1 file changed, 20 insertions(+), 1 deletion(-) -diff --git a/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx b/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx -index a1676e8..16e255f 100644 ---- a/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx -+++ b/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx -@@ -534,10 +534,15 @@ void QVTKOpenGLNativeWidget::paintGL() - - // blit from this->FBO to QOpenGLWidget's FBO. - vtkQVTKOpenGLNativeWidgetDebugMacro("paintGL::blit-to-defaultFBO"); -+#if QT_VERSION < 0x050700 - QOpenGLFunctions_3_2_Core* f = - QOpenGLContext::currentContext()->versionFunctions(); +diff --git a/GUISupport/Qt/QVTKRenderWindowAdapter.cxx b/GUISupport/Qt/QVTKRenderWindowAdapter.cxx +index 5a66e236df..e5fc5a6135 100644 +--- a/GUISupport/Qt/QVTKRenderWindowAdapter.cxx ++++ b/GUISupport/Qt/QVTKRenderWindowAdapter.cxx +@@ -334,12 +334,17 @@ public: + { + return false; + } ++#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0) + QOpenGLFunctions_3_2_Core* f = this->Context->versionFunctions(); +#else -+ QOpenGLFunctions* f = QOpenGLContext::currentContext()->functions(); ++ QOpenGLFunctions* f = this->Context->functions(); +#endif - if (f) + if (!f) + { + return false; + } + ++#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0) + f->glBindFramebuffer(GL_DRAW_FRAMEBUFFER, targetId); + f->glDrawBuffer(targetAttachment); + +@@ -358,6 +363,20 @@ public: + auto sourceSize = this->FBO->size(); + f->glBlitFramebuffer(0, 0, sourceSize.width(), sourceSize.height(), targetRect.x(), + targetRect.y(), targetRect.width(), targetRect.height(), GL_COLOR_BUFFER_BIT, GL_NEAREST); ++#else ++ GLboolean scissorTest = f->glIsEnabled(GL_SCISSOR_TEST); ++ if (scissorTest == GL_TRUE) ++ { ++ f->glDisable(GL_SCISSOR_TEST); // Scissor affects glBindFramebuffer. ++ } ++ auto sourceSize = this->FBO->size(); ++ QRect sourceRect(0, 0, sourceSize.width(), sourceSize.height()); ++ unsigned int readAttachment = ++ left ? this->RenderWindow->GetFrontLeftBuffer() : this->RenderWindow->GetFrontRightBuffer(); ++ QOpenGLFramebufferObject::blitFramebuffer(nullptr, targetRect, this->FBO.get(), sourceRect, ++ GL_COLOR_BUFFER_BIT, GL_NEAREST, readAttachment, targetAttachment, ++ QOpenGLFramebufferObject::DontRestoreFramebufferBinding); ++#endif + + this->clearAlpha(targetRect); + +@@ -436,7 +455,7 @@ public: { -+#if QT_VERSION < 0x050700 - vtkOpenGLState *ostate = this->RenderWindow->GetState(); + Q_ASSERT(this->Context && this->FBO); - f->glBindFramebuffer(GL_DRAW_FRAMEBUFFER, this->defaultFramebufferObject()); -@@ -556,6 +561,13 @@ void QVTKOpenGLNativeWidget::paintGL() - f->glBlitFramebuffer(0, 0, this->RenderWindow->GetSize()[0], this->RenderWindow->GetSize()[1], - 0, 0, this->RenderWindow->GetSize()[0], this->RenderWindow->GetSize()[1], GL_COLOR_BUFFER_BIT, - GL_NEAREST); -+#else -+ f->glDisable(GL_SCISSOR_TEST); // Scissor affects glBindFramebuffer. -+ QRect rect(0, 0, this->RenderWindow->GetSize()[0], this->RenderWindow->GetSize()[1]); -+ QOpenGLFramebufferObject::blitFramebuffer(0 /* binds to default framebuffer */, rect, -+ this->FBO, rect, GL_COLOR_BUFFER_BIT, GL_NEAREST, GL_COLOR_ATTACHMENT0, -+ GL_COLOR_ATTACHMENT0, QOpenGLFramebufferObject::DontRestoreFramebufferBinding); -+#endif - - // now clear alpha otherwise we end up blending the rendering with - // background windows in certain cases. It happens on OsX +- QOpenGLFunctions_3_2_Core* f = this->Context->versionFunctions(); ++ QOpenGLFunctions* f = this->Context->functions(); + if (f) + { + // now clear alpha otherwise we end up blending the rendering with -- -2.14.1 +2.27.0 diff --git a/0001-Correct-GL_BACK-GL_BACK_LEFT-mapping-on-GLES.patch b/0001-Correct-GL_BACK-GL_BACK_LEFT-mapping-on-GLES.patch new file mode 100644 index 0000000..54663b0 --- /dev/null +++ b/0001-Correct-GL_BACK-GL_BACK_LEFT-mapping-on-GLES.patch @@ -0,0 +1,39 @@ +From 2b930f694c2275b892772857002724b9fdcae6c5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20Br=C3=BCns?= +Date: Thu, 16 Jul 2020 03:52:23 +0200 +Subject: [PATCH 1/2] Correct GL_BACK/GL_BACK_LEFT mapping on GLES + +GLES does not have LEFT/RIGHT targets for the default framebuffer, but +just GL_BACK, so there is no need to remap it. Desktop GL may have +LEFT and RIGHT attached at the simultaneously, so one of the buffers +has to be selected when querying the attributes. +--- + Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx b/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx +index 9bbbc2ba54..4bda9330b6 100644 +--- a/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx ++++ b/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx +@@ -719,6 +719,10 @@ int vtkOpenGLRenderWindow::GetColorBufferSizes(int* rgba) + #ifdef GL_DRAW_BUFFER + glGetIntegerv(GL_DRAW_BUFFER, &attachment); + #endif ++#ifdef GL_ES_VERSION_3_0 ++ // GLES only has the GL_BACK color ++ // attachment for the default framebuffer ++#else + // GL seems odd with its handling of left/right. + // if it says we are using GL_FRONT or GL_BACK + // then convert those to GL_FRONT_LEFT and +@@ -731,6 +735,7 @@ int vtkOpenGLRenderWindow::GetColorBufferSizes(int* rgba) + { + attachment = GL_BACK_LEFT; + } ++#endif + + // make sure we clear any errors before we start + // otherwise we may get incorrect results +-- +2.27.0 + diff --git a/0001-Fix-PyVTKAddFile_-function-signature-mismatch.patch b/0001-Fix-PyVTKAddFile_-function-signature-mismatch.patch new file mode 100644 index 0000000..e993fb9 --- /dev/null +++ b/0001-Fix-PyVTKAddFile_-function-signature-mismatch.patch @@ -0,0 +1,36 @@ +From 4253aefd5b5bf5f68177b37b73588ed83d05ac7e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20Br=C3=BCns?= +Date: Thu, 2 Jul 2020 19:29:04 +0200 +Subject: [PATCH] Fix PyVTKAddFile_* function signature mismatch + +The implementation generated in vtkWrapPython.c has void return type, as +noted by GCC when using LTO, e.g.: +-- +./build/CMakeFiles/vtkRenderingOpenGL2PythonPython/vtkRenderingOpenGL2PythonInitImpl.cxx:85:24: warning: 'PyVTKAddFile_vtkPointFillPass' violates the C++ One Definition Rule [-Wodr] + 85 | extern "C" { PyObject *PyVTKAddFile_vtkPointFillPass(PyObject *dict); } + | ^ +./build/CMakeFiles/vtkRenderingOpenGL2Python/vtkPointFillPassPython.cxx:442:6: note: return value type mismatch + 442 | void PyVTKAddFile_vtkPointFillPass( + | ^ +./build/CMakeFiles/vtkRenderingOpenGL2Python/vtkPointFillPassPython.cxx:442:6: note: 'PyVTKAddFile_vtkPointFillPass' was previously declared here +-- +--- + Wrapping/Tools/vtkWrapPythonInit.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Wrapping/Tools/vtkWrapPythonInit.c b/Wrapping/Tools/vtkWrapPythonInit.c +index 6b108c1aca..dcccd4cf5d 100644 +--- a/Wrapping/Tools/vtkWrapPythonInit.c ++++ b/Wrapping/Tools/vtkWrapPythonInit.c +@@ -61,7 +61,7 @@ static void CreateImplFile(const char* libName, const char* importName, int numD + + for (i = 0; i < numFiles; i++) + { +- fprintf(fout, "extern \"C\" { PyObject *PyVTKAddFile_%s(PyObject *dict); }\n", files[i]); ++ fprintf(fout, "extern \"C\" { void PyVTKAddFile_%s(PyObject *dict); }\n", files[i]); + } + + fprintf(fout, "\nstatic PyMethodDef Py%s_Methods[] = {\n", libName); +-- +2.27.0 + diff --git a/0001-GL_POINT_SPRITE-is-only-available-for-Compatibility-.patch b/0001-GL_POINT_SPRITE-is-only-available-for-Compatibility-.patch new file mode 100644 index 0000000..b833df6 --- /dev/null +++ b/0001-GL_POINT_SPRITE-is-only-available-for-Compatibility-.patch @@ -0,0 +1,46 @@ +From 6b675d1fbb130480725ae5ed3f3bdd995e9b336a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20Br=C3=BCns?= +Date: Fri, 17 Jul 2020 05:00:04 +0200 +Subject: [PATCH 1/2] GL_POINT_SPRITE is only available for Compatibility + Profiles and GLES 1.0 + +--- + Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx +index 6cd90e0306..7b834fa6e5 100644 +--- a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx ++++ b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx +@@ -1126,22 +1126,28 @@ void vtkOpenGLContextDevice2D::DrawPointSprites( + } + + // We can actually use point sprites here ++#ifdef GL_POINT_SPRITE + if (this->RenderWindow->IsPointSpriteBugPresent()) + { + glEnable(GL_POINT_SPRITE); + glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE); + } ++#endif ++#ifdef GL_POINT_SPRITE_COORD_ORIGIN + glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, GL_LOWER_LEFT); ++#endif + + glDrawArrays(GL_POINTS, 0, n); + + // free everything + cbo->ReleaseGraphicsResources(this->RenderWindow); ++#ifdef GL_POINT_SPRITE + if (this->RenderWindow->IsPointSpriteBugPresent()) + { + glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_FALSE); + glDisable(GL_POINT_SPRITE); + } ++#endif + + if (sprite) + { +-- +2.27.0 + diff --git a/0001-Guard-glPointSize-with-GL_ES_VERSION_3_0.patch b/0001-Guard-glPointSize-with-GL_ES_VERSION_3_0.patch new file mode 100644 index 0000000..f419f79 --- /dev/null +++ b/0001-Guard-glPointSize-with-GL_ES_VERSION_3_0.patch @@ -0,0 +1,43 @@ +From 5dff10d6a3c2e19eed46af4639ade2ff0ca10d98 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20Br=C3=BCns?= +Date: Sat, 18 Jul 2020 02:22:45 +0200 +Subject: [PATCH] Guard glPointSize with GL_ES_VERSION_3_0 + +glPointSize is not available in GLES, so just disable the call on GLES +like done elsewhere. +--- + Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx | 2 ++ + Rendering/ContextOpenGL2/vtkOpenGLContextDevice3D.cxx | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx +index cc376934dd..5f4eed5401 100644 +--- a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx ++++ b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx +@@ -1912,7 +1912,9 @@ void vtkOpenGLContextDevice2D::SetPointSize(float size) + { + gl2ps->SetPointSize(size); + } ++#ifndef GL_ES_VERSION_3_0 + glPointSize(size); ++#endif + } + + //----------------------------------------------------------------------------- +diff --git a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice3D.cxx b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice3D.cxx +index d24eeeda75..ab46faf8ca 100644 +--- a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice3D.cxx ++++ b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice3D.cxx +@@ -452,7 +452,9 @@ void vtkOpenGLContextDevice3D::DrawPoints( + + this->EnableDepthBuffer(); + ++#ifndef GL_ES_VERSION_3_0 + glPointSize(this->Pen->GetWidth()); ++#endif + + vtkOpenGLHelper* cbo = nullptr; + if (colors) +-- +2.27.0 + diff --git a/0001-Remove-duplicate-check-for-QOpenGLFunctions_3_2_Core.patch b/0001-Remove-duplicate-check-for-QOpenGLFunctions_3_2_Core.patch new file mode 100644 index 0000000..eb08d6c --- /dev/null +++ b/0001-Remove-duplicate-check-for-QOpenGLFunctions_3_2_Core.patch @@ -0,0 +1,96 @@ +From 6cc902225a0c4fe8567071ce6518d5861218ca6a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20Br=C3=BCns?= +Date: Tue, 9 Jun 2020 17:34:39 +0200 +Subject: [PATCH 1/3] Remove duplicate check for QOpenGLFunctions_3_2_Core* + +The return value is already checked in QVTKRenderWindowAdapter::blit(), +no need to do it twice. +--- + GUISupport/Qt/QVTKOpenGLNativeWidget.cxx | 12 +++------ + GUISupport/Qt/QVTKOpenGLWindow.cxx | 32 ++++++++++-------------- + 2 files changed, 16 insertions(+), 28 deletions(-) + +diff --git a/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx b/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx +index 9f058c7141..054079793a 100644 +--- a/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx ++++ b/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx +@@ -19,7 +19,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -237,14 +236,9 @@ void QVTKOpenGLNativeWidget::paintGL() + // before proceeding with blit-ing. + this->makeCurrent(); + +- QOpenGLFunctions_3_2_Core* f = +- QOpenGLContext::currentContext()->versionFunctions(); +- if (f) +- { +- const QSize deviceSize = this->size() * this->devicePixelRatioF(); +- this->RenderWindowAdapter->blit( +- this->defaultFramebufferObject(), GL_COLOR_ATTACHMENT0, QRect(QPoint(0, 0), deviceSize)); +- } ++ const QSize deviceSize = this->size() * this->devicePixelRatioF(); ++ this->RenderWindowAdapter->blit( ++ this->defaultFramebufferObject(), GL_COLOR_ATTACHMENT0, QRect(QPoint(0, 0), deviceSize)); + } + else + { +diff --git a/GUISupport/Qt/QVTKOpenGLWindow.cxx b/GUISupport/Qt/QVTKOpenGLWindow.cxx +index 8311ac24a8..9c97121db9 100644 +--- a/GUISupport/Qt/QVTKOpenGLWindow.cxx ++++ b/GUISupport/Qt/QVTKOpenGLWindow.cxx +@@ -19,7 +19,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -230,25 +229,20 @@ void QVTKOpenGLWindow::paintGL() + // before proceeding with blit-ing. + this->makeCurrent(); + +- QOpenGLFunctions_3_2_Core* f = +- QOpenGLContext::currentContext()->versionFunctions(); +- if (f) ++ const QSize deviceSize = this->size() * this->devicePixelRatioF(); ++ const auto fmt = this->context()->format(); ++ if (fmt.stereo() && this->RenderWindow->GetStereoRender() && ++ this->RenderWindow->GetStereoType() == VTK_STEREO_CRYSTAL_EYES) + { +- const QSize deviceSize = this->size() * this->devicePixelRatioF(); +- const auto fmt = this->context()->format(); +- if (fmt.stereo() && this->RenderWindow->GetStereoRender() && +- this->RenderWindow->GetStereoType() == VTK_STEREO_CRYSTAL_EYES) +- { +- this->RenderWindowAdapter->blitLeftEye( +- this->defaultFramebufferObject(), GL_BACK_LEFT, QRect(QPoint(0, 0), deviceSize)); +- this->RenderWindowAdapter->blitRightEye( +- this->defaultFramebufferObject(), GL_BACK_RIGHT, QRect(QPoint(0, 0), deviceSize)); +- } +- else +- { +- this->RenderWindowAdapter->blit( +- this->defaultFramebufferObject(), GL_BACK, QRect(QPoint(0, 0), deviceSize)); +- } ++ this->RenderWindowAdapter->blitLeftEye( ++ this->defaultFramebufferObject(), GL_BACK_LEFT, QRect(QPoint(0, 0), deviceSize)); ++ this->RenderWindowAdapter->blitRightEye( ++ this->defaultFramebufferObject(), GL_BACK_RIGHT, QRect(QPoint(0, 0), deviceSize)); ++ } ++ else ++ { ++ this->RenderWindowAdapter->blit( ++ this->defaultFramebufferObject(), GL_BACK, QRect(QPoint(0, 0), deviceSize)); + } + } + else +-- +2.27.0 + diff --git a/0001-Replace-invalid-GL_LINE-with-GL_LINES-for-glDrawArra.patch b/0001-Replace-invalid-GL_LINE-with-GL_LINES-for-glDrawArra.patch new file mode 100644 index 0000000..2347aff --- /dev/null +++ b/0001-Replace-invalid-GL_LINE-with-GL_LINES-for-glDrawArra.patch @@ -0,0 +1,28 @@ +From cce31fb588c24c56848cb4ec28b10f2831232374 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20Br=C3=BCns?= +Date: Sat, 18 Jul 2020 02:09:18 +0200 +Subject: [PATCH] Replace invalid GL_LINE with GL_LINES for glDrawArrays + +GL_LINE applies to glPolygonMode, but glDrawArrays uses GL_LINES. + +(cherry picked from commit bd241df6c5804875d879c4649915e3e83172ba3f) +--- + Rendering/ContextOpenGL2/vtkOpenGLContextDevice3D.cxx | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice3D.cxx b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice3D.cxx +index c55968d3b8..d24eeeda75 100644 +--- a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice3D.cxx ++++ b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice3D.cxx +@@ -431,7 +431,7 @@ void vtkOpenGLContextDevice3D::DrawLines( + this->BuildVBO(cbo, verts, n, colors, nc, nullptr); + this->SetMatrices(cbo->Program); + +- glDrawArrays(GL_LINE, 0, n); ++ glDrawArrays(GL_LINES, 0, n); + + // free everything + cbo->ReleaseGraphicsResources(this->RenderWindow); +-- +2.27.0 + diff --git a/0001-Replace-last-glDrawBuffer-call-with-glDrawBuffers-1.patch b/0001-Replace-last-glDrawBuffer-call-with-glDrawBuffers-1.patch new file mode 100644 index 0000000..f16beaa --- /dev/null +++ b/0001-Replace-last-glDrawBuffer-call-with-glDrawBuffers-1.patch @@ -0,0 +1,46 @@ +From 98857882cdd0a08a5102d663dc9510e6343adbfa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20Br=C3=BCns?= +Date: Sun, 28 Jun 2020 22:13:32 +0200 +Subject: [PATCH 1/2] Replace last glDrawBuffer call with glDrawBuffers(1, ...) + +glDrawBuffer is only available in Desktop OpenGL, while the equivalent +glDrawBuffers is valid also for GLES. + +Just defining glDrawBuffer as an empty macro is obviously not the right +solution, as the call is also required on GLES. This also causes +a compilation failure - GL.h may be included via GLX.h on X11 platforms, +and the glDrawBuffer prototype declaration becomes malformed. +--- + Rendering/ContextOpenGL2/vtkOpenGLContextDevice2DPrivate.h | 3 ++- + ThirdParty/glew/vtk_glew.h.in | 1 - + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2DPrivate.h b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2DPrivate.h +index ddeeb04d38..2e1cc9cbf2 100644 +--- a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2DPrivate.h ++++ b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2DPrivate.h +@@ -324,7 +324,8 @@ public: + + if (this->SavedDrawBuffer != GL_BACK_LEFT) + { +- glDrawBuffer(this->SavedDrawBuffer); ++ const GLenum bufs[1] = { static_cast(this->SavedDrawBuffer) }; ++ ::glDrawBuffers(1, bufs); + } + + ostate->vtkglClearColor(this->SavedClearColor[0], this->SavedClearColor[1], +diff --git a/ThirdParty/glew/vtk_glew.h.in b/ThirdParty/glew/vtk_glew.h.in +index 009f230b19..1763e79319 100644 +--- a/ThirdParty/glew/vtk_glew.h.in ++++ b/ThirdParty/glew/vtk_glew.h.in +@@ -52,7 +52,6 @@ + + /* some fixes for both ES 2 and 3 */ + #ifdef GL_ES_VERSION_3_0 +-#define glDrawBuffer(arg) + #define GL_BACK_LEFT 0 + #define GL_BACK_RIGHT 0 + #define GL_FRONT_LEFT 0 +-- +2.27.0 + diff --git a/0001-clean-up-some-old-opengl-es-stuff.patch b/0001-clean-up-some-old-opengl-es-stuff.patch new file mode 100644 index 0000000..5b60fc3 --- /dev/null +++ b/0001-clean-up-some-old-opengl-es-stuff.patch @@ -0,0 +1,247 @@ +From 13956bf0d47391046e7bb08bb0b581d0850738a9 Mon Sep 17 00:00:00 2001 +From: Ken Martin +Date: Tue, 23 Jun 2020 14:31:15 -0400 +Subject: [PATCH] clean up some old opengl es stuff + +No longer have the version option so remove + +Partially implement 1D textures as 2D +--- + Examples/Android/ReadMe.txt | 6 +- + Rendering/OpenGL2/CMakeLists.txt | 6 +- + Rendering/OpenGL2/vtkTextureObject.cxx | 95 +++++++++++++++++++++++++- + ThirdParty/glew/vtk_glew.h.in | 45 ++++++------ + 4 files changed, 118 insertions(+), 34 deletions(-) + +diff --git a/Examples/Android/ReadMe.txt b/Examples/Android/ReadMe.txt +index 7b43476bdd..9c6f5a102d 100644 +--- a/Examples/Android/ReadMe.txt ++++ b/Examples/Android/ReadMe.txt +@@ -41,10 +41,6 @@ To build VTK and these examples follow the steps below. + * Run cmake on vtkandroid with -DVTK_ANDROID_BUILD=ON, if you use the gui add a + * boolean entry with that name prior to configuring and set it on. + +-If you want OpenGL ES 3.0 support make sure to change the setting of +-OPENGL_ES_VERSION to 3.0. Volume Rendering requires ES 3.0. Make sure to turn on +-VTK_BUILD_EXAMPLES +- + * configure and generate as usual + + * Once done run ninja or make as appropriate +@@ -60,4 +56,4 @@ cd into CMakeExternals/Build/vtk-android/Examples/Android/ExampleName/bin + + You should see some apk files in this directory. + +-You can adb install -r ExampleName-debug.apk and then run the example on your device +\ No newline at end of file ++You can adb install -r ExampleName-debug.apk and then run the example on your device +diff --git a/Rendering/OpenGL2/CMakeLists.txt b/Rendering/OpenGL2/CMakeLists.txt +index da43adb85f..0ea0ee3200 100644 +--- a/Rendering/OpenGL2/CMakeLists.txt ++++ b/Rendering/OpenGL2/CMakeLists.txt +@@ -3,6 +3,7 @@ set(classes + vtkClearRGBPass + vtkClearZPass + vtkCompositePolyDataMapper2 ++ vtkDataTransferHelper + vtkDefaultPass + vtkDepthImageProcessingPass + vtkDepthOfFieldPass +@@ -93,11 +94,6 @@ set(classes + vtkValuePass + vtkVolumetricPass) + +-if (NOT DEFINED OPENGL_ES_VERSION) +- list(APPEND classes +- vtkDataTransferHelper) +-endif() +- + set(headers + vtkCompositePolyDataMapper2Internal.h + vtkOpenGL.h + vtkStateStorage.h +diff --git a/Rendering/OpenGL2/vtkTextureObject.cxx b/Rendering/OpenGL2/vtkTextureObject.cxx +index 6afef26d97..b491c62e89 100644 +--- a/Rendering/OpenGL2/vtkTextureObject.cxx ++++ b/Rendering/OpenGL2/vtkTextureObject.cxx +@@ -1030,6 +1030,99 @@ bool vtkTextureObject::CreateTextureBuffer( + + #else + ++// Emulate 1D textures as 2D. Note that the any shader code will likely ++// have to be modified as well for this to work. ++ ++//------------------------------------------------------------------------------ ++bool vtkTextureObject::Create1D( ++ int numComps, vtkPixelBufferObject* pbo, bool shaderSupportsTextureInt) ++{ ++ assert(this->Context); ++ assert(pbo->GetContext() == this->Context.GetPointer()); ++ ++ GLenum target = GL_TEXTURE_2D; ++ ++ // Now, determine texture parameters using the information from the pbo. ++ ++ // * internalFormat depends on number of components and the data type. ++ GLenum internalFormat = ++ this->GetInternalFormat(pbo->GetType(), numComps, shaderSupportsTextureInt); ++ ++ // * format depends on the number of components. ++ GLenum format = this->GetFormat(pbo->GetType(), numComps, shaderSupportsTextureInt); ++ ++ // * type if the data type in the pbo ++ GLenum type = this->GetDefaultDataType(pbo->GetType()); ++ ++ if (!internalFormat || !format || !type) ++ { ++ vtkErrorMacro("Failed to determine texture parameters."); ++ return false; ++ } ++ ++ this->Target = target; ++ this->Context->ActivateTexture(this); ++ this->CreateTexture(); ++ this->Bind(); ++ ++ pbo->Bind(vtkPixelBufferObject::UNPACKED_BUFFER); ++ ++ // Source texture data from the PBO. ++ glPixelStorei(GL_UNPACK_ALIGNMENT, 1); ++ glTexImage2D(target, 0, static_cast(internalFormat), ++ static_cast(pbo->GetSize() / static_cast(numComps)), 1, 0, format, type, ++ BUFFER_OFFSET(0)); ++ vtkOpenGLCheckErrorMacro("failed at glTexImage1D"); ++ pbo->UnBind(); ++ this->Deactivate(); ++ ++ this->Target = target; ++ this->Format = format; ++ this->Type = type; ++ this->Components = numComps; ++ this->Width = pbo->GetSize(); ++ this->Height = 1; ++ this->Depth = 1; ++ this->NumberOfDimensions = 1; ++ return true; ++} ++ ++//------------------------------------------------------------------------------ ++bool vtkTextureObject::Create1DFromRaw(unsigned int width, int numComps, int dataType, void* data) ++{ ++ assert(this->Context); ++ ++ // Now determine the texture parameters using the arguments. ++ this->GetDataType(dataType); ++ this->GetInternalFormat(dataType, numComps, false); ++ this->GetFormat(dataType, numComps, false); ++ ++ if (!this->InternalFormat || !this->Format || !this->Type) ++ { ++ vtkErrorMacro("Failed to determine texture parameters."); ++ return false; ++ } ++ ++ GLenum target = GL_TEXTURE_2D; ++ this->Target = target; ++ this->Components = numComps; ++ this->Width = width; ++ this->Height = 1; ++ this->Depth = 1; ++ this->NumberOfDimensions = 1; ++ this->Context->ActivateTexture(this); ++ this->CreateTexture(); ++ this->Bind(); ++ ++ glTexImage2D(this->Target, 0, this->InternalFormat, static_cast(this->Width), 1, 0, ++ this->Format, this->Type, static_cast(data)); ++ ++ vtkOpenGLCheckErrorMacro("failed at glTexImage1D"); ++ ++ this->Deactivate(); ++ return true; ++} ++ + // Description: + // Create a texture buffer basically a 1D texture that can be + // very large for passing data into the fragment shader +@@ -1037,7 +1130,7 @@ bool vtkTextureObject::CreateTextureBuffer( + unsigned int numValues, int numComps, int dataType, vtkOpenGLBufferObject* bo) + { + assert(this->Context); +- vtkErrorMacro("TextureBuffers not supported in OPenGL ES"); ++ vtkErrorMacro("TextureBuffers not supported in OpenGL ES"); + // TODO: implement 1D and Texture buffers using 2D textures + return false; + } +diff --git a/ThirdParty/glew/vtk_glew.h.in b/ThirdParty/glew/vtk_glew.h.in +index 6aa8c2ee9e..009f230b19 100644 +--- a/ThirdParty/glew/vtk_glew.h.in ++++ b/ThirdParty/glew/vtk_glew.h.in +@@ -35,42 +35,41 @@ + #endif + + #if VTK_MODULE_vtkglew_GLES3 +-# include ++#include + #elif TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR +-# include ++#include + #elif VTK_MODULE_USE_EXTERNAL_vtkglew +-# include +-# ifdef _WIN32 +-# include +-# endif ++#include ++#ifdef _WIN32 ++#include ++#endif + #else +-# include +-# ifdef _WIN32 +-# include +-# endif ++#include ++#ifdef _WIN32 ++#include ++#endif + #endif + + /* some fixes for both ES 2 and 3 */ + #ifdef GL_ES_VERSION_3_0 +-# define glDrawBuffer(arg) +-# define GL_BACK_LEFT 0 +-# define GL_BACK_RIGHT 0 +-# define GL_FRONT_LEFT 0 +-# define GL_FRONT_RIGHT 0 ++#define glDrawBuffer(arg) ++#define GL_BACK_LEFT 0 ++#define GL_BACK_RIGHT 0 ++#define GL_FRONT_LEFT 0 ++#define GL_FRONT_RIGHT 0 + + /* this sends all the data each time as opposed to allowing a subset */ +-# define glMultiDrawElements(mode, counts, type, indicies, primcount) \ +- for (size_t eCount = 0; eCount < primcount; ++eCount) \ +- { \ +- glDrawElements(mode, *(counts + eCount), \ +- type, (GLvoid *)(indicies[eCount])); \ +- } ++#define glMultiDrawElements(mode, counts, type, indicies, primcount) \ ++ for (size_t eCount = 0; eCount < primcount; ++eCount) \ ++ { \ ++ glDrawElements(mode, *(counts + eCount), type, (GLvoid*)(indicies[eCount])); \ ++ } + #endif + + /*** deal with some GLES 3.0 specific issues ***/ + #ifdef GL_ES_VERSION_3_0 +-# define GLEW_ARB_vertex_array_object 1 +-# define GLEW_ARB_instanced_arrays 1 ++#define GLEW_ARB_vertex_array_object 1 ++#define GLEW_ARB_instanced_arrays 1 + #endif + + #endif +-- +2.27.0 + diff --git a/0001-expose-1d-texture-options.patch b/0001-expose-1d-texture-options.patch new file mode 100644 index 0000000..c0a1c42 --- /dev/null +++ b/0001-expose-1d-texture-options.patch @@ -0,0 +1,35 @@ +From 18b9e99bcc2550515e2f725f1b0c70904068c945 Mon Sep 17 00:00:00 2001 +From: Ken Martin +Date: Mon, 6 Jul 2020 10:48:40 -0400 +Subject: [PATCH] expose 1d texture options + +They are partially implemented as 2d textures +--- + Rendering/OpenGL2/vtkTextureObject.h | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/Rendering/OpenGL2/vtkTextureObject.h b/Rendering/OpenGL2/vtkTextureObject.h +index b6dcdf6ba7..fe018c75f9 100644 +--- a/Rendering/OpenGL2/vtkTextureObject.h ++++ b/Rendering/OpenGL2/vtkTextureObject.h +@@ -226,9 +226,6 @@ public: + bool CreateCubeFromRaw( + unsigned int width, unsigned int height, int numComps, int dataType, void* data[6]); + +-// 1D textures are not supported in ES 2.0 or 3.0 +-#ifndef GL_ES_VERSION_3_0 +- + /** + * Create a 1D texture using the PBO. + * Eventually we may start supporting creating a texture from subset of data +@@ -245,7 +242,6 @@ public: + * Create 1D texture from client memory + */ + bool Create1DFromRaw(unsigned int width, int numComps, int dataType, void* data); +-#endif + + /** + * Create a 2D texture using the PBO. +-- +2.27.0 + diff --git a/0002-Guard-GL_LINE_SMOOTH-for-GLES.patch b/0002-Guard-GL_LINE_SMOOTH-for-GLES.patch new file mode 100644 index 0000000..35980ba --- /dev/null +++ b/0002-Guard-GL_LINE_SMOOTH-for-GLES.patch @@ -0,0 +1,42 @@ +From f03ed2c663c30baac698d5b76a8ba4ea63776ce2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20Br=C3=BCns?= +Date: Fri, 17 Jul 2020 05:05:55 +0200 +Subject: [PATCH 2/2] Guard GL_LINE_SMOOTH for GLES + +--- + Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx +index 7b834fa6e5..cc376934dd 100644 +--- a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx ++++ b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx +@@ -332,10 +332,12 @@ void vtkOpenGLContextDevice2D::Begin(vtkViewport* viewport) + this->RenderWindow->GetShaderCache()->ReleaseCurrentShader(); + + // Enable simple line smoothing if multisampling is on. ++#ifdef GL_LINE_SMOOTH + if (this->Renderer->GetRenderWindow()->GetMultiSamples()) + { + glEnable(GL_LINE_SMOOTH); + } ++#endif + + this->InRender = true; + vtkOpenGLCheckErrorMacro("failed after Begin"); +@@ -359,10 +361,12 @@ void vtkOpenGLContextDevice2D::End() + this->Storage->RestoreGLState(ostate); + + // Disable simple line smoothing if multisampling is on. ++#ifdef GL_LINE_SMOOTH + if (this->Renderer->GetRenderWindow()->GetMultiSamples()) + { + glDisable(GL_LINE_SMOOTH); + } ++#endif + + this->PolyDataImpl->HandleEndFrame(); + +-- +2.27.0 + diff --git a/0002-Use-GL_DRAW_BUFFER0-instead-of-GL_DRAW_BUFFER-for-GL.patch b/0002-Use-GL_DRAW_BUFFER0-instead-of-GL_DRAW_BUFFER-for-GL.patch new file mode 100644 index 0000000..37252c1 --- /dev/null +++ b/0002-Use-GL_DRAW_BUFFER0-instead-of-GL_DRAW_BUFFER-for-GL.patch @@ -0,0 +1,150 @@ +From 651b3bae914b9f3c69031c97a366e5cf53ead389 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20Br=C3=BCns?= +Date: Thu, 16 Jul 2020 19:54:38 +0200 +Subject: [PATCH 2/2] Use GL_DRAW_BUFFER0 instead of GL_DRAW_BUFFER for GLES + compatibility + +ARB_draw_buffers is part of GL 2.0, so GL_DRAW_BUFFERS0 so it is always +available, and contrary to GL_DRAW_BUFFER it is also valid for GLES +(part of GLES 3 or as EXT_draw_buffers). + +This also matches the universal use of glDrawBuffers instead of +glDrawBuffer. + +At least with MESA, GL_DRAW_BUFFER and GL_DRAW_BUFFER0 always return the +same value. GL_DRAW_BUFFERn is also used in several places already. +--- + .../ContextOpenGL2/vtkOpenGLContextBufferId.cxx | 2 +- + .../vtkOpenGLContextDevice2DPrivate.h | 2 +- + .../External/vtkExternalOpenGLRenderWindow.cxx | 2 +- + Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx | 12 ++++++------ + Rendering/OpenGL2/vtkOpenGLState.cxx | 16 ++++++++-------- + 5 files changed, 17 insertions(+), 17 deletions(-) + +diff --git a/Rendering/ContextOpenGL2/vtkOpenGLContextBufferId.cxx b/Rendering/ContextOpenGL2/vtkOpenGLContextBufferId.cxx +index 06abb5e7e6..0d39638869 100644 +--- a/Rendering/ContextOpenGL2/vtkOpenGLContextBufferId.cxx ++++ b/Rendering/ContextOpenGL2/vtkOpenGLContextBufferId.cxx +@@ -139,7 +139,7 @@ vtkIdType vtkOpenGLContextBufferId::GetPickedItem(int x, int y) + // Render texture to current write buffer. Texel x,y is rendered at + // pixel x,y (instead of pixel 0,0 to work around pixel ownership test). + GLint savedDrawBuffer; +- glGetIntegerv(GL_DRAW_BUFFER, &savedDrawBuffer); ++ glGetIntegerv(GL_DRAW_BUFFER0, &savedDrawBuffer); + + vtkOpenGLState::ScopedglEnableDisable dsaver(ostate, GL_DEPTH_TEST); + vtkOpenGLState::ScopedglEnableDisable ssaver(ostate, GL_STENCIL_TEST); +diff --git a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2DPrivate.h b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2DPrivate.h +index 5632547459..17e2f182ef 100644 +--- a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2DPrivate.h ++++ b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2DPrivate.h +@@ -309,7 +309,7 @@ public: + this->SavedStencilTest = ostate->GetEnumState(GL_STENCIL_TEST); + this->SavedBlend = ostate->GetEnumState(GL_BLEND); + ostate->vtkglGetFloatv(GL_COLOR_CLEAR_VALUE, this->SavedClearColor); +- ostate->vtkglGetIntegerv(GL_DRAW_BUFFER, &this->SavedDrawBuffer); ++ ostate->vtkglGetIntegerv(GL_DRAW_BUFFER0, &this->SavedDrawBuffer); + } + } + +diff --git a/Rendering/External/vtkExternalOpenGLRenderWindow.cxx b/Rendering/External/vtkExternalOpenGLRenderWindow.cxx +index c95b50ac64..291c4e1e61 100644 +--- a/Rendering/External/vtkExternalOpenGLRenderWindow.cxx ++++ b/Rendering/External/vtkExternalOpenGLRenderWindow.cxx +@@ -60,7 +60,7 @@ void vtkExternalOpenGLRenderWindow::Start(void) + + // For stereo, render the correct eye based on the OpenGL buffer mode + GLint bufferType; +- ostate->vtkglGetIntegerv(GL_DRAW_BUFFER, &bufferType); ++ ostate->vtkglGetIntegerv(GL_DRAW_BUFFER0, &bufferType); + vtkCollectionSimpleIterator sit; + vtkRenderer* renderer; + for (this->GetRenderers()->InitTraversal(sit); +diff --git a/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx b/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx +index 4bda9330b6..14cd43711f 100644 +--- a/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx ++++ b/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx +@@ -533,8 +533,8 @@ bool vtkOpenGLRenderWindow::InitializeFromCurrentContext() + { + this->DefaultFrameBufferId = frameBufferBinding; + GLint attachment = GL_COLOR_ATTACHMENT0; +-#ifdef GL_DRAW_BUFFER +- glGetIntegerv(GL_DRAW_BUFFER, &attachment); ++#ifdef GL_DRAW_BUFFER0 ++ glGetIntegerv(GL_DRAW_BUFFER0, &attachment); + #endif + this->BackLeftBuffer = static_cast(attachment); + this->FrontLeftBuffer = static_cast(attachment); +@@ -660,8 +660,8 @@ bool vtkOpenGLRenderWindow::GetUsingSRGBColorSpace() + this->MakeCurrent(); + + GLint attachment = GL_BACK_LEFT; +-#ifdef GL_DRAW_BUFFER +- glGetIntegerv(GL_DRAW_BUFFER, &attachment); ++#ifdef GL_DRAW_BUFFER0 ++ glGetIntegerv(GL_DRAW_BUFFER0, &attachment); + #endif + // GL seems odd with its handling of left/right. + // if it says we are using GL_FRONT or GL_BACK +@@ -716,8 +716,8 @@ int vtkOpenGLRenderWindow::GetColorBufferSizes(int* rgba) + { + this->MakeCurrent(); + GLint attachment = GL_BACK_LEFT; +-#ifdef GL_DRAW_BUFFER +- glGetIntegerv(GL_DRAW_BUFFER, &attachment); ++#ifdef GL_DRAW_BUFFER0 ++ glGetIntegerv(GL_DRAW_BUFFER0, &attachment); + #endif + #ifdef GL_ES_VERSION_3_0 + // GLES only has the GL_BACK color +diff --git a/Rendering/OpenGL2/vtkOpenGLState.cxx b/Rendering/OpenGL2/vtkOpenGLState.cxx +index 3822fe7bd0..dbec8329dd 100644 +--- a/Rendering/OpenGL2/vtkOpenGLState.cxx ++++ b/Rendering/OpenGL2/vtkOpenGLState.cxx +@@ -205,8 +205,8 @@ void vtkOpenGLState::CheckState() + error = true; + } + unsigned int sval; +-#ifdef GL_DRAW_BUFFER +- ::glGetIntegerv(GL_DRAW_BUFFER, iparams); ++#ifdef GL_DRAW_BUFFER0 ++ ::glGetIntegerv(GL_DRAW_BUFFER0, iparams); + sval = this->CurrentState.DrawBinding.GetDrawBuffer(0); + if (sval == GL_BACK_LEFT) + { +@@ -518,8 +518,8 @@ void vtkOpenGLState::vtkglBindFramebuffer(unsigned int target, unsigned int val) + this->CurrentState.DrawBinding.Binding = val; + this->CurrentState.DrawBinding.Framebuffer = nullptr; + ::glBindFramebuffer(GL_DRAW_FRAMEBUFFER, val); +-#ifdef GL_DRAW_BUFFER +- ::glGetIntegerv(GL_DRAW_BUFFER, (int*)&this->CurrentState.DrawBinding.DrawBuffers[0]); ++#ifdef GL_DRAW_BUFFER0 ++ ::glGetIntegerv(GL_DRAW_BUFFER0, (int*)&this->CurrentState.DrawBinding.DrawBuffers[0]); + #endif + } + } +@@ -1222,8 +1222,8 @@ void vtkOpenGLState::Initialize(vtkOpenGLRenderWindow*) + unsigned int vals[1]; + vals[0] = this->CurrentState.DrawBinding.GetDrawBuffer(0); + ::glDrawBuffers(1, vals); +-#ifdef GL_DRAW_BUFFER +- ::glGetIntegerv(GL_DRAW_BUFFER, (int*)&this->CurrentState.DrawBinding.DrawBuffers[0]); ++#ifdef GL_DRAW_BUFFER0 ++ ::glGetIntegerv(GL_DRAW_BUFFER0, (int*)&this->CurrentState.DrawBinding.DrawBuffers[0]); + #endif + ::glReadBuffer(this->CurrentState.ReadBinding.GetReadBuffer()); + ::glGetIntegerv(GL_READ_BUFFER, (int*)&this->CurrentState.ReadBinding.ReadBuffer); +@@ -1232,8 +1232,8 @@ void vtkOpenGLState::Initialize(vtkOpenGLRenderWindow*) + void vtkOpenGLState::ResetFramebufferBindings() + { + ::glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, (int*)&this->CurrentState.DrawBinding.Binding); +-#ifdef GL_DRAW_BUFFER +- ::glGetIntegerv(GL_DRAW_BUFFER, (int*)&this->CurrentState.DrawBinding.DrawBuffers[0]); ++#ifdef GL_DRAW_BUFFER0 ++ ::glGetIntegerv(GL_DRAW_BUFFER0, (int*)&this->CurrentState.DrawBinding.DrawBuffers[0]); + #endif + + ::glGetIntegerv(GL_READ_FRAMEBUFFER_BINDING, (int*)&this->CurrentState.ReadBinding.Binding); +-- +2.27.0 + diff --git a/VTK-9.0.0.tar.gz b/VTK-9.0.0.tar.gz deleted file mode 100644 index 964a908..0000000 --- a/VTK-9.0.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:15def4e6f84d72f82386617fe595ec124dda3cbd13ea19a0dcd91583197d8715 -size 33535036 diff --git a/VTK-9.0.1.tar.gz b/VTK-9.0.1.tar.gz new file mode 100644 index 0000000..e52462f --- /dev/null +++ b/VTK-9.0.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b39a5e191c282861e7af4101eaa8585969a2de05f5646c9199a161213a622c7 +size 34687900 diff --git a/bundled_exodusii_add_missing_libpthread.patch b/bundled_exodusii_add_missing_libpthread.patch deleted file mode 100644 index 0dab21a..0000000 --- a/bundled_exodusii_add_missing_libpthread.patch +++ /dev/null @@ -1,63 +0,0 @@ -From ca02bcc844e4d268ac5060f56f10467e2579fb43 Mon Sep 17 00:00:00 2001 -From: Ben Boeckel -Date: Thu, 7 May 2020 11:36:50 -0400 -Subject: [PATCH 1/3] exodusII: also link to hdf5 directly - ---- - ThirdParty/exodusII/vtk.module | 1 + - 1 file changed, 1 insertion(+) - -Index: VTK-9.0.0/ThirdParty/exodusII/vtk.module -=================================================================== ---- VTK-9.0.0.orig/ThirdParty/exodusII/vtk.module -+++ VTK-9.0.0/ThirdParty/exodusII/vtk.module -@@ -3,5 +3,6 @@ NAME - LIBRARY_NAME - vtkexodusII - DEPENDS -+ VTK::hdf5 - VTK::netcdf - THIRD_PARTY - -From a98772f6d5f6b62c0f3ac360702b585c09bc5557 Mon Sep 17 00:00:00 2001 -From: Seacas Upstream -Date: Thu, 7 May 2020 12:22:01 -0400 -Subject: [PATCH 3/3] exodusII 2020-05-07 (2c24a120) - -Code extracted from: - - https://gitlab.kitware.com/third-party/seacas.git - -at commit 2c24a120deb77a8a2ea05462d0a60e7f9d90e58e (for/vtk-20200507-7.24f-v2019-12-18). ---- - ThirdParty/exodusII/vtkexodusII/CMakeLists.txt | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt b/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt -index 025abc43e0..d931004997 100644 ---- a/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt -+++ b/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt -@@ -297,14 +297,19 @@ set(headers - "${CMAKE_CURRENT_BINARY_DIR}/include/exodusII_cfg.h" - "${CMAKE_CURRENT_BINARY_DIR}/include/exodus_config.h") - -+vtk_module_find_package(PACKAGE Threads) -+ - vtk_module_add_module(VTK::exodusII - SOURCES ${sources} - HEADERS ${headers} - HEADERS_SUBDIR "vtkexodusII/include") --target_compile_definitions(exodusII -+vtk_module_definitions(VTK::exodusII - PRIVATE - exoIIc_EXPORTS) --target_include_directories(exodusII -+vtk_module_include(VTK::exodusII - PUBLIC - "$" - "$") -+vtk_module_link(VTK::exodusII -+ PRIVATE -+ Threads::Threads) --- -2.26.2 diff --git a/vtk-parallelgeometry-dependency.patch b/vtk-parallelgeometry-dependency.patch deleted file mode 100644 index 255c817..0000000 --- a/vtk-parallelgeometry-dependency.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: VTK-9.0.0/Filters/ParallelGeometry/vtk.module -=================================================================== ---- VTK-9.0.0.orig/Filters/ParallelGeometry/vtk.module -+++ VTK-9.0.0/Filters/ParallelGeometry/vtk.module -@@ -12,6 +12,7 @@ DEPENDS - VTK::CommonCore - VTK::CommonSystem - VTK::CommonExecutionModel -+ VTK::FiltersCore - VTK::FiltersGeometry - VTK::FiltersParallel - VTK::ParallelMPI diff --git a/vtk-qt-5.15-include-QPainterPath.patch b/vtk-qt-5.15-include-QPainterPath.patch deleted file mode 100644 index a50085b..0000000 --- a/vtk-qt-5.15-include-QPainterPath.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 797f28697d5ba50c1fa2bc5596af626a3c277826 Mon Sep 17 00:00:00 2001 -From: "Andrew J. P. Maclean" -Date: Wed, 27 May 2020 15:27:15 +1000 -Subject: [PATCH] Qt 5.15 needs the include file QPainterPath - ---- - Rendering/Qt/vtkQtLabelRenderStrategy.cxx | 1 + - Rendering/Qt/vtkQtStringToImage.cxx | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/Rendering/Qt/vtkQtLabelRenderStrategy.cxx b/Rendering/Qt/vtkQtLabelRenderStrategy.cxx -index afda585cca..eca65c64cd 100644 ---- a/Rendering/Qt/vtkQtLabelRenderStrategy.cxx -+++ b/Rendering/Qt/vtkQtLabelRenderStrategy.cxx -@@ -41,6 +41,7 @@ - #include - #include - #include -+#include - #include - #include - #include -diff --git a/Rendering/Qt/vtkQtStringToImage.cxx b/Rendering/Qt/vtkQtStringToImage.cxx -index 659c71570e..fbb9b78f05 100644 ---- a/Rendering/Qt/vtkQtStringToImage.cxx -+++ b/Rendering/Qt/vtkQtStringToImage.cxx -@@ -30,6 +30,7 @@ - #include - #include - #include -+#include - #include - #include - #include --- -2.26.2 diff --git a/vtk.changes b/vtk.changes index afc2bd4..c459d5d 100644 --- a/vtk.changes +++ b/vtk.changes @@ -1,3 +1,35 @@ +------------------------------------------------------------------- +Thu Jul 16 16:55:31 UTC 2020 - Stefan Brüns + +- Update to version 9.0.1: + * Drop obsolete patches: + + bundled_exodusii_add_missing_libpthread.patch + + vtk-parallelgeometry-dependency.patch + + vtk-qt-5.15-include-QPainterPath.patch +- Explicitly enable module RenderingContextOpenGL2 required for PCL +- Conditionally add pugixml-devel Requires in devel package +- Make devel package installable even when built without Java +- Remove CAPITALIZATION from comments +- Drop obsolete TK build dependency +- Drop unused wget build dependency +- Wrap devel-doc generation in bcond (keep defaulted to off), and + drop the essentially empty package when disabled. +- Fix build on ARM/Qt GLES: + * set VTK_OPENGL_USE_GLES + * Add 0001-clean-up-some-old-opengl-es-stuff.patch + * Add 0001-Remove-duplicate-check-for-QOpenGLFunctions_3_2_Core.patch + * Rebase 0001-Allow-compilation-on-GLES-platforms.patch + * Add 0001-Replace-last-glDrawBuffer-call-with-glDrawBuffers-1.patch + * Add 0001-Use-2D-textures-for-1D-texture-emulation-on-GLES.patch + * Add 0001-Add-missing-guard-required-for-GLES-to-disable-stere.patch + * Add 0001-Correct-GL_BACK-GL_BACK_LEFT-mapping-on-GLES.patch + * Add 0002-Use-GL_DRAW_BUFFER0-instead-of-GL_DRAW_BUFFER-for-GL.patch + * Add 0001-GL_POINT_SPRITE-is-only-available-for-Compatibility-.patch + * Add 0002-Guard-GL_LINE_SMOOTH-for-GLES.patch + * Add 0001-Guard-glPointSize-with-GL_ES_VERSION_3_0.patch +- Add 0001-Fix-PyVTKAddFile_-function-signature-mismatch.patch +- Add 0001-Replace-invalid-GL_LINE-with-GL_LINES-for-glDrawArra.patch + ------------------------------------------------------------------- Mon Jun 15 14:47:31 UTC 2020 - Andreas Schwab diff --git a/vtk.spec b/vtk.spec index 9bbea70..8df64b7 100644 --- a/vtk.spec +++ b/vtk.spec @@ -19,6 +19,7 @@ %global flavor @BUILD_FLAVOR@%{nil} %bcond_with examples +%bcond_with documentation %if 0%{?sle_version} >= 150200 %define DisOMPI1 ExclusiveArch: do_not_build @@ -27,9 +28,15 @@ %define DisOMPI3 ExclusiveArch: do_not_build %endif +%ifarch %arm aarch64 +%bcond_without gles +%else +%bcond_with gles +%endif + %define pkgname vtk -# PUGIXML, GL2PS IN LEAPS ARE TOO OLD +# pugixml and gl2ps in Leap 15.x are too old %if 0%{?suse_version} <= 1500 %bcond_with pugixml %bcond_with gl2ps @@ -38,9 +45,9 @@ %bcond_without gl2ps %endif -# PEGTL IN LEAP 15.1 IS TOO OLD (< 2.0.0) -# cmake STILL CHECKS FOR JAVAH (AND CHEATING WITH {_bindir}/true NO LONGER WORKS) -%if 0%{?suse_version} == 1500 && 0%{?sle_version} == 150100 +# pegtl in Leap 15.1 is too old (< 2.0.0) +# JAVA bindings fail to build +%if 0%{?sle_version} == 150100 %bcond_with java %bcond_with pegtl %else @@ -99,13 +106,13 @@ %define shlib %{vtklib} Name: vtk%{?my_suffix} -Version: 9.0.0 +Version: 9.0.1 Release: 0 %define series 9.0 +Summary: The Visualization Toolkit - A high level 3D visualization library # This is a variant BSD license, a cross between BSD and ZLIB. # For all intents, it has the same rights and restrictions as BSD. # http://fedoraproject.org/wiki/Licensing/BSD#VTKBSDVariant -Summary: The Visualization Toolkit - A high level 3D visualization library License: BSD-3-Clause Group: Productivity/Scientific/Other URL: https://vtk.org/ @@ -113,28 +120,40 @@ Source: https://www.vtk.org/files/release/%{series}/VTK-%{version}.tar.g # FIXME See if packaging can be tweaked to accommodate python-vtk's devel files in a devel package later # We need to use the compat conditionals here to avoid Factory's source validator from tripping up Source99: vtk-rpmlintrc -# PATCH-NEEDS-REBASE -%if 0 -# PATCH-FIX-OPENSUSE 0001-Allow-compilation-on-GLES-platforms.patch VTK issue #17113 stefan.bruens@rwth-aachen.de -- Fix building with Qt GLES builds -Patch2: 0001-Allow-compilation-on-GLES-platforms.patch -%endif # PATCH-FIX-OPENSUSE bundled_libharu_add_missing_libm.patch stefan.bruens@rwth-aachen.de -- Add missing libm for linking (gh#libharu/libharu#213) -Patch3: bundled_libharu_add_missing_libm.patch -# PATCH-FIX-UPSTREAM bundled_exodusii_add_missing_libpthread.patch stefan.bruens@rwth-aachen.de -- Add missing libm for linking (updated to upstream patch by badshah400, see https://gitlab.kitware.com/vtk/vtk/-/merge_requests/6865) -Patch4: bundled_exodusii_add_missing_libpthread.patch -# PATCH-FIX-UPSTREAM vtk-parallelgeometry-dependency.patch badshah400@gmail.com -- Fix a mistake in the dependencies for ParallelGeometry causing build failures for MPI builds -Patch5: vtk-parallelgeometry-dependency.patch -# PATCH-FIX-UPSTREAM vtk-qt-5.15-include-QPainterPath.patch badshah400@gmail.com -- Include QPainterPath to fix build failures against Qt 5.15; patch taken from upstream, see https://gitlab.kitware.com/vtk/vtk/-/merge_requests/6943 -Patch6: vtk-qt-5.15-include-QPainterPath.patch +Patch1: bundled_libharu_add_missing_libm.patch +# PATCH-FIX-UPSTREAM +Patch2: 0001-clean-up-some-old-opengl-es-stuff.patch +# PATCH-FIX-UPSTREAM +Patch3: 0001-expose-1d-texture-options.patch +# PATCH-FIX-UPSTREAM -- prep for GLES patch, VTK issue #17113 stefan.bruens@rwth-aachen.de +Patch4: 0001-Remove-duplicate-check-for-QOpenGLFunctions_3_2_Core.patch +# PATCH-FIX-UPSTREAM 0001-Allow-compilation-on-GLES-platforms.patch VTK issue #17113 stefan.bruens@rwth-aachen.de -- Fix building with Qt GLES builds +Patch5: 0001-Allow-compilation-on-GLES-platforms.patch +# PATCH-FIX-UPSTREAM -- Fix building with Qt GLES builds +Patch6: 0001-Replace-last-glDrawBuffer-call-with-glDrawBuffers-1.patch +# PATCH-FIX-OPENSUSE -- Fix building with Qt GLES builds +Patch7: 0001-Add-missing-guard-required-for-GLES-to-disable-stere.patch +# PATCH-FIX-UPSTREAM -- Fix building with Qt GLES builds +Patch8: 0001-Correct-GL_BACK-GL_BACK_LEFT-mapping-on-GLES.patch +# PATCH-FIX-UPSTREAM -- Fix building with Qt GLES builds +Patch9: 0002-Use-GL_DRAW_BUFFER0-instead-of-GL_DRAW_BUFFER-for-GL.patch +# PATCH-FIX-UPSTREAM +Patch10: 0001-GL_POINT_SPRITE-is-only-available-for-Compatibility-.patch +# PATCH-FIX-OPENSUSE -- GLES - Does no longer apply to upstream code +Patch11: 0002-Guard-GL_LINE_SMOOTH-for-GLES.patch +# PATCH-FIX-UPSTREAM +Patch12: 0001-Guard-glPointSize-with-GL_ES_VERSION_3_0.patch +# PATCH-FIX-UPSTREAM -- https://gitlab.kitware.com/vtk/vtk/-/merge_requests/7098 +Patch13: 0001-Fix-PyVTKAddFile_-function-signature-mismatch.patch +# PATCH-FIX-UPSTREAM -- https://gitlab.kitware.com/vtk/vtk/-/merge_requests/7115 +Patch14: 0001-Replace-invalid-GL_LINE-with-GL_LINES-for-glDrawArra.patch BuildRequires: R-base-devel BuildRequires: chrpath BuildRequires: cmake >= 3.4 BuildRequires: double-conversion-devel -BuildRequires: doxygen BuildRequires: fdupes BuildRequires: gcc-c++ -BuildRequires: gnuplot -BuildRequires: graphviz BuildRequires: hdf5-devel BuildRequires: libboost_graph-devel BuildRequires: libboost_graph_parallel-devel @@ -146,7 +165,6 @@ BuildRequires: python3-devel BuildRequires: python3-numpy-devel BuildRequires: python3-qt5-devel BuildRequires: utfcpp-devel -BuildRequires: wget BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5OpenGL) BuildRequires: pkgconfig(Qt5OpenGLExtensions) @@ -172,10 +190,13 @@ BuildRequires: pkgconfig(netcdf) BuildRequires: pkgconfig(proj) >= 5.0.0 BuildRequires: pkgconfig(sqlite3) BuildRequires: pkgconfig(theora) -# Still required with 8.2.x for PythonTkInter -BuildRequires: pkgconfig(tk) BuildRequires: pkgconfig(xt) BuildRequires: pkgconfig(zlib) +%if %{with documentation} +BuildRequires: doxygen +BuildRequires: gnuplot +BuildRequires: graphviz +%endif %if %{with gl2ps} BuildRequires: gl2ps-devel > 1.4.0 %endif @@ -223,9 +244,10 @@ This package provides the shared libraries for VTK. %package devel Summary: VTK header files for building C++ code -Group: Development/Libraries/C and C++ # not strictly necessary, but required by VTKs cmake files -Requires: %{name}-java = %{version} +Group: Development/Libraries/C and C++ +%{?with_java:Requires: %{name}-java = %{version}} +Requires: %{name}-qt = %{version} Requires: %{shlib} = %{version} Requires: R-core-devel Requires: cmake >= 3.4 @@ -239,7 +261,6 @@ Requires: libmysqlclient-devel Requires: libnetcdf_c++-devel Requires: libtiff-devel Requires: python3-%{name} = %{version} -Requires: python3-%{name} = %{version} Requires: utfcpp-devel %{?with_mpi:Requires: %{mpi_flavor}} %{?with_mpi:Requires: %{mpi_flavor}-devel} @@ -268,6 +289,9 @@ Requires: pkgconfig(zlib) %if %{with pegtl} Requires: pegtl-devel %endif +%if %{with pugixml} +Requires: pugixml-devel +%endif Conflicts: vtk-compat_gl-devel %description devel @@ -363,7 +387,23 @@ languages. %endif %prep -%autosetup -p1 -n VTK-%{version} +%setup -n VTK-%{version} +%patch1 -p1 +%patch2 -p1 +%if %{with gles} +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%endif +%patch13 -p1 +%patch14 -p1 # Replace relative path ../../../../VTKData with %%{_datadir}/vtkdata # otherwise it will break on symlinks. @@ -382,8 +422,9 @@ export CXX=g++ export CFLAGS="%{optflags}" export CXXFLAGS="%{optflags}" -# THE %%cmake MACRO SETS CMAKE_SKIP_RPATH=ON FOR LEAP 15.x WHICH CAUSES BUILD FAILURES +# The %%cmake macro sets CMAKE_SKIP_RPATH=ON for Leap 15.x which causes build failures # https://discourse.vtk.org/t/building-fails-generating-wrap-hierarchy-for-vtk-commoncore-unable-to-open-libvtkwrappingtools-so-1 +# -DOpenGL_GL_PREFERENCE:STRING='LEGACY' - see https://gitlab.kitware.com/vtk/vtk/-/merge_requests/6946#note_767329 %cmake \ -DCMAKE_INSTALL_PREFIX:PATH=%{my_prefix} \ -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \ @@ -392,6 +433,8 @@ export CXXFLAGS="%{optflags}" -DVTK_INSTALL_PACKAGE_DIR:PATH=%{_lib}/cmake/%{pkgname} \ -DVTK_PYTHON_OPTIONAL_LINK:BOOL=OFF \ -DVTK_BUILD_TESTING:BOOL=ON \ + -DVTK_BUILD_EXAMPLES:BOOL=%{?with_examples:ON}%{!?with_examples:OFF} \ + -DVTK_BUILD_DOCUMENTATION:BOOL=%{?with_documentation:ON}%{!?with_documentation:OFF} \ -DCMAKE_NO_BUILTIN_CHRPATH:BOOL=ON \ %if 0%{?suse_version} <= 1500 -DCMAKE_SKIP_RPATH:BOOL=OFF \ @@ -399,7 +442,8 @@ export CXXFLAGS="%{optflags}" %endif -DVTK_MODULE_ENABLE_VTK_TestingCore=WANT \ -DVTK_MODULE_ENABLE_VTK_TestingRendering=WANT \ - -DOpenGL_GL_PREFERENCE:STRING='GLVND' \ + -DVTK_MODULE_ENABLE_VTK_RenderingContextOpenGL2=YES \ + -DVTK_MODULE_ENABLE_VTK_RenderingFreeTypeFontConfig=YES \ -DVTK_CUSTOM_LIBRARY_SUFFIX="" \ -DVTK_GROUP_ENABLE_Imaging=WANT \ %if %{with mpi} @@ -414,14 +458,16 @@ export CXXFLAGS="%{optflags}" -DVTK_GROUP_ENABLE_Views=WANT \ -DVTK_PYTHON_VERSION=3 \ -DVTK_USE_OGGTHEORA_ENCODER:BOOL=ON \ + -DJava_JAVAH_EXECUTABLE=%{_bindir}/true \ -DVTK_WRAP_JAVA:BOOL=%{?with_java:ON}%{!?with_java:OFF} \ -DVTK_WRAP_PYTHON:BOOL=ON \ -DVTK_USE_EXTERNAL:BOOL=ON \ + -DOpenGL_GL_PREFERENCE:STRING='GLVND' \ + -DVTK_OPENGL_USE_GLES:BOOL=%{?with_gles:ON}%{!?with_gles:OFF} \ -DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps=%{?with_gl2ps:ON}%{!?with_gl2ps:OFF} \ -DVTK_MODULE_USE_EXTERNAL_VTK_libharu=%{?with_haru:ON}%{!?with_haru:OFF} \ -DVTK_MODULE_USE_EXTERNAL_VTK_pugixml=%{?with_pugixml:ON}%{!?with_pugixml:OFF} \ - -DVTK_MODULE_ENABLE_VTK_pegtl=%{?with_pegtl:YES}%{!?with_pegtl:NO} \ - -DVTK_INSTALL_DOC_DIR:PATH=%{_docdir}/%{name}-%{series} + -DVTK_MODULE_ENABLE_VTK_pegtl=%{?with_pegtl:YES}%{!?with_pegtl:NO} #-DVTK_EXTERNAL_LIBHARU_IS_SHARED:BOOL=OFF \ @@ -487,9 +533,9 @@ perl -pi -e's,^,%{my_bindir}/,' examples.list %endif -# MOVE LICENSES TO PROPER DOCDIR INSTEAD OF %%{my_datadir}/licenses -mkdir -p %{buildroot}%{_datadir}/licenses/%{name} -mv %{buildroot}%{my_datadir}/licenses/VTK/* %{buildroot}%{_datadir}/licenses/%{name}/ +# Move licenses to licensedir instead of %%{my_datadir}/licenses +mkdir -p %{buildroot}%{_licensedir} +mv %{buildroot}%{my_datadir}/licenses/VTK %{buildroot}%{_licensedir}/%{name} %fdupes -s %{buildroot} @@ -526,7 +572,9 @@ find %{buildroot} . -name vtk.cpython-3*.pyc -delete # drop unreproducible time- %files devel %license Copyright.txt %license %{_datadir}/licenses/%{name}/ +%if %{without gles} %{my_bindir}/vtkProbeOpenGLVersion +%endif %{my_bindir}/%{pkgname}ParseJava %{my_bindir}/%{pkgname}WrapHierarchy %{my_bindir}/%{pkgname}WrapJava @@ -542,9 +590,11 @@ find %{buildroot} . -name vtk.cpython-3*.pyc -delete # drop unreproducible time- %exclude %{my_libdir}/libvtk*Python*.so %exclude %{my_libdir}/libvtk*Qt*.so +%if %{with documentation} %files devel-doc %license Copyright.txt %{_docdir}/%{name}-%{series} +%endif %if %{with java} %files java From 54b481982f1286be379b276c21e879a456402d52370b7d8f00d758bcfb5b50fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= Date: Sat, 18 Jul 2020 22:25:29 +0000 Subject: [PATCH 2/2] Accepting request 821694 from home:StefanBruens:branches:science MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update to version 9.0.1: * Drop obsolete patches: + bundled_exodusii_add_missing_libpthread.patch + vtk-parallelgeometry-dependency.patch + vtk-qt-5.15-include-QPainterPath.patch - Explicitly enable module RenderingContextOpenGL2 required for PCL - Conditionally add pugixml-devel Requires in devel package - Make devel package installable even when built without Java - Remove CAPITALIZATION from comments - Drop obsolete TK build dependency - Drop unused wget build dependency - Wrap devel-doc generation in bcond (keep defaulted to off), and drop the essentially empty package when disabled. - Fix build on ARM/Qt GLES (boo#1172723): * set VTK_OPENGL_USE_GLES * Add 0001-clean-up-some-old-opengl-es-stuff.patch * Add 0001-expose-1d-texture-options.patch * Add 0001-Remove-duplicate-check-for-QOpenGLFunctions_3_2_Core.patch * Rebase 0001-Allow-compilation-on-GLES-platforms.patch * Add 0001-Replace-last-glDrawBuffer-call-with-glDrawBuffers-1.patch * Add 0001-Use-2D-textures-for-1D-texture-emulation-on-GLES.patch * Add 0001-Add-missing-guard-required-for-GLES-to-disable-stere.patch * Add 0001-Correct-GL_BACK-GL_BACK_LEFT-mapping-on-GLES.patch * Add 0002-Use-GL_DRAW_BUFFER0-instead-of-GL_DRAW_BUFFER-for-GL.patch * Add 0001-GL_POINT_SPRITE-is-only-available-for-Compatibility-.patch * Add 0002-Guard-GL_LINE_SMOOTH-for-GLES.patch * Add 0001-Guard-glPointSize-with-GL_ES_VERSION_3_0.patch - Add 0001-Fix-PyVTKAddFile_-function-signature-mismatch.patch - Add 0001-Replace-invalid-GL_LINE-with-GL_LINES-for-glDrawArra.patch - Drop -ffat-lto-objects to avoid wasting disk space - Update _constraints to avoid OOM errors - Add vtk-qt-5.15-include-QPainterPath.patch: Include QPainterPath to fix build failures against Qt 5.15; patch taken from upstream, see . - The %%cmake macro sets CMAKE_SKIP_RPATH=ON for Leap 15.x which causes build failures; set it to OFF and set CMAKE_SKIP_INSTALL_RPATH=ON for openSUSE <= 1500. See . - Build without pegtl for distributions where pegtl > 2.0 is unavailable (Leap 15.1). - Disable java bindings for Leap 15.1 only where cmake still searches for the javah binary (and setting it to %{_bindir}/true seems to no longer work). - Run ld post scripts for vtk-qt. - Update to version 9.0.0 * See https://discourse.vtk.org/t/vtk-9-0-0/3205. - Rebase patches still required for building: * bundled_exodusii_add_missing_libpthread.patch: Update to upstream patch (https://gitlab.kitware.com/vtk/vtk/-/merge_requests/6865). * bundled_libharu_add_missing_libm.patch - Pass VTK_PYTHON_OPTIONAL_LINK:BOOL=OFF to cmake to link against the system python library explicitly. - Add vtk-parallelgeometry-dependency.patch to fix a missing dependency for vtkparallelgeometry (see https://discourse.vtk.org/t/building-vtk-9-0-fails-when-using-mpi-support/3227). - Comment out 0001-Allow-compilation-on-GLES-platforms.patch that no longer applies and needs extensive rebasing. - Drop patches incorporated or otherwise fixed upstream: * 0001-Make-code-calling-proj4-compatible-with-proj4-5.0-an.patch * 0001-Add-libogg-to-IOMovie-target-link-libraries.patch * python38.patch * reproducible.patch - Adapt to changes in upstream's cmake script: * Replace old options by their newer versions where applicable. * Pass VTK_USE_EXTERNAL=ON to use system libraries by default except for gl2ps, haru, and pugixml. - New BuildRequires: pegtl-devel and utfcpp-devel. - No longer needed to pass Java_JAVAH_EXECUTABLE:PATH=%{_bindir}/true to cmake; script does not look for javah any more. - Use autosetup to set up and patch sources: simplifies applying changing list of patches; use an if guard to avoid patch needing rebase while not running into conflict with factory bot. - Use system gl2ps for openSUSE > 1500. - Fix serial builds broken due to disabling the building of examples; instead of commenting out sections of the specfile related to examples, use %bcond_with to disable building examples by default and the corresponding conditionals where appropriate. - add reproducible.patch to override build date and to sort entries (boo#1047218, boo#1041090) - Disable building examples to prevent vtkLocalExample.java randomly missing from vtk.jar (boo#1138295, see also upstream recommendation in https://gitlab.kitware.com/vtk/vtk/issues/17619). - Remove -DVTK_PYTHON_SITE_PACKAGES_SUFFIX silently added with the last change. As it specifies the path relative to the install prefix, setting it to the absolute python_sitearch is obviously wrong. As VTK figures out the correct path by itself, it is completely unnecessary. - Add patch to fix building with python 3.8: * python38.patch - Add openmpi3 flavor. - Disable openmpi1 for SLE/Leap 15.2, openmpi3 for SLE <= 15.1 - Adjust disk _constraints. - Drop vtk-fix-file-contains-date-time.patch, GCC honors SOURCE_DATE_EPOCH. - Drop unused netcdf-c++-devel BuildRequires. - Adapt to openmpi -> openmpi1 rename on Tumbleweed. - Spec file cleanup, remove conditionals for Leap 42.x. - Apply proj4 compatibility patch also on Leap. - Use -ffat-lto-objects when building static libraries. - Add more explicit dependencies to vtk-devel. - Add an explicit 'Requires: double-conversion-devel' for vtk-devel. The double-conversion library is mentioned in vtkdoubleconversion.cmake but isn't automatically installed. - Update to version 8.2.0 * Removed support for TCL and Qt4 * Removed all VTK_OVERRIDE, VTK_FINAL, VTK_DELETE_FUNCTION macros as C++11 is now required. * vtkAbstractArray gained support for runtime user defined free functions, allowing for custom allocator memory to be used with VTK. * The vtkGeovis classes are now deprecated. See https://blog.kitware.com/vtk-8-2-0/ for a more exhaustive list. - Packaging changes: * Python bindings for MPI flavors are now installed below the MPI prefix and thus no longer conflict with each other. To use these, the PYTHONPATH currently has to be amended manually. * Removed several devel Requires: from the devel package. This reduces the dependency chain (e.g. java-devel) for all packages building against VTK, but may require to specify some dependencies explicitly, depending on the used VTK modules and bindings. - Patch updates/additions: * Rebase vtk-fix-file-contains-date-time.patch * Rebase 0001-Allow-compilation-on-GLES-platforms.patch * Drop obsolete fix_qt5_example_cmake.patch * Add bundled_libharu_add_missing_libm.patch * Add bundled_exodusii_add_missing_libpthread.patch * Add 0001-Add-libogg-to-IOMovie-target-link-libraries.patch * Add 0001-Make-code-calling-proj4-compatible-with-proj4-5.0-an.patch - Correct names of built packages, the mpi flavors were lacking the flavor specific name infix, i.e. all flavors were named identically. - Add openmpi2 flavor - BuildRequire netcdf-{mpi_flavor}-devel for MPI flavors - Add Conflicts between flavors of python3 subpackage (all flavors install into python_sitearch). - Convert openmpi package to multibuild flavor - Use correct mpi version - openmpi currently means openmpi, and not openmpi2/3 Otherwise, VTK depends on openmpi1 (HDF5, netcdf) and openmpi2/3 (direct) - Remove several mpi BuildRequires in serial flavor - Add python3-vtk to vtk-devel Requires, same as for vtk-java/tcl - Remove empty testing subpackage - Fix path to VTK_DATA_ROOT default directory - Update to version 8.1.2 * Issue error if vtkAlgorithm::GetInputConnection called on wrong port * Added explicit cast to pacify UBSan’s “implicit-integer-truncation” * Make some orientation marker widget methods virtual * vtkImageBlend bug fix for compound mode * vtkFlyingEdges2D: Properly color multiple isocontour values * Invoke DeletePointEvent before deleting vtkSeedWidget seed * Fix compilation issue due to Python3.7 API change * Fix bug where re-enabling seed widget wouldn't move existing seeds - Fix python dependencies - Test to make sure python package is importable - Split out MPI version since the MPI version cannot be used outside an MPI environment. - Build vtkData as part of the main package. This makes sure the data is extracted into the correct format. - Drop post[un] scripts for devel and java subpackages; they are only needed for the versioned shlib. - Update to version 8.1.1: * Fixed thin border around vtkImageResliceMapper rendering * Fixed vtkImageResliceMapper showing a black polygon when slice is out of bounds. * Fixed conflict between Process.h and process.h * Fixed building VTK 8.1 against 10.13 SDK resulting in linker errors when trying to use resulting libraries on older SDK * Fixed vtkCellPicker::IntersectActorWithLine maybe using invalid cell id when picking composite data - Add fix_qt5_example_cmake.patch Fixes use of removed cmake macro in some examples See: https://gitlab.kitware.com/vtk/vtk/issues/17336 - Use modern cmake spec file macros - Run spec cleaner - Other spec file cleanups - Support parallel HDF5. - Drop support for qt4. Any version of openSUSE with a recent enough version of cmake to build the package supports Qt5. - Drop checks for old versions of openSUSE that have too old of a cmake to build. - Use split libboost*-devel BuildRequires for TW and Leap/SLE 15 - Fix build with jdk10 * give a bogus javah path "%{_bindir}/true", since the cmake checks the javah binary although the build does not use it. - Drop vtk-Rinterface-uintptr_t.patch as the related plugin has been retired. - Drop vtk-compat_gl: Building against OpenGL1 has now been deprecated with version 8.1.0, and the examples don't build against it already; so, drop all specfile and related modifications catering to OpenGL1 bindings. - Update to version 8.1.0: * Full release notes at https://blog.kitware.com/vtk-8-1-0/. - Turn OFF building against system libharu, since libharu upstream seems dead, while vtk's included libharu has new features essential for building vtk 8.1. Drop BuildRequires on libharu. - Does not build against java 10, so ensure at most java 9 is used by using appropriate versioning for java-devel BuildRequires. - Drop cmake options no longer used for build. - Drop VERBOSE=1 for make: it makes the compilation too verbose making brp checks for code warnings too slow to execute; this reduces build time by nearly half. - Enforce Qt4 for openSUSE <= 1320 explicitly because Qt5 is now the default option. - Move BuildRequires: libQtWebKit-devel (Qt4) inside the else version < 13.2 - Add conflict between the -devel-doc variants. - Setup MPI environment before building. - Rectify RPM groups again. - Move the vtk binary to the tcl subpackage, it is an interactive TCL shell, and depends on the TCL bindings. It can be used standalone from the devel package. Dito for its MPI variant, i.e. the pvtk binary. - Move all libvtk*Java.so to the java subpackage. These are part of the Java bindings, i.e. runtime dependencies. Otherwise, the java subpacakge depends on the devel subpackage. - Add the tcl and java subpackage to the devel requires again. Although not stricly necessary until building java or tcl packages, the cmake files have a hard dependency on several build artifacts provided by the tcl and java subpackages. Split devel packages for the bindings would be preferred, but this is not supported by the upstream build system. - Remove the openmpi-devel requires in the python subpackage, the mpi runtime libraries are provided by openmpi-libs, which is picked up automatically. - Split the API documentation from the development subpackage. The documentation amounts to almost 1 GByte of data, not necessary when just building packages. - Drop vtk-compat_gl-rpmlintrc: openSUSE:Factory bots don't accept conditional sources and one rpmlintrc file is sufficient for both main and linked packages anyway. - do not exclude libViewsGeovisJava.so from devel package This library is required for development. - package vtk binary in devel package. - VTKTargets-debug.cmake tests for the existance of the library (line 3394) and the binary (line 3404) and causes an error if the files do not exist - Remove the various subpackage Requires from the devel package again. The qt subpackage contains a Qt Designer plugin and no dependency at all. Package the vtkWrap{Tcl,Java,Python} wrapper generators in the devel package, as these are useless without the vtk headers files. - Fix description/summary of vtk-qt subpackage - devel subpackage should require -tcl, -java and -qt subpackages since the *.cmake files refer to files in those subpackages - Add 0001-Allow-compilation-on-GLES-platforms.patch The QOpenGLFunctions_3_2_Core class providing the framebuffer blit functions is not available on GLES 2 builds of Qt5. Let Qt handle the framebuffer blit, and just use the GLES/GL subset provided by QOpenGLFunctions for the remainder. Fix for https://gitlab.kitware.com/vtk/vtk/issues/17113 - Update to version 8.0.1: * Fix QVTKOpenGLWidget rendering issues on Windows machines with certain Intel graphics chips. This was a significant issue that broke all rendering and resulted in a black screen. * Fix data array range caching per finite component which would otherwise cause considerable slow-downs when using data arrays. * Fix button and slider widgets to work in multi-viewport render windows. Without this change the widgets would either be placed in the wrong viewport or be non-interactive completely. * Fix image XY sampling in the volume mapper when depth peeling is enabled. * Fix z-fighting issues with dual depth peeling between two layers of geometry that are too close. * Fix crash when reparenting the QVTKWidget to a different window. The application would crash due to lack of OpenGL resources for the reparented widget. - Suppress romlint error about shlib-policy-name-error for %{name}-java -- libvtkViewsGeovisJava.so packaged therein is not a versioned shared lib, and only used by vtk's java bindings, so there is no point in enforcing the shared lib packaging policy for this subpackage. - Move libvtkViewsGeovisJava.so to the %{name}-java subpackage, this is not really a devel file. - Fix RPM groups. Use POSIX-compliant find call. - Implement shared library packaging policy for vtk: + Rename %{name} to %{shlib}. + Move all shared library objects to %{shlib} package. + Remove no longer needed Requires from %{name}-devel package; e.g.: %{name}-java contains the java binaries and jar object now, and no longer the lib*Java.so file which has been moved into %{shlib}. + Adapt conflicts for vtk-compat_gl accordingly. + Install libraries to /usr/lib(64) instead of /usr/lib(64)/vtk. + Do away with python3-%{name}-qt subpackage and Obsolete/Provide it from %{shlib} as it only contained a shared lib object. - Use system mpi4py; add BuildRequires on python3-mpi4py. - liblz4 >= 1.7.3 now required (since version 8.0); adapt BuildRequires accordingly. - Trim descriptions and rectify RPM groups. - add liblz4-devel and libharu-devel also to Requires of devel package (fixes linking errors in other packages) - Update to version 8.0.0: * Read about changes here: https://blog.kitware.com/vtk-8-0-0/ * API changes: http://www.vtk.org/Wiki/VTK/API_Changes_7_1_0_to_8_0_0 - Add BuildRequires on liblz4-devel, libharu-devel, mandatory requirements for version 8.0.0. - Run make DoxygenDoc to generate documentation. - add a separate package vtk-compat_gl compile using rendering backend OpenGL for systems without brand new graphic cards - default package vtk still uses new rendering backend default OpenGL2 - Update to version 7.1.0: See news item at https://blog.kitware.com/kitware-plans-to-spotlight-new-vtk-and-paraview-releases-at-sc16/ - Drop patch vtk-gcc6.patch, upstreamed. - Turn off usage of system DIY2, this library is not yet packaged for openSUSE. - Disable mkg3states binary also for openSUSE:Leap versions. - Update file list for upstream installation changes. - Use bundled gl2ps, as it no longer builds against the system one (requires svn trunk version of gl2ps). - CMake >= 3.4 is now required (earlier versions don't support NAMES_PER_DIR in find_program). - Enable use of SYSTEM_LIBRARIES for openSUSE:Leap versions too (only 13.2 requires this turned off as of now). - Refresh vtk-Rinterface-uintptr_t.patch to fix further issues with uintptr_t redefinition by defining the HAVE_UINTPTR_T macro using cmake functions; removing the #include of stdint.h is not needed any more since we will not be using the defs from Rinterface.h anyway (boo#985386). Although this really causes a build failure for the i586 arch, where the redefinition of unitptr_t in Rinterface.h conflicts with the stdint.h defintion, the patch is applied generally because the redefinition is not needed in any case. Patch sent upstream. - Add freetype2-devel as a Requires for vtk-devel. - Apply vtk-gcc6.patch also to python-vtk. - Fixed RPATH error for Factory by passing the option CMAKE_NO_BUILTIN_CHRPATH:BOOL=ON to cmake. - add vtk-gcc6.patch: Fix build with gcc 6 - skip RPATH setting - openmpi-libs will be installed with openmpi-devel if necessary. No such package on openSUSE 13.1. - Add disk constraints - Update to version 7.0.0: + See https://blog.kitware.com/vtk-7-0-0/ for a detailed article describing all the changes in this version. - Add vtk-Rinterface-uintptr_t.patch to fix building: uintptr_t is already defined in the R headers, uintptr_t definition in conflicts with the R definition and causes builds to fail. This patch fixes the problem by commenting out the call to include stdint.h (it was only being used for this solitary symbol). - Use python 3 for building, rename python- subpackages accordingly to python3-. - Update file lists in accordance with added/dropped binaries upstream; affects vtk-examples, vtk-devel. - Drop conditionals referencing outdated openSUSE version 12.3. - Update rpmlintrc file to suppress rpmlint warnings for "no-manual-page-for-binary": upstream does not supply manuals for its binaries and does not plan to. - vtkdata should be a Recommends for vtk-examples, not Requires. - Update to version 6.3.0: - See list of changes at http://www.vtk.org/Bug/changelog_page.php?version_id=118 or blog post at http://www.kitware.com/blog/home/post/963. - python-vtk also needs openmpi-devel at runtime. - python-vtk should have Requires on openmpi-libs to enable its parallelized modules to work. - use qt5 for factory - Add libxml2-devel/netcdf-devel/libnetcdf_c++-devel Requires to vtk-devel - Add jsoncpp-devel Requires to vtk-devel (for openSUSE > 13.2): vtkjsoncpp.cmake has set(vtkjsoncpp_LIBRARIES "/usr/lib64/libjsoncpp.so"). - Update to version 6.2.0: + See http://www.kitware.com/blog/home/post/858 for a list of changes. - Drop patches incorporated upstream: + vtk-install-missing-modules.patch + vtk-Mesa10.3-build-failures.patch + vtk-system.patch. - Update filelist to incorporate new files installed by upstream. - Use system hdf5 and netcdf on all openSUSE versions. - Build on openSUSE > 13.2 with system libraries ON (except for libproj4); all required depndencies for this purpose are now in Factory. - Add rpmlintrc file to suppress "devel-files-in-non-devel-package" warning; python-vtk needs these devel files for its own functioning. - Add MPI support - Add vtk-Mesa10.3-build-failures.patch to workaround build failures when compiling against Mesa >= 10.3; patch taken from upstream git and rebased; applied only for openSUSE >= 13.2. - Update to version 6.1.0: + See http://www.kitware.com/news/home/browse/502 for a list of changes - Rebase patches: + vtk-system.patch + vtk-install-missing-modules.patch - Packaging changes: + Re-enable R bindings for 13.1 and above + Turn off building test modules for now as it leads to build issues (DBUILD_TESTING:BOOL=OFF) + Turn off usage of system libraries for now (DVTK_USE_SYSTEM_LIBRARIES:BOOL=OFF), as usage of system libraries now introduces dependency on json-cpp which is not available for openSUSE (yet) + Python modules are now installed by vtk's cmake script; hence, pass system python dirs to cmake by using cmake variable DVTK_INSTALL_PYTHON_MODULE_DIR instead of DVTK_PYTHON_SETUP_ARGS used previously + vtkpython is now installed by cmake script automatically; hence remove the manual copying to /usr/bin used earlier + Python libraries are now stripped automatically on install; chrpath no longer needed on these + Python object files are now installed in %python_sitearch + Skip examples no longer installed as a result of test modules being turned off + Install new binaries (mkg3states) and bundled data files (/usr/share/vtk-6.1) + Cleanup spec file: - Remove support for EOL openSUSE versions (12.1 and earlier) by dropping appropriate conditionals - Fix minor formatting issues. - Disable R bindings for Factory, since it causes weird build failures in openSUSE:Factory, (strangely no failures in devel project) until the reason behind the failure is found and fixed. - Update to version 6.0.0: + Lengthy list of changes, see http://www.kitware.com/blog/home/post/515 for a summary - Also build R language bindings, introduces dependency on R-base - Drop patches for already being incorporated upstream: + vtk-pythondestdir.patch + vtk-sqldatabaseschema.patch + vtk-soversion2.patch - Rebase patches for updated version: + vtk-fix-file-contains-date-time.patch + vtk-system.patch - Add vtk-install-missing-modules.patch to install cmake modules missed by the upstream packaging, will be required esp. when we will be able to use the system installed vtk to build paraview in the future; patch taken from Fedora - Remove unused cmake variables during configuration - Install all examples (several more added in current version) - Install vtk.conf file in /etc/ld.so.conf.d to enable vtk find its libraries - Testing binaries are no longer installed separately. - Update to version 5.10.1: + Fix netCDF symbol mangling, which allows applications to use an external netCDF library and VTK's internal copy simultaneously + Fixes for STL and SLC readers that prevent crashes and file handle resource exhaustion + Fix compilation on FreeBSD operating system + A handful of fixes in VTK's Qt interface kit + Fixes for interpreted language wrapping including a bug which prevented java wrapping of VTK on power PC macs, and compatibility with Tcl 8.6 - Add vtk-fix-file-contains-date-time.patch to fix rpmlint warning about a packaged file containing DATE and TIME. - build python-qt and java binding for openSUSE version higher than 11.2 which fixes build on SLE 11 - Update to version 5.10.0: See http://www.kitware.com/news/home/browse/408 for a detailed list of changes - Dropped patches: + vtk-boost149.patch: implemented upstream - Patch vtk-sqldatabaseschema.patch now only required for openSUSE 11.4 - Minor rebasing of existing patches so they apply cleanly - No longer use verbose make. - Remove openmotif dependency - Use the gl2ps and hdf5 system libraries for building in openSUSE > 12.1. - Updated Mesa and XOrg dependencies for openSUSE > 12.1. - Removed the following dependencies which are not needed: MesaGLw-devel, freeglut-devel, gcc-java, libgcj-devel and sqlite3-devel. - Removed postgresql-devel dependency (wasn't enabled and fails to compile anyway - added a note about it). - Removed build time references so build-compare can do its work. - Compile the package out-of-source. - Use the generic "VTK_USE_SYSTEM_LIBRARIES" cmake variable for enabling the use of system libraries instead of doing it with a per package variable. - Fix compilation with boost 1.49 and enable boost again - Cleaned up spec file formatting - Build and package python-qt (python-sip) bindings - Link libraries to library directory instead of moving them to avoid breaking the find vtk cmake macro - Force enable of various additional optional components - Removed redundant packages (readme and logo) from backends - Make the devel package depend on the backends, since it does not work properly without them - Disable boost building on factory due to an icompatibility with boosswt 1.4.9+. See http://vtk.org/Bug/view.php?id=12988 - Reverted the source file change since it didn't work - Changed the license text a little - Switched to approved license text (fix for RPMLINT warning) - Escaped some macros in comments (fix for RPMLINT warnings) - Made the source file a tiny bit easier to use - updated to 5.8.0 - removed patches: * vtk-Balloon-Representation.patch (applied in upstream) * vtk-gcc43.patch (applied in upstream) * vtk-gcc46.patch (applied in upstream) * vtk-libpng14.patch (applied in upstream) * vtk-python27-compat.patch (applied in upstream) * vtk-soversion.patch (applied in upstream) * vtk-string-length.patch (not needed anymore) * vtk-testcxxjavaremove.patch (applied in upstream) - Add explicit libQtWebKit-devel BuildRequires to fix build failures on openSUSE 11.3 - Make description of sub-package vtk-qt more detailed - Spec file clean up - fix the missing soname for libVTKnetcdf_cxx - Fix the broken vtk-qt package - Fix dependencies for openSUSE 11.2 and SLE 11 - Fix build problems with openSUSE 11.4 - Restored vtk-string-length.patch to solve buffer overflow errors during string copy operations - Added vtk-sqldatabaseschema.patch (from upstream) to fix compilation errors with python enabled - Update to version 5.6.1, rebase existing patches and remove unnecessary ones - Add vtk-python2.7-compat.patch to fix build problems with python 2.7 - Add vtk-gcc4.3.patch to fix building issues with gcc 4.3 ------------------------------------------------------------------ - Extended buffer size in VTK/Utilities/kwsys/SystemInformation.cxx OBS-URL: https://build.opensuse.org/request/show/821694 OBS-URL: https://build.opensuse.org/package/show/science/vtk?expand=0&rev=165 --- vtk.changes | 3 ++- vtk.spec | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/vtk.changes b/vtk.changes index c459d5d..b0f7651 100644 --- a/vtk.changes +++ b/vtk.changes @@ -14,9 +14,10 @@ Thu Jul 16 16:55:31 UTC 2020 - Stefan Brüns - Drop unused wget build dependency - Wrap devel-doc generation in bcond (keep defaulted to off), and drop the essentially empty package when disabled. -- Fix build on ARM/Qt GLES: +- Fix build on ARM/Qt GLES (boo#1172723): * set VTK_OPENGL_USE_GLES * Add 0001-clean-up-some-old-opengl-es-stuff.patch + * Add 0001-expose-1d-texture-options.patch * Add 0001-Remove-duplicate-check-for-QOpenGLFunctions_3_2_Core.patch * Rebase 0001-Allow-compilation-on-GLES-platforms.patch * Add 0001-Replace-last-glDrawBuffer-call-with-glDrawBuffers-1.patch diff --git a/vtk.spec b/vtk.spec index 8df64b7..a9a0aed 100644 --- a/vtk.spec +++ b/vtk.spec @@ -390,8 +390,8 @@ languages. %setup -n VTK-%{version} %patch1 -p1 %patch2 -p1 -%if %{with gles} %patch3 -p1 +%if %{with gles} %patch4 -p1 %patch5 -p1 %patch6 -p1