Accepting request 1135804 from home:StefanBruens:branches:science
- Fix build with VTK 9.3.0, add fix_vtk_9_3_compat.patch OBS-URL: https://build.opensuse.org/request/show/1135804 OBS-URL: https://build.opensuse.org/package/show/science/FreeCAD?expand=0&rev=170
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 31 01:05:56 UTC 2023 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||
|
||||
- Fix build with VTK 9.3.0, add fix_vtk_9_3_compat.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 11 10:52:51 UTC 2023 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||
|
||||
|
10
FreeCAD.spec
10
FreeCAD.spec
@@ -22,9 +22,12 @@
|
||||
%bcond_without boost_signals2
|
||||
# The AddonManager requires Python >= 3.8
|
||||
%bcond_without fc_addonmanager
|
||||
# zipios not yet in TW
|
||||
%bcond_with zipios
|
||||
%else
|
||||
%bcond_with boost_signals2
|
||||
%bcond_with fc_addonmanager
|
||||
%bcond_with zipios
|
||||
%endif
|
||||
%bcond_with smesh_external
|
||||
%bcond_without smesh
|
||||
@@ -45,6 +48,8 @@ Patch1: 0001-Avoid-catching-SIGSEGV-defer-to-system-services.patch
|
||||
Patch2: 0001-Implement-math.comb-fallback-for-Python-3.6.patch
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch9: 0001-Fix-variable-name-for-OpenGL-library.patch
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch10: https://github.com/FreeCAD/FreeCAD/commit/d0fb2b8b29fe0428d9dd8aa790b0d6e45c8a9516.patch#/fix_vtk_9_3_compat.patch
|
||||
|
||||
# Test suite fails on 32bit and I don't want to debug that anymore
|
||||
ExcludeArch: %ix86 %arm ppc s390 s390x
|
||||
@@ -94,6 +99,9 @@ BuildRequires: python3-pyside2-devel
|
||||
BuildRequires: python3-vtk
|
||||
BuildRequires: python3-xml
|
||||
BuildRequires: cmake(GTest)
|
||||
%if %{with zipios}
|
||||
BuildRequires: cmake(ZipIos)
|
||||
%endif
|
||||
BuildRequires: cmake(coin)
|
||||
BuildRequires: pkgconfig(Qt5Concurrent)
|
||||
BuildRequires: pkgconfig(Qt5OpenGL)
|
||||
@@ -142,6 +150,7 @@ This package contains the files needed for development with FreeCAD.
|
||||
%prep
|
||||
%setup -q
|
||||
%autopatch -p1
|
||||
|
||||
# Use system gtest - https://github.com/FreeCAD/FreeCAD/issues/10126
|
||||
sed -i -e 's/add_subdirectory(lib)/find_package(GTest)/' \
|
||||
-e 's/ gtest_main/ GTest::gtest_main/' \
|
||||
@@ -215,6 +224,7 @@ rm tests/lib -fr
|
||||
-DBUILD_OPENSCAD:BOOL=ON \
|
||||
-DBUILD_FLAT_MESH:BOOL=ON \
|
||||
-DFREECAD_USE_EXTERNAL_SMESH=%{?with_smesh_external:ON}%{!?with_smesh_external:OFF} \
|
||||
-DFREECAD_USE_EXTERNAL_ZIPIOS=%{?with_zipios:ON}%{!?with_zipios:OFF} \
|
||||
-DBUILD_SMESH:BOOL=ON \
|
||||
-DBUILD_MESH_PART:BOOL=ON \
|
||||
-DBUILD_FEM:BOOL=%{?with_smesh:ON}%{!?with_smesh:OFF} \
|
||||
|
43
fix_vtk_9_3_compat.patch
Normal file
43
fix_vtk_9_3_compat.patch
Normal file
@@ -0,0 +1,43 @@
|
||||
From d0fb2b8b29fe0428d9dd8aa790b0d6e45c8a9516 Mon Sep 17 00:00:00 2001
|
||||
From: Adrian Insaurralde Avalos <adrianinsaval@gmail.com>
|
||||
Date: Wed, 22 Nov 2023 16:42:06 -0300
|
||||
Subject: [PATCH] 3rdPart/salomesmesh - fix for vtk 9.3 compatibility
|
||||
|
||||
minimum required version is 7.1
|
||||
---
|
||||
src/3rdParty/salomesmesh/inc/SMESH_SMDS.hxx | 4 ----
|
||||
src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp | 5 +++++
|
||||
2 files changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/3rdParty/salomesmesh/inc/SMESH_SMDS.hxx b/src/3rdParty/salomesmesh/inc/SMESH_SMDS.hxx
|
||||
index 7f89573efd0d..47a52fe585fe 100644
|
||||
--- a/src/3rdParty/salomesmesh/inc/SMESH_SMDS.hxx
|
||||
+++ b/src/3rdParty/salomesmesh/inc/SMESH_SMDS.hxx
|
||||
@@ -39,10 +39,6 @@
|
||||
#define SMDS_EXPORT
|
||||
#endif
|
||||
|
||||
-#ifdef VTK_HAS_MTIME_TYPE
|
||||
#define VTK_MTIME_TYPE vtkMTimeType
|
||||
-#else
|
||||
-#define VTK_MTIME_TYPE unsigned long
|
||||
-#endif
|
||||
|
||||
#endif
|
||||
diff --git a/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
|
||||
index 7e3de0070a02..e9895d615717 100644
|
||||
--- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
|
||||
+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
|
||||
@@ -1026,7 +1026,12 @@ void SMDS_UnstructuredGrid::BuildLinks()
|
||||
GetLinks()->Allocate(this->GetNumberOfPoints());
|
||||
GetLinks()->Register(this);
|
||||
//FIXME: vtk9
|
||||
+ #if VTK_VERSION_NUMBER < VTK_VERSION_CHECK(9,3,0)
|
||||
GetLinks()->BuildLinks(this);
|
||||
+ #else
|
||||
+ GetLinks()->SetDataSet(this);
|
||||
+ GetLinks()->BuildLinks();
|
||||
+ #endif
|
||||
GetLinks()->Delete();
|
||||
#else
|
||||
this->Links = SMDS_CellLinks::New();
|
Reference in New Issue
Block a user