Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] [WIP] freecad: update to 0.19.1
@ 2021-03-19  7:02 yopito
  2021-03-20  4:03 ` sww1235
                   ` (8 more replies)
  0 siblings, 9 replies; 29+ messages in thread
From: yopito @ 2021-03-19  7:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 410 bytes --]

There is a new pull request by yopito against master on the void-packages repository

https://github.com/yopito/void-packages freecad.0.19
https://github.com/void-linux/void-packages/pull/29580

[WIP] freecad: update to 0.19.1
[ ] wait for official announcement
[ ] Embedded help does not launch

Superseeds #29466 

A patch file from https://github.com/void-linux/void-packages/pull/29580.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-freecad.0.19-29580.patch --]
[-- Type: text/x-diff, Size: 61055 bytes --]

From d120edc6a9d1e54572dc8b192d7cda295f1a71ab Mon Sep 17 00:00:00 2001
From: yopito <pierre.bourgin@free.fr>
Date: Wed, 17 Mar 2021 19:50:55 +0100
Subject: [PATCH] freecad: update to 0.19.1

---
 srcpkgs/freecad/patches/001-python3.patch     |  11 -
 srcpkgs/freecad/patches/002-execinfo.patch    |  10 +-
 .../patches/010-salomesmesh-execinfo.patch    |  30 ++
 .../patches/020-namespace-missing-std.patch   | 127 -------
 srcpkgs/freecad/patches/090-py38.patch        |  22 --
 srcpkgs/freecad/patches/091-py39.patch        | 174 ----------
 ...00-detect-shiboken2-and-pyside2-5.14.patch |  33 --
 .../101-pyside2-tool-5.14-support.patch       |  67 ----
 srcpkgs/freecad/patches/102-qt5-5.15.0.patch  |  14 -
 .../patches/103-find-coin3v4-doc.patch        |  50 ---
 srcpkgs/freecad/patches/150-vtk9.patch        | 326 ++++++++++--------
 .../freecad/patches/151-python-warning.patch  |  39 ---
 srcpkgs/freecad/patches/152-cmake-vtk9.patch  |  53 +++
 srcpkgs/freecad/template                      |  28 +-
 14 files changed, 284 insertions(+), 700 deletions(-)
 delete mode 100644 srcpkgs/freecad/patches/001-python3.patch
 create mode 100644 srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch
 delete mode 100644 srcpkgs/freecad/patches/020-namespace-missing-std.patch
 delete mode 100644 srcpkgs/freecad/patches/090-py38.patch
 delete mode 100644 srcpkgs/freecad/patches/091-py39.patch
 delete mode 100644 srcpkgs/freecad/patches/100-detect-shiboken2-and-pyside2-5.14.patch
 delete mode 100644 srcpkgs/freecad/patches/101-pyside2-tool-5.14-support.patch
 delete mode 100644 srcpkgs/freecad/patches/102-qt5-5.15.0.patch
 delete mode 100644 srcpkgs/freecad/patches/103-find-coin3v4-doc.patch
 delete mode 100644 srcpkgs/freecad/patches/151-python-warning.patch
 create mode 100644 srcpkgs/freecad/patches/152-cmake-vtk9.patch

diff --git a/srcpkgs/freecad/patches/001-python3.patch b/srcpkgs/freecad/patches/001-python3.patch
deleted file mode 100644
index b49978adcf37..000000000000
--- a/srcpkgs/freecad/patches/001-python3.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- CMakeLists.txt
-+++ CMakeLists.txt
-@@ -445,7 +445,7 @@
- 
- # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=677598
- # Acceptable versions of Python
--set(Python_ADDITIONAL_VERSIONS "2.7")
-+set(Python_ADDITIONAL_VERSIONS "2.7 3.6")
- 
- # For building on OS X
- if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
diff --git a/srcpkgs/freecad/patches/002-execinfo.patch b/srcpkgs/freecad/patches/002-execinfo.patch
index 9f9d797d00f2..471e06e6453a 100644
--- a/srcpkgs/freecad/patches/002-execinfo.patch
+++ b/srcpkgs/freecad/patches/002-execinfo.patch
@@ -1,6 +1,6 @@
---- src/App/Application.cpp.orig	2019-03-08 18:56:16.000000000 +0100
-+++ src/App/Application.cpp	2019-03-13 21:36:38.873587534 +0100
-@@ -1163,7 +1163,9 @@
+--- src/App/Application.cpp.ORIG	2020-01-22 23:27:42.709273087 +0100
++++ src/App/Application.cpp	2020-01-22 23:50:53.915075955 +0100
+@@ -1485,7 +1485,9 @@
  #endif
  
  #if defined(FC_OS_LINUX)
@@ -10,7 +10,7 @@
  #include <dlfcn.h>
  #include <cxxabi.h>
  
-@@ -1175,6 +1177,7 @@
+@@ -1497,6 +1499,7 @@
  // This function produces a stack backtrace with demangled function & method names.
  void printBacktrace(size_t skip=0)
  {
@@ -18,7 +18,7 @@
      void *callstack[128];
      size_t nMaxFrames = sizeof(callstack) / sizeof(callstack[0]);
      size_t nFrames = backtrace(callstack, nMaxFrames);
-@@ -1205,6 +1208,9 @@
+@@ -1527,6 +1530,9 @@
      }
  
      free(symbols);
