Hello community, here is the log from the commit of package QCSXCAD for openSUSE:Factory checked in at 2020-10-16 16:14:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/QCSXCAD (Old) and /work/SRC/openSUSE:Factory/.QCSXCAD.new.3486 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "QCSXCAD" Fri Oct 16 16:14:08 2020 rev:9 rq:841928 version:0.6.2 Changes: -------- --- /work/SRC/openSUSE:Factory/QCSXCAD/QCSXCAD.changes 2019-04-04 12:08:55.113354431 +0200 +++ /work/SRC/openSUSE:Factory/.QCSXCAD.new.3486/QCSXCAD.changes 2020-10-16 16:14:16.656690660 +0200 @@ -1,0 +2,9 @@ +Thu Oct 15 11:40:53 UTC 2020 - Stefan BrĂ¼ns <stefan.bru...@rwth-aachen.de> + +- Add some patches to fix compilation with VTK 9.x: + * 0001-vtk-use-QVTKOpenGLWidget-for-vtk-8.patch + * 0001-vtk-fix-changes-for-vtk-8.x.patch + * 0001-Remove-leftover-QVTKWidget-include-fix-for-VTK-9.patch + * Update QCSXCAD-vtk.patch + +------------------------------------------------------------------- New: ---- 0001-Remove-leftover-QVTKWidget-include-fix-for-VTK-9.patch 0001-vtk-fix-changes-for-vtk-8.x.patch 0001-vtk-use-QVTKOpenGLWidget-for-vtk-8.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ QCSXCAD.spec ++++++ --- /var/tmp/diff_new_pack.m6X4Ps/_old 2020-10-16 16:14:18.672691278 +0200 +++ /var/tmp/diff_new_pack.m6X4Ps/_new 2020-10-16 16:14:18.676691280 +0200 @@ -1,7 +1,7 @@ # # spec file for package QCSXCAD # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ Summary: Qt-GUI for CSXCAD library License: LGPL-3.0-or-later Group: Productivity/Graphics/CAD -Url: http://openems.de +URL: https://openems.de Source0: https://github.com/thliebig/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz # PATCH-FIX-OPENSUSE qt5_use_modules.diff -- qt5_use_modules has been deprecated and removed Patch0: qt5_use_modules.diff @@ -32,6 +32,12 @@ Patch1: QCSXCAD-no-build-date.patch # PATCH-FIX-OPENSUSE QCSXCAD-vtk.patch -- Avoid pulling in unneeded VTK modules Patch2: QCSXCAD-vtk.patch +# PATCH-FIX-UPSTREAM +Patch3: 0001-vtk-use-QVTKOpenGLWidget-for-vtk-8.patch +# PATCH-FIX-UPSTREAM +Patch4: 0001-vtk-fix-changes-for-vtk-8.x.patch +# PATCH-FIX-OPENSUSE +Patch5: 0001-Remove-leftover-QVTKWidget-include-fix-for-VTK-9.patch BuildRequires: CSXCAD-devel BuildRequires: cmake BuildRequires: double-conversion-devel @@ -39,14 +45,15 @@ BuildRequires: lzma-devel BuildRequires: tinyxml-devel BuildRequires: vtk-devel +BuildRequires: vtk-qt BuildRequires: cmake(Qt5Sql) BuildRequires: cmake(Qt5Widgets) BuildRequires: cmake(Qt5Xml) +BuildRequires: pkgconfig(eigen3) BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(python3) BuildRequires: pkgconfig(sm) BuildRequires: pkgconfig(xt) -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description A Qt-GUI for the CSXCAD library. @@ -70,14 +77,11 @@ applications that use %{name}. %prep -%setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 +%autosetup -p1 %build %cmake -make %{?_smp_mflags} +%cmake_build %install %cmake_install @@ -87,13 +91,11 @@ %postun -n %{libname} -p /sbin/ldconfig %files -n %{libname} -%defattr(-,root,root,-) %license COPYING %doc NEWS README %{_libdir}/lib%{name}.so.* %files devel -%defattr(-,root,root,-) %{_libdir}/lib%{name}.so %{_includedir}/%{name}/ ++++++ 0001-Remove-leftover-QVTKWidget-include-fix-for-VTK-9.patch ++++++ >From 6c8d2faa73571e41d49b609b1406dec1e6a0fe8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bru...@rwth-aachen.de> Date: Thu, 15 Oct 2020 13:48:37 +0200 Subject: [PATCH] Remove leftover QVTKWidget include, fix for VTK 9 QVTKWidget has been removed finally in VTK 9, but as it is not used directly in QCSXAPP it can be removed there. Everywhere else, use QVTKOpenGLWidget/QVTKOpenGLStereoWidget. --- QCSXCAD.cpp | 1 - QVTKStructure.cpp | 10 ++++++++-- QVTKStructure.h | 8 ++++++-- export_pov.cpp | 22 ++++++++++++++++++++-- export_x3d.cpp | 16 ++++++++++++++-- 5 files changed, 48 insertions(+), 9 deletions(-) diff --git a/QCSXCAD.cpp b/QCSXCAD.cpp index 4cd4a74..a7450c6 100644 --- a/QCSXCAD.cpp +++ b/QCSXCAD.cpp @@ -58,7 +58,6 @@ #include "CSPrimWire.h" #include "CSPrimUserDefined.h" -#include <QVTKWidget.h> #include <vtkRendererCollection.h> #include <vtkRenderWindow.h> #include <vtkRenderer.h> diff --git a/QVTKStructure.cpp b/QVTKStructure.cpp index 1c9b539..1a6dff5 100644 --- a/QVTKStructure.cpp +++ b/QVTKStructure.cpp @@ -20,7 +20,10 @@ #include "QVTKStructure.h" #include "vtkCommand.h" -#if VTK_MAJOR_VERSION>=8 +#if VTK_MAJOR_VERSION>=9 + #include "QVTKOpenGLStereoWidget.h" + #include "vtkGenericOpenGLRenderWindow.h" +#elif VTK_MAJOR_VERSION==8 #include "QVTKOpenGLWidget.h" #include "vtkGenericOpenGLRenderWindow.h" #else @@ -99,7 +102,10 @@ QVTKStructure::QVTKStructure() iResolution=32; AllowUpdate=true; -#if VTK_MAJOR_VERSION>=8 +#if VTK_MAJOR_VERSION>=9 + VTKWidget = new QVTKOpenGLStereoWidget(); + VTKWidget->setRenderWindow(vtkGenericOpenGLRenderWindow::New()); +#elif VTK_MAJOR_VERSION==8 VTKWidget = new QVTKOpenGLWidget(); VTKWidget->SetRenderWindow(vtkGenericOpenGLRenderWindow::New()); #else diff --git a/QVTKStructure.h b/QVTKStructure.h index 6719711..4b0dd5e 100644 --- a/QVTKStructure.h +++ b/QVTKStructure.h @@ -21,7 +21,9 @@ #include <QtGui> #include "vtkCommand.h" -#if VTK_MAJOR_VERSION>=8 +#if VTK_MAJOR_VERSION>=9 + class QVTKOpenGLStereoWidget; +#elif VTK_MAJOR_VERSION==8 class QVTKOpenGLWidget; #else class QVTKWidget; @@ -100,7 +102,9 @@ protected: unsigned int uID; } VTKLayerStruct; -#if VTK_MAJOR_VERSION>=8 +#if VTK_MAJOR_VERSION>=9 + QVTKOpenGLStereoWidget *VTKWidget; +#elif VTK_MAJOR_VERSION==8 QVTKOpenGLWidget *VTKWidget; #else QVTKWidget *VTKWidget; diff --git a/export_pov.cpp b/export_pov.cpp index 07f6fb5..30c0943 100644 --- a/export_pov.cpp +++ b/export_pov.cpp @@ -18,7 +18,14 @@ #include <QMessageBox> #include <QtXml> -#include <QVTKWidget.h> +#include "QVTKStructure.h" +#if VTK_MAJOR_VERSION>=9 + #include "QVTKOpenGLStereoWidget.h" +#elif VTK_MAJOR_VERSION==8 + #include "QVTKOpenGLWidget.h" +#else + #include "QVTKWidget.h" +#endif #include <vtkRendererCollection.h> #include <vtkRenderWindow.h> #include <vtkRenderer.h> @@ -33,7 +40,6 @@ #include "CSPrimCurve.h" #include "CSPrimWire.h" -#include "QVTKStructure.h" #include "QCSXCAD.h" #include "export_pov.h" @@ -201,7 +207,13 @@ void export_pov::export_wire( QTextStream &stream, size_t count, double *array, QString export_pov::get_camera() { +#if VTK_MAJOR_VERSION>=9 + vtkRendererCollection* collection = ((QVTKOpenGLStereoWidget*)(m_CSX->StructureVTK->GetVTKWidget()))->renderWindow()->GetRenderers(); +#elif VTK_MAJOR_VERSION==8 + vtkRendererCollection* collection = ((QVTKOpenGLWidget*)(m_CSX->StructureVTK->GetVTKWidget()))->GetRenderWindow()->GetRenderers(); +#else vtkRendererCollection* collection = ((QVTKWidget*)(m_CSX->StructureVTK->GetVTKWidget()))->GetRenderWindow()->GetRenderers(); +#endif vtkRenderer *r = collection->GetFirstRenderer(); if (!r) return QString(); @@ -231,7 +243,13 @@ QString export_pov::get_camera() QString export_pov::get_light() { +#if VTK_MAJOR_VERSION>=9 + vtkRendererCollection* collection = ((QVTKOpenGLStereoWidget*)(m_CSX->StructureVTK->GetVTKWidget()))->renderWindow()->GetRenderers(); +#elif VTK_MAJOR_VERSION==8 + vtkRendererCollection* collection = ((QVTKOpenGLWidget*)(m_CSX->StructureVTK->GetVTKWidget()))->GetRenderWindow()->GetRenderers(); +#else vtkRendererCollection* collection = ((QVTKWidget*)(m_CSX->StructureVTK->GetVTKWidget()))->GetRenderWindow()->GetRenderers(); +#endif vtkRenderer *r = collection->GetFirstRenderer(); if (!r) return QString(); diff --git a/export_x3d.cpp b/export_x3d.cpp index 347463d..802d974 100644 --- a/export_x3d.cpp +++ b/export_x3d.cpp @@ -17,7 +17,14 @@ #include <QMessageBox> -#include <QVTKWidget.h> +#include "QVTKStructure.h" +#if VTK_MAJOR_VERSION>=9 + #include "QVTKOpenGLStereoWidget.h" +#elif VTK_MAJOR_VERSION==8 + #include "QVTKOpenGLWidget.h" +#else + #include "QVTKWidget.h" +#endif #include <vtkRendererCollection.h> #include <vtkRenderWindow.h> #include <vtkRenderer.h> @@ -29,7 +36,6 @@ #include "CSPrimBox.h" #include "CSPrimPolygon.h" -#include "QVTKStructure.h" #include "QCSXCAD.h" #include "export_x3d.h" @@ -70,7 +76,13 @@ void export_X3D::save( QString filename ) export_properties( Scene, properties, Material ); // create camera +#if VTK_MAJOR_VERSION>=9 + vtkRendererCollection* collection = ((QVTKOpenGLStereoWidget*)(m_CSX->StructureVTK->GetVTKWidget()))->renderWindow()->GetRenderers(); +#elif VTK_MAJOR_VERSION==8 + vtkRendererCollection* collection = ((QVTKOpenGLWidget*)(m_CSX->StructureVTK->GetVTKWidget()))->GetRenderWindow()->GetRenderers(); +#else vtkRendererCollection* collection = ((QVTKWidget*)(m_CSX->StructureVTK->GetVTKWidget()))->GetRenderWindow()->GetRenderers(); +#endif vtkRenderer *r = collection->GetFirstRenderer(); if (!r) return; -- 2.28.0 ++++++ 0001-vtk-fix-changes-for-vtk-8.x.patch ++++++ >From 3d301074593bde36ed43044e87864f6796aedb24 Mon Sep 17 00:00:00 2001 From: Thorsten Liebig <thorsten.lie...@gmx.de> Date: Wed, 26 Dec 2018 23:25:53 +0100 Subject: [PATCH] vtk: fix changes for vtk 8.x Signed-off-by: Thorsten Liebig <thorsten.lie...@gmx.de> --- QVTKStructure.cpp | 10 +++++----- QVTKStructure.h | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/QVTKStructure.cpp b/QVTKStructure.cpp index 1ddf2c8..7394bd9 100644 --- a/QVTKStructure.cpp +++ b/QVTKStructure.cpp @@ -19,11 +19,13 @@ #include "QVTKStructure.h" +#include "vtkCommand.h" #if VTK_MAJOR_VERSION>=8 #include "QVTKOpenGLWidget.h" #include "vtkGenericOpenGLRenderWindow.h" #else - #include "QVTKWidget.h" + #include "QVTKWidget.h" + #endif #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" @@ -55,7 +57,6 @@ #include "vtkDoubleArray.h" #include "vtkActorCollection.h" #include "vtkInteractorStyle.h" -#include "vtkCommand.h" #include "vtkCallbackCommand.h" #include "vtkWindowToImageFilter.h" #include "vtkPNGWriter.h" @@ -99,9 +100,8 @@ QVTKStructure::QVTKStructure() AllowUpdate=true; #if VTK_MAJOR_VERSION>=8 - VTKWidget= new QVTKOpenGLWidget(); - vtkNew<vtkGenericOpenGLRenderWindow> renderWindow; - VTKWidget->SetRenderWindow(renderWindow); + VTKWidget = new QVTKOpenGLWidget(); + VTKWidget->SetRenderWindow(vtkGenericOpenGLRenderWindow::New()); #else VTKWidget= new QVTKWidget(); #endif diff --git a/QVTKStructure.h b/QVTKStructure.h index 3a0cb4e..6719711 100644 --- a/QVTKStructure.h +++ b/QVTKStructure.h @@ -20,6 +20,7 @@ #include <QtGui> +#include "vtkCommand.h" #if VTK_MAJOR_VERSION>=8 class QVTKOpenGLWidget; #else -- 2.28.0 ++++++ 0001-vtk-use-QVTKOpenGLWidget-for-vtk-8.patch ++++++ >From 56149e537115275f7bbceead1853c8e11217ae40 Mon Sep 17 00:00:00 2001 From: Thorsten Liebig <thorsten.lie...@gmx.de> Date: Wed, 26 Dec 2018 22:51:17 +0100 Subject: [PATCH] vtk: use QVTKOpenGLWidget for vtk>=8 Signed-off-by: Thorsten Liebig <thorsten.lie...@gmx.de> --- QVTKStructure.cpp | 13 ++++++++++++- QVTKStructure.h | 10 +++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/QVTKStructure.cpp b/QVTKStructure.cpp index 9482dde..1ddf2c8 100644 --- a/QVTKStructure.cpp +++ b/QVTKStructure.cpp @@ -19,7 +19,12 @@ #include "QVTKStructure.h" -#include "QVTKWidget.h" +#if VTK_MAJOR_VERSION>=8 + #include "QVTKOpenGLWidget.h" + #include "vtkGenericOpenGLRenderWindow.h" +#else + #include "QVTKWidget.h" +#endif #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" #include "vtkRenderer.h" @@ -93,7 +98,13 @@ QVTKStructure::QVTKStructure() iResolution=32; AllowUpdate=true; +#if VTK_MAJOR_VERSION>=8 + VTKWidget= new QVTKOpenGLWidget(); + vtkNew<vtkGenericOpenGLRenderWindow> renderWindow; + VTKWidget->SetRenderWindow(renderWindow); +#else VTKWidget= new QVTKWidget(); +#endif ren = vtkRenderer::New(); VTKWidget->GetRenderWindow()->AddRenderer(ren); diff --git a/QVTKStructure.h b/QVTKStructure.h index 2809e8a..3a0cb4e 100644 --- a/QVTKStructure.h +++ b/QVTKStructure.h @@ -20,7 +20,11 @@ #include <QtGui> -class QVTKWidget; +#if VTK_MAJOR_VERSION>=8 + class QVTKOpenGLWidget; +#else + class QVTKWidget; +#endif class vtkRenderWindow; class vtkRenderWindowInteractor; class vtkRenderer; @@ -95,7 +99,11 @@ protected: unsigned int uID; } VTKLayerStruct; +#if VTK_MAJOR_VERSION>=8 + QVTKOpenGLWidget *VTKWidget; +#else QVTKWidget *VTKWidget; +#endif //set to false if this widget is hidden bool AllowUpdate; -- 2.28.0 ++++++ QCSXCAD-vtk.patch ++++++ --- /var/tmp/diff_new_pack.m6X4Ps/_old 2020-10-16 16:14:18.740691299 +0200 +++ /var/tmp/diff_new_pack.m6X4Ps/_new 2020-10-16 16:14:18.740691299 +0200 @@ -1,15 +1,29 @@ --- a/CMakeLists.txt 2018-12-14 23:45:50.112002905 +0100 +++ b/CMakeLists.txt 2018-12-15 00:01:35.322874327 +0100 -@@ -98,8 +98,11 @@ +@@ -98,8 +98,16 @@ if (WIN32) find_package(VTK 6.1 REQUIRED) else() -+ find_package(VTK COMPONENTS vtkGUISupportQt vtkRenderingLOD vtkIOGeometry vtkIOXML vtkIOPLY vtkIOImage vtkInteractionWidgets NO_MODULE) ++ find_package(VTK COMPONENTS GUISupportQt RenderingLOD IOGeometry IOXML IOPLY IOImage InteractionWidgets InteractionStyle FiltersModeling FiltersGeometry RenderingAnnotation RenderingFreeType NO_MODULE) ++ IF (NOT ${VTK_FOUND}) ++ find_package(VTK COMPONENTS vtkGUISupportQt vtkRenderingLOD vtkIOGeometry vtkIOXML vtkIOPLY vtkIOImage vtkInteractionWidgets NO_MODULE) ++ endif() # prefer >=6.1, fallback to >=5.4 - find_package(VTK 6.1 COMPONENTS vtkGUISupportQt vtkRenderingLOD vtkRenderingOpenGL vtkIOXML vtkIOPLY vtkIOImage vtkInteractionWidgets NO_MODULE) + IF (NOT ${VTK_FOUND}) + find_package(VTK 6.1 COMPONENTS vtkGUISupportQt vtkRenderingLOD vtkRenderingOpenGL vtkIOXML vtkIOPLY vtkIOImage vtkInteractionWidgets NO_MODULE) ++ else() ++ message(STATUS "Found VTK ${VTK_VERSION}, Qt \"${VTK_QT_VERSION}\"") + endif() IF (NOT ${VTK_FOUND}) find_package(VTK REQUIRED) endif() +@@ -112,7 +115,7 @@ + # Qt + SET(RESOURCES resources.qrc) + set(CMAKE_AUTOMOC ON) +-if(${VTK_VERSION} VERSION_GREATER "6" AND VTK_QT_VERSION VERSION_GREATER "4") ++if(${VTK_VERSION} VERSION_GREATER "6" AND ((NOT DEFINED VTK_QT_VERSION) OR ("${VTK_QT_VERSION}" VERSION_GREATER "4"))) + find_package(Qt5Widgets REQUIRED) + include_directories(${Qt5Widgets_INCLUDE_DIRS}) + find_package(Qt5Xml REQUIRED)