diff --git a/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch b/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch
new file mode 100644
index 000000000000..2b46616ad7a2
--- /dev/null
+++ b/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch
@@ -0,0 +1,30 @@
+--- src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
++++ src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
+@@ -29,7 +29,9 @@
+ #ifndef WIN32
+ #include <unistd.h>
+ #include <sys/stat.h>
++#ifdef __GLIBC__
+ #include <execinfo.h>
++#endif
+ #endif
+ 
+ 
+@@ -109,6 +111,7 @@
+ #ifndef WIN32
+   void print_traceback()
+   {
++#ifdef __GLIBC__
+     void *array[50];
+     size_t size;
+     char **strings;
+@@ -123,6 +126,9 @@
+       }
+ 
+     free (strings);
++#else     
++   std::cerr << "sorry, no backtrace on musl libc";
++#endif
+   }
+ #else
+   #if (_MSC_VER >= 1400) // Visual Studio 2005
diff --git a/srcpkgs/freecad/patches/020-namespace-missing-std.patch b/srcpkgs/freecad/patches/020-namespace-missing-std.patch
deleted file mode 100644
index 82033cd5afb4..000000000000
--- a/srcpkgs/freecad/patches/020-namespace-missing-std.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-# reason: fix build with gcc9
-# upstream: yes
-
-diff --git src/3rdParty/salomesmesh/inc/Rn.h src/3rdParty/salomesmesh/inc/Rn.h
-index 6ec871d93..e92d2275a 100644
---- src/3rdParty/salomesmesh/inc/Rn.h
-+++ src/3rdParty/salomesmesh/inc/Rn.h
-@@ -180,12 +180,12 @@ class R4: public R3
- {
-   friend std::ostream& operator <<(std::ostream& f, const R4 & P )
-   { f << P.x << ' ' << P.y << ' ' << P.z << ' ' << P.omega; return f; }
--  friend istream& operator >>(istream& f,  R4 & P)
-+  friend std::istream& operator >>(std::istream& f,  R4 & P)
-   { f >> P.x >>  P.y >>  P.z >> P.omega ; return f; }
- 
-   friend std::ostream& operator <<(std::ostream& f, const R4 * P )
-   { f << P->x << ' ' << P->y << ' ' << P->z << ' ' << P->omega; return f; }
--  friend istream& operator >>(istream& f,  R4 * P)
-+  friend std::istream& operator >>(std::istream& f,  R4 * P)
-   { f >> P->x >>  P->y >>  P->z >> P->omega ; return f; }
- 
- public:  
-
-
-diff --git src/Mod/Drawing/App/DrawingExport.cpp src/Mod/Drawing/App/DrawingExport.cpp
-index 0c3c23231..550b12c25 100644
---- src/Mod/Drawing/App/DrawingExport.cpp
-+++ src/Mod/Drawing/App/DrawingExport.cpp
-@@ -81,6 +81,7 @@
- #include <Base/Vector3D.h>
- 
- using namespace Drawing;
-+using namespace std;
- 
- TopoDS_Edge DrawingOutput::asCircle(const BRepAdaptor_Curve& c) const
- {
-diff --git src/Mod/Part/App/Geometry2d.cpp src/Mod/Part/App/Geometry2d.cpp
-index fb1de909c..979465533 100644
---- src/Mod/Part/App/Geometry2d.cpp
-+++ src/Mod/Part/App/Geometry2d.cpp
-@@ -83,6 +83,7 @@
- #include <Mod/Part/App/Geom2d/OffsetCurve2dPy.h>
- 
- using namespace Part;
-+using namespace std;
- 
- extern const char* gce_ErrorStatusText(gce_ErrorType et);
- 
-diff --git src/Mod/Raytracing/App/AppRaytracingPy.cpp src/Mod/Raytracing/App/AppRaytracingPy.cpp
-index d48c51c97..1bb2b1b01 100644
---- src/Mod/Raytracing/App/AppRaytracingPy.cpp
-+++ src/Mod/Raytracing/App/AppRaytracingPy.cpp
-@@ -40,6 +40,8 @@
- #include <Mod/Part/App/TopoShapePy.h>
- #include <App/Application.h>
- 
-+using namespace std;
-+
- 
- namespace Raytracing {
- class Module : public Py::ExtensionModule<Module>
-diff --git src/Mod/Raytracing/App/LuxFeature.cpp src/Mod/Raytracing/App/LuxFeature.cpp
-index 930fe12b7..d1e0a0089 100644
---- src/Mod/Raytracing/App/LuxFeature.cpp
-+++ src/Mod/Raytracing/App/LuxFeature.cpp
-@@ -38,6 +38,7 @@
- 
- 
- using namespace Raytracing;
-+using namespace std;
- 
- PROPERTY_SOURCE(Raytracing::LuxFeature, Raytracing::RaySegment)
- 
-diff --git src/Mod/Raytracing/App/RayFeature.cpp src/Mod/Raytracing/App/RayFeature.cpp
-index cdd2cb6dc..235a98685 100644
---- src/Mod/Raytracing/App/RayFeature.cpp
-+++ src/Mod/Raytracing/App/RayFeature.cpp
-@@ -36,6 +36,7 @@
- 
- 
- using namespace Raytracing;
-+using namespace std;
- 
- PROPERTY_SOURCE(Raytracing::RayFeature, Raytracing::RaySegment)
- 
-diff --git src/Mod/TechDraw/App/Geometry.cpp src/Mod/TechDraw/App/Geometry.cpp
-index c10b63177..d34eeb9bb 100644
---- src/Mod/TechDraw/App/Geometry.cpp
-+++ src/Mod/TechDraw/App/Geometry.cpp
-@@ -80,6 +80,7 @@
- #include "Geometry.h"
- 
- using namespace TechDraw;
-+using namespace std;
- 
- // Collection of Geometric Features
- Wire::Wire()
-
-
---- src/Mod/Part/App/PropertyTopoShape.cpp
-+++ src/Mod/Part/App/PropertyTopoShape.cpp
-@@ -281,11 +281,11 @@
- static Standard_Boolean  BRepTools_Write(const TopoDS_Shape& Sh, 
-                                    const Standard_CString File)
- {
--  ofstream os;
-+  std::ofstream os;
- #if OCC_VERSION_HEX >= 0x060800
--  OSD_OpenStream(os, File, ios::out);
-+  OSD_OpenStream(os, File, std::ios::out);
- #else
--  os.open(File, ios::out);
-+  os.open(File, std::ios::out);
- #endif
-   if (!os.rdbuf()->is_open()) return Standard_False;
- 
-
---- src/Mod/Part/App/Geometry.cpp
-+++ src/Mod/Part/App/Geometry.cpp
-@@ -141,6 +141,7 @@
- #include "Geometry.h"
- 
- using namespace Part;
-+using namespace std;
- 
- 
- const char* gce_ErrorStatusText(gce_ErrorType et)
diff --git a/srcpkgs/freecad/patches/090-py38.patch b/srcpkgs/freecad/patches/090-py38.patch
deleted file mode 100644
index 92566df9df3d..000000000000
--- a/srcpkgs/freecad/patches/090-py38.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 174011749d836f3b6c6ae2630f53b2f4c1f9d3fc Mon Sep 17 00:00:00 2001
-From: Richard <hobbes1069@gmail.com>
-Date: Thu, 17 Oct 2019 11:20:10 -0500
-Subject: [PATCH] Update swigpyrun.in for Python 3.8
-
-In Python 3.8 some functions related to thread state were intentionally made private.
-
-This fix (specific to FreeCAD) was suggested here:
-
-https://bugs.python.org/issue35886
-
---- src/Base/swigpyrun.inl
-+++ src/Base/swigpyrun.inl
-@@ -72,7 +72,7 @@ void cleanupSWIG_T(const char* TypeName)
- 
-     PyObject *module, *dict;
-     PyInterpreterState *interp = PyThreadState_GET()->interp;
--    PyObject *modules = interp->modules;
-+    PyObject *modules = PyImport_GetModuleDict();
-     module = PyDict_GetItemString(modules, "__builtin__");
-     if (module != NULL && PyModule_Check(module)) {
-         dict = PyModule_GetDict(module);
diff --git a/srcpkgs/freecad/patches/091-py39.patch b/srcpkgs/freecad/patches/091-py39.patch
deleted file mode 100644
index d03bb03adb21..000000000000
--- a/srcpkgs/freecad/patches/091-py39.patch
+++ /dev/null
@@ -1,174 +0,0 @@
-Fix for Python 3.9
-
-https://github.com/FreeCAD/FreeCAD/commit/ae641dc5278efafa22b168fc196875558b92e436
-
-diff --git src/Base/swigpyrun_1.3.25.h src/Base/swigpyrun_1.3.25.h
-index 91717210b..9ebadbc83 100644
---- src/Base/swigpyrun_1.3.25.h
-+++ src/Base/swigpyrun_1.3.25.h
-@@ -699,7 +699,11 @@ PySwigObject_type(void) {
-     0,					/*tp_itemsize*/
-     /* methods */
-     (destructor)PySwigObject_dealloc,	/*tp_dealloc*/
-+#if PY_VERSION_HEX < 0x03080000
-     (printfunc)PySwigObject_print,	/*tp_print*/
-+#else
-+    0,          /*tp_vectorcall_offset*/
-+#endif
-     (getattrfunc)0,			/*tp_getattr*/
-     (setattrfunc)0,			/*tp_setattr*/
-     (cmpfunc)PySwigObject_compare,	/*tp_compare*/
-@@ -859,7 +863,11 @@ PySwigPacked_type(void) {
-     0,					/*tp_itemsize*/
-     /* methods */
-     (destructor)PySwigPacked_dealloc,	/*tp_dealloc*/
-+#if PY_VERSION_HEX < 0x03080000
-     (printfunc)PySwigPacked_print,	/*tp_print*/
-+#else
-+    0,          /*tp_vectorcall_offset*/
-+#endif
-     (getattrfunc)0,			/*tp_getattr*/
-     (setattrfunc)0,			/*tp_setattr*/
-     (cmpfunc)PySwigPacked_compare,	/*tp_compare*/
-diff --git src/Base/swigpyrun_1.3.33.h src/Base/swigpyrun_1.3.33.h
-index f83ac1e89..afd5a8c50 100644
---- src/Base/swigpyrun_1.3.33.h
-+++ src/Base/swigpyrun_1.3.33.h
-@@ -1620,7 +1620,11 @@ _PySwigObject_type(void) {
- 	sizeof(PySwigObject),		    /* tp_basicsize */
- 	0,			            /* tp_itemsize */
- 	(destructor)PySwigObject_dealloc,   /* tp_dealloc */
-+#if PY_VERSION_HEX < 0x03080000
- 	(printfunc)PySwigObject_print,	    /* tp_print */
-+#else
-+	0, /*tp_vectorcall_offset*/
-+#endif
- #if PY_VERSION_HEX < 0x02020000
- 	(getattrfunc)PySwigObject_getattr,  /* tp_getattr */ 
- #else
-@@ -1790,7 +1794,11 @@ _PySwigPacked_type(void) {
- 	sizeof(PySwigPacked),		    /* tp_basicsize */	
- 	0,				    /* tp_itemsize */	
- 	(destructor)PySwigPacked_dealloc,   /* tp_dealloc */	
-+#if PY_VERSION_HEX < 0x03080000
- 	(printfunc)PySwigPacked_print,	    /* tp_print */   	
-+#else
-+	0, /*tp_vectorcall_offset*/
-+#endif
- 	(getattrfunc)0,			    /* tp_getattr */ 	
- 	(setattrfunc)0,			    /* tp_setattr */ 	
- 	(cmpfunc)PySwigPacked_compare,	    /* tp_compare */ 	
-diff --git src/Base/swigpyrun_1.3.36.h src/Base/swigpyrun_1.3.36.h
-index 02c58ad8a..12ad41e12 100644
---- src/Base/swigpyrun_1.3.36.h
-+++ src/Base/swigpyrun_1.3.36.h
-@@ -1628,7 +1628,12 @@ _PySwigObject_type(void) {
- 	sizeof(PySwigObject),		    /* tp_basicsize */
- 	0,			            /* tp_itemsize */
- 	(destructor)PySwigObject_dealloc,   /* tp_dealloc */
-+#if PY_VERSION_HEX < 0x03080000
- 	(printfunc)PySwigObject_print,	    /* tp_print */
-+#else
-+	0, /*tp_vectorcall_offset*/
-+#endif
-+
- #if PY_VERSION_HEX < 0x02020000
- 	(getattrfunc)PySwigObject_getattr,  /* tp_getattr */ 
- #else
-@@ -1798,7 +1803,11 @@ _PySwigPacked_type(void) {
- 	sizeof(PySwigPacked),		    /* tp_basicsize */	
- 	0,				    /* tp_itemsize */	
- 	(destructor)PySwigPacked_dealloc,   /* tp_dealloc */	
-+#if PY_VERSION_HEX < 0x03080000
- 	(printfunc)PySwigPacked_print,	    /* tp_print */   	
-+#else
-+	0, /*tp_vectorcall_offset*/
-+#endif
- 	(getattrfunc)0,			    /* tp_getattr */ 	
- 	(setattrfunc)0,			    /* tp_setattr */ 	
- 	(cmpfunc)PySwigPacked_compare,	    /* tp_compare */ 	
-diff --git src/Base/swigpyrun_1.3.38.h src/Base/swigpyrun_1.3.38.h
-index dae058c20..7cacc1579 100644
---- src/Base/swigpyrun_1.3.38.h
-+++ src/Base/swigpyrun_1.3.38.h
-@@ -1741,7 +1741,11 @@ _PySwigObject_type(void) {
- 	sizeof(SwigPyObject),		    /* tp_basicsize */
- 	0,			            /* tp_itemsize */
- 	(destructor)SwigPyObject_dealloc,   /* tp_dealloc */
-+#if PY_VERSION_HEX < 0x03080000
- 	(printfunc)SwigPyObject_print,	    /* tp_print */
-+#else
-+	0, /*tp_vectorcall_offset*/
-+#endif
- #if PY_VERSION_HEX < 0x02020000
- 	(getattrfunc)SwigPyObject_getattr,  /* tp_getattr */ 
- #else
-@@ -1919,7 +1923,11 @@ _PySwigPacked_type(void) {
- 	sizeof(SwigPyPacked),		    /* tp_basicsize */	
- 	0,				    /* tp_itemsize */	
- 	(destructor)SwigPyPacked_dealloc,   /* tp_dealloc */	
-+#if PY_VERSION_HEX < 0x03080000
- 	(printfunc)SwigPyPacked_print,	    /* tp_print */   	
-+#else
-+	0, /*tp_vectorcall_offset*/
-+#endif
- 	(getattrfunc)0,			    /* tp_getattr */ 	
- 	(setattrfunc)0,			    /* tp_setattr */ 	
- 	(cmpfunc)SwigPyPacked_compare,	    /* tp_compare */ 	
-diff --git src/Base/swigpyrun_1.3.40.h src/Base/swigpyrun_1.3.40.h
-index 136ba809f..400db8b47 100644
---- src/Base/swigpyrun_1.3.40.h
-+++ src/Base/swigpyrun_1.3.40.h
-@@ -1766,7 +1766,11 @@ _PySwigObject_type(void) {
- 	sizeof(SwigPyObject),		    /* tp_basicsize */
- 	0,			            /* tp_itemsize */
- 	(destructor)SwigPyObject_dealloc,   /* tp_dealloc */
-+#if PY_VERSION_HEX < 0x03080000
- 	(printfunc)SwigPyObject_print,	    /* tp_print */
-+#else
-+	0, /*tp_vectorcall_offset*/
-+#endif
- #if PY_VERSION_HEX < 0x02020000
- 	(getattrfunc)SwigPyObject_getattr,  /* tp_getattr */ 
- #else
-@@ -1947,8 +1951,12 @@ _PySwigPacked_type(void) {
- 	(char *)"SwigPyPacked",		    /* tp_name */	
- 	sizeof(SwigPyPacked),		    /* tp_basicsize */	
- 	0,				    /* tp_itemsize */	
--	(destructor)SwigPyPacked_dealloc,   /* tp_dealloc */	
--	(printfunc)SwigPyPacked_print,	    /* tp_print */   	
-+	(destructor)SwigPyPacked_dealloc,   /* tp_dealloc */
-+#if PY_VERSION_HEX < 0x03080000
-+	(printfunc)SwigPyPacked_print,	    /* tp_print */
-+#else
-+	0, /*tp_vectorcall_offset*/
-+#endif
- 	(getattrfunc)0,			    /* tp_getattr */ 	
- 	(setattrfunc)0,			    /* tp_setattr */ 	
- #if PY_VERSION_HEX>=0x03000000
-diff --git src/CXX/Python3/cxx_extensions.cxx src/CXX/Python3/cxx_extensions.cxx
-index fb3da455f..9ff94612f 100644
---- src/CXX/Python3/cxx_extensions.cxx
-+++ src/CXX/Python3/cxx_extensions.cxx
-@@ -381,7 +381,11 @@ PythonType::PythonType( size_t basic_size, int itemsize, const char *default_nam
- 
-     // Methods to implement standard operations
-     table->tp_dealloc = (destructor)standard_dealloc;
-+#if PY_VERSION_HEX < 0x03080000
-     table->tp_print = 0;
-+#else
-+    table->tp_vectorcall_offset = 0;
-+#endif
-     table->tp_getattr = 0;
-     table->tp_setattr = 0;
-     table->tp_repr = 0;
-@@ -524,7 +528,9 @@ PythonType &PythonType::supportClass()
- #ifdef PYCXX_PYTHON_2TO3
- PythonType &PythonType::supportPrint()
- {
-+#if PY_VERSION_HEX < 0x03080000
-     table->tp_print = print_handler;
-+#endif
-     return *this;
- }
- #endif
diff --git a/srcpkgs/freecad/patches/100-detect-shiboken2-and-pyside2-5.14.patch b/srcpkgs/freecad/patches/100-detect-shiboken2-and-pyside2-5.14.patch
deleted file mode 100644
index 14ce9d5fcf90..000000000000
--- a/srcpkgs/freecad/patches/100-detect-shiboken2-and-pyside2-5.14.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-source: https://svnweb.freebsd.org/ports/head/cad/freecad/files/patch-CMakeLists.txt?revision=504361&view=co
-
---- CMakeLists.txt.orig
-+++ CMakeLists.txt
-@@ -989,6 +989,13 @@ endif()
-             endif()
-         endif()
- 
-+        # pyside2 changed it's cmake files, this is the dance we have
-+        # to dance to be compatible with the old and the new versions
-+        if(SHIBOKEN_PYTHON_INCLUDE_DIRS AND NOT SHIBOKEN_INCLUDE_DIR)
-+          get_property(SHIBOKEN_INCLUDE_DIR TARGET Shiboken2::libshiboken PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
-+            get_property(SHIBOKEN_LIBRARY TARGET Shiboken2::libshiboken PROPERTY IMPORTED_LOCATION_RELEASE)
-+        endif(SHIBOKEN_PYTHON_INCLUDE_DIRS AND NOT SHIBOKEN_INCLUDE_DIR)
-+
-         if(NOT SHIBOKEN_INCLUDE_DIR)
-             MESSAGE("====================\n"
-                     "shiboken2 not found.\n"
-@@ -996,6 +1003,14 @@ endif()
-         endif(NOT SHIBOKEN_INCLUDE_DIR)
- 
-         find_package(PySide2 QUIET)# REQUIRED
-+
-+        # pyside2 changed it's cmake files, this is the dance we have
-+        # to dance to be compatible with the old and the new versions
-+        if(NOT PYSIDE_INCLUDE_DIR)
-+          get_property(PYSIDE_INCLUDE_DIR TARGET PySide2::pyside2 PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
-+          get_property(PYSIDE_LIBRARY TARGET PySide2::pyside2 PROPERTY IMPORTED_LOCATION_RELEASE)
-+        endif(NOT PYSIDE_INCLUDE_DIR)
-+
-         if(NOT PYSIDE_INCLUDE_DIR)
-             MESSAGE("==================\n"
-                     "PySide2 not found.\n"
diff --git a/srcpkgs/freecad/patches/101-pyside2-tool-5.14-support.patch b/srcpkgs/freecad/patches/101-pyside2-tool-5.14-support.patch
deleted file mode 100644
index 632384d2df4a..000000000000
--- a/srcpkgs/freecad/patches/101-pyside2-tool-5.14-support.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-backport from FreeCAD git master (rev @1bca539)
-
---- cMake/FindPySide2Tools.cmake.ORIG
-+++ cMake/FindPySide2Tools.cmake
-@@ -20,8 +20,24 @@
-     set(PYSIDE_BIN_DIR ${PYTHON_BIN_DIR})
- endif(WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
- 
--FIND_PROGRAM(PYSIDE2UICBINARY NAMES python2-pyside2-uic pyside2-uic pyside2-uic-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR})
--FIND_PROGRAM(PYSIDE2RCCBINARY NAMES pyside2-rcc pyside2-rcc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR})
-+# Since Qt v5.14, pyside2-uic and pyside2-rcc are directly provided by Qt5Core uic and rcc, with '-g python' option
-+# We test Qt5Core version to act accordingly
-+
-+FIND_PACKAGE(Qt5Core)
-+
-+IF(Qt5Core_VERSION VERSION_LESS 5.14)
-+  # Legacy (< 5.14)
-+  FIND_PROGRAM(PYSIDE2UICBINARY NAMES python2-pyside2-uic pyside2-uic pyside2-uic-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR})
-+  FIND_PROGRAM(PYSIDE2RCCBINARY NAMES pyside2-rcc pyside2-rcc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR})
-+  set(UICOPTIONS "")
-+  set(RCCOPTIONS "")
-+ELSE(Qt5Core_VERSION VERSION_LESS 5.14)
-+  # New (>= 5.14)
-+  FIND_PROGRAM(PYSIDE2UICBINARY NAMES uic-qt5 uic)
-+  set(UICOPTIONS "--generator=python")
-+  FIND_PROGRAM(PYSIDE2RCCBINARY NAMES rcc-qt5 rcc)
-+  set(RCCOPTIONS "--generator=python" "--compress-algo=zlib" "--compress=1")
-+ENDIF(Qt5Core_VERSION VERSION_LESS 5.14)
- 
- MACRO(PYSIDE_WRAP_UI outfiles)
-   FOREACH(it ${ARGN})
-@@ -33,7 +49,7 @@
-     #)
-     if(WIN32 OR APPLE)
-         ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
--          COMMAND ${PYSIDE2UICBINARY} ${infile} -o ${outfile}
-+          COMMAND ${PYSIDE2UICBINARY} ${UICOPTIONS} ${infile} -o ${outfile}
-           MAIN_DEPENDENCY ${infile}
-         )
-     else()
-@@ -41,7 +57,7 @@
-         # pyside2-uic generates in comments at beginning., which is why
-         # we follow the tool command with in-place sed.
-         ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
--          COMMAND "${PYSIDE2UICBINARY}" "${infile}" -o "${outfile}"
-+          COMMAND "${PYSIDE2UICBINARY}" ${UICOPTIONS} "${infile}" -o "${outfile}"
-           COMMAND sed -i "/^# /d" "${outfile}"
-           MAIN_DEPENDENCY "${infile}"
-         )
-@@ -60,7 +76,7 @@
-     #)
-     if(WIN32 OR APPLE)
-         ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
--          COMMAND ${PYSIDE2RCCBINARY} ${infile} -o ${outfile}
-+          COMMAND ${PYSIDE2RCCBINARY} ${RCCOPTIONS} ${infile} -o ${outfile}
-           MAIN_DEPENDENCY ${infile}
-         )
-     else()
-@@ -68,7 +84,7 @@
-         # pyside-rcc generates in comments at beginning, which is why
-         # we follow the tool command with in-place sed.
-         ADD_CUSTOM_COMMAND(OUTPUT "${outfile}"
--          COMMAND "${PYSIDE2RCCBINARY}" "${infile}" ${PY_ATTRIBUTE} -o "${outfile}"
-+          COMMAND "${PYSIDE2RCCBINARY}" ${RCCOPTIONS} "${infile}" ${PY_ATTRIBUTE} -o "${outfile}"
-           COMMAND sed -i "/^# /d" "${outfile}"
-           MAIN_DEPENDENCY "${infile}"
-         )
diff --git a/srcpkgs/freecad/patches/102-qt5-5.15.0.patch b/srcpkgs/freecad/patches/102-qt5-5.15.0.patch
deleted file mode 100644
index 9c4632d80a80..000000000000
--- a/srcpkgs/freecad/patches/102-qt5-5.15.0.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Source: @pullmoll
-Upstream: no
-Reason: qt5-5.15.0 requires explicit include for QPainterPath
-
---- src/Mod/Image/Gui/OpenGLImageBox.cpp
-+++ src/Mod/Image/Gui/OpenGLImageBox.cpp	2020-07-14 12:25:42.607075856 +0200
-@@ -26,6 +26,7 @@
- # include <QSurfaceFormat>
- # include <QMessageBox>
- # include <QPainter>
-+# include <QPainterPath>
- #endif
- 
- #if defined(__MINGW32__)
diff --git a/srcpkgs/freecad/patches/103-find-coin3v4-doc.patch b/srcpkgs/freecad/patches/103-find-coin3v4-doc.patch
deleted file mode 100644
index 5b7de514de4b..000000000000
--- a/srcpkgs/freecad/patches/103-find-coin3v4-doc.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 04833a5f1cbc07f8f6ae94453c4535e13789aa05 Mon Sep 17 00:00:00 2001
-From: yopito <pierre.bourgin@free.fr>
-Date: Mon, 6 Jul 2020 06:54:07 +0200
-Subject: [PATCH] build: fix Coin 3d documentation discovering
-
-* coin3d 4.0.0 default location is /usr/share/doc/Coin/html/
-* misuses of find_files() if several candidates for filename
-* export variable COIN3D_DOC_FOUND that is used by cMake/FreeCAD_Helpers/PrintFinalReport.cmake
----
- cMake/FindCoin3DDoc.cmake | 12 +++++++-----
- 1 file changed, 7 insertions(+), 5 deletions(-)
-
-diff --git cMake/FindCoin3DDoc.cmake cMake/FindCoin3DDoc.cmake
-index 883368445..c6c92f260 100644
---- cMake/FindCoin3DDoc.cmake
-+++ cMake/FindCoin3DDoc.cmake
-@@ -23,18 +23,19 @@ IF (COIN3D_FOUND)
-       find_path(COIN3D_DOC_PATH index.html 
-                 /usr/share/doc/libcoin80-doc/html
-                 /usr/share/doc/coin/html
-+                /usr/share/doc/Coin/html
-       )
-       IF( EXISTS ${COIN3D_DOC_PATH})
-         message(STATUS "Coin3D doc is installed")
--        find_file(COIN3D_DOC_TAGFILE coin.tag Coin.tag 
--            ${COIN3D_DOC_PATH}
-+        find_file(COIN3D_DOC_TAGFILE NAMES coin.tag Coin.tag 
-+            PATHS ${COIN3D_DOC_PATH}
-         )
-         IF( EXISTS ${COIN3D_DOC_TAGFILE})
-           SET( COIN3D_DOC_FOUND "YES"
-           )
-         ELSE( EXISTS ${COIN3D_DOC_TAGFILE})
--          find_file(COIN3D_DOC_TAGFILE_GZ coin.tag.gz Coin.tag.gz 
--              ${COIN3D_DOC_PATH}
-+          find_file(COIN3D_DOC_TAGFILE_GZ NAMES coin.tag.gz Coin.tag.gz 
-+              PATHS ${COIN3D_DOC_PATH}
-           )
-           IF( EXISTS ${COIN3D_DOC_TAGFILE_GZ})
-             message(STATUS "  Found ${COIN3D_DOC_TAGFILE_GZ}")
-@@ -85,4 +86,5 @@ if(COIN3D_DOC_FOUND)
-   message(STATUS "  Location: ${COIN3D_DOC_PATH}")
- endif(COIN3D_DOC_FOUND)
- 
--
-+# export for others
-+SET( COIN3D_DOC_FOUND "${COIN3D_DOC_FOUND}" CACHE BOOL "Coin3d documentation available")
--- 
-2.27.0
-
diff --git a/srcpkgs/freecad/patches/150-vtk9.patch b/srcpkgs/freecad/patches/150-vtk9.patch
index e8fb5ec14b7a..3c00ff784e4c 100644
--- a/srcpkgs/freecad/patches/150-vtk9.patch
+++ b/srcpkgs/freecad/patches/150-vtk9.patch
@@ -1,10 +1,11 @@
-Taken from https://github.com/wwmayer/FreeCAD/commit/52599f771fa934ceeb11a970c3639bfa8f90411e
+Taken from https://github.com/wwmayer/FreeCAD/commit/bb9bcbd51df7c3cb76c5823038e4ea0f7e25a9ff
+but removed patch on file src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp : already applied (2021-01-20)
 
 diff --git src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx b/src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx
-index 14a6d9a76..7b9d88db1 100644
+index 14a6d9a763f..0e9b9e6c905 100644
 --- src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx
 +++ src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx
-@@ -40,10 +40,16 @@
+@@ -40,11 +40,16 @@
  
  #include <vtkType.h>
  #include <vtkCellType.h>
@@ -13,15 +14,16 @@ index 14a6d9a76..7b9d88db1 100644
  //typedef unsigned short UShortType;
  typedef short ShortType;
  typedef int   LongType;
+-
 +#ifdef VTK_CELL_ARRAY_V2
 +typedef const vtkIdType* vtkIdTypePtr;
 +#else
 +typedef vtkIdType* vtkIdTypePtr;
 +#endif
- 
  class SMDS_MeshNode;
  class SMDS_MeshEdge;
-@@ -192,7 +198,7 @@ protected:
+ class SMDS_MeshFace;
+@@ -192,7 +197,7 @@ protected:
    //! Element index in vector SMDS_Mesh::myNodes or SMDS_Mesh::myCells
    int myID;
    //! index in vtkUnstructuredGrid
@@ -31,7 +33,7 @@ index 14a6d9a76..7b9d88db1 100644
    ShortType myMeshId;
    //! SubShape and SubMesh identification in SMESHDS
 diff --git src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx b/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx
-index 9e4a23edd..774658145 100644
+index 9e4a23eddfb..77465814541 100644
 --- src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx
 +++ src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx
 @@ -95,7 +95,11 @@ public:
@@ -47,25 +49,27 @@ index 9e4a23edd..774658145 100644
    SMDS_Downward* getDownArray(unsigned char vtkType)
    {
 diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp
-index 299093c94..990e2b641 100644
+index 299093c94f6..2680c217305 100644
 --- src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp
 +++ src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp
-@@ -68,9 +68,13 @@ bool SMDS_BallElement::ChangeNode (const SMDS_MeshNode * node)
+@@ -67,10 +67,16 @@ void SMDS_BallElement::SetDiameter(double diameter)
+ bool SMDS_BallElement::ChangeNode (const SMDS_MeshNode * node)
  {
    vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
-   vtkIdType npts = 0;
--  vtkIdType* pts = 0;
-+  vtkIdTypePtr pts = 0;
-   grid->GetCellPoints(myVtkID, npts, pts);
 +#ifdef VTK_CELL_ARRAY_V2
-+//FIXME: vtk9
++  vtkNew<vtkIdList> cellPoints;
++  grid->GetCellPoints(myVtkID, cellPoints.GetPointer());
++  cellPoints->SetId(0, node->getVtkId());
 +#else
+   vtkIdType npts = 0;
+   vtkIdType* pts = 0;
+   grid->GetCellPoints(myVtkID, npts, pts);
    pts[0] = node->getVtkId();
 +#endif
    SMDS_Mesh::_meshList[myMeshId]->setMyModified();
    return true;
  }
-@@ -83,7 +87,8 @@ void SMDS_BallElement::Print (std::ostream & OS) const
+@@ -83,7 +89,8 @@ void SMDS_BallElement::Print (std::ostream & OS) const
  const SMDS_MeshNode* SMDS_BallElement::GetNode (const int ind) const
  {
    vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
@@ -76,7 +80,7 @@ index 299093c94..990e2b641 100644
    return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ 0 ]);
  }
 diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp
-index d6049c0bd..77555d5bc 100644
+index d6049c0bd19..a41f5c18e78 100644
 --- src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp
 +++ src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp
 @@ -303,7 +303,7 @@ int SMDS_Down1D::getNodeSet(int cellId, int* nodeSet)
@@ -88,6 +92,15 @@ index d6049c0bd..77555d5bc 100644
    _grid->GetCellPoints(vtkId, npts, pts);
    // MESSAGE(vtkId << " " << npts << "  " << _nbDownCells);
    //ASSERT(npts == _nbDownCells);
+@@ -357,7 +357,7 @@ int SMDS_Down1D::computeVtkCells(int *pts, std::vector<int>& vtkIds)
+     {
+       vtkIdType point = pts[i];
+       int numCells = _grid->GetLinks()->GetNcells(point);
+-      vtkIdType *cells = _grid->GetLinks()->GetCells(point);
++      vtkIdTypePtr cells = _grid->GetLinks()->GetCells(point);
+       for (int j = 0; j < numCells; j++)
+         {
+           int vtkCellId = cells[j];
 @@ -532,7 +532,7 @@ int SMDS_Down2D::computeVolumeIds(int cellId, int* ids)
    // --- find point id's of the face
  
@@ -97,6 +110,15 @@ index d6049c0bd..77555d5bc 100644
    _grid->GetCellPoints(cellId, npts, pts);
    vector<int> nodes;
    for (int i = 0; i < npts; i++)
+@@ -577,7 +577,7 @@ int SMDS_Down2D::computeVolumeIdsFromNodesFace(int* pts, int npts, int* ids)
+       vtkIdType point = pts[i];
+       int numCells = _grid->GetLinks()->GetNcells(point);
+       //MESSAGE("cells pour " << i << " " << numCells);
+-      vtkIdType *cells = _grid->GetLinks()->GetCells(point);
++      vtkIdTypePtr cells = _grid->GetLinks()->GetCells(point);
+       for (int j = 0; j < numCells; j++)
+         {
+           int vtkCellId = cells[j];
 @@ -627,7 +627,7 @@ int SMDS_Down2D::computeVolumeIdsFromNodesFace(int* pts, int npts, int* ids)
  void SMDS_Down2D::setTempNodes(int cellId, int vtkId)
  {
@@ -260,10 +282,10 @@ index d6049c0bd..77555d5bc 100644
  
    // --- create all the ordered list of node id's for each face
 diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp
-index 4ac6fd768..51b281699 100644
+index 61c8e751d94..1eac2907d3d 100644
 --- src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp
 +++ src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp
-@@ -4763,7 +4763,11 @@ void SMDS_Mesh::dumpGrid(string ficdump)
+@@ -4768,7 +4768,11 @@ void SMDS_Mesh::dumpGrid(string ficdump)
          ficcon << endl;
    }
    ficcon << "-------------------------------- connectivity " <<  nbPoints << endl;
@@ -277,35 +299,40 @@ index 4ac6fd768..51b281699 100644
    {
          int ncells = links->GetNcells(i);
 diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp
-index 95438eab0..a7f8059e0 100644
+index 95438eab064..0df32e3b97c 100644
 --- src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp
 +++ src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp
-@@ -147,7 +147,7 @@ bool SMDS_Mesh0DElement::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbN
+@@ -146,6 +146,17 @@ bool SMDS_Mesh0DElement::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbN
+   if ( nbNodes == 1 )
    {
      vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
++#ifdef VTK_CELL_ARRAY_V2
++    vtkNew<vtkIdList> cellPoints;
++    grid->GetCellPoints(myVtkID, cellPoints.GetPointer());
++    if (nbNodes != cellPoints->GetNumberOfIds())
++    {
++      MESSAGE("ChangeNodes problem: not the same number of nodes " << cellPoints->GetNumberOfIds() << " -> " << nbNodes);
++      return false;
++    }
++    myNode = nodes[0];
++    cellPoints->SetId(0, myNode->getVtkId());
++#else
      vtkIdType npts = 0;
--    vtkIdType* pts = 0;
-+    vtkIdTypePtr pts = 0;
+     vtkIdType* pts = 0;
      grid->GetCellPoints(myVtkID, npts, pts);
-     if (nbNodes != npts)
-     {
-@@ -155,7 +155,11 @@ bool SMDS_Mesh0DElement::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbN
-       return false;
+@@ -156,6 +167,7 @@ bool SMDS_Mesh0DElement::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbN
      }
      myNode = nodes[0];
-+#ifdef VTK_CELL_ARRAY_V2
-+//FIXME: vtk9
-+#else
      pts[0] = myNode->getVtkId();
 +#endif
  
      SMDS_Mesh::_meshList[myMeshId]->setMyModified();
      return true;
 diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp
-index f647a5f1b..5b903c8fb 100644
+index f647a5f1b8f..5b903c8fb55 100644
 --- src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp
 +++ src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp
-@@ -191,7 +191,7 @@ public:
+@@ -191,7 +191,7 @@ class SMDS_MeshNode_MyInvIterator: public SMDS_ElemIterator
  SMDS_ElemIteratorPtr SMDS_MeshNode::
  GetInverseElementIterator(SMDSAbs_ElementType type) const
  {
@@ -351,7 +378,7 @@ index f647a5f1b..5b903c8fb 100644
    if ( type == SMDSAbs_All )
      return l.ncells;
 diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
-index fbd903b1e..19ccebcab 100644
+index fbd903b1e74..ff2b81e9694 100644
 --- src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
 +++ src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
 @@ -139,8 +139,8 @@ int SMDS_UnstructuredGrid::InsertNextLinkedCell(int type, int npts, vtkIdType *p
@@ -370,7 +397,7 @@ index fbd903b1e..19ccebcab 100644
        newTypes->SetValue(alreadyCopied, this->Types->GetValue(j));
        idCellsOldToNew[j] = alreadyCopied; // old vtkId --> new vtkId
 +#ifdef VTK_CELL_ARRAY_V2
-+      vtkIdType oldLoc; //FIXME: vtk9
++      vtkIdType oldLoc = this->GetCellLocationsArray()->GetValue(j);
 +#else
        vtkIdType oldLoc = this->Locations->GetValue(j);
 +#endif
@@ -380,37 +407,47 @@ index fbd903b1e..19ccebcab 100644
        this->Connectivity->GetCell(oldLoc, nbpts, oldPtsCell);
        assert(nbpts < NBMAXNODESINCELL);
        //MESSAGE(j << " " << alreadyCopied << " " << (int)this->Types->GetValue(j) << " " << oldLoc << " " << nbpts );
-@@ -953,14 +957,18 @@ void SMDS_UnstructuredGrid::GetNodeIds(std::set<int>& nodeSet, int downId, unsig
+@@ -952,6 +956,21 @@ void SMDS_UnstructuredGrid::GetNodeIds(std::set<int>& nodeSet, int downId, unsig
+  */
  void SMDS_UnstructuredGrid::ModifyCellNodes(int vtkVolId, std::map<int, int> localClonedNodeIds)
  {
-   vtkIdType npts = 0;
--  vtkIdType *pts; // will refer to the point id's of the face
-+  vtkIdTypePtr pts; // will refer to the point id's of the face
-   this->GetCellPoints(vtkVolId, npts, pts);
-   for (int i = 0; i < npts; i++)
-     {
-       if (localClonedNodeIds.count(pts[i]))
-         {
-           vtkIdType oldpt = pts[i];
 +#ifdef VTK_CELL_ARRAY_V2
-+//FIXME: vtk9
++  vtkNew<vtkIdList> cellPoints;
++  this->GetCellPoints(vtkVolId, cellPoints.GetPointer());
++  for (vtkIdType i = 0; i < cellPoints->GetNumberOfIds(); i++)
++    {
++      if (localClonedNodeIds.count(cellPoints->GetId(i)))
++        {
++          vtkIdType oldpt = cellPoints->GetId(i);
++          cellPoints->SetId(i, localClonedNodeIds[oldpt]);
++          //MESSAGE(oldpt << " --> " << pts[i]);
++          //this->RemoveReferenceToCell(oldpt, vtkVolId);
++          //this->AddReferenceToCell(pts[i], vtkVolId);
++        }
++    }
 +#else
-           pts[i] = localClonedNodeIds[oldpt];
-+#endif
-           //MESSAGE(oldpt << " --> " << pts[i]);
-           //this->RemoveReferenceToCell(oldpt, vtkVolId);
+   vtkIdType npts = 0;
+   vtkIdType *pts; // will refer to the point id's of the face
+   this->GetCellPoints(vtkVolId, npts, pts);
+@@ -966,6 +985,7 @@ void SMDS_UnstructuredGrid::ModifyCellNodes(int vtkVolId, std::map<int, int> loc
            //this->AddReferenceToCell(pts[i], vtkVolId);
-@@ -995,11 +1003,20 @@ void SMDS_UnstructuredGrid::BuildLinks()
+         }
+     }
++#endif
+ }
+ 
+ /*! reorder the nodes of a face
+@@ -995,11 +1015,20 @@ void SMDS_UnstructuredGrid::BuildLinks()
      this->Links->UnRegister(this);
      }
  
 +#ifdef VTK_CELL_ARRAY_V2
-+//FIXME: vtk9
 +  this->Links = SMDS_CellLinks::New();
-+  //this->Links->Allocate(this->GetNumberOfPoints());
-+  this->Links->Register(this);
-+  //this->Links->BuildLinks(this, this->Connectivity);
-+  this->Links->Delete();
++  GetLinks()->Allocate(this->GetNumberOfPoints());
++  GetLinks()->Register(this);
++//FIXME: vtk9
++  GetLinks()->BuildLinks(this);
++  GetLinks()->Delete();
 +#else
    this->Links = SMDS_CellLinks::New();
    this->Links->Allocate(this->GetNumberOfPoints());
@@ -422,7 +459,7 @@ index fbd903b1e..19ccebcab 100644
  
  /*! Create a volume (prism or hexahedron) by duplication of a face.
 diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp
-index deb05985f..63b6eabb7 100644
+index deb05985f00..63b6eabb704 100644
 --- src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp
 +++ src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp
 @@ -33,7 +33,8 @@ SMDS_VtkCellIterator::SMDS_VtkCellIterator(SMDS_Mesh* mesh, int vtkCellId, SMDSA
@@ -454,31 +491,38 @@ index deb05985f..63b6eabb7 100644
      int id = 0;
      _nbNodesInFaces = 0;
 diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp
-index 9786abf9a..58d2df3cf 100644
+index 9786abf9aae..6d772a3cd4a 100644
 --- src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp
 +++ src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp
-@@ -68,7 +68,7 @@ bool SMDS_VtkEdge::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
+@@ -67,6 +67,19 @@ bool SMDS_VtkEdge::ChangeNodes(const SMDS_MeshNode * node1, const SMDS_MeshNode
+ bool SMDS_VtkEdge::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
  {
    vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
++#ifdef VTK_CELL_ARRAY_V2
++  vtkNew<vtkIdList> cellPoints;
++  grid->GetCellPoints(myVtkID, cellPoints.GetPointer());
++  if (nbNodes != cellPoints->GetNumberOfIds())
++    {
++      MESSAGE("ChangeNodes problem: not the same number of nodes " << cellPoints->GetNumberOfIds() << " -> " << nbNodes);
++      return false;
++    }
++  for (int i = 0; i < nbNodes; i++)
++    {
++      cellPoints->SetId(i, nodes[i]->getVtkId());
++    }
++#else
    vtkIdType npts = 0;
--  vtkIdType* pts = 0;
-+  vtkIdTypePtr pts = 0;
+   vtkIdType* pts = 0;
    grid->GetCellPoints(myVtkID, npts, pts);
-   if (nbNodes != npts)
+@@ -79,6 +92,7 @@ bool SMDS_VtkEdge::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
      {
-@@ -77,7 +77,11 @@ bool SMDS_VtkEdge::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
-     }
-   for (int i = 0; i < nbNodes; i++)
-     {
-+#ifdef VTK_CELL_ARRAY_V2
-+//FIXME: vtk9
-+#else
        pts[i] = nodes[i]->getVtkId();
-+#endif
      }
++#endif
    SMDS_Mesh::_meshList[myMeshId]->setMyModified();
    return true;
-@@ -87,7 +91,7 @@ bool SMDS_VtkEdge::IsMediumNode(const SMDS_MeshNode* node) const
+ }
+@@ -87,7 +101,7 @@ bool SMDS_VtkEdge::IsMediumNode(const SMDS_MeshNode* node) const
  {
    vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
    vtkIdType npts = 0;
@@ -487,7 +531,7 @@ index 9786abf9a..58d2df3cf 100644
    grid->GetCellPoints(myVtkID, npts, pts);
    //MESSAGE("IsMediumNode " << npts  << " " << (node->getVtkId() == pts[npts-1]));
    return ((npts == 3) && (node->getVtkId() == pts[2]));
-@@ -137,7 +141,8 @@ const SMDS_MeshNode*
+@@ -137,7 +151,8 @@ const SMDS_MeshNode*
  SMDS_VtkEdge::GetNode(const int ind) const
  {
    vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
@@ -498,31 +542,38 @@ index 9786abf9a..58d2df3cf 100644
    return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ ind ]);
  }
 diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp
-index 1389e0d35..a92601f1e 100644
+index 1389e0d3585..cb981bfb18e 100644
 --- src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp
 +++ src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp
-@@ -102,7 +102,7 @@ bool SMDS_VtkFace::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
+@@ -101,6 +101,19 @@ void SMDS_VtkFace::initQuadPoly(const std::vector<vtkIdType>& nodeIds, SMDS_Mesh
+ bool SMDS_VtkFace::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
  {
    vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
++#ifdef VTK_CELL_ARRAY_V2
++  vtkNew<vtkIdList> cellPoints;
++  grid->GetCellPoints(myVtkID, cellPoints.GetPointer());
++  if (nbNodes != cellPoints->GetNumberOfIds())
++    {
++      MESSAGE("ChangeNodes problem: not the same number of nodes " << cellPoints->GetNumberOfIds() << " -> " << nbNodes);
++      return false;
++    }
++  for (int i = 0; i < nbNodes; i++)
++    {
++      cellPoints->SetId(i, nodes[i]->getVtkId());
++    }
++#else
    vtkIdType npts = 0;
--  vtkIdType* pts = 0;
-+  vtkIdTypePtr pts = 0;
+   vtkIdType* pts = 0;
    grid->GetCellPoints(myVtkID, npts, pts);
-   if (nbNodes != npts)
+@@ -113,6 +126,7 @@ bool SMDS_VtkFace::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
      {
-@@ -111,7 +111,11 @@ bool SMDS_VtkFace::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
-     }
-   for (int i = 0; i < nbNodes; i++)
-     {
-+#ifdef VTK_CELL_ARRAY_V2
-+//FIXME: vtk9
-+#else
        pts[i] = nodes[i]->getVtkId();
-+#endif
      }
++#endif
    SMDS_Mesh::_meshList[myMeshId]->setMyModified();
    return true;
-@@ -173,7 +177,8 @@ const SMDS_MeshNode*
+ }
+@@ -173,7 +187,8 @@ const SMDS_MeshNode*
  SMDS_VtkFace::GetNode(const int ind) const
  {
    vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
@@ -532,7 +583,7 @@ index 1389e0d35..a92601f1e 100644
    grid->GetCellPoints( this->myVtkID, npts, pts );
    return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ ind ]);
  }
-@@ -186,7 +191,8 @@ SMDS_VtkFace::GetNode(const int ind) const
+@@ -186,7 +201,8 @@ SMDS_VtkFace::GetNode(const int ind) const
  int SMDS_VtkFace::GetNodeIndex( const SMDS_MeshNode* node ) const
  {
    vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
@@ -542,7 +593,7 @@ index 1389e0d35..a92601f1e 100644
    grid->GetCellPoints( this->myVtkID, npts, pts );
    for ( vtkIdType i = 0; i < npts; ++i )
      if ( pts[i] == node->getVtkId() )
-@@ -251,7 +257,7 @@ bool SMDS_VtkFace::IsMediumNode(const SMDS_MeshNode* node) const
+@@ -251,7 +267,7 @@ bool SMDS_VtkFace::IsMediumNode(const SMDS_MeshNode* node) const
      return false;
    }
    vtkIdType npts = 0;
@@ -551,48 +602,58 @@ index 1389e0d35..a92601f1e 100644
    grid->GetCellPoints(myVtkID, npts, pts);
    vtkIdType nodeId = node->getVtkId();
    for (int rank = 0; rank < npts; rank++)
-@@ -357,10 +363,14 @@ void SMDS_VtkFace::ChangeApex(SMDS_MeshNode* node)
+@@ -356,11 +372,18 @@ SMDS_NodeIteratorPtr SMDS_VtkFace::interlacedNodesIterator() const
+ void SMDS_VtkFace::ChangeApex(SMDS_MeshNode* node)
  {
    vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
++#ifdef VTK_CELL_ARRAY_V2
++  vtkNew<vtkIdList> cellPoints;
++  grid->GetCellPoints(myVtkID, cellPoints.GetPointer());
++  grid->RemoveReferenceToCell(cellPoints->GetId(0), myVtkID);
++  cellPoints->SetId(0, node->getVtkId());
++#else
    vtkIdType npts = 0;
--  vtkIdType* pts = 0;
-+  vtkIdTypePtr pts = 0;
+   vtkIdType* pts = 0;
    grid->GetCellPoints(myVtkID, npts, pts);
    grid->RemoveReferenceToCell(pts[0], myVtkID);
-+#ifdef VTK_CELL_ARRAY_V2
-+//FIXME: vtk9
-+#else
    pts[0] = node->getVtkId();
 +#endif
    node->AddInverseElement(this),
    SMDS_Mesh::_meshList[myMeshId]->setMyModified();
  }
 diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp
-index 015edf75f..da2f73ffb 100644
+index 015edf75fd2..19ebd0746c8 100644
 --- src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp
 +++ src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp
-@@ -134,7 +134,7 @@ bool SMDS_VtkVolume::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes
+@@ -133,6 +133,19 @@ void SMDS_VtkVolume::initPoly(const std::vector<vtkIdType>& nodeIds,
+ bool SMDS_VtkVolume::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
  {
    vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
++#ifdef VTK_CELL_ARRAY_V2
++  vtkNew<vtkIdList> cellPoints;
++  grid->GetCellPoints(myVtkID, cellPoints.GetPointer());
++  if (nbNodes != cellPoints->GetNumberOfIds())
++    {
++      MESSAGE("ChangeNodes problem: not the same number of nodes " << cellPoints->GetNumberOfIds() << " -> " << nbNodes);
++      return false;
++    }
++  for (int i = 0; i < nbNodes; i++)
++    {
++      cellPoints->SetId(i, nodes[i]->getVtkId());
++    }
++#else
    vtkIdType npts = 0;
--  vtkIdType* pts = 0;
-+  vtkIdTypePtr pts = 0;
+   vtkIdType* pts = 0;
    grid->GetCellPoints(myVtkID, npts, pts);
-   if (nbNodes != npts)
-     {
-@@ -143,7 +143,11 @@ bool SMDS_VtkVolume::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes
-     }
-   for (int i = 0; i < nbNodes; i++)
+@@ -145,6 +158,7 @@ bool SMDS_VtkVolume::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes
      {
-+#ifdef VTK_CELL_ARRAY_V2
-+//FIXME: vtk9
-+#else
        pts[i] = nodes[i]->getVtkId();
-+#endif
      }
++#endif
    SMDS_Mesh::_meshList[myMeshId]->setMyModified();
    return true;
-@@ -207,7 +211,7 @@ int SMDS_VtkVolume::NbFaces() const
+ }
+@@ -207,7 +221,7 @@ int SMDS_VtkVolume::NbFaces() const
      case VTK_POLYHEDRON:
        {
          vtkIdType nFaces = 0;
@@ -601,7 +662,7 @@ index 015edf75f..da2f73ffb 100644
          grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
          nbFaces = nFaces;
          break;
-@@ -236,7 +240,7 @@ int SMDS_VtkVolume::NbNodes() const
+@@ -236,7 +250,7 @@ int SMDS_VtkVolume::NbNodes() const
    else
      {
        vtkIdType nFaces = 0;
@@ -610,7 +671,7 @@ index 015edf75f..da2f73ffb 100644
        grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
        int id = 0;
        for (int i = 0; i < nFaces; i++)
-@@ -276,7 +280,7 @@ int SMDS_VtkVolume::NbEdges() const
+@@ -276,7 +290,7 @@ int SMDS_VtkVolume::NbEdges() const
      case VTK_POLYHEDRON:
        {
          vtkIdType nFaces = 0;
@@ -619,7 +680,7 @@ index 015edf75f..da2f73ffb 100644
          grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
          nbEdges = 0;
          int id = 0;
-@@ -312,7 +316,7 @@ int SMDS_VtkVolume::NbFaceNodes(const int face_ind) const
+@@ -312,7 +326,7 @@ int SMDS_VtkVolume::NbFaceNodes(const int face_ind) const
    if (aVtkType == VTK_POLYHEDRON)
      {
        vtkIdType nFaces = 0;
@@ -628,7 +689,7 @@ index 015edf75f..da2f73ffb 100644
        grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
        int id = 0;
        for (int i = 0; i < nFaces; i++)
-@@ -342,7 +346,7 @@ const SMDS_MeshNode* SMDS_VtkVolume::GetFaceNode(const int face_ind, const int n
+@@ -342,7 +356,7 @@ const SMDS_MeshNode* SMDS_VtkVolume::GetFaceNode(const int face_ind, const int n
    if (aVtkType == VTK_POLYHEDRON)
      {
        vtkIdType nFaces = 0;
@@ -637,7 +698,7 @@ index 015edf75f..da2f73ffb 100644
        grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
        int id = 0;
        for (int i = 0; i < nFaces; i++)
-@@ -372,7 +376,7 @@ std::vector<int> SMDS_VtkVolume::GetQuantities() const
+@@ -372,7 +386,7 @@ std::vector<int> SMDS_VtkVolume::GetQuantities() const
    if (aVtkType == VTK_POLYHEDRON)
      {
        vtkIdType nFaces = 0;
@@ -646,7 +707,7 @@ index 015edf75f..da2f73ffb 100644
        grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
        int id = 0;
        for (int i = 0; i < nFaces; i++)
-@@ -430,7 +434,7 @@ const SMDS_MeshNode* SMDS_VtkVolume::GetNode(const int ind) const
+@@ -430,7 +444,7 @@ const SMDS_MeshNode* SMDS_VtkVolume::GetNode(const int ind) const
    if ( aVtkType == VTK_POLYHEDRON)
    {
      vtkIdType nFaces = 0;
@@ -655,7 +716,7 @@ index 015edf75f..da2f73ffb 100644
      grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
      int id = 0, nbPoints = 0;
      for (int i = 0; i < nFaces; i++)
-@@ -443,7 +447,8 @@ const SMDS_MeshNode* SMDS_VtkVolume::GetNode(const int ind) const
+@@ -443,7 +457,8 @@ const SMDS_MeshNode* SMDS_VtkVolume::GetNode(const int ind) const
      }
      return 0;
    }
@@ -665,7 +726,7 @@ index 015edf75f..da2f73ffb 100644
    grid->GetCellPoints( this->myVtkID, npts, pts );
    const std::vector<int>& interlace = SMDS_MeshCell::fromVtkOrder( VTKCellType( aVtkType ));
    return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ interlace.empty() ? ind : interlace[ind]] );
-@@ -460,7 +465,7 @@ int SMDS_VtkVolume::GetNodeIndex( const SMDS_MeshNode* node ) const
+@@ -460,7 +475,7 @@ int SMDS_VtkVolume::GetNodeIndex( const SMDS_MeshNode* node ) const
    if ( aVtkType == VTK_POLYHEDRON)
    {
      vtkIdType nFaces = 0;
@@ -674,7 +735,7 @@ index 015edf75f..da2f73ffb 100644
      grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
      int id = 0;
      for (int iF = 0; iF < nFaces; iF++)
-@@ -473,7 +478,8 @@ int SMDS_VtkVolume::GetNodeIndex( const SMDS_MeshNode* node ) const
+@@ -473,7 +488,8 @@ int SMDS_VtkVolume::GetNodeIndex( const SMDS_MeshNode* node ) const
      }
      return -1;
    }
@@ -684,7 +745,7 @@ index 015edf75f..da2f73ffb 100644
    grid->GetCellPoints( this->myVtkID, npts, pts );
    for ( vtkIdType i = 0; i < npts; ++i )
      if ( pts[i] == node->getVtkId() )
-@@ -534,7 +540,7 @@ bool SMDS_VtkVolume::IsMediumNode(const SMDS_MeshNode* node) const
+@@ -534,7 +550,7 @@ bool SMDS_VtkVolume::IsMediumNode(const SMDS_MeshNode* node) const
        return false;
    }
    vtkIdType npts = 0;
@@ -694,10 +755,10 @@ index 015edf75f..da2f73ffb 100644
    vtkIdType nodeId = node->getVtkId();
    for (int rank = 0; rank < npts; rank++)
 diff --git src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
-index a742702ff..1ff4d5eef 100644
+index fcd044b00f2..f54c24f8618 100644
 --- src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
 +++ src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
-@@ -11343,7 +11343,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
+@@ -11348,7 +11348,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
              {
                int oldId = *itn;
                //MESSAGE("     node " << oldId);
@@ -706,7 +767,7 @@ index a742702ff..1ff4d5eef 100644
                for (int i=0; i<l.ncells; i++)
                  {
                    int vtkId = l.cells[i];
-@@ -11522,7 +11522,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
+@@ -11527,7 +11527,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
                                            //MESSAGE("  domain " << idom << " volume " << elem->GetID());
                                            double values[3];
                                            vtkIdType npts = 0;
@@ -715,7 +776,7 @@ index a742702ff..1ff4d5eef 100644
                                            grid->GetCellPoints(vtkVolIds[ivol], npts, pts);
                                            SMDS_VtkVolume::gravityCenter(grid, pts, npts, values);
                                            if (id ==0)
-@@ -11703,7 +11703,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
+@@ -11708,7 +11708,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
          {
            int oldId = itnod->first;
            //MESSAGE("     node " << oldId);
@@ -724,7 +785,7 @@ index a742702ff..1ff4d5eef 100644
            for (int i = 0; i < l.ncells; i++)
              {
                int vtkId = l.cells[i];
-@@ -12160,7 +12160,7 @@ void SMESH_MeshEditor::CreateHoleSkin(double radius,
+@@ -12165,7 +12165,7 @@ void SMESH_MeshEditor::CreateHoleSkin(double radius,
            MESSAGE("volume to check,  vtkId " << vtkId << " smdsId " << meshDS->fromVtkToSmds(vtkId));
            bool volInside = false;
            vtkIdType npts = 0;
@@ -733,28 +794,3 @@ index a742702ff..1ff4d5eef 100644
            grid->GetCellPoints(vtkId, npts, pts);
            for (int i=0; i<npts; i++)
              {
-diff --git src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp b/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp
-index dde2bd824..3acfead65 100644
---- src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp
-+++ src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp
-@@ -56,6 +56,11 @@
- 
- using namespace FemGui;
- 
-+#ifdef VTK_CELL_ARRAY_V2
-+typedef const vtkIdType* vtkIdTypePtr;
-+#else
-+typedef vtkIdType* vtkIdTypePtr;
-+#endif
- 
- PROPERTY_SOURCE(FemGui::ViewProviderFemPostObject, Gui::ViewProviderDocumentObject)
- 
-@@ -316,7 +321,7 @@ void ViewProviderFemPostObject::update3D() {
-     vtkDataArray *tcoords = NULL;
-     vtkCellArray *cells;
-     vtkIdType npts = 0;
--    vtkIdType *indx = 0;
-+    vtkIdTypePtr indx = 0;
- 
-     points = pd->GetPoints();
-     pntData = pd->GetPointData();
diff --git a/srcpkgs/freecad/patches/151-python-warning.patch b/srcpkgs/freecad/patches/151-python-warning.patch
deleted file mode 100644
index e76c8b1c654b..000000000000
--- a/srcpkgs/freecad/patches/151-python-warning.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-diff --git src/Mod/Fem/feminout/importFenicsMesh.py src/Mod/Fem/feminout/importFenicsMesh.py
-index 1bb40de..a0b5484 100644
---- src/Mod/Fem/feminout/importFenicsMesh.py
-+++ src/Mod/Fem/feminout/importFenicsMesh.py
-@@ -154,7 +154,7 @@ def export(objectslist, fileString):
-             FreeCAD.Console.PrintWarning("Tri6 -> Tri3, Tet10 -> Tet4, etc.\n")
-             writeFenicsXML.write_fenics_mesh_xml(obj, fileString)
-         elif fileExtension.lower() == '.xdmf':
--            if importToolsFem.get_FemMeshObjectMeshGroups(obj) is not ():
-+            if importToolsFem.get_FemMeshObjectMeshGroups(obj):
-                 # if there are groups found, make task panel available
-                 panel = WriteXDMFTaskPanel(obj, fileString)
-                 FreeCADGui.Control.showDialog(panel)
-diff --git src/Mod/Fem/feminout/writeFenicsXDMF.py src/Mod/Fem/feminout/writeFenicsXDMF.py
-index 9e7f01b..5a93823 100644
---- src/Mod/Fem/feminout/writeFenicsXDMF.py
-+++ src/Mod/Fem/feminout/writeFenicsXDMF.py
-@@ -258,7 +258,7 @@ def write_fenics_mesh_xdmf(fem_mesh_obj, outputfile, group_values_dict={}, encod
-     fem_mesh = fem_mesh_obj.FemMesh
-     gmshgroups = get_FemMeshObjectMeshGroups(fem_mesh_obj)
- 
--    if gmshgroups is not ():
-+    if gmshgroups:
-         print('found mesh groups')
- 
-     for g in gmshgroups:
-diff --git src/Mod/PartDesign/WizardShaft/Shaft.py src/Mod/PartDesign/WizardShaft/Shaft.py
-index c519b97..8c20eb4 100644
---- src/Mod/PartDesign/WizardShaft/Shaft.py
-+++ src/Mod/PartDesign/WizardShaft/Shaft.py
-@@ -88,7 +88,7 @@ class Shaft:
-         # We don't call equilibrium() here because the new segment has no constraints defined yet
-         # Fix face reference of fixed segment if it is the last one
-         for i in range(1,  len(self.segments)):
--            if self.segments[i].constraintType is not "Fixed":
-+            if self.segments[i].constraintType != "Fixed":
-                 continue
-             if i == len(self.segments) - 1:
-                 self.segments[index].constraint.References = [( self.feature.feature,  "Face%u" % (2 * (index+1) + 1) )]
diff --git a/srcpkgs/freecad/patches/152-cmake-vtk9.patch b/srcpkgs/freecad/patches/152-cmake-vtk9.patch
new file mode 100644
index 000000000000..f5c6d4000497
--- /dev/null
+++ b/srcpkgs/freecad/patches/152-cmake-vtk9.patch
@@ -0,0 +1,53 @@
+--- cMake/FreeCAD_Helpers/SetupSalomeSMESH.cmake	2020-11-26 15:59:27.000000000 +0100
++++ cMake/FreeCAD_Helpers/SetupSalomeSMESH.cmake	2020-11-26 23:09:12.778262636 +0100
+@@ -11,6 +11,8 @@
+         set(SMESH_VERSION_TWEAK 0)
+ 
+         #if we use smesh we definitely also need vtk, no matter of external or internal smesh
++        find_package(VTK REQUIRED NO_MODULE)
++        if(${VTK_MAJOR_VERSION} LESS 9)
+         set (VTK_COMPONENTS
+             vtkCommonCore
+             vtkCommonDataModel
+@@ -23,18 +25,37 @@
+             vtkFiltersSources
+             vtkFiltersGeometry
+         )
+-
+-        # check which modules are available
+-        if(UNIX OR WIN32)
+             find_package(VTK COMPONENTS vtkCommonCore REQUIRED NO_MODULE)
+             list(APPEND VTK_COMPONENTS vtkIOMPIParallel vtkParallelMPI vtkhdf5 vtkFiltersParallelDIY2 vtkRenderingCore vtkInteractionStyle vtkRenderingFreeType vtkRenderingOpenGL2)
++        else()
++            # VTK 9 changed its component names
++            set (VTK_COMPONENTS
++                CommonCore
++                CommonDataModel
++                FiltersVerdict
++                IOXML
++                FiltersCore
++                FiltersGeneral
++                IOLegacy
++                FiltersExtraction
++                FiltersSources
++                FiltersGeometry
++            )
++            find_package(VTK COMPONENTS CommonCore REQUIRED NO_MODULE)
++            list(APPEND VTK_COMPONENTS IOMPIParallel ParallelMPI hdf5 FiltersParallelDIY2 RenderingCore InteractionStyle RenderingFreeType RenderingOpenGL2)
++        endif()
++
++        # check which modules are available
+             foreach(_module ${VTK_COMPONENTS})
++            if(${VTK_MAJOR_VERSION} LESS 9)
+                 list (FIND VTK_MODULES_ENABLED ${_module} _index)
++            else()
++                list (FIND VTK_AVAILABLE_COMPONENTS ${_module} _index)
++            endif()
+                 if (${_index} GREATER -1)
+                     list(APPEND AVAILABLE_VTK_COMPONENTS ${_module})
+                 endif()
+             endforeach()
+-        endif()
+ 
+         # don't check VERSION 6 as this would exclude VERSION 7
+         if(AVAILABLE_VTK_COMPONENTS)
diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template
index 6fe749b53d70..6e0556c75c8b 100644
--- a/srcpkgs/freecad/template
+++ b/srcpkgs/freecad/template
@@ -1,17 +1,19 @@
 # Template file for 'freecad'
+# XXX runtime: help (F1) does not work
 pkgname=freecad
-version=0.18.4
-revision=10
+version=0.19.1
+revision=1
 wrksrc="FreeCAD-${version}"
 build_style=cmake
 
-# CMAKE_INSTALL_LIBDIR by default doesn't use PREFIX, so we set it manually
 _inst_prefix=/usr/lib/${pkgname}
 configure_args="
+ -DPYTHON_EXECUTABLE=/usr/bin/python3
  -DBUILD_QT5=ON
+ -DBUILD_FEM_NETGEN=OFF
  -DCMAKE_INSTALL_PREFIX=${_inst_prefix}
- -DCMAKE_INSTALL_LIBDIR=${_inst_prefix}/lib
  -DCMAKE_INSTALL_DATAROOTDIR=/usr/share
+ -DCMAKE_INSTALL_DATADIR=/usr/share/${pkgname}
  -DMEDFILE_INCLUDE_DIRS=/usr/include/med
  -DPYSIDE2RCCBINARY=/usr/bin/rcc-qt5
  -DPYSIDE2UICBINARY=/usr/bin/uic-qt5"
@@ -21,20 +23,20 @@ makedepends="python3-devel boost-devel libxerces-c-devel zlib-devel occt-devel
  coin3-devel libshiboken2-devel libspnav-devel pyside2-tools
  liblz4-devel libpyside2-python3-devel python3-matplotlib netcdf-devel
  jsoncpp-devel qt5-devel qt5-svg-devel qt5-tools-devel qt5-webkit-devel
- qt5-x11extras-devel coin3-doc glew-devel"
+ qt5-xmlpatterns-devel coin3-doc glew-devel"
 
-# FreeCAD help: qt5/assistant with datas in SQLite format
+# FreeCAD help: qt5/assistant with SQLite storage
 depends="python3-matplotlib python3-pyside2 qt5-plugin-sqlite python3-pivy"
 
 python_version=3
-pycompile_dirs="usr/lib/${pkgname}/Mod usr/lib/${pkgname}/data/Mod"
+pycompile_dirs="usr/lib/${pkgname}/Mod"
 
 short_desc="General purpose 3D CAD modeler"
 maintainer="yopito <pierre.bourgin@free.fr>"
 license="LGPL-2.0-or-later"
 homepage="https://freecadweb.org/"
 distfiles="https://github.com/FreeCAD/FreeCAD/archive/${version}.tar.gz"
-checksum=4e0cce447b31b8989a00cf68c49ae012ce8e5546a56c6e0874fbd8f7ddedffd2
+checksum=5ec0003c18df204f7b449d4ac0a82f945b41613a0264127de3ef16f6b2efa60f
 
 if [ "$XBPS_TARGET_LIBC" = musl ]; then
 	makedepends+=" libexecinfo-devel"
@@ -43,13 +45,13 @@ fi
 
 post_extract() {
 	# Report exact minor version
-	sed -i -e "s,^\(set(PACKAGE_VERSION_MINOR\) .*,\1 \"${version#*.}\")," CMakeLists.txt
+	vsed -i -e "s,^\(set(PACKAGE_VERSION_MINOR\) .*,\1 \"${version#*.}\")," CMakeLists.txt
 
 	# SubWCRev.py (SCM check) reports "unknown" for these fields
-	sed -i -e "s,\${PACKAGE_WCREF},${revision}_voidlinux," \
-	       -e "s,\${PACKAGE_WCDATE},(from release)," \
-	       -e "s,\${PACKAGE_WCURL},VoidLinux package ${pkgname}," \
-	       src/Build/Version.h.cmake
+	vsed -e "s,\${PACKAGE_WCREF},${revision}_voidlinux," \
+	     -e "s,\${PACKAGE_WCDATE},(from release)," \
+	     -e "s,\${PACKAGE_WCURL},VoidLinux package ${pkgname}," \
+	     -i src/Build/Version.h.cmake
 }
 
 post_install() {

^ permalink raw reply	[flat|nested] 29+ messages in thread
* [PR PATCH] Freecad: Update to 0.19.1
@ 2021-03-15  0:21 sww1235
  2021-03-15  0:32 ` ericonr
                   ` (18 more replies)
  0 siblings, 19 replies; 29+ messages in thread
From: sww1235 @ 2021-03-15  0:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 690 bytes --]

There is a new pull request by sww1235 against master on the void-packages repository

https://github.com/sww1235/void-packages freecad0.19.1
https://github.com/void-linux/void-packages/pull/29466

Freecad: Update to 0.19.1


#### Have the results of the proposed changes been tested?
- [X ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

I tested these changes in a separate branch that I used for testing the FreeCAD master prior to 0.19 being released.


A patch file from https://github.com/void-linux/void-packages/pull/29466.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-freecad0.19.1-29466.patch --]
[-- Type: text/x-diff, Size: 95426 bytes --]

From db9df6e940394d2f17cd7d21de952e266ac8e1eb Mon Sep 17 00:00:00 2001
From: Stephen Walker-Weinshenker <sww1235@gmail.com>
Date: Sat, 13 Mar 2021 19:06:12 -0700
Subject: [PATCH 1/2] FreeCAD: update to 0.19.1

---
 srcpkgs/freecad/patches/001-python3.patch     |  11 -
 srcpkgs/freecad/patches/002-execinfo.patch    |  30 -
 .../patches/020-namespace-missing-std.patch   | 127 ---
 srcpkgs/freecad/patches/090-py38.patch        |  22 -
 srcpkgs/freecad/patches/091-py39.patch        | 174 ----
 ...00-detect-shiboken2-and-pyside2-5.14.patch |  33 -
 .../101-pyside2-tool-5.14-support.patch       |  67 --
 srcpkgs/freecad/patches/102-qt5-5.15.0.patch  |  14 -
 .../patches/103-find-coin3v4-doc.patch        |  50 --
 srcpkgs/freecad/patches/150-vtk9.patch        | 760 ------------------
 .../freecad/patches/151-python-warning.patch  |  39 -
 srcpkgs/freecad/template                      |   9 +-
 12 files changed, 4 insertions(+), 1332 deletions(-)
 delete mode 100644 srcpkgs/freecad/patches/001-python3.patch
 delete mode 100644 srcpkgs/freecad/patches/002-execinfo.patch
 delete mode 100644 srcpkgs/freecad/patches/020-namespace-missing-std.patch
 delete mode 100644 srcpkgs/freecad/patches/090-py38.patch
 delete mode 100644 srcpkgs/freecad/patches/091-py39.patch
 delete mode 100644 srcpkgs/freecad/patches/100-detect-shiboken2-and-pyside2-5.14.patch
 delete mode 100644 srcpkgs/freecad/patches/101-pyside2-tool-5.14-support.patch
 delete mode 100644 srcpkgs/freecad/patches/102-qt5-5.15.0.patch
 delete mode 100644 srcpkgs/freecad/patches/103-find-coin3v4-doc.patch
 delete mode 100644 srcpkgs/freecad/patches/150-vtk9.patch
 delete mode 100644 srcpkgs/freecad/patches/151-python-warning.patch

diff --git a/srcpkgs/freecad/patches/001-python3.patch b/srcpkgs/freecad/patches/001-python3.patch
deleted file mode 100644
index b49978adcf37..000000000000
--- a/srcpkgs/freecad/patches/001-python3.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- CMakeLists.txt
-+++ CMakeLists.txt
-@@ -445,7 +445,7 @@
- 
- # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=677598
- # Acceptable versions of Python
--set(Python_ADDITIONAL_VERSIONS "2.7")
-+set(Python_ADDITIONAL_VERSIONS "2.7 3.6")
- 
- # For building on OS X
- if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
diff --git a/srcpkgs/freecad/patches/002-execinfo.patch b/srcpkgs/freecad/patches/002-execinfo.patch
deleted file mode 100644
index 9f9d797d00f2..000000000000
--- a/srcpkgs/freecad/patches/002-execinfo.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- src/App/Application.cpp.orig	2019-03-08 18:56:16.000000000 +0100
-+++ src/App/Application.cpp	2019-03-13 21:36:38.873587534 +0100
-@@ -1163,7 +1163,9 @@
- #endif
- 
- #if defined(FC_OS_LINUX)
-+#ifdef __GLIBC__
- #include <execinfo.h>
-+#endif
- #include <dlfcn.h>
- #include <cxxabi.h>
- 
-@@ -1175,6 +1177,7 @@
- // This function produces a stack backtrace with demangled function & method names.
- void printBacktrace(size_t skip=0)
- {
-+#ifdef __GLIBC__
-     void *callstack[128];
-     size_t nMaxFrames = sizeof(callstack) / sizeof(callstack[0]);
-     size_t nFrames = backtrace(callstack, nMaxFrames);
-@@ -1205,6 +1208,9 @@
-     }
- 
-     free(symbols);
-+#else
-+    std::cerr << "sorry, no backtrace on musl libc";
-+#endif
- }
- #endif
- 
diff --git a/srcpkgs/freecad/patches/020-namespace-missing-std.patch b/srcpkgs/freecad/patches/020-namespace-missing-std.patch
deleted file mode 100644
index 82033cd5afb4..000000000000
--- a/srcpkgs/freecad/patches/020-namespace-missing-std.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-# reason: fix build with gcc9
-# upstream: yes
-
-diff --git src/3rdParty/salomesmesh/inc/Rn.h src/3rdParty/salomesmesh/inc/Rn.h
-index 6ec871d93..e92d2275a 100644
---- src/3rdParty/salomesmesh/inc/Rn.h
-+++ src/3rdParty/salomesmesh/inc/Rn.h
-@@ -180,12 +180,12 @@ class R4: public R3
- {
-   friend std::ostream& operator <<(std::ostream& f, const R4 & P )
-   { f << P.x << ' ' << P.y << ' ' << P.z << ' ' << P.omega; return f; }
--  friend istream& operator >>(istream& f,  R4 & P)
-+  friend std::istream& operator >>(std::istream& f,  R4 & P)
-   { f >> P.x >>  P.y >>  P.z >> P.omega ; return f; }
- 
-   friend std::ostream& operator <<(std::ostream& f, const R4 * P )
-   { f << P->x << ' ' << P->y << ' ' << P->z << ' ' << P->omega; return f; }
--  friend istream& operator >>(istream& f,  R4 * P)
-+  friend std::istream& operator >>(std::istream& f,  R4 * P)
-   { f >> P->x >>  P->y >>  P->z >> P->omega ; return f; }
- 
- public:  
-
-
-diff --git src/Mod/Drawing/App/DrawingExport.cpp src/Mod/Drawing/App/DrawingExport.cpp
-index 0c3c23231..550b12c25 100644
---- src/Mod/Drawing/App/DrawingExport.cpp
-+++ src/Mod/Drawing/App/DrawingExport.cpp
-@@ -81,6 +81,7 @@
- #include <Base/Vector3D.h>
- 
- using namespace Drawing;
-+using namespace std;
- 
- TopoDS_Edge DrawingOutput::asCircle(const BRepAdaptor_Curve& c) const
- {
-diff --git src/Mod/Part/App/Geometry2d.cpp src/Mod/Part/App/Geometry2d.cpp
-index fb1de909c..979465533 100644
---- src/Mod/Part/App/Geometry2d.cpp
-+++ src/Mod/Part/App/Geometry2d.cpp
-@@ -83,6 +83,7 @@
- #include <Mod/Part/App/Geom2d/OffsetCurve2dPy.h>
- 
- using namespace Part;
-+using namespace std;
- 
- extern const char* gce_ErrorStatusText(gce_ErrorType et);
- 
-diff --git src/Mod/Raytracing/App/AppRaytracingPy.cpp src/Mod/Raytracing/App/AppRaytracingPy.cpp
-index d48c51c97..1bb2b1b01 100644
---- src/Mod/Raytracing/App/AppRaytracingPy.cpp
-+++ src/Mod/Raytracing/App/AppRaytracingPy.cpp
-@@ -40,6 +40,8 @@
- #include <Mod/Part/App/TopoShapePy.h>
- #include <App/Application.h>
- 
-+using namespace std;
-+
- 
- namespace Raytracing {
- class Module : public Py::ExtensionModule<Module>
-diff --git src/Mod/Raytracing/App/LuxFeature.cpp src/Mod/Raytracing/App/LuxFeature.cpp
-index 930fe12b7..d1e0a0089 100644
---- src/Mod/Raytracing/App/LuxFeature.cpp
-+++ src/Mod/Raytracing/App/LuxFeature.cpp
-@@ -38,6 +38,7 @@
- 
- 
- using namespace Raytracing;
-+using namespace std;
- 
- PROPERTY_SOURCE(Raytracing::LuxFeature, Raytracing::RaySegment)
- 
-diff --git src/Mod/Raytracing/App/RayFeature.cpp src/Mod/Raytracing/App/RayFeature.cpp
-index cdd2cb6dc..235a98685 100644
---- src/Mod/Raytracing/App/RayFeature.cpp
-+++ src/Mod/Raytracing/App/RayFeature.cpp
-@@ -36,6 +36,7 @@
- 
- 
- using namespace Raytracing;
-+using namespace std;
- 
- PROPERTY_SOURCE(Raytracing::RayFeature, Raytracing::RaySegment)
- 
-diff --git src/Mod/TechDraw/App/Geometry.cpp src/Mod/TechDraw/App/Geometry.cpp
-index c10b63177..d34eeb9bb 100644
---- src/Mod/TechDraw/App/Geometry.cpp
-+++ src/Mod/TechDraw/App/Geometry.cpp
-@@ -80,6 +80,7 @@
- #include "Geometry.h"
- 
- using namespace TechDraw;
-+using namespace std;
- 
- // Collection of Geometric Features
- Wire::Wire()
-
-
---- src/Mod/Part/App/PropertyTopoShape.cpp
-+++ src/Mod/Part/App/PropertyTopoShape.cpp
-@@ -281,11 +281,11 @@
- static Standard_Boolean  BRepTools_Write(const TopoDS_Shape& Sh, 
-                                    const Standard_CString File)
- {
--  ofstream os;
-+  std::ofstream os;
- #if OCC_VERSION_HEX >= 0x060800
--  OSD_OpenStream(os, File, ios::out);
-+  OSD_OpenStream(os, File, std::ios::out);
- #else
--  os.open(File, ios::out);
-+  os.open(File, std::ios::out);
- #endif
-   if (!os.rdbuf()->is_open()) return Standard_False;
- 
-
---- src/Mod/Part/App/Geometry.cpp
-+++ src/Mod/Part/App/Geometry.cpp
-@@ -141,6 +141,7 @@
- #include "Geometry.h"
- 
- using namespace Part;
-+using namespace std;
- 
- 
- const char* gce_ErrorStatusText(gce_ErrorType et)
diff --git a/srcpkgs/freecad/patches/090-py38.patch b/srcpkgs/freecad/patches/090-py38.patch
deleted file mode 100644
index 92566df9df3d..000000000000
--- a/srcpkgs/freecad/patches/090-py38.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 174011749d836f3b6c6ae2630f53b2f4c1f9d3fc Mon Sep 17 00:00:00 2001
-From: Richard <hobbes1069@gmail.com>
-Date: Thu, 17 Oct 2019 11:20:10 -0500
-Subject: [PATCH] Update swigpyrun.in for Python 3.8
-
-In Python 3.8 some functions related to thread state were intentionally made private.
-
-This fix (specific to FreeCAD) was suggested here:
-
-https://bugs.python.org/issue35886
-
---- src/Base/swigpyrun.inl
-+++ src/Base/swigpyrun.inl
-@@ -72,7 +72,7 @@ void cleanupSWIG_T(const char* TypeName)
- 
-     PyObject *module, *dict;
-     PyInterpreterState *interp = PyThreadState_GET()->interp;
--    PyObject *modules = interp->modules;
-+    PyObject *modules = PyImport_GetModuleDict();
-     module = PyDict_GetItemString(modules, "__builtin__");
-     if (module != NULL && PyModule_Check(module)) {
-         dict = PyModule_GetDict(module);
diff --git a/srcpkgs/freecad/patches/091-py39.patch b/srcpkgs/freecad/patches/091-py39.patch
deleted file mode 100644
index d03bb03adb21..000000000000
--- a/srcpkgs/freecad/patches/091-py39.patch
+++ /dev/null
@@ -1,174 +0,0 @@
-Fix for Python 3.9
-
-https://github.com/FreeCAD/FreeCAD/commit/ae641dc5278efafa22b168fc196875558b92e436
-
-diff --git src/Base/swigpyrun_1.3.25.h src/Base/swigpyrun_1.3.25.h
-index 91717210b..9ebadbc83 100644
---- src/Base/swigpyrun_1.3.25.h
-+++ src/Base/swigpyrun_1.3.25.h
-@@ -699,7 +699,11 @@ PySwigObject_type(void) {
-     0,					/*tp_itemsize*/
-     /* methods */
-     (destructor)PySwigObject_dealloc,	/*tp_dealloc*/
-+#if PY_VERSION_HEX < 0x03080000
-     (printfunc)PySwigObject_print,	/*tp_print*/
-+#else
-+    0,          /*tp_vectorcall_offset*/
-+#endif
-     (getattrfunc)0,			/*tp_getattr*/
-     (setattrfunc)0,			/*tp_setattr*/
-     (cmpfunc)PySwigObject_compare,	/*tp_compare*/
-@@ -859,7 +863,11 @@ PySwigPacked_type(void) {
-     0,					/*tp_itemsize*/
-     /* methods */
-     (destructor)PySwigPacked_dealloc,	/*tp_dealloc*/
-+#if PY_VERSION_HEX < 0x03080000
-     (printfunc)PySwigPacked_print,	/*tp_print*/
-+#else
-+    0,          /*tp_vectorcall_offset*/
-+#endif
-     (getattrfunc)0,			/*tp_getattr*/
-     (setattrfunc)0,			/*tp_setattr*/
-     (cmpfunc)PySwigPacked_compare,	/*tp_compare*/
-diff --git src/Base/swigpyrun_1.3.33.h src/Base/swigpyrun_1.3.33.h
-index f83ac1e89..afd5a8c50 100644
---- src/Base/swigpyrun_1.3.33.h
-+++ src/Base/swigpyrun_1.3.33.h
-@@ -1620,7 +1620,11 @@ _PySwigObject_type(void) {
- 	sizeof(PySwigObject),		    /* tp_basicsize */
- 	0,			            /* tp_itemsize */
- 	(destructor)PySwigObject_dealloc,   /* tp_dealloc */
-+#if PY_VERSION_HEX < 0x03080000
- 	(printfunc)PySwigObject_print,	    /* tp_print */
-+#else
-+	0, /*tp_vectorcall_offset*/
-+#endif
- #if PY_VERSION_HEX < 0x02020000
- 	(getattrfunc)PySwigObject_getattr,  /* tp_getattr */ 
- #else
-@@ -1790,7 +1794,11 @@ _PySwigPacked_type(void) {
- 	sizeof(PySwigPacked),		    /* tp_basicsize */	
- 	0,				    /* tp_itemsize */	
- 	(destructor)PySwigPacked_dealloc,   /* tp_dealloc */	
-+#if PY_VERSION_HEX < 0x03080000
- 	(printfunc)PySwigPacked_print,	    /* tp_print */   	
-+#else
-+	0, /*tp_vectorcall_offset*/
-+#endif
- 	(getattrfunc)0,			    /* tp_getattr */ 	
- 	(setattrfunc)0,			    /* tp_setattr */ 	
- 	(cmpfunc)PySwigPacked_compare,	    /* tp_compare */ 	
-diff --git src/Base/swigpyrun_1.3.36.h src/Base/swigpyrun_1.3.36.h
-index 02c58ad8a..12ad41e12 100644
---- src/Base/swigpyrun_1.3.36.h
-+++ src/Base/swigpyrun_1.3.36.h
-@@ -1628,7 +1628,12 @@ _PySwigObject_type(void) {
- 	sizeof(PySwigObject),		    /* tp_basicsize */
- 	0,			            /* tp_itemsize */
- 	(destructor)PySwigObject_dealloc,   /* tp_dealloc */
-+#if PY_VERSION_HEX < 0x03080000
- 	(printfunc)PySwigObject_print,	    /* tp_print */
-+#else
-+	0, /*tp_vectorcall_offset*/
-+#endif
-+
- #if PY_VERSION_HEX < 0x02020000
- 	(getattrfunc)PySwigObject_getattr,  /* tp_getattr */ 
- #else
-@@ -1798,7 +1803,11 @@ _PySwigPacked_type(void) {
- 	sizeof(PySwigPacked),		    /* tp_basicsize */	
- 	0,				    /* tp_itemsize */	
- 	(destructor)PySwigPacked_dealloc,   /* tp_dealloc */	
-+#if PY_VERSION_HEX < 0x03080000
- 	(printfunc)PySwigPacked_print,	    /* tp_print */   	
-+#else
-+	0, /*tp_vectorcall_offset*/
-+#endif
- 	(getattrfunc)0,			    /* tp_getattr */ 	
- 	(setattrfunc)0,			    /* tp_setattr */ 	
- 	(cmpfunc)PySwigPacked_compare,	    /* tp_compare */ 	
-diff --git src/Base/swigpyrun_1.3.38.h src/Base/swigpyrun_1.3.38.h
-index dae058c20..7cacc1579 100644
---- src/Base/swigpyrun_1.3.38.h
-+++ src/Base/swigpyrun_1.3.38.h
-@@ -1741,7 +1741,11 @@ _PySwigObject_type(void) {
- 	sizeof(SwigPyObject),		    /* tp_basicsize */
- 	0,			            /* tp_itemsize */
- 	(destructor)SwigPyObject_dealloc,   /* tp_dealloc */
-+#if PY_VERSION_HEX < 0x03080000
- 	(printfunc)SwigPyObject_print,	    /* tp_print */
-+#else
-+	0, /*tp_vectorcall_offset*/
-+#endif
- #if PY_VERSION_HEX < 0x02020000
- 	(getattrfunc)SwigPyObject_getattr,  /* tp_getattr */ 
- #else
-@@ -1919,7 +1923,11 @@ _PySwigPacked_type(void) {
- 	sizeof(SwigPyPacked),		    /* tp_basicsize */	
- 	0,				    /* tp_itemsize */	
- 	(destructor)SwigPyPacked_dealloc,   /* tp_dealloc */	
-+#if PY_VERSION_HEX < 0x03080000
- 	(printfunc)SwigPyPacked_print,	    /* tp_print */   	
-+#else
-+	0, /*tp_vectorcall_offset*/
-+#endif
- 	(getattrfunc)0,			    /* tp_getattr */ 	
- 	(setattrfunc)0,			    /* tp_setattr */ 	
- 	(cmpfunc)SwigPyPacked_compare,	    /* tp_compare */ 	
-diff --git src/Base/swigpyrun_1.3.40.h src/Base/swigpyrun_1.3.40.h
-index 136ba809f..400db8b47 100644
---- src/Base/swigpyrun_1.3.40.h
-+++ src/Base/swigpyrun_1.3.40.h
-@@ -1766,7 +1766,11 @@ _PySwigObject_type(void) {
- 	sizeof(SwigPyObject),		    /* tp_basicsize */
- 	0,			            /* tp_itemsize */
- 	(destructor)SwigPyObject_dealloc,   /* tp_dealloc */
-+#if PY_VERSION_HEX < 0x03080000
- 	(printfunc)SwigPyObject_print,	    /* tp_print */
-+#else
-+	0, /*tp_vectorcall_offset*/
-+#endif
- #if PY_VERSION_HEX < 0x02020000
- 	(getattrfunc)SwigPyObject_getattr,  /* tp_getattr */ 
- #else
-@@ -1947,8 +1951,12 @@ _PySwigPacked_type(void) {
- 	(char *)"SwigPyPacked",		    /* tp_name */	
- 	sizeof(SwigPyPacked),		    /* tp_basicsize */	
- 	0,				    /* tp_itemsize */	
--	(destructor)SwigPyPacked_dealloc,   /* tp_dealloc */	
--	(printfunc)SwigPyPacked_print,	    /* tp_print */   	
-+	(destructor)SwigPyPacked_dealloc,   /* tp_dealloc */
-+#if PY_VERSION_HEX < 0x03080000
-+	(printfunc)SwigPyPacked_print,	    /* tp_print */
-+#else
-+	0, /*tp_vectorcall_offset*/
-+#endif
- 	(getattrfunc)0,			    /* tp_getattr */ 	
- 	(setattrfunc)0,			    /* tp_setattr */ 	
- #if PY_VERSION_HEX>=0x03000000
-diff --git src/CXX/Python3/cxx_extensions.cxx src/CXX/Python3/cxx_extensions.cxx
-index fb3da455f..9ff94612f 100644
---- src/CXX/Python3/cxx_extensions.cxx
-+++ src/CXX/Python3/cxx_extensions.cxx
-@@ -381,7 +381,11 @@ PythonType::PythonType( size_t basic_size, int itemsize, const char *default_nam
- 
-     // Methods to implement standard operations
-     table->tp_dealloc = (destructor)standard_dealloc;
-+#if PY_VERSION_HEX < 0x03080000
-     table->tp_print = 0;
-+#else
-+    table->tp_vectorcall_offset = 0;
-+#endif
-     table->tp_getattr = 0;
-     table->tp_setattr = 0;
-     table->tp_repr = 0;
-@@ -524,7 +528,9 @@ PythonType &PythonType::supportClass()
- #ifdef PYCXX_PYTHON_2TO3
- PythonType &PythonType::supportPrint()
- {
-+#if PY_VERSION_HEX < 0x03080000
-     table->tp_print = print_handler;
-+#endif
-     return *this;
- }
- #endif
diff --git a/srcpkgs/freecad/patches/100-detect-shiboken2-and-pyside2-5.14.patch b/srcpkgs/freecad/patches/100-detect-shiboken2-and-pyside2-5.14.patch
deleted file mode 100644
index 14ce9d5fcf90..000000000000
--- a/srcpkgs/freecad/patches/100-detect-shiboken2-and-pyside2-5.14.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-source: https://svnweb.freebsd.org/ports/head/cad/freecad/files/patch-CMakeLists.txt?revision=504361&view=co
-
---- CMakeLists.txt.orig
-+++ CMakeLists.txt
-@@ -989,6 +989,13 @@ endif()
-             endif()
-         endif()
- 
-+        # pyside2 changed it's cmake files, this is the dance we have
-+        # to dance to be compatible with the old and the new versions
-+        if(SHIBOKEN_PYTHON_INCLUDE_DIRS AND NOT SHIBOKEN_INCLUDE_DIR)
-+          get_property(SHIBOKEN_INCLUDE_DIR TARGET Shiboken2::libshiboken PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
-+            get_property(SHIBOKEN_LIBRARY TARGET Shiboken2::libshiboken PROPERTY IMPORTED_LOCATION_RELEASE)
-+        endif(SHIBOKEN_PYTHON_INCLUDE_DIRS AND NOT SHIBOKEN_INCLUDE_DIR)
-+
-         if(NOT SHIBOKEN_INCLUDE_DIR)
-             MESSAGE("====================\n"
-                     "shiboken2 not found.\n"
-@@ -996,6 +1003,14 @@ endif()
-         endif(NOT SHIBOKEN_INCLUDE_DIR)
- 
-         find_package(PySide2 QUIET)# REQUIRED
-+
-+        # pyside2 changed it's cmake files, this is the dance we have
-+        # to dance to be compatible with the old and the new versions
-+        if(NOT PYSIDE_INCLUDE_DIR)
-+          get_property(PYSIDE_INCLUDE_DIR TARGET PySide2::pyside2 PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
-+          get_property(PYSIDE_LIBRARY TARGET PySide2::pyside2 PROPERTY IMPORTED_LOCATION_RELEASE)
-+        endif(NOT PYSIDE_INCLUDE_DIR)
-+
-         if(NOT PYSIDE_INCLUDE_DIR)
-             MESSAGE("==================\n"
-                     "PySide2 not found.\n"
diff --git a/srcpkgs/freecad/patches/101-pyside2-tool-5.14-support.patch b/srcpkgs/freecad/patches/101-pyside2-tool-5.14-support.patch
deleted file mode 100644
index 632384d2df4a..000000000000
--- a/srcpkgs/freecad/patches/101-pyside2-tool-5.14-support.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-backport from FreeCAD git master (rev @1bca539)
-
---- cMake/FindPySide2Tools.cmake.ORIG
-+++ cMake/FindPySide2Tools.cmake
-@@ -20,8 +20,24 @@
-     set(PYSIDE_BIN_DIR ${PYTHON_BIN_DIR})
- endif(WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
- 
--FIND_PROGRAM(PYSIDE2UICBINARY NAMES python2-pyside2-uic pyside2-uic pyside2-uic-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR})
--FIND_PROGRAM(PYSIDE2RCCBINARY NAMES pyside2-rcc pyside2-rcc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR})
-+# Since Qt v5.14, pyside2-uic and pyside2-rcc are directly provided by Qt5Core uic and rcc, with '-g python' option
-+# We test Qt5Core version to act accordingly
-+
-+FIND_PACKAGE(Qt5Core)
-+
-+IF(Qt5Core_VERSION VERSION_LESS 5.14)
-+  # Legacy (< 5.14)
-+  FIND_PROGRAM(PYSIDE2UICBINARY NAMES python2-pyside2-uic pyside2-uic pyside2-uic-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR})
-+  FIND_PROGRAM(PYSIDE2RCCBINARY NAMES pyside2-rcc pyside2-rcc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR})
-+  set(UICOPTIONS "")
-+  set(RCCOPTIONS "")
-+ELSE(Qt5Core_VERSION VERSION_LESS 5.14)
-+  # New (>= 5.14)
-+  FIND_PROGRAM(PYSIDE2UICBINARY NAMES uic-qt5 uic)
-+  set(UICOPTIONS "--generator=python")
-+  FIND_PROGRAM(PYSIDE2RCCBINARY NAMES rcc-qt5 rcc)
-+  set(RCCOPTIONS "--generator=python" "--compress-algo=zlib" "--compress=1")
-+ENDIF(Qt5Core_VERSION VERSION_LESS 5.14)
- 
- MACRO(PYSIDE_WRAP_UI outfiles)
-   FOREACH(it ${ARGN})
-@@ -33,7 +49,7 @@
-     #)
-     if(WIN32 OR APPLE)
-         ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
--          COMMAND ${PYSIDE2UICBINARY} ${infile} -o ${outfile}
-+          COMMAND ${PYSIDE2UICBINARY} ${UICOPTIONS} ${infile} -o ${outfile}
-           MAIN_DEPENDENCY ${infile}
-         )
-     else()
-@@ -41,7 +57,7 @@
-         # pyside2-uic generates in comments at beginning., which is why
-         # we follow the tool command with in-place sed.
-         ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
--          COMMAND "${PYSIDE2UICBINARY}" "${infile}" -o "${outfile}"
-+          COMMAND "${PYSIDE2UICBINARY}" ${UICOPTIONS} "${infile}" -o "${outfile}"
-           COMMAND sed -i "/^# /d" "${outfile}"
-           MAIN_DEPENDENCY "${infile}"
-         )
-@@ -60,7 +76,7 @@
-     #)
-     if(WIN32 OR APPLE)
-         ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
--          COMMAND ${PYSIDE2RCCBINARY} ${infile} -o ${outfile}
-+          COMMAND ${PYSIDE2RCCBINARY} ${RCCOPTIONS} ${infile} -o ${outfile}
-           MAIN_DEPENDENCY ${infile}
-         )
-     else()
-@@ -68,7 +84,7 @@
-         # pyside-rcc generates in comments at beginning, which is why
-         # we follow the tool command with in-place sed.
-         ADD_CUSTOM_COMMAND(OUTPUT "${outfile}"
--          COMMAND "${PYSIDE2RCCBINARY}" "${infile}" ${PY_ATTRIBUTE} -o "${outfile}"
-+          COMMAND "${PYSIDE2RCCBINARY}" ${RCCOPTIONS} "${infile}" ${PY_ATTRIBUTE} -o "${outfile}"
-           COMMAND sed -i "/^# /d" "${outfile}"
-           MAIN_DEPENDENCY "${infile}"
-         )
diff --git a/srcpkgs/freecad/patches/102-qt5-5.15.0.patch b/srcpkgs/freecad/patches/102-qt5-5.15.0.patch
deleted file mode 100644
index 9c4632d80a80..000000000000
--- a/srcpkgs/freecad/patches/102-qt5-5.15.0.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Source: @pullmoll
-Upstream: no
-Reason: qt5-5.15.0 requires explicit include for QPainterPath
-
---- src/Mod/Image/Gui/OpenGLImageBox.cpp
-+++ src/Mod/Image/Gui/OpenGLImageBox.cpp	2020-07-14 12:25:42.607075856 +0200
-@@ -26,6 +26,7 @@
- # include <QSurfaceFormat>
- # include <QMessageBox>
- # include <QPainter>
-+# include <QPainterPath>
- #endif
- 
- #if defined(__MINGW32__)
diff --git a/srcpkgs/freecad/patches/103-find-coin3v4-doc.patch b/srcpkgs/freecad/patches/103-find-coin3v4-doc.patch
deleted file mode 100644
index 5b7de514de4b..000000000000
--- a/srcpkgs/freecad/patches/103-find-coin3v4-doc.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 04833a5f1cbc07f8f6ae94453c4535e13789aa05 Mon Sep 17 00:00:00 2001
-From: yopito <pierre.bourgin@free.fr>
-Date: Mon, 6 Jul 2020 06:54:07 +0200
-Subject: [PATCH] build: fix Coin 3d documentation discovering
-
-* coin3d 4.0.0 default location is /usr/share/doc/Coin/html/
-* misuses of find_files() if several candidates for filename
-* export variable COIN3D_DOC_FOUND that is used by cMake/FreeCAD_Helpers/PrintFinalReport.cmake
----
- cMake/FindCoin3DDoc.cmake | 12 +++++++-----
- 1 file changed, 7 insertions(+), 5 deletions(-)
-
-diff --git cMake/FindCoin3DDoc.cmake cMake/FindCoin3DDoc.cmake
-index 883368445..c6c92f260 100644
---- cMake/FindCoin3DDoc.cmake
-+++ cMake/FindCoin3DDoc.cmake
-@@ -23,18 +23,19 @@ IF (COIN3D_FOUND)
-       find_path(COIN3D_DOC_PATH index.html 
-                 /usr/share/doc/libcoin80-doc/html
-                 /usr/share/doc/coin/html
-+                /usr/share/doc/Coin/html
-       )
-       IF( EXISTS ${COIN3D_DOC_PATH})
-         message(STATUS "Coin3D doc is installed")
--        find_file(COIN3D_DOC_TAGFILE coin.tag Coin.tag 
--            ${COIN3D_DOC_PATH}
-+        find_file(COIN3D_DOC_TAGFILE NAMES coin.tag Coin.tag 
-+            PATHS ${COIN3D_DOC_PATH}
-         )
-         IF( EXISTS ${COIN3D_DOC_TAGFILE})
-           SET( COIN3D_DOC_FOUND "YES"
-           )
-         ELSE( EXISTS ${COIN3D_DOC_TAGFILE})
--          find_file(COIN3D_DOC_TAGFILE_GZ coin.tag.gz Coin.tag.gz 
--              ${COIN3D_DOC_PATH}
-+          find_file(COIN3D_DOC_TAGFILE_GZ NAMES coin.tag.gz Coin.tag.gz 
-+              PATHS ${COIN3D_DOC_PATH}
-           )
-           IF( EXISTS ${COIN3D_DOC_TAGFILE_GZ})
-             message(STATUS "  Found ${COIN3D_DOC_TAGFILE_GZ}")
-@@ -85,4 +86,5 @@ if(COIN3D_DOC_FOUND)
-   message(STATUS "  Location: ${COIN3D_DOC_PATH}")
- endif(COIN3D_DOC_FOUND)
- 
--
-+# export for others
-+SET( COIN3D_DOC_FOUND "${COIN3D_DOC_FOUND}" CACHE BOOL "Coin3d documentation available")
--- 
-2.27.0
-
diff --git a/srcpkgs/freecad/patches/150-vtk9.patch b/srcpkgs/freecad/patches/150-vtk9.patch
deleted file mode 100644
index e8fb5ec14b7a..000000000000
--- a/srcpkgs/freecad/patches/150-vtk9.patch
+++ /dev/null
@@ -1,760 +0,0 @@
-Taken from https://github.com/wwmayer/FreeCAD/commit/52599f771fa934ceeb11a970c3639bfa8f90411e
-
-diff --git src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx b/src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx
-index 14a6d9a76..7b9d88db1 100644
---- src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx
-+++ src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx
-@@ -40,10 +40,16 @@
- 
- #include <vtkType.h>
- #include <vtkCellType.h>
-+#include <vtkCellArray.h>
- 
- //typedef unsigned short UShortType;
- typedef short ShortType;
- typedef int   LongType;
-+#ifdef VTK_CELL_ARRAY_V2
-+typedef const vtkIdType* vtkIdTypePtr;
-+#else
-+typedef vtkIdType* vtkIdTypePtr;
-+#endif
- 
- class SMDS_MeshNode;
- class SMDS_MeshEdge;
-@@ -192,7 +198,7 @@ protected:
-   //! Element index in vector SMDS_Mesh::myNodes or SMDS_Mesh::myCells
-   int myID;
-   //! index in vtkUnstructuredGrid
--  int myVtkID;
-+  vtkIdType myVtkID;
-   //! SMDS_Mesh identification in SMESH
-   ShortType myMeshId;
-   //! SubShape and SubMesh identification in SMESHDS
-diff --git src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx b/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx
-index 9e4a23edd..774658145 100644
---- src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx
-+++ src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx
-@@ -95,7 +95,11 @@ public:
-                                        std::map<int, std::map<long,int> >& nodeQuadDomains);
-   vtkCellLinks* GetLinks()
-   {
-+#ifdef VTK_CELL_ARRAY_V2
-+    return static_cast<vtkCellLinks*>(GetCellLinks());
-+#else
-     return Links;
-+#endif
-   }
-   SMDS_Downward* getDownArray(unsigned char vtkType)
-   {
-diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp
-index 299093c94..990e2b641 100644
---- src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp
-+++ src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp
-@@ -68,9 +68,13 @@ bool SMDS_BallElement::ChangeNode (const SMDS_MeshNode * node)
- {
-   vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
-   vtkIdType npts = 0;
--  vtkIdType* pts = 0;
-+  vtkIdTypePtr pts = 0;
-   grid->GetCellPoints(myVtkID, npts, pts);
-+#ifdef VTK_CELL_ARRAY_V2
-+//FIXME: vtk9
-+#else
-   pts[0] = node->getVtkId();
-+#endif
-   SMDS_Mesh::_meshList[myMeshId]->setMyModified();
-   return true;
- }
-@@ -83,7 +87,8 @@ void SMDS_BallElement::Print (std::ostream & OS) const
- const SMDS_MeshNode* SMDS_BallElement::GetNode (const int ind) const
- {
-   vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
--  vtkIdType npts, *pts;
-+  vtkIdType npts;
-+  vtkIdTypePtr pts;
-   grid->GetCellPoints( myVtkID, npts, pts );
-   return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ 0 ]);
- }
-diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp
-index d6049c0bd..77555d5bc 100644
---- src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp
-+++ src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp
-@@ -303,7 +303,7 @@ int SMDS_Down1D::getNodeSet(int cellId, int* nodeSet)
- void SMDS_Down1D::setNodes(int cellId, int vtkId)
- {
-   vtkIdType npts = 0;
--  vtkIdType *pts; // will refer to the point id's of the face
-+  vtkIdTypePtr pts; // will refer to the point id's of the face
-   _grid->GetCellPoints(vtkId, npts, pts);
-   // MESSAGE(vtkId << " " << npts << "  " << _nbDownCells);
-   //ASSERT(npts == _nbDownCells);
-@@ -532,7 +532,7 @@ int SMDS_Down2D::computeVolumeIds(int cellId, int* ids)
-   // --- find point id's of the face
- 
-   vtkIdType npts = 0;
--  vtkIdType *pts; // will refer to the point id's of the face
-+  vtkIdTypePtr pts; // will refer to the point id's of the face
-   _grid->GetCellPoints(cellId, npts, pts);
-   vector<int> nodes;
-   for (int i = 0; i < npts; i++)
-@@ -627,7 +627,7 @@ int SMDS_Down2D::computeVolumeIdsFromNodesFace(int* pts, int npts, int* ids)
- void SMDS_Down2D::setTempNodes(int cellId, int vtkId)
- {
-   vtkIdType npts = 0;
--  vtkIdType *pts; // will refer to the point id's of the face
-+  vtkIdTypePtr pts; // will refer to the point id's of the face
-   _grid->GetCellPoints(vtkId, npts, pts);
-   // MESSAGE(vtkId << " " << npts << "  " << _nbNodes);
-   //ASSERT(npts == _nbNodes);
-@@ -795,7 +795,7 @@ void SMDS_Down3D::getNodeIds(int cellId, std::set<int>& nodeSet)
- {
-   int vtkId = this->_vtkCellIds[cellId];
-   vtkIdType npts = 0;
--  vtkIdType *nodes; // will refer to the point id's of the volume
-+  vtkIdTypePtr nodes; // will refer to the point id's of the volume
-   _grid->GetCellPoints(vtkId, npts, nodes);
-   for (int i = 0; i < npts; i++)
-     nodeSet.insert(nodes[i]);
-@@ -1126,7 +1126,7 @@ void SMDS_DownTetra::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& o
-   //MESSAGE("cellId = " << cellId);
- 
-   vtkIdType npts = 0;
--  vtkIdType *nodes; // will refer to the point id's of the volume
-+  vtkIdTypePtr nodes; // will refer to the point id's of the volume
-   _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
- 
-   set<int> tofind;
-@@ -1178,7 +1178,7 @@ void SMDS_DownTetra::computeFacesWithNodes(int cellId, ListElemByNodesType& face
-   // --- find point id's of the volume
- 
-   vtkIdType npts = 0;
--  vtkIdType *nodes; // will refer to the point id's of the volume
-+  vtkIdTypePtr nodes; // will refer to the point id's of the volume
-   _grid->GetCellPoints(cellId, npts, nodes);
- 
-   // --- create all the ordered list of node id's for each face
-@@ -1234,7 +1234,7 @@ void SMDS_DownQuadTetra::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType
-   //MESSAGE("cellId = " << cellId);
- 
-   vtkIdType npts = 0;
--  vtkIdType *nodes; // will refer to the point id's of the volume
-+  vtkIdTypePtr nodes; // will refer to the point id's of the volume
-   _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
- 
-   set<int> tofind;
-@@ -1288,7 +1288,7 @@ void SMDS_DownQuadTetra::computeFacesWithNodes(int cellId, ListElemByNodesType&
-   // --- find point id's of the volume
- 
-   vtkIdType npts = 0;
--  vtkIdType *nodes; // will refer to the point id's of the volume
-+  vtkIdTypePtr nodes; // will refer to the point id's of the volume
-   _grid->GetCellPoints(cellId, npts, nodes);
- 
-   // --- create all the ordered list of node id's for each face
-@@ -1357,7 +1357,7 @@ void SMDS_DownPyramid::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>&
-   //MESSAGE("cellId = " << cellId);
- 
-   vtkIdType npts = 0;
--  vtkIdType *nodes; // will refer to the point id's of the volume
-+  vtkIdTypePtr nodes; // will refer to the point id's of the volume
-   _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
- 
-   set<int> tofind;
-@@ -1435,7 +1435,7 @@ void SMDS_DownPyramid::computeFacesWithNodes(int cellId, ListElemByNodesType& fa
-   // --- find point id's of the volume
- 
-   vtkIdType npts = 0;
--  vtkIdType *nodes; // will refer to the point id's of the volume
-+  vtkIdTypePtr nodes; // will refer to the point id's of the volume
-   _grid->GetCellPoints(cellId, npts, nodes);
- 
-   // --- create all the ordered list of node id's for each face
-@@ -1500,7 +1500,7 @@ void SMDS_DownQuadPyramid::getOrderedNodesOfFace(int cellId, std::vector<vtkIdTy
-   //MESSAGE("cellId = " << cellId);
- 
-   vtkIdType npts = 0;
--  vtkIdType *nodes; // will refer to the point id's of the volume
-+  vtkIdTypePtr nodes; // will refer to the point id's of the volume
-   _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
- 
-   set<int> tofind;
-@@ -1580,7 +1580,7 @@ void SMDS_DownQuadPyramid::computeFacesWithNodes(int cellId, ListElemByNodesType
-   // --- find point id's of the volume
- 
-   vtkIdType npts = 0;
--  vtkIdType *nodes; // will refer to the point id's of the volume
-+  vtkIdTypePtr nodes; // will refer to the point id's of the volume
-   _grid->GetCellPoints(cellId, npts, nodes);
- 
-   // --- create all the ordered list of node id's for each face
-@@ -1660,7 +1660,7 @@ void SMDS_DownPenta::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& o
-   //MESSAGE("cellId = " << cellId);
- 
-   vtkIdType npts = 0;
--  vtkIdType *nodes; // will refer to the point id's of the volume
-+  vtkIdTypePtr nodes; // will refer to the point id's of the volume
-   _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
- 
-   set<int> tofind;
-@@ -1744,7 +1744,7 @@ void SMDS_DownPenta::computeFacesWithNodes(int cellId, ListElemByNodesType& face
-   // --- find point id's of the volume
- 
-   vtkIdType npts = 0;
--  vtkIdType *nodes; // will refer to the point id's of the volume
-+  vtkIdTypePtr nodes; // will refer to the point id's of the volume
-   _grid->GetCellPoints(cellId, npts, nodes);
- 
-   // --- create all the ordered list of node id's for each face
-@@ -1810,7 +1810,7 @@ void SMDS_DownQuadPenta::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType
-   //MESSAGE("cellId = " << cellId);
- 
-   vtkIdType npts = 0;
--  vtkIdType *nodes; // will refer to the point id's of the volume
-+  vtkIdTypePtr nodes; // will refer to the point id's of the volume
-   _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
- 
-   set<int> tofind;
-@@ -1896,7 +1896,7 @@ void SMDS_DownQuadPenta::computeFacesWithNodes(int cellId, ListElemByNodesType&
-   // --- find point id's of the volume
- 
-   vtkIdType npts = 0;
--  vtkIdType *nodes; // will refer to the point id's of the volume
-+  vtkIdTypePtr nodes; // will refer to the point id's of the volume
-   _grid->GetCellPoints(cellId, npts, nodes);
- 
-   // --- create all the ordered list of node id's for each face
-@@ -1981,7 +1981,7 @@ void SMDS_DownHexa::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& or
-   //MESSAGE("cellId = " << cellId);
- 
-   vtkIdType npts = 0;
--  vtkIdType *nodes; // will refer to the point id's of the volume
-+  vtkIdTypePtr nodes; // will refer to the point id's of the volume
-   _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
- 
-   set<int> tofind;
-@@ -2036,7 +2036,7 @@ void SMDS_DownHexa::computeFacesWithNodes(int cellId, ListElemByNodesType& faces
-   // --- find point id's of the volume
- 
-   vtkIdType npts = 0;
--  vtkIdType *nodes; // will refer to the point id's of the volume
-+  vtkIdTypePtr nodes; // will refer to the point id's of the volume
-   _grid->GetCellPoints(cellId, npts, nodes);
- 
-   // --- create all the ordered list of node id's for each face
-@@ -2112,7 +2112,7 @@ void SMDS_DownQuadHexa::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>
-   //MESSAGE("cellId = " << cellId);
- 
-   vtkIdType npts = 0;
--  vtkIdType *nodes; // will refer to the point id's of the volume
-+  vtkIdTypePtr nodes; // will refer to the point id's of the volume
-   _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
- 
-   set<int> tofind;
-@@ -2167,7 +2167,7 @@ void SMDS_DownQuadHexa::computeFacesWithNodes(int cellId, ListElemByNodesType& f
-   // --- find point id's of the volume
- 
-   vtkIdType npts = 0;
--  vtkIdType *nodes; // will refer to the point id's of the volume
-+  vtkIdTypePtr nodes; // will refer to the point id's of the volume
-   _grid->GetCellPoints(cellId, npts, nodes);
- 
-   // --- create all the ordered list of node id's for each face
-diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp
-index 4ac6fd768..51b281699 100644
---- src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp
-+++ src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp
-@@ -4763,7 +4763,11 @@ void SMDS_Mesh::dumpGrid(string ficdump)
-         ficcon << endl;
-   }
-   ficcon << "-------------------------------- connectivity " <<  nbPoints << endl;
--        vtkCellLinks *links = myGrid->GetCellLinks();
-+#ifdef VTK_CELL_ARRAY_V2
-+  vtkCellLinks *links = static_cast<vtkCellLinks*>(myGrid->GetCellLinks());
-+#else
-+  vtkCellLinks *links = myGrid->GetCellLinks();
-+#endif
-   for (int i=0; i<nbPoints; i++)
-   {
-         int ncells = links->GetNcells(i);
-diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp
-index 95438eab0..a7f8059e0 100644
---- src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp
-+++ src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp
-@@ -147,7 +147,7 @@ bool SMDS_Mesh0DElement::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbN
-   {
-     vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
-     vtkIdType npts = 0;
--    vtkIdType* pts = 0;
-+    vtkIdTypePtr pts = 0;
-     grid->GetCellPoints(myVtkID, npts, pts);
-     if (nbNodes != npts)
-     {
-@@ -155,7 +155,11 @@ bool SMDS_Mesh0DElement::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbN
-       return false;
-     }
-     myNode = nodes[0];
-+#ifdef VTK_CELL_ARRAY_V2
-+//FIXME: vtk9
-+#else
-     pts[0] = myNode->getVtkId();
-+#endif
- 
-     SMDS_Mesh::_meshList[myMeshId]->setMyModified();
-     return true;
-diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp
-index f647a5f1b..5b903c8fb 100644
---- src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp
-+++ src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp
-@@ -191,7 +191,7 @@ public:
- SMDS_ElemIteratorPtr SMDS_MeshNode::
- GetInverseElementIterator(SMDSAbs_ElementType type) const
- {
--  vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID);
-+  vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID);
-   //MESSAGE("myID " << myID << " ncells " << l.ncells);
-   return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyInvIterator(SMDS_Mesh::_meshList[myMeshId], l.cells, l.ncells, type));
- }
-@@ -251,7 +251,7 @@ elementsIterator(SMDSAbs_ElementType type) const
-     return SMDS_MeshElement::elementsIterator(SMDSAbs_Node);
-   else
-   {
--    vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID);
-+    vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID);
-     return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyIterator(SMDS_Mesh::_meshList[myMeshId], l.cells, l.ncells, type));
-   }
- }
-@@ -350,7 +350,7 @@ void SMDS_MeshNode::AddInverseElement(const SMDS_MeshElement* ME)
-   const SMDS_MeshCell *cell = dynamic_cast<const SMDS_MeshCell*> (ME);
-   assert(cell);
-   SMDS_UnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
--  vtkCellLinks *Links = grid->GetCellLinks();
-+  vtkCellLinks *Links = static_cast<vtkCellLinks*>(grid->GetCellLinks());
-   Links->ResizeCellList(myVtkID, 1);
-   Links->AddCellReference(cell->getVtkId(), myVtkID);
- }
-@@ -366,7 +366,7 @@ void SMDS_MeshNode::ClearInverseElements()
- 
- bool SMDS_MeshNode::emptyInverseElements()
- {
--  vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID);
-+  vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID);
-   return (l.ncells == 0);
- }
- 
-@@ -378,7 +378,7 @@ bool SMDS_MeshNode::emptyInverseElements()
- 
- int SMDS_MeshNode::NbInverseElements(SMDSAbs_ElementType type) const
- {
--  vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID);
-+  vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID);
- 
-   if ( type == SMDSAbs_All )
-     return l.ncells;
-diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
-index fbd903b1e..19ccebcab 100644
---- src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
-+++ src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
-@@ -139,8 +139,8 @@ int SMDS_UnstructuredGrid::InsertNextLinkedCell(int type, int npts, vtkIdType *p
-   for (; it != setOfNodes.end(); ++it)
-     {
-       //MESSAGE("reverse link for node " << *it << " cell " << cellid);
--      this->Links->ResizeCellList(*it, 1);
--      this->Links->AddCellReference(cellid, *it);
-+      this->GetLinks()->ResizeCellList(*it, 1);
-+      this->GetLinks()->AddCellReference(cellid, *it);
-     }
- 
-   return cellid;
-@@ -332,9 +332,13 @@ void SMDS_UnstructuredGrid::copyBloc(vtkUnsignedCharArray *newTypes,
-     {
-       newTypes->SetValue(alreadyCopied, this->Types->GetValue(j));
-       idCellsOldToNew[j] = alreadyCopied; // old vtkId --> new vtkId
-+#ifdef VTK_CELL_ARRAY_V2
-+      vtkIdType oldLoc; //FIXME: vtk9
-+#else
-       vtkIdType oldLoc = this->Locations->GetValue(j);
-+#endif
-       vtkIdType nbpts;
--      vtkIdType *oldPtsCell = 0;
-+      vtkIdTypePtr oldPtsCell = 0;
-       this->Connectivity->GetCell(oldLoc, nbpts, oldPtsCell);
-       assert(nbpts < NBMAXNODESINCELL);
-       //MESSAGE(j << " " << alreadyCopied << " " << (int)this->Types->GetValue(j) << " " << oldLoc << " " << nbpts );
-@@ -953,14 +957,18 @@ void SMDS_UnstructuredGrid::GetNodeIds(std::set<int>& nodeSet, int downId, unsig
- void SMDS_UnstructuredGrid::ModifyCellNodes(int vtkVolId, std::map<int, int> localClonedNodeIds)
- {
-   vtkIdType npts = 0;
--  vtkIdType *pts; // will refer to the point id's of the face
-+  vtkIdTypePtr pts; // will refer to the point id's of the face
-   this->GetCellPoints(vtkVolId, npts, pts);
-   for (int i = 0; i < npts; i++)
-     {
-       if (localClonedNodeIds.count(pts[i]))
-         {
-           vtkIdType oldpt = pts[i];
-+#ifdef VTK_CELL_ARRAY_V2
-+//FIXME: vtk9
-+#else
-           pts[i] = localClonedNodeIds[oldpt];
-+#endif
-           //MESSAGE(oldpt << " --> " << pts[i]);
-           //this->RemoveReferenceToCell(oldpt, vtkVolId);
-           //this->AddReferenceToCell(pts[i], vtkVolId);
-@@ -995,11 +1003,20 @@ void SMDS_UnstructuredGrid::BuildLinks()
-     this->Links->UnRegister(this);
-     }
- 
-+#ifdef VTK_CELL_ARRAY_V2
-+//FIXME: vtk9
-+  this->Links = SMDS_CellLinks::New();
-+  //this->Links->Allocate(this->GetNumberOfPoints());
-+  this->Links->Register(this);
-+  //this->Links->BuildLinks(this, this->Connectivity);
-+  this->Links->Delete();
-+#else
-   this->Links = SMDS_CellLinks::New();
-   this->Links->Allocate(this->GetNumberOfPoints());
-   this->Links->Register(this);
-   this->Links->BuildLinks(this, this->Connectivity);
-   this->Links->Delete();
-+#endif
- }
- 
- /*! Create a volume (prism or hexahedron) by duplication of a face.
-diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp
-index deb05985f..63b6eabb7 100644
---- src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp
-+++ src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp
-@@ -33,7 +33,8 @@ SMDS_VtkCellIterator::SMDS_VtkCellIterator(SMDS_Mesh* mesh, int vtkCellId, SMDSA
-   }
-   else
-   {
--    vtkIdType npts, *pts;
-+    vtkIdType npts;
-+    vtkIdTypePtr pts;
-     grid->GetCellPoints( _cellId, npts, pts );
-     _vtkIdList->SetNumberOfIds( _nbNodes = npts );
-     for (int i = 0; i < _nbNodes; i++)
-@@ -67,7 +68,7 @@ SMDS_VtkCellIteratorToUNV::SMDS_VtkCellIteratorToUNV(SMDS_Mesh* mesh, int vtkCel
-   //MESSAGE("SMDS_VtkCellInterlacedIterator (UNV)" << _type);
- 
-   _vtkIdList = vtkIdList::New();
--  vtkIdType* pts;
-+  vtkIdTypePtr pts;
-   vtkIdType npts;
-   vtkUnstructuredGrid* grid = _mesh->getGrid();
-   grid->GetCellPoints((vtkIdType)_cellId, npts, pts);
-@@ -182,7 +183,7 @@ SMDS_VtkCellIteratorPolyH::SMDS_VtkCellIteratorPolyH(SMDS_Mesh* mesh, int vtkCel
-   {
-     //MESSAGE("SMDS_VtkCellIterator Polyhedra");
-     vtkIdType nFaces = 0;
--    vtkIdType* ptIds = 0;
-+    vtkIdTypePtr ptIds = 0;
-     grid->GetFaceStream(_cellId, nFaces, ptIds);
-     int id = 0;
-     _nbNodesInFaces = 0;
-diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp
-index 9786abf9a..58d2df3cf 100644
---- src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp
-+++ src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp
-@@ -68,7 +68,7 @@ bool SMDS_VtkEdge::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
- {
-   vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
-   vtkIdType npts = 0;
--  vtkIdType* pts = 0;
-+  vtkIdTypePtr pts = 0;
-   grid->GetCellPoints(myVtkID, npts, pts);
-   if (nbNodes != npts)
-     {
-@@ -77,7 +77,11 @@ bool SMDS_VtkEdge::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
-     }
-   for (int i = 0; i < nbNodes; i++)
-     {
-+#ifdef VTK_CELL_ARRAY_V2
-+//FIXME: vtk9
-+#else
-       pts[i] = nodes[i]->getVtkId();
-+#endif
-     }
-   SMDS_Mesh::_meshList[myMeshId]->setMyModified();
-   return true;
-@@ -87,7 +91,7 @@ bool SMDS_VtkEdge::IsMediumNode(const SMDS_MeshNode* node) const
- {
-   vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
-   vtkIdType npts = 0;
--  vtkIdType* pts = 0;
-+  vtkIdTypePtr pts = 0;
-   grid->GetCellPoints(myVtkID, npts, pts);
-   //MESSAGE("IsMediumNode " << npts  << " " << (node->getVtkId() == pts[npts-1]));
-   return ((npts == 3) && (node->getVtkId() == pts[2]));
-@@ -137,7 +141,8 @@ const SMDS_MeshNode*
- SMDS_VtkEdge::GetNode(const int ind) const
- {
-   vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
--  vtkIdType npts, *pts;
-+  vtkIdType npts;
-+  vtkIdTypePtr pts;
-   grid->GetCellPoints( this->myVtkID, npts, pts );
-   return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ ind ]);
- }
-diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp
-index 1389e0d35..a92601f1e 100644
---- src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp
-+++ src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp
-@@ -102,7 +102,7 @@ bool SMDS_VtkFace::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
- {
-   vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
-   vtkIdType npts = 0;
--  vtkIdType* pts = 0;
-+  vtkIdTypePtr pts = 0;
-   grid->GetCellPoints(myVtkID, npts, pts);
-   if (nbNodes != npts)
-     {
-@@ -111,7 +111,11 @@ bool SMDS_VtkFace::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
-     }
-   for (int i = 0; i < nbNodes; i++)
-     {
-+#ifdef VTK_CELL_ARRAY_V2
-+//FIXME: vtk9
-+#else
-       pts[i] = nodes[i]->getVtkId();
-+#endif
-     }
-   SMDS_Mesh::_meshList[myMeshId]->setMyModified();
-   return true;
-@@ -173,7 +177,8 @@ const SMDS_MeshNode*
- SMDS_VtkFace::GetNode(const int ind) const
- {
-   vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
--  vtkIdType npts, *pts;
-+  vtkIdType npts;
-+  vtkIdTypePtr pts;
-   grid->GetCellPoints( this->myVtkID, npts, pts );
-   return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ ind ]);
- }
-@@ -186,7 +191,8 @@ SMDS_VtkFace::GetNode(const int ind) const
- int SMDS_VtkFace::GetNodeIndex( const SMDS_MeshNode* node ) const
- {
-   vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
--  vtkIdType npts, *pts;
-+  vtkIdType npts;
-+  vtkIdTypePtr pts;
-   grid->GetCellPoints( this->myVtkID, npts, pts );
-   for ( vtkIdType i = 0; i < npts; ++i )
-     if ( pts[i] == node->getVtkId() )
-@@ -251,7 +257,7 @@ bool SMDS_VtkFace::IsMediumNode(const SMDS_MeshNode* node) const
-     return false;
-   }
-   vtkIdType npts = 0;
--  vtkIdType* pts = 0;
-+  vtkIdTypePtr pts = 0;
-   grid->GetCellPoints(myVtkID, npts, pts);
-   vtkIdType nodeId = node->getVtkId();
-   for (int rank = 0; rank < npts; rank++)
-@@ -357,10 +363,14 @@ void SMDS_VtkFace::ChangeApex(SMDS_MeshNode* node)
- {
-   vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
-   vtkIdType npts = 0;
--  vtkIdType* pts = 0;
-+  vtkIdTypePtr pts = 0;
-   grid->GetCellPoints(myVtkID, npts, pts);
-   grid->RemoveReferenceToCell(pts[0], myVtkID);
-+#ifdef VTK_CELL_ARRAY_V2
-+//FIXME: vtk9
-+#else
-   pts[0] = node->getVtkId();
-+#endif
-   node->AddInverseElement(this),
-   SMDS_Mesh::_meshList[myMeshId]->setMyModified();
- }
-diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp
-index 015edf75f..da2f73ffb 100644
---- src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp
-+++ src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp
-@@ -134,7 +134,7 @@ bool SMDS_VtkVolume::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes
- {
-   vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
-   vtkIdType npts = 0;
--  vtkIdType* pts = 0;
-+  vtkIdTypePtr pts = 0;
-   grid->GetCellPoints(myVtkID, npts, pts);
-   if (nbNodes != npts)
-     {
-@@ -143,7 +143,11 @@ bool SMDS_VtkVolume::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes
-     }
-   for (int i = 0; i < nbNodes; i++)
-     {
-+#ifdef VTK_CELL_ARRAY_V2
-+//FIXME: vtk9
-+#else
-       pts[i] = nodes[i]->getVtkId();
-+#endif
-     }
-   SMDS_Mesh::_meshList[myMeshId]->setMyModified();
-   return true;
-@@ -207,7 +211,7 @@ int SMDS_VtkVolume::NbFaces() const
-     case VTK_POLYHEDRON:
-       {
-         vtkIdType nFaces = 0;
--        vtkIdType* ptIds = 0;
-+        vtkIdTypePtr ptIds = 0;
-         grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
-         nbFaces = nFaces;
-         break;
-@@ -236,7 +240,7 @@ int SMDS_VtkVolume::NbNodes() const
-   else
-     {
-       vtkIdType nFaces = 0;
--      vtkIdType* ptIds = 0;
-+      vtkIdTypePtr ptIds = 0;
-       grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
-       int id = 0;
-       for (int i = 0; i < nFaces; i++)
-@@ -276,7 +280,7 @@ int SMDS_VtkVolume::NbEdges() const
-     case VTK_POLYHEDRON:
-       {
-         vtkIdType nFaces = 0;
--        vtkIdType* ptIds = 0;
-+        vtkIdTypePtr ptIds = 0;
-         grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
-         nbEdges = 0;
-         int id = 0;
-@@ -312,7 +316,7 @@ int SMDS_VtkVolume::NbFaceNodes(const int face_ind) const
-   if (aVtkType == VTK_POLYHEDRON)
-     {
-       vtkIdType nFaces = 0;
--      vtkIdType* ptIds = 0;
-+      vtkIdTypePtr ptIds = 0;
-       grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
-       int id = 0;
-       for (int i = 0; i < nFaces; i++)
-@@ -342,7 +346,7 @@ const SMDS_MeshNode* SMDS_VtkVolume::GetFaceNode(const int face_ind, const int n
-   if (aVtkType == VTK_POLYHEDRON)
-     {
-       vtkIdType nFaces = 0;
--      vtkIdType* ptIds = 0;
-+      vtkIdTypePtr ptIds = 0;
-       grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
-       int id = 0;
-       for (int i = 0; i < nFaces; i++)
-@@ -372,7 +376,7 @@ std::vector<int> SMDS_VtkVolume::GetQuantities() const
-   if (aVtkType == VTK_POLYHEDRON)
-     {
-       vtkIdType nFaces = 0;
--      vtkIdType* ptIds = 0;
-+      vtkIdTypePtr ptIds = 0;
-       grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
-       int id = 0;
-       for (int i = 0; i < nFaces; i++)
-@@ -430,7 +434,7 @@ const SMDS_MeshNode* SMDS_VtkVolume::GetNode(const int ind) const
-   if ( aVtkType == VTK_POLYHEDRON)
-   {
-     vtkIdType nFaces = 0;
--    vtkIdType* ptIds = 0;
-+    vtkIdTypePtr ptIds = 0;
-     grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
-     int id = 0, nbPoints = 0;
-     for (int i = 0; i < nFaces; i++)
-@@ -443,7 +447,8 @@ const SMDS_MeshNode* SMDS_VtkVolume::GetNode(const int ind) const
-     }
-     return 0;
-   }
--  vtkIdType npts, *pts;
-+  vtkIdType npts;
-+  vtkIdTypePtr pts;
-   grid->GetCellPoints( this->myVtkID, npts, pts );
-   const std::vector<int>& interlace = SMDS_MeshCell::fromVtkOrder( VTKCellType( aVtkType ));
-   return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ interlace.empty() ? ind : interlace[ind]] );
-@@ -460,7 +465,7 @@ int SMDS_VtkVolume::GetNodeIndex( const SMDS_MeshNode* node ) const
-   if ( aVtkType == VTK_POLYHEDRON)
-   {
-     vtkIdType nFaces = 0;
--    vtkIdType* ptIds = 0;
-+    vtkIdTypePtr ptIds = 0;
-     grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
-     int id = 0;
-     for (int iF = 0; iF < nFaces; iF++)
-@@ -473,7 +478,8 @@ int SMDS_VtkVolume::GetNodeIndex( const SMDS_MeshNode* node ) const
-     }
-     return -1;
-   }
--  vtkIdType npts, *pts;
-+  vtkIdType npts;
-+  vtkIdTypePtr pts;
-   grid->GetCellPoints( this->myVtkID, npts, pts );
-   for ( vtkIdType i = 0; i < npts; ++i )
-     if ( pts[i] == node->getVtkId() )
-@@ -534,7 +540,7 @@ bool SMDS_VtkVolume::IsMediumNode(const SMDS_MeshNode* node) const
-       return false;
-   }
-   vtkIdType npts = 0;
--  vtkIdType* pts = 0;
-+  vtkIdTypePtr pts = 0;
-   grid->GetCellPoints(myVtkID, npts, pts);
-   vtkIdType nodeId = node->getVtkId();
-   for (int rank = 0; rank < npts; rank++)
-diff --git src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
-index a742702ff..1ff4d5eef 100644
---- src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
-+++ src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
-@@ -11343,7 +11343,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
-             {
-               int oldId = *itn;
-               //MESSAGE("     node " << oldId);
--              vtkCellLinks::Link l = grid->GetCellLinks()->GetLink(oldId);
-+              vtkCellLinks::Link l = static_cast<vtkCellLinks*>(grid->GetCellLinks())->GetLink(oldId);
-               for (int i=0; i<l.ncells; i++)
-                 {
-                   int vtkId = l.cells[i];
-@@ -11522,7 +11522,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
-                                           //MESSAGE("  domain " << idom << " volume " << elem->GetID());
-                                           double values[3];
-                                           vtkIdType npts = 0;
--                                          vtkIdType* pts = 0;
-+                                          vtkIdTypePtr pts = 0;
-                                           grid->GetCellPoints(vtkVolIds[ivol], npts, pts);
-                                           SMDS_VtkVolume::gravityCenter(grid, pts, npts, values);
-                                           if (id ==0)
-@@ -11703,7 +11703,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
-         {
-           int oldId = itnod->first;
-           //MESSAGE("     node " << oldId);
--          vtkCellLinks::Link l = grid->GetCellLinks()->GetLink(oldId);
-+          vtkCellLinks::Link l = static_cast<vtkCellLinks*>(grid->GetCellLinks())->GetLink(oldId);
-           for (int i = 0; i < l.ncells; i++)
-             {
-               int vtkId = l.cells[i];
-@@ -12160,7 +12160,7 @@ void SMESH_MeshEditor::CreateHoleSkin(double radius,
-           MESSAGE("volume to check,  vtkId " << vtkId << " smdsId " << meshDS->fromVtkToSmds(vtkId));
-           bool volInside = false;
-           vtkIdType npts = 0;
--          vtkIdType* pts = 0;
-+          vtkIdTypePtr pts = 0;
-           grid->GetCellPoints(vtkId, npts, pts);
-           for (int i=0; i<npts; i++)
-             {
-diff --git src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp b/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp
-index dde2bd824..3acfead65 100644
---- src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp
-+++ src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp
-@@ -56,6 +56,11 @@
- 
- using namespace FemGui;
- 
-+#ifdef VTK_CELL_ARRAY_V2
-+typedef const vtkIdType* vtkIdTypePtr;
-+#else
-+typedef vtkIdType* vtkIdTypePtr;
-+#endif
- 
- PROPERTY_SOURCE(FemGui::ViewProviderFemPostObject, Gui::ViewProviderDocumentObject)
- 
-@@ -316,7 +321,7 @@ void ViewProviderFemPostObject::update3D() {
-     vtkDataArray *tcoords = NULL;
-     vtkCellArray *cells;
-     vtkIdType npts = 0;
--    vtkIdType *indx = 0;
-+    vtkIdTypePtr indx = 0;
- 
-     points = pd->GetPoints();
-     pntData = pd->GetPointData();
diff --git a/srcpkgs/freecad/patches/151-python-warning.patch b/srcpkgs/freecad/patches/151-python-warning.patch
deleted file mode 100644
index e76c8b1c654b..000000000000
--- a/srcpkgs/freecad/patches/151-python-warning.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-diff --git src/Mod/Fem/feminout/importFenicsMesh.py src/Mod/Fem/feminout/importFenicsMesh.py
-index 1bb40de..a0b5484 100644
---- src/Mod/Fem/feminout/importFenicsMesh.py
-+++ src/Mod/Fem/feminout/importFenicsMesh.py
-@@ -154,7 +154,7 @@ def export(objectslist, fileString):
-             FreeCAD.Console.PrintWarning("Tri6 -> Tri3, Tet10 -> Tet4, etc.\n")
-             writeFenicsXML.write_fenics_mesh_xml(obj, fileString)
-         elif fileExtension.lower() == '.xdmf':
--            if importToolsFem.get_FemMeshObjectMeshGroups(obj) is not ():
-+            if importToolsFem.get_FemMeshObjectMeshGroups(obj):
-                 # if there are groups found, make task panel available
-                 panel = WriteXDMFTaskPanel(obj, fileString)
-                 FreeCADGui.Control.showDialog(panel)
-diff --git src/Mod/Fem/feminout/writeFenicsXDMF.py src/Mod/Fem/feminout/writeFenicsXDMF.py
-index 9e7f01b..5a93823 100644
---- src/Mod/Fem/feminout/writeFenicsXDMF.py
-+++ src/Mod/Fem/feminout/writeFenicsXDMF.py
-@@ -258,7 +258,7 @@ def write_fenics_mesh_xdmf(fem_mesh_obj, outputfile, group_values_dict={}, encod
-     fem_mesh = fem_mesh_obj.FemMesh
-     gmshgroups = get_FemMeshObjectMeshGroups(fem_mesh_obj)
- 
--    if gmshgroups is not ():
-+    if gmshgroups:
-         print('found mesh groups')
- 
-     for g in gmshgroups:
-diff --git src/Mod/PartDesign/WizardShaft/Shaft.py src/Mod/PartDesign/WizardShaft/Shaft.py
-index c519b97..8c20eb4 100644
---- src/Mod/PartDesign/WizardShaft/Shaft.py
-+++ src/Mod/PartDesign/WizardShaft/Shaft.py
-@@ -88,7 +88,7 @@ class Shaft:
-         # We don't call equilibrium() here because the new segment has no constraints defined yet
-         # Fix face reference of fixed segment if it is the last one
-         for i in range(1,  len(self.segments)):
--            if self.segments[i].constraintType is not "Fixed":
-+            if self.segments[i].constraintType != "Fixed":
-                 continue
-             if i == len(self.segments) - 1:
-                 self.segments[index].constraint.References = [( self.feature.feature,  "Face%u" % (2 * (index+1) + 1) )]
diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template
index 6fe749b53d70..f1b96b4818c5 100644
--- a/srcpkgs/freecad/template
+++ b/srcpkgs/freecad/template
@@ -1,7 +1,7 @@
 # Template file for 'freecad'
 pkgname=freecad
-version=0.18.4
-revision=10
+version=0.19.1
+revision=1
 wrksrc="FreeCAD-${version}"
 build_style=cmake
 
@@ -21,7 +21,7 @@ makedepends="python3-devel boost-devel libxerces-c-devel zlib-devel occt-devel
  coin3-devel libshiboken2-devel libspnav-devel pyside2-tools
  liblz4-devel libpyside2-python3-devel python3-matplotlib netcdf-devel
  jsoncpp-devel qt5-devel qt5-svg-devel qt5-tools-devel qt5-webkit-devel
- qt5-x11extras-devel coin3-doc glew-devel"
+ qt5-x11extras-devel qt5-xmlpatterns-devel coin3-doc glew-devel"
 
 # FreeCAD help: qt5/assistant with datas in SQLite format
 depends="python3-matplotlib python3-pyside2 qt5-plugin-sqlite python3-pivy"
@@ -34,8 +34,7 @@ maintainer="yopito <pierre.bourgin@free.fr>"
 license="LGPL-2.0-or-later"
 homepage="https://freecadweb.org/"
 distfiles="https://github.com/FreeCAD/FreeCAD/archive/${version}.tar.gz"
-checksum=4e0cce447b31b8989a00cf68c49ae012ce8e5546a56c6e0874fbd8f7ddedffd2
-
+checksum=5ec0003c18df204f7b449d4ac0a82f945b41613a0264127de3ef16f6b2efa60f
 if [ "$XBPS_TARGET_LIBC" = musl ]; then
 	makedepends+=" libexecinfo-devel"
 	LDFLAGS="-lexecinfo"

From c7751d17588d65baa602acbb003818ec62274873 Mon Sep 17 00:00:00 2001
From: Stephen Walker-Weinshenker <sww1235@gmail.com>
Date: Sat, 13 Mar 2021 19:15:07 -0700
Subject: [PATCH 2/2] Added patches

- get rid of python 2
- execinfo for musl builds
- namespace missing std from 0.18 build
- vtk9 patch from 0.18 build
- fix for salomesmesh
---
 .../freecad/patches/001-remove-python2.patch  |  15 +
 srcpkgs/freecad/patches/002-execinfo.patch    |  32 +
 .../patches/010-salomesmesh-execinfo.patch    |  30 +
 .../patches/020-namespace-missing-std.patch   |  15 +
 srcpkgs/freecad/patches/150-vtk9.patch        | 736 ++++++++++++++++++
 5 files changed, 828 insertions(+)
 create mode 100644 srcpkgs/freecad/patches/001-remove-python2.patch
 create mode 100644 srcpkgs/freecad/patches/002-execinfo.patch
 create mode 100644 srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch
 create mode 100644 srcpkgs/freecad/patches/020-namespace-missing-std.patch
 create mode 100644 srcpkgs/freecad/patches/150-vtk9.patch

diff --git a/srcpkgs/freecad/patches/001-remove-python2.patch b/srcpkgs/freecad/patches/001-remove-python2.patch
new file mode 100644
index 000000000000..64dfc24ce77f
--- /dev/null
+++ b/srcpkgs/freecad/patches/001-remove-python2.patch
@@ -0,0 +1,15 @@
+diff --git cMake/FreeCAD_Helpers/SetupPython.cmake cMake/FreeCAD_Helpers/SetupPython.cmake
+index 3c8e10635..c4d2f2629 100644
+--- cMake/FreeCAD_Helpers/SetupPython.cmake
++++ cMake/FreeCAD_Helpers/SetupPython.cmake
+@@ -1,10 +1,6 @@
+ macro(SetupPython)
+ # -------------------------------- Python --------------------------------
+ 
+-    # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=677598
+-    # Acceptable versions of Python
+-    set(Python_ADDITIONAL_VERSIONS "2.7")
+-
+     # For building on OS X
+     if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT BUILD_WITH_CONDA)
+ 
diff --git a/srcpkgs/freecad/patches/002-execinfo.patch b/srcpkgs/freecad/patches/002-execinfo.patch
new file mode 100644
index 000000000000..037ac0d947cc
--- /dev/null
+++ b/srcpkgs/freecad/patches/002-execinfo.patch
@@ -0,0 +1,32 @@
+diff --git src/App/Application.cpp src/App/Application.cpp
+index 2d498974d..baacdc2fe 100644
+--- src/App/Application.cpp
++++ src/App/Application.cpp
+@@ -1577,7 +1577,9 @@ static void freecadNewHandler ()
+ #endif
+ 
+ #if defined(FC_OS_LINUX)
++#ifdef __GLIBC__
+ #include <execinfo.h>
++#endif
+ #include <dlfcn.h>
+ #include <cxxabi.h>
+ 
+@@ -1589,6 +1591,7 @@ static void freecadNewHandler ()
+ // This function produces a stack backtrace with demangled function & method names.
+ void printBacktrace(size_t skip=0)
+ {
++#ifdef __GLIBC__
+     void *callstack[128];
+     size_t nMaxFrames = sizeof(callstack) / sizeof(callstack[0]);
+     size_t nFrames = backtrace(callstack, nMaxFrames);
+@@ -1619,6 +1622,9 @@ void printBacktrace(size_t skip=0)
+     }
+ 
+     free(symbols);
++#else
++    std::cerr << "sorry, no backtrace on musl libc";
++#endif
+ }
+ #endif
+ 
diff --git a/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch b/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch
new file mode 100644
index 000000000000..2b46616ad7a2
--- /dev/null
+++ b/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch
@@ -0,0 +1,30 @@
+--- src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
++++ src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
+@@ -29,7 +29,9 @@
+ #ifndef WIN32
+ #include <unistd.h>
+ #include <sys/stat.h>
++#ifdef __GLIBC__
+ #include <execinfo.h>
++#endif
+ #endif
+ 
+ 
+@@ -109,6 +111,7 @@
+ #ifndef WIN32
+   void print_traceback()
+   {
++#ifdef __GLIBC__
+     void *array[50];
+     size_t size;
+     char **strings;
+@@ -123,6 +126,9 @@
+       }
+ 
+     free (strings);
++#else     
++   std::cerr << "sorry, no backtrace on musl libc";
++#endif
+   }
+ #else
+   #if (_MSC_VER >= 1400) // Visual Studio 2005
diff --git a/srcpkgs/freecad/patches/020-namespace-missing-std.patch b/srcpkgs/freecad/patches/020-namespace-missing-std.patch
new file mode 100644
index 000000000000..1ee6f4f5a80e
--- /dev/null
+++ b/srcpkgs/freecad/patches/020-namespace-missing-std.patch
@@ -0,0 +1,15 @@
+# reason: fix build with gcc9
+# upstream: yes
+diff --git src/Mod/Part/App/Geometry.cpp src/Mod/Part/App/Geometry.cpp
+index e7663fdf2..692e1a9d5 100644
+--- src/Mod/Part/App/Geometry.cpp
++++ src/Mod/Part/App/Geometry.cpp
+@@ -141,7 +141,7 @@
+ #include "Geometry.h"
+ 
+ using namespace Part;
+-
++using namespace std;
+ 
+ const char* gce_ErrorStatusText(gce_ErrorType et)
+ {
diff --git a/srcpkgs/freecad/patches/150-vtk9.patch b/srcpkgs/freecad/patches/150-vtk9.patch
new file mode 100644
index 000000000000..1ae8d43ac7af
--- /dev/null
+++ b/srcpkgs/freecad/patches/150-vtk9.patch
@@ -0,0 +1,736 @@
+Taken from https://github.com/wwmayer/FreeCAD/commit/52599f771fa934ceeb11a970c3639bfa8f90411e
+
+diff --git src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx b/src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx
+index 14a6d9a76..7b9d88db1 100644
+--- src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx
++++ src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx
+@@ -40,10 +40,16 @@
+ 
+ #include <vtkType.h>
+ #include <vtkCellType.h>
++#include <vtkCellArray.h>
+ 
+ //typedef unsigned short UShortType;
+ typedef short ShortType;
+ typedef int   LongType;
++#ifdef VTK_CELL_ARRAY_V2
++typedef const vtkIdType* vtkIdTypePtr;
++#else
++typedef vtkIdType* vtkIdTypePtr;
++#endif
+ 
+ class SMDS_MeshNode;
+ class SMDS_MeshEdge;
+@@ -192,7 +198,7 @@ protected:
+   //! Element index in vector SMDS_Mesh::myNodes or SMDS_Mesh::myCells
+   int myID;
+   //! index in vtkUnstructuredGrid
+-  int myVtkID;
++  vtkIdType myVtkID;
+   //! SMDS_Mesh identification in SMESH
+   ShortType myMeshId;
+   //! SubShape and SubMesh identification in SMESHDS
+diff --git src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx b/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx
+index 9e4a23edd..774658145 100644
+--- src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx
++++ src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx
+@@ -95,7 +95,11 @@ public:
+                                        std::map<int, std::map<long,int> >& nodeQuadDomains);
+   vtkCellLinks* GetLinks()
+   {
++#ifdef VTK_CELL_ARRAY_V2
++    return static_cast<vtkCellLinks*>(GetCellLinks());
++#else
+     return Links;
++#endif
+   }
+   SMDS_Downward* getDownArray(unsigned char vtkType)
+   {
+diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp
+index 299093c94..990e2b641 100644
+--- src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp
++++ src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp
+@@ -68,9 +68,13 @@ bool SMDS_BallElement::ChangeNode (const SMDS_MeshNode * node)
+ {
+   vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
+   vtkIdType npts = 0;
+-  vtkIdType* pts = 0;
++  vtkIdTypePtr pts = 0;
+   grid->GetCellPoints(myVtkID, npts, pts);
++#ifdef VTK_CELL_ARRAY_V2
++//FIXME: vtk9
++#else
+   pts[0] = node->getVtkId();
++#endif
+   SMDS_Mesh::_meshList[myMeshId]->setMyModified();
+   return true;
+ }
+@@ -83,7 +87,8 @@ void SMDS_BallElement::Print (std::ostream & OS) const
+ const SMDS_MeshNode* SMDS_BallElement::GetNode (const int ind) const
+ {
+   vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
+-  vtkIdType npts, *pts;
++  vtkIdType npts;
++  vtkIdTypePtr pts;
+   grid->GetCellPoints( myVtkID, npts, pts );
+   return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ 0 ]);
+ }
+diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp
+index d6049c0bd..77555d5bc 100644
+--- src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp
++++ src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp
+@@ -303,7 +303,7 @@ int SMDS_Down1D::getNodeSet(int cellId, int* nodeSet)
+ void SMDS_Down1D::setNodes(int cellId, int vtkId)
+ {
+   vtkIdType npts = 0;
+-  vtkIdType *pts; // will refer to the point id's of the face
++  vtkIdTypePtr pts; // will refer to the point id's of the face
+   _grid->GetCellPoints(vtkId, npts, pts);
+   // MESSAGE(vtkId << " " << npts << "  " << _nbDownCells);
+   //ASSERT(npts == _nbDownCells);
+@@ -532,7 +532,7 @@ int SMDS_Down2D::computeVolumeIds(int cellId, int* ids)
+   // --- find point id's of the face
+ 
+   vtkIdType npts = 0;
+-  vtkIdType *pts; // will refer to the point id's of the face
++  vtkIdTypePtr pts; // will refer to the point id's of the face
+   _grid->GetCellPoints(cellId, npts, pts);
+   vector<int> nodes;
+   for (int i = 0; i < npts; i++)
+@@ -627,7 +627,7 @@ int SMDS_Down2D::computeVolumeIdsFromNodesFace(int* pts, int npts, int* ids)
+ void SMDS_Down2D::setTempNodes(int cellId, int vtkId)
+ {
+   vtkIdType npts = 0;
+-  vtkIdType *pts; // will refer to the point id's of the face
++  vtkIdTypePtr pts; // will refer to the point id's of the face
+   _grid->GetCellPoints(vtkId, npts, pts);
+   // MESSAGE(vtkId << " " << npts << "  " << _nbNodes);
+   //ASSERT(npts == _nbNodes);
+@@ -795,7 +795,7 @@ void SMDS_Down3D::getNodeIds(int cellId, std::set<int>& nodeSet)
+ {
+   int vtkId = this->_vtkCellIds[cellId];
+   vtkIdType npts = 0;
+-  vtkIdType *nodes; // will refer to the point id's of the volume
++  vtkIdTypePtr nodes; // will refer to the point id's of the volume
+   _grid->GetCellPoints(vtkId, npts, nodes);
+   for (int i = 0; i < npts; i++)
+     nodeSet.insert(nodes[i]);
+@@ -1126,7 +1126,7 @@ void SMDS_DownTetra::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& o
+   //MESSAGE("cellId = " << cellId);
+ 
+   vtkIdType npts = 0;
+-  vtkIdType *nodes; // will refer to the point id's of the volume
++  vtkIdTypePtr nodes; // will refer to the point id's of the volume
+   _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
+ 
+   set<int> tofind;
+@@ -1178,7 +1178,7 @@ void SMDS_DownTetra::computeFacesWithNodes(int cellId, ListElemByNodesType& face
+   // --- find point id's of the volume
+ 
+   vtkIdType npts = 0;
+-  vtkIdType *nodes; // will refer to the point id's of the volume
++  vtkIdTypePtr nodes; // will refer to the point id's of the volume
+   _grid->GetCellPoints(cellId, npts, nodes);
+ 
+   // --- create all the ordered list of node id's for each face
+@@ -1234,7 +1234,7 @@ void SMDS_DownQuadTetra::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType
+   //MESSAGE("cellId = " << cellId);
+ 
+   vtkIdType npts = 0;
+-  vtkIdType *nodes; // will refer to the point id's of the volume
++  vtkIdTypePtr nodes; // will refer to the point id's of the volume
+   _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
+ 
+   set<int> tofind;
+@@ -1288,7 +1288,7 @@ void SMDS_DownQuadTetra::computeFacesWithNodes(int cellId, ListElemByNodesType&
+   // --- find point id's of the volume
+ 
+   vtkIdType npts = 0;
+-  vtkIdType *nodes; // will refer to the point id's of the volume
++  vtkIdTypePtr nodes; // will refer to the point id's of the volume
+   _grid->GetCellPoints(cellId, npts, nodes);
+ 
+   // --- create all the ordered list of node id's for each face
+@@ -1357,7 +1357,7 @@ void SMDS_DownPyramid::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>&
+   //MESSAGE("cellId = " << cellId);
+ 
+   vtkIdType npts = 0;
+-  vtkIdType *nodes; // will refer to the point id's of the volume
++  vtkIdTypePtr nodes; // will refer to the point id's of the volume
+   _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
+ 
+   set<int> tofind;
+@@ -1435,7 +1435,7 @@ void SMDS_DownPyramid::computeFacesWithNodes(int cellId, ListElemByNodesType& fa
+   // --- find point id's of the volume
+ 
+   vtkIdType npts = 0;
+-  vtkIdType *nodes; // will refer to the point id's of the volume
++  vtkIdTypePtr nodes; // will refer to the point id's of the volume
+   _grid->GetCellPoints(cellId, npts, nodes);
+ 
+   // --- create all the ordered list of node id's for each face
+@@ -1500,7 +1500,7 @@ void SMDS_DownQuadPyramid::getOrderedNodesOfFace(int cellId, std::vector<vtkIdTy
+   //MESSAGE("cellId = " << cellId);
+ 
+   vtkIdType npts = 0;
+-  vtkIdType *nodes; // will refer to the point id's of the volume
++  vtkIdTypePtr nodes; // will refer to the point id's of the volume
+   _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
+ 
+   set<int> tofind;
+@@ -1580,7 +1580,7 @@ void SMDS_DownQuadPyramid::computeFacesWithNodes(int cellId, ListElemByNodesType
+   // --- find point id's of the volume
+ 
+   vtkIdType npts = 0;
+-  vtkIdType *nodes; // will refer to the point id's of the volume
++  vtkIdTypePtr nodes; // will refer to the point id's of the volume
+   _grid->GetCellPoints(cellId, npts, nodes);
+ 
+   // --- create all the ordered list of node id's for each face
+@@ -1660,7 +1660,7 @@ void SMDS_DownPenta::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& o
+   //MESSAGE("cellId = " << cellId);
+ 
+   vtkIdType npts = 0;
+-  vtkIdType *nodes; // will refer to the point id's of the volume
++  vtkIdTypePtr nodes; // will refer to the point id's of the volume
+   _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
+ 
+   set<int> tofind;
+@@ -1744,7 +1744,7 @@ void SMDS_DownPenta::computeFacesWithNodes(int cellId, ListElemByNodesType& face
+   // --- find point id's of the volume
+ 
+   vtkIdType npts = 0;
+-  vtkIdType *nodes; // will refer to the point id's of the volume
++  vtkIdTypePtr nodes; // will refer to the point id's of the volume
+   _grid->GetCellPoints(cellId, npts, nodes);
+ 
+   // --- create all the ordered list of node id's for each face
+@@ -1810,7 +1810,7 @@ void SMDS_DownQuadPenta::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType
+   //MESSAGE("cellId = " << cellId);
+ 
+   vtkIdType npts = 0;
+-  vtkIdType *nodes; // will refer to the point id's of the volume
++  vtkIdTypePtr nodes; // will refer to the point id's of the volume
+   _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
+ 
+   set<int> tofind;
+@@ -1896,7 +1896,7 @@ void SMDS_DownQuadPenta::computeFacesWithNodes(int cellId, ListElemByNodesType&
+   // --- find point id's of the volume
+ 
+   vtkIdType npts = 0;
+-  vtkIdType *nodes; // will refer to the point id's of the volume
++  vtkIdTypePtr nodes; // will refer to the point id's of the volume
+   _grid->GetCellPoints(cellId, npts, nodes);
+ 
+   // --- create all the ordered list of node id's for each face
+@@ -1981,7 +1981,7 @@ void SMDS_DownHexa::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& or
+   //MESSAGE("cellId = " << cellId);
+ 
+   vtkIdType npts = 0;
+-  vtkIdType *nodes; // will refer to the point id's of the volume
++  vtkIdTypePtr nodes; // will refer to the point id's of the volume
+   _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
+ 
+   set<int> tofind;
+@@ -2036,7 +2036,7 @@ void SMDS_DownHexa::computeFacesWithNodes(int cellId, ListElemByNodesType& faces
+   // --- find point id's of the volume
+ 
+   vtkIdType npts = 0;
+-  vtkIdType *nodes; // will refer to the point id's of the volume
++  vtkIdTypePtr nodes; // will refer to the point id's of the volume
+   _grid->GetCellPoints(cellId, npts, nodes);
+ 
+   // --- create all the ordered list of node id's for each face
+@@ -2112,7 +2112,7 @@ void SMDS_DownQuadHexa::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>
+   //MESSAGE("cellId = " << cellId);
+ 
+   vtkIdType npts = 0;
+-  vtkIdType *nodes; // will refer to the point id's of the volume
++  vtkIdTypePtr nodes; // will refer to the point id's of the volume
+   _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
+ 
+   set<int> tofind;
+@@ -2167,7 +2167,7 @@ void SMDS_DownQuadHexa::computeFacesWithNodes(int cellId, ListElemByNodesType& f
+   // --- find point id's of the volume
+ 
+   vtkIdType npts = 0;
+-  vtkIdType *nodes; // will refer to the point id's of the volume
++  vtkIdTypePtr nodes; // will refer to the point id's of the volume
+   _grid->GetCellPoints(cellId, npts, nodes);
+ 
+   // --- create all the ordered list of node id's for each face
+diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp
+index 4ac6fd768..51b281699 100644
+--- src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp
++++ src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp
+@@ -4768,7 +4768,11 @@ void SMDS_Mesh::dumpGrid(string ficdump)
+         ficcon << endl;
+   }
+   ficcon << "-------------------------------- connectivity " <<  nbPoints << endl;
+-        vtkCellLinks *links = myGrid->GetCellLinks();
++#ifdef VTK_CELL_ARRAY_V2
++  vtkCellLinks *links = static_cast<vtkCellLinks*>(myGrid->GetCellLinks());
++#else
++  vtkCellLinks *links = myGrid->GetCellLinks();
++#endif
+   for (int i=0; i<nbPoints; i++)
+   {
+         int ncells = links->GetNcells(i);
+diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp
+index 95438eab0..a7f8059e0 100644
+--- src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp
++++ src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp
+@@ -147,7 +147,7 @@ bool SMDS_Mesh0DElement::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbN
+   {
+     vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
+     vtkIdType npts = 0;
+-    vtkIdType* pts = 0;
++    vtkIdTypePtr pts = 0;
+     grid->GetCellPoints(myVtkID, npts, pts);
+     if (nbNodes != npts)
+     {
+@@ -155,7 +155,11 @@ bool SMDS_Mesh0DElement::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbN
+       return false;
+     }
+     myNode = nodes[0];
++#ifdef VTK_CELL_ARRAY_V2
++//FIXME: vtk9
++#else
+     pts[0] = myNode->getVtkId();
++#endif
+ 
+     SMDS_Mesh::_meshList[myMeshId]->setMyModified();
+     return true;
+diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp
+index f647a5f1b..5b903c8fb 100644
+--- src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp
++++ src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp
+@@ -191,7 +191,7 @@ public:
+ SMDS_ElemIteratorPtr SMDS_MeshNode::
+ GetInverseElementIterator(SMDSAbs_ElementType type) const
+ {
+-  vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID);
++  vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID);
+   //MESSAGE("myID " << myID << " ncells " << l.ncells);
+   return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyInvIterator(SMDS_Mesh::_meshList[myMeshId], l.cells, l.ncells, type));
+ }
+@@ -251,7 +251,7 @@ elementsIterator(SMDSAbs_ElementType type) const
+     return SMDS_MeshElement::elementsIterator(SMDSAbs_Node);
+   else
+   {
+-    vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID);
++    vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID);
+     return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyIterator(SMDS_Mesh::_meshList[myMeshId], l.cells, l.ncells, type));
+   }
+ }
+@@ -350,7 +350,7 @@ void SMDS_MeshNode::AddInverseElement(const SMDS_MeshElement* ME)
+   const SMDS_MeshCell *cell = dynamic_cast<const SMDS_MeshCell*> (ME);
+   assert(cell);
+   SMDS_UnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
+-  vtkCellLinks *Links = grid->GetCellLinks();
++  vtkCellLinks *Links = static_cast<vtkCellLinks*>(grid->GetCellLinks());
+   Links->ResizeCellList(myVtkID, 1);
+   Links->AddCellReference(cell->getVtkId(), myVtkID);
+ }
+@@ -366,7 +366,7 @@ void SMDS_MeshNode::ClearInverseElements()
+ 
+ bool SMDS_MeshNode::emptyInverseElements()
+ {
+-  vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID);
++  vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID);
+   return (l.ncells == 0);
+ }
+ 
+@@ -378,7 +378,7 @@ bool SMDS_MeshNode::emptyInverseElements()
+ 
+ int SMDS_MeshNode::NbInverseElements(SMDSAbs_ElementType type) const
+ {
+-  vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID);
++  vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID);
+ 
+   if ( type == SMDSAbs_All )
+     return l.ncells;
+diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
+index fbd903b1e..19ccebcab 100644
+--- src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
++++ src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
+@@ -139,8 +139,8 @@ int SMDS_UnstructuredGrid::InsertNextLinkedCell(int type, int npts, vtkIdType *p
+   for (; it != setOfNodes.end(); ++it)
+     {
+       //MESSAGE("reverse link for node " << *it << " cell " << cellid);
+-      this->Links->ResizeCellList(*it, 1);
+-      this->Links->AddCellReference(cellid, *it);
++      this->GetLinks()->ResizeCellList(*it, 1);
++      this->GetLinks()->AddCellReference(cellid, *it);
+     }
+ 
+   return cellid;
+@@ -332,9 +332,13 @@ void SMDS_UnstructuredGrid::copyBloc(vtkUnsignedCharArray *newTypes,
+     {
+       newTypes->SetValue(alreadyCopied, this->Types->GetValue(j));
+       idCellsOldToNew[j] = alreadyCopied; // old vtkId --> new vtkId
++#ifdef VTK_CELL_ARRAY_V2
++      vtkIdType oldLoc; //FIXME: vtk9
++#else
+       vtkIdType oldLoc = this->Locations->GetValue(j);
++#endif
+       vtkIdType nbpts;
+-      vtkIdType *oldPtsCell = 0;
++      vtkIdTypePtr oldPtsCell = 0;
+       this->Connectivity->GetCell(oldLoc, nbpts, oldPtsCell);
+       assert(nbpts < NBMAXNODESINCELL);
+       //MESSAGE(j << " " << alreadyCopied << " " << (int)this->Types->GetValue(j) << " " << oldLoc << " " << nbpts );
+@@ -953,14 +957,18 @@ void SMDS_UnstructuredGrid::GetNodeIds(std::set<int>& nodeSet, int downId, unsig
+ void SMDS_UnstructuredGrid::ModifyCellNodes(int vtkVolId, std::map<int, int> localClonedNodeIds)
+ {
+   vtkIdType npts = 0;
+-  vtkIdType *pts; // will refer to the point id's of the face
++  vtkIdTypePtr pts; // will refer to the point id's of the face
+   this->GetCellPoints(vtkVolId, npts, pts);
+   for (int i = 0; i < npts; i++)
+     {
+       if (localClonedNodeIds.count(pts[i]))
+         {
+           vtkIdType oldpt = pts[i];
++#ifdef VTK_CELL_ARRAY_V2
++//FIXME: vtk9
++#else
+           pts[i] = localClonedNodeIds[oldpt];
++#endif
+           //MESSAGE(oldpt << " --> " << pts[i]);
+           //this->RemoveReferenceToCell(oldpt, vtkVolId);
+           //this->AddReferenceToCell(pts[i], vtkVolId);
+@@ -995,11 +1003,20 @@ void SMDS_UnstructuredGrid::BuildLinks()
+     this->Links->UnRegister(this);
+     }
+ 
++#ifdef VTK_CELL_ARRAY_V2
++//FIXME: vtk9
++  this->Links = SMDS_CellLinks::New();
++  //this->Links->Allocate(this->GetNumberOfPoints());
++  this->Links->Register(this);
++  //this->Links->BuildLinks(this, this->Connectivity);
++  this->Links->Delete();
++#else
+   this->Links = SMDS_CellLinks::New();
+   this->Links->Allocate(this->GetNumberOfPoints());
+   this->Links->Register(this);
+   this->Links->BuildLinks(this, this->Connectivity);
+   this->Links->Delete();
++#endif
+ }
+ 
+ /*! Create a volume (prism or hexahedron) by duplication of a face.
+diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp
+index deb05985f..63b6eabb7 100644
+--- src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp
++++ src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp
+@@ -33,7 +33,8 @@ SMDS_VtkCellIterator::SMDS_VtkCellIterator(SMDS_Mesh* mesh, int vtkCellId, SMDSA
+   }
+   else
+   {
+-    vtkIdType npts, *pts;
++    vtkIdType npts;
++    vtkIdTypePtr pts;
+     grid->GetCellPoints( _cellId, npts, pts );
+     _vtkIdList->SetNumberOfIds( _nbNodes = npts );
+     for (int i = 0; i < _nbNodes; i++)
+@@ -67,7 +68,7 @@ SMDS_VtkCellIteratorToUNV::SMDS_VtkCellIteratorToUNV(SMDS_Mesh* mesh, int vtkCel
+   //MESSAGE("SMDS_VtkCellInterlacedIterator (UNV)" << _type);
+ 
+   _vtkIdList = vtkIdList::New();
+-  vtkIdType* pts;
++  vtkIdTypePtr pts;
+   vtkIdType npts;
+   vtkUnstructuredGrid* grid = _mesh->getGrid();
+   grid->GetCellPoints((vtkIdType)_cellId, npts, pts);
+@@ -182,7 +183,7 @@ SMDS_VtkCellIteratorPolyH::SMDS_VtkCellIteratorPolyH(SMDS_Mesh* mesh, int vtkCel
+   {
+     //MESSAGE("SMDS_VtkCellIterator Polyhedra");
+     vtkIdType nFaces = 0;
+-    vtkIdType* ptIds = 0;
++    vtkIdTypePtr ptIds = 0;
+     grid->GetFaceStream(_cellId, nFaces, ptIds);
+     int id = 0;
+     _nbNodesInFaces = 0;
+diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp
+index 9786abf9a..58d2df3cf 100644
+--- src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp
++++ src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp
+@@ -68,7 +68,7 @@ bool SMDS_VtkEdge::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
+ {
+   vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
+   vtkIdType npts = 0;
+-  vtkIdType* pts = 0;
++  vtkIdTypePtr pts = 0;
+   grid->GetCellPoints(myVtkID, npts, pts);
+   if (nbNodes != npts)
+     {
+@@ -77,7 +77,11 @@ bool SMDS_VtkEdge::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
+     }
+   for (int i = 0; i < nbNodes; i++)
+     {
++#ifdef VTK_CELL_ARRAY_V2
++//FIXME: vtk9
++#else
+       pts[i] = nodes[i]->getVtkId();
++#endif
+     }
+   SMDS_Mesh::_meshList[myMeshId]->setMyModified();
+   return true;
+@@ -87,7 +91,7 @@ bool SMDS_VtkEdge::IsMediumNode(const SMDS_MeshNode* node) const
+ {
+   vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
+   vtkIdType npts = 0;
+-  vtkIdType* pts = 0;
++  vtkIdTypePtr pts = 0;
+   grid->GetCellPoints(myVtkID, npts, pts);
+   //MESSAGE("IsMediumNode " << npts  << " " << (node->getVtkId() == pts[npts-1]));
+   return ((npts == 3) && (node->getVtkId() == pts[2]));
+@@ -137,7 +141,8 @@ const SMDS_MeshNode*
+ SMDS_VtkEdge::GetNode(const int ind) const
+ {
+   vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
+-  vtkIdType npts, *pts;
++  vtkIdType npts;
++  vtkIdTypePtr pts;
+   grid->GetCellPoints( this->myVtkID, npts, pts );
+   return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ ind ]);
+ }
+diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp
+index 1389e0d35..a92601f1e 100644
+--- src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp
++++ src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp
+@@ -102,7 +102,7 @@ bool SMDS_VtkFace::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
+ {
+   vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
+   vtkIdType npts = 0;
+-  vtkIdType* pts = 0;
++  vtkIdTypePtr pts = 0;
+   grid->GetCellPoints(myVtkID, npts, pts);
+   if (nbNodes != npts)
+     {
+@@ -111,7 +111,11 @@ bool SMDS_VtkFace::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
+     }
+   for (int i = 0; i < nbNodes; i++)
+     {
++#ifdef VTK_CELL_ARRAY_V2
++//FIXME: vtk9
++#else
+       pts[i] = nodes[i]->getVtkId();
++#endif
+     }
+   SMDS_Mesh::_meshList[myMeshId]->setMyModified();
+   return true;
+@@ -173,7 +177,8 @@ const SMDS_MeshNode*
+ SMDS_VtkFace::GetNode(const int ind) const
+ {
+   vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
+-  vtkIdType npts, *pts;
++  vtkIdType npts;
++  vtkIdTypePtr pts;
+   grid->GetCellPoints( this->myVtkID, npts, pts );
+   return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ ind ]);
+ }
+@@ -186,7 +191,8 @@ SMDS_VtkFace::GetNode(const int ind) const
+ int SMDS_VtkFace::GetNodeIndex( const SMDS_MeshNode* node ) const
+ {
+   vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
+-  vtkIdType npts, *pts;
++  vtkIdType npts;
++  vtkIdTypePtr pts;
+   grid->GetCellPoints( this->myVtkID, npts, pts );
+   for ( vtkIdType i = 0; i < npts; ++i )
+     if ( pts[i] == node->getVtkId() )
+@@ -251,7 +257,7 @@ bool SMDS_VtkFace::IsMediumNode(const SMDS_MeshNode* node) const
+     return false;
+   }
+   vtkIdType npts = 0;
+-  vtkIdType* pts = 0;
++  vtkIdTypePtr pts = 0;
+   grid->GetCellPoints(myVtkID, npts, pts);
+   vtkIdType nodeId = node->getVtkId();
+   for (int rank = 0; rank < npts; rank++)
+@@ -357,10 +363,14 @@ void SMDS_VtkFace::ChangeApex(SMDS_MeshNode* node)
+ {
+   vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
+   vtkIdType npts = 0;
+-  vtkIdType* pts = 0;
++  vtkIdTypePtr pts = 0;
+   grid->GetCellPoints(myVtkID, npts, pts);
+   grid->RemoveReferenceToCell(pts[0], myVtkID);
++#ifdef VTK_CELL_ARRAY_V2
++//FIXME: vtk9
++#else
+   pts[0] = node->getVtkId();
++#endif
+   node->AddInverseElement(this),
+   SMDS_Mesh::_meshList[myMeshId]->setMyModified();
+ }
+diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp
+index 015edf75f..da2f73ffb 100644
+--- src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp
++++ src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp
+@@ -134,7 +134,7 @@ bool SMDS_VtkVolume::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes
+ {
+   vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
+   vtkIdType npts = 0;
+-  vtkIdType* pts = 0;
++  vtkIdTypePtr pts = 0;
+   grid->GetCellPoints(myVtkID, npts, pts);
+   if (nbNodes != npts)
+     {
+@@ -143,7 +143,11 @@ bool SMDS_VtkVolume::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes
+     }
+   for (int i = 0; i < nbNodes; i++)
+     {
++#ifdef VTK_CELL_ARRAY_V2
++//FIXME: vtk9
++#else
+       pts[i] = nodes[i]->getVtkId();
++#endif
+     }
+   SMDS_Mesh::_meshList[myMeshId]->setMyModified();
+   return true;
+@@ -207,7 +211,7 @@ int SMDS_VtkVolume::NbFaces() const
+     case VTK_POLYHEDRON:
+       {
+         vtkIdType nFaces = 0;
+-        vtkIdType* ptIds = 0;
++        vtkIdTypePtr ptIds = 0;
+         grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
+         nbFaces = nFaces;
+         break;
+@@ -236,7 +240,7 @@ int SMDS_VtkVolume::NbNodes() const
+   else
+     {
+       vtkIdType nFaces = 0;
+-      vtkIdType* ptIds = 0;
++      vtkIdTypePtr ptIds = 0;
+       grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
+       int id = 0;
+       for (int i = 0; i < nFaces; i++)
+@@ -276,7 +280,7 @@ int SMDS_VtkVolume::NbEdges() const
+     case VTK_POLYHEDRON:
+       {
+         vtkIdType nFaces = 0;
+-        vtkIdType* ptIds = 0;
++        vtkIdTypePtr ptIds = 0;
+         grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
+         nbEdges = 0;
+         int id = 0;
+@@ -312,7 +316,7 @@ int SMDS_VtkVolume::NbFaceNodes(const int face_ind) const
+   if (aVtkType == VTK_POLYHEDRON)
+     {
+       vtkIdType nFaces = 0;
+-      vtkIdType* ptIds = 0;
++      vtkIdTypePtr ptIds = 0;
+       grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
+       int id = 0;
+       for (int i = 0; i < nFaces; i++)
+@@ -342,7 +346,7 @@ const SMDS_MeshNode* SMDS_VtkVolume::GetFaceNode(const int face_ind, const int n
+   if (aVtkType == VTK_POLYHEDRON)
+     {
+       vtkIdType nFaces = 0;
+-      vtkIdType* ptIds = 0;
++      vtkIdTypePtr ptIds = 0;
+       grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
+       int id = 0;
+       for (int i = 0; i < nFaces; i++)
+@@ -372,7 +376,7 @@ std::vector<int> SMDS_VtkVolume::GetQuantities() const
+   if (aVtkType == VTK_POLYHEDRON)
+     {
+       vtkIdType nFaces = 0;
+-      vtkIdType* ptIds = 0;
++      vtkIdTypePtr ptIds = 0;
+       grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
+       int id = 0;
+       for (int i = 0; i < nFaces; i++)
+@@ -430,7 +434,7 @@ const SMDS_MeshNode* SMDS_VtkVolume::GetNode(const int ind) const
+   if ( aVtkType == VTK_POLYHEDRON)
+   {
+     vtkIdType nFaces = 0;
+-    vtkIdType* ptIds = 0;
++    vtkIdTypePtr ptIds = 0;
+     grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
+     int id = 0, nbPoints = 0;
+     for (int i = 0; i < nFaces; i++)
+@@ -443,7 +447,8 @@ const SMDS_MeshNode* SMDS_VtkVolume::GetNode(const int ind) const
+     }
+     return 0;
+   }
+-  vtkIdType npts, *pts;
++  vtkIdType npts;
++  vtkIdTypePtr pts;
+   grid->GetCellPoints( this->myVtkID, npts, pts );
+   const std::vector<int>& interlace = SMDS_MeshCell::fromVtkOrder( VTKCellType( aVtkType ));
+   return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ interlace.empty() ? ind : interlace[ind]] );
+@@ -460,7 +465,7 @@ int SMDS_VtkVolume::GetNodeIndex( const SMDS_MeshNode* node ) const
+   if ( aVtkType == VTK_POLYHEDRON)
+   {
+     vtkIdType nFaces = 0;
+-    vtkIdType* ptIds = 0;
++    vtkIdTypePtr ptIds = 0;
+     grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
+     int id = 0;
+     for (int iF = 0; iF < nFaces; iF++)
+@@ -473,7 +478,8 @@ int SMDS_VtkVolume::GetNodeIndex( const SMDS_MeshNode* node ) const
+     }
+     return -1;
+   }
+-  vtkIdType npts, *pts;
++  vtkIdType npts;
++  vtkIdTypePtr pts;
+   grid->GetCellPoints( this->myVtkID, npts, pts );
+   for ( vtkIdType i = 0; i < npts; ++i )
+     if ( pts[i] == node->getVtkId() )
+@@ -534,7 +540,7 @@ bool SMDS_VtkVolume::IsMediumNode(const SMDS_MeshNode* node) const
+       return false;
+   }
+   vtkIdType npts = 0;
+-  vtkIdType* pts = 0;
++  vtkIdTypePtr pts = 0;
+   grid->GetCellPoints(myVtkID, npts, pts);
+   vtkIdType nodeId = node->getVtkId();
+   for (int rank = 0; rank < npts; rank++)
+diff --git src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
+index a742702ff..1ff4d5eef 100644
+--- src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
++++ src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
+@@ -11343,7 +11343,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
+             {
+               int oldId = *itn;
+               //MESSAGE("     node " << oldId);
+-              vtkCellLinks::Link l = grid->GetCellLinks()->GetLink(oldId);
++              vtkCellLinks::Link l = static_cast<vtkCellLinks*>(grid->GetCellLinks())->GetLink(oldId);
+               for (int i=0; i<l.ncells; i++)
+                 {
+                   int vtkId = l.cells[i];
+@@ -11522,7 +11522,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
+                                           //MESSAGE("  domain " << idom << " volume " << elem->GetID());
+                                           double values[3];
+                                           vtkIdType npts = 0;
+-                                          vtkIdType* pts = 0;
++                                          vtkIdTypePtr pts = 0;
+                                           grid->GetCellPoints(vtkVolIds[ivol], npts, pts);
+                                           SMDS_VtkVolume::gravityCenter(grid, pts, npts, values);
+                                           if (id ==0)
+@@ -11703,7 +11703,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
+         {
+           int oldId = itnod->first;
+           //MESSAGE("     node " << oldId);
+-          vtkCellLinks::Link l = grid->GetCellLinks()->GetLink(oldId);
++          vtkCellLinks::Link l = static_cast<vtkCellLinks*>(grid->GetCellLinks())->GetLink(oldId);
+           for (int i = 0; i < l.ncells; i++)
+             {
+               int vtkId = l.cells[i];
+@@ -12160,7 +12160,7 @@ void SMESH_MeshEditor::CreateHoleSkin(double radius,
+           MESSAGE("volume to check,  vtkId " << vtkId << " smdsId " << meshDS->fromVtkToSmds(vtkId));
+           bool volInside = false;
+           vtkIdType npts = 0;
+-          vtkIdType* pts = 0;
++          vtkIdTypePtr pts = 0;
+           grid->GetCellPoints(vtkId, npts, pts);
+           for (int i=0; i<npts; i++)
+             {
+

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2021-03-25  6:44 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19  7:02 [PR PATCH] [WIP] freecad: update to 0.19.1 yopito
2021-03-20  4:03 ` sww1235
2021-03-20 16:02 ` sww1235
2021-03-20 23:34 ` sww1235
2021-03-21 17:44 ` [PR PATCH] [Updated] " yopito
2021-03-21 17:55 ` yopito
2021-03-22  4:15 ` sww1235
2021-03-25  4:19 ` [PR PATCH] [Merged]: " ericonr
2021-03-25  4:19 ` ericonr
2021-03-25  6:44 ` yopito
  -- strict thread matches above, loose matches on Subject: below --
2021-03-15  0:21 [PR PATCH] Freecad: Update " sww1235
2021-03-15  0:32 ` ericonr
2021-03-15 22:44 ` sww1235
2021-03-16  2:00 ` sww1235
2021-03-16 19:05 ` yopito
2021-03-16 19:06 ` yopito
2021-03-16 20:27 ` karl-nilsson
2021-03-16 20:57 ` sww1235
2021-03-16 21:03 ` ericonr
2021-03-16 21:16 ` karl-nilsson
2021-03-16 21:43 ` yopito
2021-03-16 22:37 ` yopito
2021-03-16 23:28 ` sww1235
2021-03-16 23:29 ` sww1235
2021-03-16 23:33 ` sww1235
2021-03-17 19:07 ` yopito
2021-03-17 20:43 ` yopito
2021-03-18  1:58 ` sww1235
2021-03-18 19:31 ` yopito
2021-03-20  3:11 ` sww1235

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).