Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] [WIP] occt: update to 7.6.1
@ 2022-03-26  4:42 karl-nilsson
  2022-03-26 15:07 ` [PR PATCH] [Updated] " karl-nilsson
                   ` (41 more replies)
  0 siblings, 42 replies; 43+ messages in thread
From: karl-nilsson @ 2022-03-26  4:42 UTC (permalink / raw)
  To: ml

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

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

https://github.com/karl-nilsson/void-packages occt_7.6
https://github.com/void-linux/void-packages/pull/36356

[WIP] occt: update to 7.6.1


#### Testing the changes
- I tested the changes in this PR: **briefly**


#### Local build testing
- I built this PR locally for my native architecture, x64-glibc


Like previously, broken ABI
```console
During initialization the error "/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv" occurred in /home/nilsson/.FreeCAD/Mod/A2plus/InitGui.py                                                                                                                        
Please look into the log file for further information                                                                                                
Wizard shaft module cannot be loaded                                                                                                                 
/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv                                                              
connect failed: No such file or directory      
```

Looks like we'll have to update or patch freecad
```console
In file included from /usr/include/opencascade/Extrema_POnSurf.lxx:15,
                 from /usr/include/opencascade/Extrema_POnSurf.hxx:75,
                 from /usr/include/opencascade/Extrema_ExtPElS.hxx:27,
                 from /usr/include/opencascade/Extrema_ExtPS.hxx:24,
                 from /usr/include/opencascade/ShapeAnalysis_Surface.hxx:20,
                 from ../src/3rdParty/salomesmesh/inc/SMESH_MesherHelper.hxx:37,
                 from ../src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp:34:
/usr/include/opencascade/Precision.hxx:98:7: note: previous definition of 'class Precision'
   98 | class Precision
      |       ^~~~~~~~~

```

ping @Piraty 

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-occt_7.6-36356.patch --]
[-- Type: text/x-diff, Size: 9783 bytes --]

From 330f1a6511259207ecd527e00e9c11bb68292bbf Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 20:24:49 -0400
Subject: [PATCH 1/2] python3-occ: remove package

* upstream is well behind occt
---
 srcpkgs/python3-occ/patches/python3.10.patch | 15 ---------------
 srcpkgs/python3-occ/template                 | 17 -----------------
 srcpkgs/removed-packages/template            |  3 ++-
 3 files changed, 2 insertions(+), 33 deletions(-)
 delete mode 100644 srcpkgs/python3-occ/patches/python3.10.patch
 delete mode 100644 srcpkgs/python3-occ/template

diff --git a/srcpkgs/python3-occ/patches/python3.10.patch b/srcpkgs/python3-occ/patches/python3.10.patch
deleted file mode 100644
index e192608fd3b3..000000000000
--- a/srcpkgs/python3-occ/patches/python3.10.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/src/Display/SimpleGui.py b/src/Display/SimpleGui.py
-index 42705a82..6a274c16 100644
---- a/src/Display/SimpleGui.py
-+++ b/src/Display/SimpleGui.py
-@@ -161,8 +161,8 @@ def init_display(backend_str: Optional[str]=None,
-             def centerOnScreen(self) -> None:
-                 '''Centers the window on the screen.'''
-                 resolution = QtWidgets.QApplication.desktop().screenGeometry()
--                x = (resolution.width() - self.frameSize().width()) / 2
--                y = (resolution.height() - self.frameSize().height()) / 2
-+                x = (resolution.width() - self.frameSize().width()) // 2
-+                y = (resolution.height() - self.frameSize().height()) // 2
-                 self.move(x, y)
- 
-             def add_menu(self, menu_name: str) -> None:
diff --git a/srcpkgs/python3-occ/template b/srcpkgs/python3-occ/template
deleted file mode 100644
index bee03373a3d1..000000000000
--- a/srcpkgs/python3-occ/template
+++ /dev/null
@@ -1,17 +0,0 @@
-# Template file for 'python3-occ'
-pkgname=python3-occ
-version=7.4.1
-revision=3
-archs="i686* x86_64* armv7l* aarch64* ppc*"
-wrksrc="pythonocc-core-${version}"
-build_style=cmake
-configure_args="-DPYTHONOCC_BUILD_TYPE=None -DCMAKE_BUILD_TYPE=None"
-hostmakedepends="python3 swig"
-makedepends="python3-devel occt-devel freetype-devel swig"
-depends="python3 occt freetype"
-short_desc="Industrial strength 3D CAD Python3 package"
-maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
-license="LGPL-3.0-or-later"
-homepage="http://pythonocc.org"
-distfiles="https://github.com/tpaviot/pythonocc-core/archive/${version}.tar.gz"
-checksum=6d62002244a0e7f4e5c1ad590d332a60601c44b2501ad017361443b54371e667
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index df264c9d7501..dc8107f36e09 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,7 +1,7 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
 version=0.1
-revision=67
+revision=68
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
 maintainer="Piotr Wójcik <chocimier@tlen.pl>"
@@ -327,6 +327,7 @@ replaces="
  python3-keepalive<=0.5_6
  python3-pgpdump<=1.5_10
  python3-lockfile<=0.12.2_7
+ python3-occ<=7.4.1_3
  python3-pyPEG2<=2.15.2_7
  python3-pyenet<=5.15.0_2
  python3-pyside-phonon<=5.15.0_2

From 4ff9f0b1f5971b4a3409aed5cfccd00df017786e Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 19:29:00 -0400
Subject: [PATCH 2/2] occt: update to 7.6.1.

---
 .../occt/patches/cmake-build-type-none.patch  |  6 +--
 srcpkgs/occt/patches/musl-fenv.patch          | 18 ++++----
 srcpkgs/occt/patches/musl-mallinfo.patch      | 45 ++++++++++++++-----
 srcpkgs/occt/template                         | 24 +++++-----
 srcpkgs/occt/update                           |  2 -
 5 files changed, 56 insertions(+), 39 deletions(-)
 delete mode 100644 srcpkgs/occt/update

diff --git a/srcpkgs/occt/patches/cmake-build-type-none.patch b/srcpkgs/occt/patches/cmake-build-type-none.patch
index ecb0e3da3929..d2caec8c4e87 100644
--- a/srcpkgs/occt/patches/cmake-build-type-none.patch
+++ b/srcpkgs/occt/patches/cmake-build-type-none.patch
@@ -1,8 +1,8 @@
-Index: CMakeLists.txt
-===================================================================
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f4ec871f5..9b0644e94 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_D
+@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
  
  set (CMAKE_SUPPRESS_REGENERATION TRUE)
  
diff --git a/srcpkgs/occt/patches/musl-fenv.patch b/srcpkgs/occt/patches/musl-fenv.patch
index 09da8d0afeae..06a8e3a89cfd 100644
--- a/srcpkgs/occt/patches/musl-fenv.patch
+++ b/srcpkgs/occt/patches/musl-fenv.patch
@@ -5,18 +5,20 @@ is probably wrong, but I don't have a replacement for the
 non-posix functions fegetexcept(3) and feenableexcept(3).
 """
 
+diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx
+index 007f5ccaa..fe39e07ac 100644
 --- a/src/OSD/OSD_signal.cxx
 +++ b/src/OSD/OSD_signal.cxx
-@@ -703,7 +703,7 @@
- 
+@@ -761,7 +761,7 @@ typedef void (* SIG_PFV) (int);
+
  #include <signal.h>
- 
--#if !defined(__ANDROID__) && !defined(__QNX__)
-+#if !defined(__ANDROID__) && !defined(__QNX__) && defined(__GLIBC__)
+
+-#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
++#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && defined(__GLIBC__)
    #include <sys/signal.h>
  #endif
- 
-@@ -914,7 +914,7 @@
+
+@@ -977,7 +977,7 @@ static void SegvHandler(const int theSignal,
  //=======================================================================
  void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  {
@@ -25,7 +27,7 @@ non-posix functions fegetexcept(3) and feenableexcept(3).
    feclearexcept (FE_ALL_EXCEPT);
    if (theFloatingSignal)
    {
-@@ -947,7 +947,7 @@
+@@ -1010,7 +1010,7 @@ void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  //=======================================================================
  Standard_Boolean OSD::ToCatchFloatingSignals()
  {
diff --git a/srcpkgs/occt/patches/musl-mallinfo.patch b/srcpkgs/occt/patches/musl-mallinfo.patch
index 4e5825bf1cb0..6ae94992eaf8 100644
--- a/srcpkgs/occt/patches/musl-mallinfo.patch
+++ b/srcpkgs/occt/patches/musl-mallinfo.patch
@@ -1,17 +1,38 @@
-In musl libc there is no struct mallinfo and no function mallinf()
+Adapted from alpine's patch
 
+diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx
+index d9bb91398..d608e04fc 100644
 --- a/src/OSD/OSD_MemInfo.cxx
 +++ b/src/OSD/OSD_MemInfo.cxx
-@@ -147,8 +147,12 @@
-   }
-   aFile.close();
+@@ -35,6 +35,9 @@
+ #include <sstream>
+ #include <fstream>
+ 
++#include <sys/time.h>
++#include <sys/resource.h>
++
+ #include <OSD_MemInfo.hxx>
  
-+  #if defined(__GLIBC__)
-   struct mallinfo aMI = mallinfo();
-   myCounters[MemHeapUsage] = aMI.uordblks;
-+  #else /* XXX not yet coded */
-+  myCounters[MemHeapUsage] = 0;
-+  #endif
+ #if defined(__EMSCRIPTEN__)
+@@ -182,18 +185,9 @@ void OSD_MemInfo::Update()
+ #elif (defined(__linux__) || defined(__linux))
+   if (IsActive (MemHeapUsage))
+   {
+-  #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+-    #if __GLIBC_PREREQ(2,33)
+-      #define HAS_MALLINFO2
+-    #endif
+-  #endif
+-
+-  #ifdef HAS_MALLINFO2
+-    const struct mallinfo2 aMI = mallinfo2();
+-  #else
+-    const struct mallinfo aMI = mallinfo();
+-  #endif
+-    myCounters[MemHeapUsage] = aMI.uordblks;
++    struct rusage ru = { .ru_maxrss = 0 };
++    getrusage(RUSAGE_SELF, &ru);
++    myCounters[MemHeapUsage] = ru.ru_maxrss;
+   }
  
- #elif (defined(__APPLE__))
-   struct task_basic_info aTaskInfo;
+   if (!IsActive (MemVirtual)
diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template
index 6624fea8b53f..ee6838efc30f 100644
--- a/srcpkgs/occt/template
+++ b/srcpkgs/occt/template
@@ -1,24 +1,20 @@
 # Template file for 'occt'
 pkgname=occt
-reverts=7.5.0_1
-version=7.4.0p1
-revision=5
-_gittag="V${version//./_}"
-wrksrc=occt-${_gittag}
+version=7.6.1
+revision=1
+_ver="${version//./_}"
+wrksrc=OCCT-${_ver}
 build_style=cmake
-# XXX: re-enable -DUSE_TBB=ON if possible when updating
-configure_args="-DUSE_FREEIMAGE=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
+configure_args="-DUSE_FREEIMAGE=ON -DUSE_TBB=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
  -DINSTALL_SAMPLES=ON"
-makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tcl-devel
- tk-devel"
+makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tbb-devel
+ tcl-devel tk-devel"
 short_desc="OpenCASCADE Technology - library for CAD/CAM/CAE applications"
 maintainer="Piraty <piraty1@inbox.ru>"
 license="custom:LGPL-2.1-only-with-exceptions"
 homepage="https://www.opencascade.com"
-# distfile: use git instead of official tarball, which requires registration
-# see https://www.opencascade.com/content/packaging-again-debian
-distfiles="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_gittag};sf=tgz>occt-${_gittag}.tar.gz"
-checksum=e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0
+distfiles="https://github.com/Open-Cascade-SAS/OCCT/archive/V${_ver}.tar.gz"
+checksum=48969bf9130966a30b370b335133f87e8614b7cbc077b0df9d895bbefc5cfeae
 conflicts="oce>=0"
 
 post_install() {
@@ -28,7 +24,7 @@ post_install() {
 
 	vmkdir /etc/profile.d
 	vinstall ${FILESDIR}/opencascade.sh 644 /etc/profile.d
-	chmod 755 ${DESTDIR}/usr/bin/draw.sh
+    chmod 755 ${DESTDIR}/usr/bin/draw.sh
 }
 
 occt-devel_package() {
diff --git a/srcpkgs/occt/update b/srcpkgs/occt/update
deleted file mode 100644
index c128eec6d9c9..000000000000
--- a/srcpkgs/occt/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=tags"
-pattern=">V\K[\d_p]+(?=</a>)"

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

* Re: [PR PATCH] [Updated] [WIP] occt: update to 7.6.1
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
@ 2022-03-26 15:07 ` karl-nilsson
  2022-03-26 15:26 ` karl-nilsson
                   ` (40 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: karl-nilsson @ 2022-03-26 15:07 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by karl-nilsson against master on the void-packages repository

https://github.com/karl-nilsson/void-packages occt_7.6
https://github.com/void-linux/void-packages/pull/36356

[WIP] occt: update to 7.6.1


#### Testing the changes
- I tested the changes in this PR: **briefly**


#### Local build testing
- I built this PR locally for my native architecture, x64-glibc


Like previously, broken ABI
```console
During initialization the error "/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv" occurred in /home/nilsson/.FreeCAD/Mod/A2plus/InitGui.py                                                                                                                        
Please look into the log file for further information                                                                                                
Wizard shaft module cannot be loaded                                                                                                                 
/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv                                                              
connect failed: No such file or directory      
```

Looks like we'll have to update or patch freecad
```console
In file included from /usr/include/opencascade/Extrema_POnSurf.lxx:15,
                 from /usr/include/opencascade/Extrema_POnSurf.hxx:75,
                 from /usr/include/opencascade/Extrema_ExtPElS.hxx:27,
                 from /usr/include/opencascade/Extrema_ExtPS.hxx:24,
                 from /usr/include/opencascade/ShapeAnalysis_Surface.hxx:20,
                 from ../src/3rdParty/salomesmesh/inc/SMESH_MesherHelper.hxx:37,
                 from ../src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp:34:
/usr/include/opencascade/Precision.hxx:98:7: note: previous definition of 'class Precision'
   98 | class Precision
      |       ^~~~~~~~~

```

ping @Piraty 

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-occt_7.6-36356.patch --]
[-- Type: text/x-diff, Size: 9735 bytes --]

From 330f1a6511259207ecd527e00e9c11bb68292bbf Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 20:24:49 -0400
Subject: [PATCH 1/2] python3-occ: remove package

* upstream is well behind occt
---
 srcpkgs/python3-occ/patches/python3.10.patch | 15 ---------------
 srcpkgs/python3-occ/template                 | 17 -----------------
 srcpkgs/removed-packages/template            |  3 ++-
 3 files changed, 2 insertions(+), 33 deletions(-)
 delete mode 100644 srcpkgs/python3-occ/patches/python3.10.patch
 delete mode 100644 srcpkgs/python3-occ/template

diff --git a/srcpkgs/python3-occ/patches/python3.10.patch b/srcpkgs/python3-occ/patches/python3.10.patch
deleted file mode 100644
index e192608fd3b3..000000000000
--- a/srcpkgs/python3-occ/patches/python3.10.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/src/Display/SimpleGui.py b/src/Display/SimpleGui.py
-index 42705a82..6a274c16 100644
---- a/src/Display/SimpleGui.py
-+++ b/src/Display/SimpleGui.py
-@@ -161,8 +161,8 @@ def init_display(backend_str: Optional[str]=None,
-             def centerOnScreen(self) -> None:
-                 '''Centers the window on the screen.'''
-                 resolution = QtWidgets.QApplication.desktop().screenGeometry()
--                x = (resolution.width() - self.frameSize().width()) / 2
--                y = (resolution.height() - self.frameSize().height()) / 2
-+                x = (resolution.width() - self.frameSize().width()) // 2
-+                y = (resolution.height() - self.frameSize().height()) // 2
-                 self.move(x, y)
- 
-             def add_menu(self, menu_name: str) -> None:
diff --git a/srcpkgs/python3-occ/template b/srcpkgs/python3-occ/template
deleted file mode 100644
index bee03373a3d1..000000000000
--- a/srcpkgs/python3-occ/template
+++ /dev/null
@@ -1,17 +0,0 @@
-# Template file for 'python3-occ'
-pkgname=python3-occ
-version=7.4.1
-revision=3
-archs="i686* x86_64* armv7l* aarch64* ppc*"
-wrksrc="pythonocc-core-${version}"
-build_style=cmake
-configure_args="-DPYTHONOCC_BUILD_TYPE=None -DCMAKE_BUILD_TYPE=None"
-hostmakedepends="python3 swig"
-makedepends="python3-devel occt-devel freetype-devel swig"
-depends="python3 occt freetype"
-short_desc="Industrial strength 3D CAD Python3 package"
-maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
-license="LGPL-3.0-or-later"
-homepage="http://pythonocc.org"
-distfiles="https://github.com/tpaviot/pythonocc-core/archive/${version}.tar.gz"
-checksum=6d62002244a0e7f4e5c1ad590d332a60601c44b2501ad017361443b54371e667
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index df264c9d7501..dc8107f36e09 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,7 +1,7 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
 version=0.1
-revision=67
+revision=68
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
 maintainer="Piotr Wójcik <chocimier@tlen.pl>"
@@ -327,6 +327,7 @@ replaces="
  python3-keepalive<=0.5_6
  python3-pgpdump<=1.5_10
  python3-lockfile<=0.12.2_7
+ python3-occ<=7.4.1_3
  python3-pyPEG2<=2.15.2_7
  python3-pyenet<=5.15.0_2
  python3-pyside-phonon<=5.15.0_2

From 1275e700b5c66f51fa4525dc8c86ffe9cf5d1797 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 19:29:00 -0400
Subject: [PATCH 2/2] occt: update to 7.6.1.

---
 .../occt/patches/cmake-build-type-none.patch  |  6 +--
 srcpkgs/occt/patches/musl-fenv.patch          | 18 ++++----
 srcpkgs/occt/patches/musl-mallinfo.patch      | 45 ++++++++++++++-----
 srcpkgs/occt/template                         | 26 +++++------
 srcpkgs/occt/update                           |  2 -
 5 files changed, 59 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/occt/update

diff --git a/srcpkgs/occt/patches/cmake-build-type-none.patch b/srcpkgs/occt/patches/cmake-build-type-none.patch
index ecb0e3da3929..d2caec8c4e87 100644
--- a/srcpkgs/occt/patches/cmake-build-type-none.patch
+++ b/srcpkgs/occt/patches/cmake-build-type-none.patch
@@ -1,8 +1,8 @@
-Index: CMakeLists.txt
-===================================================================
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f4ec871f5..9b0644e94 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_D
+@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
  
  set (CMAKE_SUPPRESS_REGENERATION TRUE)
  
diff --git a/srcpkgs/occt/patches/musl-fenv.patch b/srcpkgs/occt/patches/musl-fenv.patch
index 09da8d0afeae..06a8e3a89cfd 100644
--- a/srcpkgs/occt/patches/musl-fenv.patch
+++ b/srcpkgs/occt/patches/musl-fenv.patch
@@ -5,18 +5,20 @@ is probably wrong, but I don't have a replacement for the
 non-posix functions fegetexcept(3) and feenableexcept(3).
 """
 
+diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx
+index 007f5ccaa..fe39e07ac 100644
 --- a/src/OSD/OSD_signal.cxx
 +++ b/src/OSD/OSD_signal.cxx
-@@ -703,7 +703,7 @@
- 
+@@ -761,7 +761,7 @@ typedef void (* SIG_PFV) (int);
+
  #include <signal.h>
- 
--#if !defined(__ANDROID__) && !defined(__QNX__)
-+#if !defined(__ANDROID__) && !defined(__QNX__) && defined(__GLIBC__)
+
+-#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
++#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && defined(__GLIBC__)
    #include <sys/signal.h>
  #endif
- 
-@@ -914,7 +914,7 @@
+
+@@ -977,7 +977,7 @@ static void SegvHandler(const int theSignal,
  //=======================================================================
  void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  {
@@ -25,7 +27,7 @@ non-posix functions fegetexcept(3) and feenableexcept(3).
    feclearexcept (FE_ALL_EXCEPT);
    if (theFloatingSignal)
    {
-@@ -947,7 +947,7 @@
+@@ -1010,7 +1010,7 @@ void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  //=======================================================================
  Standard_Boolean OSD::ToCatchFloatingSignals()
  {
diff --git a/srcpkgs/occt/patches/musl-mallinfo.patch b/srcpkgs/occt/patches/musl-mallinfo.patch
index 4e5825bf1cb0..6ae94992eaf8 100644
--- a/srcpkgs/occt/patches/musl-mallinfo.patch
+++ b/srcpkgs/occt/patches/musl-mallinfo.patch
@@ -1,17 +1,38 @@
-In musl libc there is no struct mallinfo and no function mallinf()
+Adapted from alpine's patch
 
+diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx
+index d9bb91398..d608e04fc 100644
 --- a/src/OSD/OSD_MemInfo.cxx
 +++ b/src/OSD/OSD_MemInfo.cxx
-@@ -147,8 +147,12 @@
-   }
-   aFile.close();
+@@ -35,6 +35,9 @@
+ #include <sstream>
+ #include <fstream>
+ 
++#include <sys/time.h>
++#include <sys/resource.h>
++
+ #include <OSD_MemInfo.hxx>
  
-+  #if defined(__GLIBC__)
-   struct mallinfo aMI = mallinfo();
-   myCounters[MemHeapUsage] = aMI.uordblks;
-+  #else /* XXX not yet coded */
-+  myCounters[MemHeapUsage] = 0;
-+  #endif
+ #if defined(__EMSCRIPTEN__)
+@@ -182,18 +185,9 @@ void OSD_MemInfo::Update()
+ #elif (defined(__linux__) || defined(__linux))
+   if (IsActive (MemHeapUsage))
+   {
+-  #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+-    #if __GLIBC_PREREQ(2,33)
+-      #define HAS_MALLINFO2
+-    #endif
+-  #endif
+-
+-  #ifdef HAS_MALLINFO2
+-    const struct mallinfo2 aMI = mallinfo2();
+-  #else
+-    const struct mallinfo aMI = mallinfo();
+-  #endif
+-    myCounters[MemHeapUsage] = aMI.uordblks;
++    struct rusage ru = { .ru_maxrss = 0 };
++    getrusage(RUSAGE_SELF, &ru);
++    myCounters[MemHeapUsage] = ru.ru_maxrss;
+   }
  
- #elif (defined(__APPLE__))
-   struct task_basic_info aTaskInfo;
+   if (!IsActive (MemVirtual)
diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template
index 6624fea8b53f..569e0f738bcb 100644
--- a/srcpkgs/occt/template
+++ b/srcpkgs/occt/template
@@ -1,26 +1,26 @@
 # Template file for 'occt'
 pkgname=occt
-reverts=7.5.0_1
-version=7.4.0p1
-revision=5
-_gittag="V${version//./_}"
-wrksrc=occt-${_gittag}
+version=7.6.1
+revision=1
+_ver="${version//./_}"
+wrksrc=OCCT-${_ver}
 build_style=cmake
-# XXX: re-enable -DUSE_TBB=ON if possible when updating
-configure_args="-DUSE_FREEIMAGE=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
+configure_args="-DUSE_FREEIMAGE=ON -DUSE_TBB=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
  -DINSTALL_SAMPLES=ON"
-makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tcl-devel
- tk-devel"
+makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tbb-devel
+ tcl-devel tk-devel"
 short_desc="OpenCASCADE Technology - library for CAD/CAM/CAE applications"
 maintainer="Piraty <piraty1@inbox.ru>"
 license="custom:LGPL-2.1-only-with-exceptions"
 homepage="https://www.opencascade.com"
-# distfile: use git instead of official tarball, which requires registration
-# see https://www.opencascade.com/content/packaging-again-debian
-distfiles="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_gittag};sf=tgz>occt-${_gittag}.tar.gz"
-checksum=e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0
+distfiles="https://github.com/Open-Cascade-SAS/OCCT/archive/V${_ver}.tar.gz"
+checksum=48969bf9130966a30b370b335133f87e8614b7cbc077b0df9d895bbefc5cfeae
 conflicts="oce>=0"
 
+case "$XBPS_TARGET_MACHINE" in
+	*-musl) makedepends+=" libexecinfo-devel";;
+esac
+
 post_install() {
 	rm ${PKGDESTDIR}/usr/share/doc/opencascade/*_LGPL_*.txt
 	vlicense OCCT_LGPL_EXCEPTION.txt
diff --git a/srcpkgs/occt/update b/srcpkgs/occt/update
deleted file mode 100644
index c128eec6d9c9..000000000000
--- a/srcpkgs/occt/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=tags"
-pattern=">V\K[\d_p]+(?=</a>)"

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

* Re: [PR PATCH] [Updated] [WIP] occt: update to 7.6.1
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
  2022-03-26 15:07 ` [PR PATCH] [Updated] " karl-nilsson
@ 2022-03-26 15:26 ` karl-nilsson
  2022-03-28 19:00 ` Piraty
                   ` (39 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: karl-nilsson @ 2022-03-26 15:26 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by karl-nilsson against master on the void-packages repository

https://github.com/karl-nilsson/void-packages occt_7.6
https://github.com/void-linux/void-packages/pull/36356

[WIP] occt: update to 7.6.1


#### Testing the changes
- I tested the changes in this PR: **briefly**


#### Local build testing
- I built this PR locally for my native architecture, x64-glibc


Like previously, broken ABI
```console
During initialization the error "/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv" occurred in /home/nilsson/.FreeCAD/Mod/A2plus/InitGui.py                                                                                                                        
Please look into the log file for further information                                                                                                
Wizard shaft module cannot be loaded                                                                                                                 
/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv                                                              
connect failed: No such file or directory      
```

Looks like we'll have to update or patch freecad
```console
In file included from /usr/include/opencascade/Extrema_POnSurf.lxx:15,
                 from /usr/include/opencascade/Extrema_POnSurf.hxx:75,
                 from /usr/include/opencascade/Extrema_ExtPElS.hxx:27,
                 from /usr/include/opencascade/Extrema_ExtPS.hxx:24,
                 from /usr/include/opencascade/ShapeAnalysis_Surface.hxx:20,
                 from ../src/3rdParty/salomesmesh/inc/SMESH_MesherHelper.hxx:37,
                 from ../src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp:34:
/usr/include/opencascade/Precision.hxx:98:7: note: previous definition of 'class Precision'
   98 | class Precision
      |       ^~~~~~~~~

```

ping @Piraty 

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-occt_7.6-36356.patch --]
[-- Type: text/x-diff, Size: 10824 bytes --]

From 330f1a6511259207ecd527e00e9c11bb68292bbf Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 20:24:49 -0400
Subject: [PATCH 1/3] python3-occ: remove package

* upstream is well behind occt
---
 srcpkgs/python3-occ/patches/python3.10.patch | 15 ---------------
 srcpkgs/python3-occ/template                 | 17 -----------------
 srcpkgs/removed-packages/template            |  3 ++-
 3 files changed, 2 insertions(+), 33 deletions(-)
 delete mode 100644 srcpkgs/python3-occ/patches/python3.10.patch
 delete mode 100644 srcpkgs/python3-occ/template

diff --git a/srcpkgs/python3-occ/patches/python3.10.patch b/srcpkgs/python3-occ/patches/python3.10.patch
deleted file mode 100644
index e192608fd3b3..000000000000
--- a/srcpkgs/python3-occ/patches/python3.10.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/src/Display/SimpleGui.py b/src/Display/SimpleGui.py
-index 42705a82..6a274c16 100644
---- a/src/Display/SimpleGui.py
-+++ b/src/Display/SimpleGui.py
-@@ -161,8 +161,8 @@ def init_display(backend_str: Optional[str]=None,
-             def centerOnScreen(self) -> None:
-                 '''Centers the window on the screen.'''
-                 resolution = QtWidgets.QApplication.desktop().screenGeometry()
--                x = (resolution.width() - self.frameSize().width()) / 2
--                y = (resolution.height() - self.frameSize().height()) / 2
-+                x = (resolution.width() - self.frameSize().width()) // 2
-+                y = (resolution.height() - self.frameSize().height()) // 2
-                 self.move(x, y)
- 
-             def add_menu(self, menu_name: str) -> None:
diff --git a/srcpkgs/python3-occ/template b/srcpkgs/python3-occ/template
deleted file mode 100644
index bee03373a3d1..000000000000
--- a/srcpkgs/python3-occ/template
+++ /dev/null
@@ -1,17 +0,0 @@
-# Template file for 'python3-occ'
-pkgname=python3-occ
-version=7.4.1
-revision=3
-archs="i686* x86_64* armv7l* aarch64* ppc*"
-wrksrc="pythonocc-core-${version}"
-build_style=cmake
-configure_args="-DPYTHONOCC_BUILD_TYPE=None -DCMAKE_BUILD_TYPE=None"
-hostmakedepends="python3 swig"
-makedepends="python3-devel occt-devel freetype-devel swig"
-depends="python3 occt freetype"
-short_desc="Industrial strength 3D CAD Python3 package"
-maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
-license="LGPL-3.0-or-later"
-homepage="http://pythonocc.org"
-distfiles="https://github.com/tpaviot/pythonocc-core/archive/${version}.tar.gz"
-checksum=6d62002244a0e7f4e5c1ad590d332a60601c44b2501ad017361443b54371e667
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index df264c9d7501..dc8107f36e09 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,7 +1,7 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
 version=0.1
-revision=67
+revision=68
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
 maintainer="Piotr Wójcik <chocimier@tlen.pl>"
@@ -327,6 +327,7 @@ replaces="
  python3-keepalive<=0.5_6
  python3-pgpdump<=1.5_10
  python3-lockfile<=0.12.2_7
+ python3-occ<=7.4.1_3
  python3-pyPEG2<=2.15.2_7
  python3-pyenet<=5.15.0_2
  python3-pyside-phonon<=5.15.0_2

From 31b54813e051111f3c2d4f02d39dfdfa4ad50374 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 19:29:00 -0400
Subject: [PATCH 2/3] occt: update to 7.6.1.

---
 .../occt/patches/cmake-build-type-none.patch  |  6 +--
 srcpkgs/occt/patches/musl-fenv.patch          | 18 ++++----
 srcpkgs/occt/patches/musl-mallinfo.patch      | 45 ++++++++++++++-----
 srcpkgs/occt/template                         | 27 +++++------
 srcpkgs/occt/update                           |  2 -
 5 files changed, 60 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/occt/update

diff --git a/srcpkgs/occt/patches/cmake-build-type-none.patch b/srcpkgs/occt/patches/cmake-build-type-none.patch
index ecb0e3da3929..d2caec8c4e87 100644
--- a/srcpkgs/occt/patches/cmake-build-type-none.patch
+++ b/srcpkgs/occt/patches/cmake-build-type-none.patch
@@ -1,8 +1,8 @@
-Index: CMakeLists.txt
-===================================================================
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f4ec871f5..9b0644e94 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_D
+@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
  
  set (CMAKE_SUPPRESS_REGENERATION TRUE)
  
diff --git a/srcpkgs/occt/patches/musl-fenv.patch b/srcpkgs/occt/patches/musl-fenv.patch
index 09da8d0afeae..06a8e3a89cfd 100644
--- a/srcpkgs/occt/patches/musl-fenv.patch
+++ b/srcpkgs/occt/patches/musl-fenv.patch
@@ -5,18 +5,20 @@ is probably wrong, but I don't have a replacement for the
 non-posix functions fegetexcept(3) and feenableexcept(3).
 """
 
+diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx
+index 007f5ccaa..fe39e07ac 100644
 --- a/src/OSD/OSD_signal.cxx
 +++ b/src/OSD/OSD_signal.cxx
-@@ -703,7 +703,7 @@
- 
+@@ -761,7 +761,7 @@ typedef void (* SIG_PFV) (int);
+
  #include <signal.h>
- 
--#if !defined(__ANDROID__) && !defined(__QNX__)
-+#if !defined(__ANDROID__) && !defined(__QNX__) && defined(__GLIBC__)
+
+-#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
++#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && defined(__GLIBC__)
    #include <sys/signal.h>
  #endif
- 
-@@ -914,7 +914,7 @@
+
+@@ -977,7 +977,7 @@ static void SegvHandler(const int theSignal,
  //=======================================================================
  void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  {
@@ -25,7 +27,7 @@ non-posix functions fegetexcept(3) and feenableexcept(3).
    feclearexcept (FE_ALL_EXCEPT);
    if (theFloatingSignal)
    {
-@@ -947,7 +947,7 @@
+@@ -1010,7 +1010,7 @@ void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  //=======================================================================
  Standard_Boolean OSD::ToCatchFloatingSignals()
  {
diff --git a/srcpkgs/occt/patches/musl-mallinfo.patch b/srcpkgs/occt/patches/musl-mallinfo.patch
index 4e5825bf1cb0..6ae94992eaf8 100644
--- a/srcpkgs/occt/patches/musl-mallinfo.patch
+++ b/srcpkgs/occt/patches/musl-mallinfo.patch
@@ -1,17 +1,38 @@
-In musl libc there is no struct mallinfo and no function mallinf()
+Adapted from alpine's patch
 
+diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx
+index d9bb91398..d608e04fc 100644
 --- a/src/OSD/OSD_MemInfo.cxx
 +++ b/src/OSD/OSD_MemInfo.cxx
-@@ -147,8 +147,12 @@
-   }
-   aFile.close();
+@@ -35,6 +35,9 @@
+ #include <sstream>
+ #include <fstream>
+ 
++#include <sys/time.h>
++#include <sys/resource.h>
++
+ #include <OSD_MemInfo.hxx>
  
-+  #if defined(__GLIBC__)
-   struct mallinfo aMI = mallinfo();
-   myCounters[MemHeapUsage] = aMI.uordblks;
-+  #else /* XXX not yet coded */
-+  myCounters[MemHeapUsage] = 0;
-+  #endif
+ #if defined(__EMSCRIPTEN__)
+@@ -182,18 +185,9 @@ void OSD_MemInfo::Update()
+ #elif (defined(__linux__) || defined(__linux))
+   if (IsActive (MemHeapUsage))
+   {
+-  #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+-    #if __GLIBC_PREREQ(2,33)
+-      #define HAS_MALLINFO2
+-    #endif
+-  #endif
+-
+-  #ifdef HAS_MALLINFO2
+-    const struct mallinfo2 aMI = mallinfo2();
+-  #else
+-    const struct mallinfo aMI = mallinfo();
+-  #endif
+-    myCounters[MemHeapUsage] = aMI.uordblks;
++    struct rusage ru = { .ru_maxrss = 0 };
++    getrusage(RUSAGE_SELF, &ru);
++    myCounters[MemHeapUsage] = ru.ru_maxrss;
+   }
  
- #elif (defined(__APPLE__))
-   struct task_basic_info aTaskInfo;
+   if (!IsActive (MemVirtual)
diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template
index 6624fea8b53f..ca3e101a30ad 100644
--- a/srcpkgs/occt/template
+++ b/srcpkgs/occt/template
@@ -1,26 +1,27 @@
 # Template file for 'occt'
 pkgname=occt
-reverts=7.5.0_1
-version=7.4.0p1
-revision=5
-_gittag="V${version//./_}"
-wrksrc=occt-${_gittag}
+version=7.6.1
+revision=1
+_ver="${version//./_}"
+wrksrc=OCCT-${_ver}
 build_style=cmake
-# XXX: re-enable -DUSE_TBB=ON if possible when updating
-configure_args="-DUSE_FREEIMAGE=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
+configure_args="-DUSE_FREEIMAGE=ON -DUSE_TBB=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
  -DINSTALL_SAMPLES=ON"
-makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tcl-devel
- tk-devel"
+makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tbb-devel
+ tcl-devel tk-devel"
 short_desc="OpenCASCADE Technology - library for CAD/CAM/CAE applications"
 maintainer="Piraty <piraty1@inbox.ru>"
 license="custom:LGPL-2.1-only-with-exceptions"
 homepage="https://www.opencascade.com"
-# distfile: use git instead of official tarball, which requires registration
-# see https://www.opencascade.com/content/packaging-again-debian
-distfiles="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_gittag};sf=tgz>occt-${_gittag}.tar.gz"
-checksum=e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0
+distfiles="https://github.com/Open-Cascade-SAS/OCCT/archive/V${_ver}.tar.gz"
+checksum=48969bf9130966a30b370b335133f87e8614b7cbc077b0df9d895bbefc5cfeae
 conflicts="oce>=0"
 
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" libexecinfo-devel"
+	LDFLAGS="-lexecinfo"
+fi
+
 post_install() {
 	rm ${PKGDESTDIR}/usr/share/doc/opencascade/*_LGPL_*.txt
 	vlicense OCCT_LGPL_EXCEPTION.txt
diff --git a/srcpkgs/occt/update b/srcpkgs/occt/update
deleted file mode 100644
index c128eec6d9c9..000000000000
--- a/srcpkgs/occt/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=tags"
-pattern=">V\K[\d_p]+(?=</a>)"

From c59702a54218f6f7e7af75a718b0a3ce736f5a60 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 26 Mar 2022 11:25:11 -0400
Subject: [PATCH 3/3] freecad: update to 0.19.4.

---
 srcpkgs/freecad/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template
index a2f04bd91f1b..1e2aec024fd7 100644
--- a/srcpkgs/freecad/template
+++ b/srcpkgs/freecad/template
@@ -1,7 +1,7 @@
 # Template file for 'freecad'
 pkgname=freecad
-version=0.19.2
-revision=4
+version=0.19.4
+revision=1
 wrksrc="FreeCAD-${version}"
 build_style=cmake
 
@@ -36,7 +36,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=47e39e3d6fcafe6e0c68923fb1b86acda16986268e5e6011694057b940139fba
+checksum=e40a1c343956e13c56cc8578d025ae83d68d9d20acda1732953bc8a3883e9722
 
 if [ "$XBPS_TARGET_LIBC" = musl ]; then
 	makedepends+=" libexecinfo-devel"

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

* Re: [WIP] occt: update to 7.6.1
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
  2022-03-26 15:07 ` [PR PATCH] [Updated] " karl-nilsson
  2022-03-26 15:26 ` karl-nilsson
@ 2022-03-28 19:00 ` Piraty
  2022-05-01 20:20 ` [PR PATCH] [Updated] " karl-nilsson
                   ` (38 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Piraty @ 2022-03-28 19:00 UTC (permalink / raw)
  To: ml

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

New comment by Piraty on void-packages repository

https://github.com/void-linux/void-packages/pull/36356#issuecomment-1081025510

Comment:
*sigh*

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

* Re: [PR PATCH] [Updated] [WIP] occt: update to 7.6.1
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (2 preceding siblings ...)
  2022-03-28 19:00 ` Piraty
@ 2022-05-01 20:20 ` karl-nilsson
  2022-05-01 20:24 ` karl-nilsson
                   ` (37 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: karl-nilsson @ 2022-05-01 20:20 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by karl-nilsson against master on the void-packages repository

https://github.com/karl-nilsson/void-packages occt_7.6
https://github.com/void-linux/void-packages/pull/36356

[WIP] occt: update to 7.6.1


#### Testing the changes
- I tested the changes in this PR: **briefly**


#### Local build testing
- I built this PR locally for my native architecture, x64-glibc


Like previously, broken ABI
```console
During initialization the error "/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv" occurred in /home/nilsson/.FreeCAD/Mod/A2plus/InitGui.py                                                                                                                        
Please look into the log file for further information                                                                                                
Wizard shaft module cannot be loaded                                                                                                                 
/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv                                                              
connect failed: No such file or directory      
```

Looks like we'll have to update or patch freecad
```console
In file included from /usr/include/opencascade/Extrema_POnSurf.lxx:15,
                 from /usr/include/opencascade/Extrema_POnSurf.hxx:75,
                 from /usr/include/opencascade/Extrema_ExtPElS.hxx:27,
                 from /usr/include/opencascade/Extrema_ExtPS.hxx:24,
                 from /usr/include/opencascade/ShapeAnalysis_Surface.hxx:20,
                 from ../src/3rdParty/salomesmesh/inc/SMESH_MesherHelper.hxx:37,
                 from ../src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp:34:
/usr/include/opencascade/Precision.hxx:98:7: note: previous definition of 'class Precision'
   98 | class Precision
      |       ^~~~~~~~~

```

ping @Piraty 

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-occt_7.6-36356.patch --]
[-- Type: text/x-diff, Size: 11851 bytes --]

From 330f1a6511259207ecd527e00e9c11bb68292bbf Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 20:24:49 -0400
Subject: [PATCH 1/4] python3-occ: remove package

* upstream is well behind occt
---
 srcpkgs/python3-occ/patches/python3.10.patch | 15 ---------------
 srcpkgs/python3-occ/template                 | 17 -----------------
 srcpkgs/removed-packages/template            |  3 ++-
 3 files changed, 2 insertions(+), 33 deletions(-)
 delete mode 100644 srcpkgs/python3-occ/patches/python3.10.patch
 delete mode 100644 srcpkgs/python3-occ/template

diff --git a/srcpkgs/python3-occ/patches/python3.10.patch b/srcpkgs/python3-occ/patches/python3.10.patch
deleted file mode 100644
index e192608fd3b3..000000000000
--- a/srcpkgs/python3-occ/patches/python3.10.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/src/Display/SimpleGui.py b/src/Display/SimpleGui.py
-index 42705a82..6a274c16 100644
---- a/src/Display/SimpleGui.py
-+++ b/src/Display/SimpleGui.py
-@@ -161,8 +161,8 @@ def init_display(backend_str: Optional[str]=None,
-             def centerOnScreen(self) -> None:
-                 '''Centers the window on the screen.'''
-                 resolution = QtWidgets.QApplication.desktop().screenGeometry()
--                x = (resolution.width() - self.frameSize().width()) / 2
--                y = (resolution.height() - self.frameSize().height()) / 2
-+                x = (resolution.width() - self.frameSize().width()) // 2
-+                y = (resolution.height() - self.frameSize().height()) // 2
-                 self.move(x, y)
- 
-             def add_menu(self, menu_name: str) -> None:
diff --git a/srcpkgs/python3-occ/template b/srcpkgs/python3-occ/template
deleted file mode 100644
index bee03373a3d1..000000000000
--- a/srcpkgs/python3-occ/template
+++ /dev/null
@@ -1,17 +0,0 @@
-# Template file for 'python3-occ'
-pkgname=python3-occ
-version=7.4.1
-revision=3
-archs="i686* x86_64* armv7l* aarch64* ppc*"
-wrksrc="pythonocc-core-${version}"
-build_style=cmake
-configure_args="-DPYTHONOCC_BUILD_TYPE=None -DCMAKE_BUILD_TYPE=None"
-hostmakedepends="python3 swig"
-makedepends="python3-devel occt-devel freetype-devel swig"
-depends="python3 occt freetype"
-short_desc="Industrial strength 3D CAD Python3 package"
-maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
-license="LGPL-3.0-or-later"
-homepage="http://pythonocc.org"
-distfiles="https://github.com/tpaviot/pythonocc-core/archive/${version}.tar.gz"
-checksum=6d62002244a0e7f4e5c1ad590d332a60601c44b2501ad017361443b54371e667
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index df264c9d7501..dc8107f36e09 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,7 +1,7 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
 version=0.1
-revision=67
+revision=68
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
 maintainer="Piotr Wójcik <chocimier@tlen.pl>"
@@ -327,6 +327,7 @@ replaces="
  python3-keepalive<=0.5_6
  python3-pgpdump<=1.5_10
  python3-lockfile<=0.12.2_7
+ python3-occ<=7.4.1_3
  python3-pyPEG2<=2.15.2_7
  python3-pyenet<=5.15.0_2
  python3-pyside-phonon<=5.15.0_2

From 31b54813e051111f3c2d4f02d39dfdfa4ad50374 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 19:29:00 -0400
Subject: [PATCH 2/4] occt: update to 7.6.1.

---
 .../occt/patches/cmake-build-type-none.patch  |  6 +--
 srcpkgs/occt/patches/musl-fenv.patch          | 18 ++++----
 srcpkgs/occt/patches/musl-mallinfo.patch      | 45 ++++++++++++++-----
 srcpkgs/occt/template                         | 27 +++++------
 srcpkgs/occt/update                           |  2 -
 5 files changed, 60 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/occt/update

diff --git a/srcpkgs/occt/patches/cmake-build-type-none.patch b/srcpkgs/occt/patches/cmake-build-type-none.patch
index ecb0e3da3929..d2caec8c4e87 100644
--- a/srcpkgs/occt/patches/cmake-build-type-none.patch
+++ b/srcpkgs/occt/patches/cmake-build-type-none.patch
@@ -1,8 +1,8 @@
-Index: CMakeLists.txt
-===================================================================
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f4ec871f5..9b0644e94 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_D
+@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
  
  set (CMAKE_SUPPRESS_REGENERATION TRUE)
  
diff --git a/srcpkgs/occt/patches/musl-fenv.patch b/srcpkgs/occt/patches/musl-fenv.patch
index 09da8d0afeae..06a8e3a89cfd 100644
--- a/srcpkgs/occt/patches/musl-fenv.patch
+++ b/srcpkgs/occt/patches/musl-fenv.patch
@@ -5,18 +5,20 @@ is probably wrong, but I don't have a replacement for the
 non-posix functions fegetexcept(3) and feenableexcept(3).
 """
 
+diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx
+index 007f5ccaa..fe39e07ac 100644
 --- a/src/OSD/OSD_signal.cxx
 +++ b/src/OSD/OSD_signal.cxx
-@@ -703,7 +703,7 @@
- 
+@@ -761,7 +761,7 @@ typedef void (* SIG_PFV) (int);
+
  #include <signal.h>
- 
--#if !defined(__ANDROID__) && !defined(__QNX__)
-+#if !defined(__ANDROID__) && !defined(__QNX__) && defined(__GLIBC__)
+
+-#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
++#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && defined(__GLIBC__)
    #include <sys/signal.h>
  #endif
- 
-@@ -914,7 +914,7 @@
+
+@@ -977,7 +977,7 @@ static void SegvHandler(const int theSignal,
  //=======================================================================
  void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  {
@@ -25,7 +27,7 @@ non-posix functions fegetexcept(3) and feenableexcept(3).
    feclearexcept (FE_ALL_EXCEPT);
    if (theFloatingSignal)
    {
-@@ -947,7 +947,7 @@
+@@ -1010,7 +1010,7 @@ void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  //=======================================================================
  Standard_Boolean OSD::ToCatchFloatingSignals()
  {
diff --git a/srcpkgs/occt/patches/musl-mallinfo.patch b/srcpkgs/occt/patches/musl-mallinfo.patch
index 4e5825bf1cb0..6ae94992eaf8 100644
--- a/srcpkgs/occt/patches/musl-mallinfo.patch
+++ b/srcpkgs/occt/patches/musl-mallinfo.patch
@@ -1,17 +1,38 @@
-In musl libc there is no struct mallinfo and no function mallinf()
+Adapted from alpine's patch
 
+diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx
+index d9bb91398..d608e04fc 100644
 --- a/src/OSD/OSD_MemInfo.cxx
 +++ b/src/OSD/OSD_MemInfo.cxx
-@@ -147,8 +147,12 @@
-   }
-   aFile.close();
+@@ -35,6 +35,9 @@
+ #include <sstream>
+ #include <fstream>
+ 
++#include <sys/time.h>
++#include <sys/resource.h>
++
+ #include <OSD_MemInfo.hxx>
  
-+  #if defined(__GLIBC__)
-   struct mallinfo aMI = mallinfo();
-   myCounters[MemHeapUsage] = aMI.uordblks;
-+  #else /* XXX not yet coded */
-+  myCounters[MemHeapUsage] = 0;
-+  #endif
+ #if defined(__EMSCRIPTEN__)
+@@ -182,18 +185,9 @@ void OSD_MemInfo::Update()
+ #elif (defined(__linux__) || defined(__linux))
+   if (IsActive (MemHeapUsage))
+   {
+-  #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+-    #if __GLIBC_PREREQ(2,33)
+-      #define HAS_MALLINFO2
+-    #endif
+-  #endif
+-
+-  #ifdef HAS_MALLINFO2
+-    const struct mallinfo2 aMI = mallinfo2();
+-  #else
+-    const struct mallinfo aMI = mallinfo();
+-  #endif
+-    myCounters[MemHeapUsage] = aMI.uordblks;
++    struct rusage ru = { .ru_maxrss = 0 };
++    getrusage(RUSAGE_SELF, &ru);
++    myCounters[MemHeapUsage] = ru.ru_maxrss;
+   }
  
- #elif (defined(__APPLE__))
-   struct task_basic_info aTaskInfo;
+   if (!IsActive (MemVirtual)
diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template
index 6624fea8b53f..ca3e101a30ad 100644
--- a/srcpkgs/occt/template
+++ b/srcpkgs/occt/template
@@ -1,26 +1,27 @@
 # Template file for 'occt'
 pkgname=occt
-reverts=7.5.0_1
-version=7.4.0p1
-revision=5
-_gittag="V${version//./_}"
-wrksrc=occt-${_gittag}
+version=7.6.1
+revision=1
+_ver="${version//./_}"
+wrksrc=OCCT-${_ver}
 build_style=cmake
-# XXX: re-enable -DUSE_TBB=ON if possible when updating
-configure_args="-DUSE_FREEIMAGE=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
+configure_args="-DUSE_FREEIMAGE=ON -DUSE_TBB=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
  -DINSTALL_SAMPLES=ON"
-makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tcl-devel
- tk-devel"
+makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tbb-devel
+ tcl-devel tk-devel"
 short_desc="OpenCASCADE Technology - library for CAD/CAM/CAE applications"
 maintainer="Piraty <piraty1@inbox.ru>"
 license="custom:LGPL-2.1-only-with-exceptions"
 homepage="https://www.opencascade.com"
-# distfile: use git instead of official tarball, which requires registration
-# see https://www.opencascade.com/content/packaging-again-debian
-distfiles="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_gittag};sf=tgz>occt-${_gittag}.tar.gz"
-checksum=e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0
+distfiles="https://github.com/Open-Cascade-SAS/OCCT/archive/V${_ver}.tar.gz"
+checksum=48969bf9130966a30b370b335133f87e8614b7cbc077b0df9d895bbefc5cfeae
 conflicts="oce>=0"
 
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" libexecinfo-devel"
+	LDFLAGS="-lexecinfo"
+fi
+
 post_install() {
 	rm ${PKGDESTDIR}/usr/share/doc/opencascade/*_LGPL_*.txt
 	vlicense OCCT_LGPL_EXCEPTION.txt
diff --git a/srcpkgs/occt/update b/srcpkgs/occt/update
deleted file mode 100644
index c128eec6d9c9..000000000000
--- a/srcpkgs/occt/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=tags"
-pattern=">V\K[\d_p]+(?=</a>)"

From c59702a54218f6f7e7af75a718b0a3ce736f5a60 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 26 Mar 2022 11:25:11 -0400
Subject: [PATCH 3/4] freecad: update to 0.19.4.

---
 srcpkgs/freecad/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template
index a2f04bd91f1b..1e2aec024fd7 100644
--- a/srcpkgs/freecad/template
+++ b/srcpkgs/freecad/template
@@ -1,7 +1,7 @@
 # Template file for 'freecad'
 pkgname=freecad
-version=0.19.2
-revision=4
+version=0.19.4
+revision=1
 wrksrc="FreeCAD-${version}"
 build_style=cmake
 
@@ -36,7 +36,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=47e39e3d6fcafe6e0c68923fb1b86acda16986268e5e6011694057b940139fba
+checksum=e40a1c343956e13c56cc8578d025ae83d68d9d20acda1732953bc8a3883e9722
 
 if [ "$XBPS_TARGET_LIBC" = musl ]; then
 	makedepends+=" libexecinfo-devel"

From c6ed48955d166ac2eca7122621fcda7dbec73324 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sun, 1 May 2022 16:20:12 -0400
Subject: [PATCH 4/4] occt: update to 7.6.2.

---
 srcpkgs/occt/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template
index ca3e101a30ad..b17c91b0058b 100644
--- a/srcpkgs/occt/template
+++ b/srcpkgs/occt/template
@@ -1,6 +1,6 @@
 # Template file for 'occt'
 pkgname=occt
-version=7.6.1
+version=7.6.2
 revision=1
 _ver="${version//./_}"
 wrksrc=OCCT-${_ver}
@@ -14,7 +14,7 @@ maintainer="Piraty <piraty1@inbox.ru>"
 license="custom:LGPL-2.1-only-with-exceptions"
 homepage="https://www.opencascade.com"
 distfiles="https://github.com/Open-Cascade-SAS/OCCT/archive/V${_ver}.tar.gz"
-checksum=48969bf9130966a30b370b335133f87e8614b7cbc077b0df9d895bbefc5cfeae
+checksum=dea04077d71507c666aaa7ccaeacc73ab580d6572d7f75e90a1984c4c0302a7a
 conflicts="oce>=0"
 
 if [ "$XBPS_TARGET_LIBC" = musl ]; then

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

* Re: [PR PATCH] [Updated] [WIP] occt: update to 7.6.1
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (3 preceding siblings ...)
  2022-05-01 20:20 ` [PR PATCH] [Updated] " karl-nilsson
@ 2022-05-01 20:24 ` karl-nilsson
  2022-05-01 20:24 ` karl-nilsson
                   ` (36 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: karl-nilsson @ 2022-05-01 20:24 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by karl-nilsson against master on the void-packages repository

https://github.com/karl-nilsson/void-packages occt_7.6
https://github.com/void-linux/void-packages/pull/36356

[WIP] occt: update to 7.6.1


#### Testing the changes
- I tested the changes in this PR: **briefly**


#### Local build testing
- I built this PR locally for my native architecture, x64-glibc


Like previously, broken ABI
```console
During initialization the error "/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv" occurred in /home/nilsson/.FreeCAD/Mod/A2plus/InitGui.py                                                                                                                        
Please look into the log file for further information                                                                                                
Wizard shaft module cannot be loaded                                                                                                                 
/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv                                                              
connect failed: No such file or directory      
```

Looks like we'll have to update or patch freecad
```console
In file included from /usr/include/opencascade/Extrema_POnSurf.lxx:15,
                 from /usr/include/opencascade/Extrema_POnSurf.hxx:75,
                 from /usr/include/opencascade/Extrema_ExtPElS.hxx:27,
                 from /usr/include/opencascade/Extrema_ExtPS.hxx:24,
                 from /usr/include/opencascade/ShapeAnalysis_Surface.hxx:20,
                 from ../src/3rdParty/salomesmesh/inc/SMESH_MesherHelper.hxx:37,
                 from ../src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp:34:
/usr/include/opencascade/Precision.hxx:98:7: note: previous definition of 'class Precision'
   98 | class Precision
      |       ^~~~~~~~~

```

ping @Piraty 

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-occt_7.6-36356.patch --]
[-- Type: text/x-diff, Size: 11851 bytes --]

From af2f676f81add4ade99da51300221e2d6aa3a2c1 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 20:24:49 -0400
Subject: [PATCH 1/4] python3-occ: remove package

* upstream is well behind occt
---
 srcpkgs/python3-occ/patches/python3.10.patch | 15 ---------------
 srcpkgs/python3-occ/template                 | 17 -----------------
 srcpkgs/removed-packages/template            |  3 ++-
 3 files changed, 2 insertions(+), 33 deletions(-)
 delete mode 100644 srcpkgs/python3-occ/patches/python3.10.patch
 delete mode 100644 srcpkgs/python3-occ/template

diff --git a/srcpkgs/python3-occ/patches/python3.10.patch b/srcpkgs/python3-occ/patches/python3.10.patch
deleted file mode 100644
index e192608fd3b3..000000000000
--- a/srcpkgs/python3-occ/patches/python3.10.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/src/Display/SimpleGui.py b/src/Display/SimpleGui.py
-index 42705a82..6a274c16 100644
---- a/src/Display/SimpleGui.py
-+++ b/src/Display/SimpleGui.py
-@@ -161,8 +161,8 @@ def init_display(backend_str: Optional[str]=None,
-             def centerOnScreen(self) -> None:
-                 '''Centers the window on the screen.'''
-                 resolution = QtWidgets.QApplication.desktop().screenGeometry()
--                x = (resolution.width() - self.frameSize().width()) / 2
--                y = (resolution.height() - self.frameSize().height()) / 2
-+                x = (resolution.width() - self.frameSize().width()) // 2
-+                y = (resolution.height() - self.frameSize().height()) // 2
-                 self.move(x, y)
- 
-             def add_menu(self, menu_name: str) -> None:
diff --git a/srcpkgs/python3-occ/template b/srcpkgs/python3-occ/template
deleted file mode 100644
index bee03373a3d1..000000000000
--- a/srcpkgs/python3-occ/template
+++ /dev/null
@@ -1,17 +0,0 @@
-# Template file for 'python3-occ'
-pkgname=python3-occ
-version=7.4.1
-revision=3
-archs="i686* x86_64* armv7l* aarch64* ppc*"
-wrksrc="pythonocc-core-${version}"
-build_style=cmake
-configure_args="-DPYTHONOCC_BUILD_TYPE=None -DCMAKE_BUILD_TYPE=None"
-hostmakedepends="python3 swig"
-makedepends="python3-devel occt-devel freetype-devel swig"
-depends="python3 occt freetype"
-short_desc="Industrial strength 3D CAD Python3 package"
-maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
-license="LGPL-3.0-or-later"
-homepage="http://pythonocc.org"
-distfiles="https://github.com/tpaviot/pythonocc-core/archive/${version}.tar.gz"
-checksum=6d62002244a0e7f4e5c1ad590d332a60601c44b2501ad017361443b54371e667
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 0923c53cfc05..de77c08a449f 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,7 +1,7 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
 version=0.1
-revision=69
+revision=70
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
 maintainer="Piotr Wójcik <chocimier@tlen.pl>"
@@ -338,6 +338,7 @@ replaces="
  python3-keepalive<=0.5_6
  python3-pgpdump<=1.5_10
  python3-lockfile<=0.12.2_7
+ python3-occ<=7.4.1_3
  python3-pyPEG2<=2.15.2_7
  python3-pyenet<=5.15.0_2
  python3-pyside-phonon<=5.15.0_2

From d2c2dea88555481e5e127883496c3758aee8957d Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 19:29:00 -0400
Subject: [PATCH 2/4] occt: update to 7.6.1.

---
 .../occt/patches/cmake-build-type-none.patch  |  6 +--
 srcpkgs/occt/patches/musl-fenv.patch          | 18 ++++----
 srcpkgs/occt/patches/musl-mallinfo.patch      | 45 ++++++++++++++-----
 srcpkgs/occt/template                         | 27 +++++------
 srcpkgs/occt/update                           |  2 -
 5 files changed, 60 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/occt/update

diff --git a/srcpkgs/occt/patches/cmake-build-type-none.patch b/srcpkgs/occt/patches/cmake-build-type-none.patch
index ecb0e3da3929..d2caec8c4e87 100644
--- a/srcpkgs/occt/patches/cmake-build-type-none.patch
+++ b/srcpkgs/occt/patches/cmake-build-type-none.patch
@@ -1,8 +1,8 @@
-Index: CMakeLists.txt
-===================================================================
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f4ec871f5..9b0644e94 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_D
+@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
  
  set (CMAKE_SUPPRESS_REGENERATION TRUE)
  
diff --git a/srcpkgs/occt/patches/musl-fenv.patch b/srcpkgs/occt/patches/musl-fenv.patch
index 09da8d0afeae..06a8e3a89cfd 100644
--- a/srcpkgs/occt/patches/musl-fenv.patch
+++ b/srcpkgs/occt/patches/musl-fenv.patch
@@ -5,18 +5,20 @@ is probably wrong, but I don't have a replacement for the
 non-posix functions fegetexcept(3) and feenableexcept(3).
 """
 
+diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx
+index 007f5ccaa..fe39e07ac 100644
 --- a/src/OSD/OSD_signal.cxx
 +++ b/src/OSD/OSD_signal.cxx
-@@ -703,7 +703,7 @@
- 
+@@ -761,7 +761,7 @@ typedef void (* SIG_PFV) (int);
+
  #include <signal.h>
- 
--#if !defined(__ANDROID__) && !defined(__QNX__)
-+#if !defined(__ANDROID__) && !defined(__QNX__) && defined(__GLIBC__)
+
+-#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
++#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && defined(__GLIBC__)
    #include <sys/signal.h>
  #endif
- 
-@@ -914,7 +914,7 @@
+
+@@ -977,7 +977,7 @@ static void SegvHandler(const int theSignal,
  //=======================================================================
  void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  {
@@ -25,7 +27,7 @@ non-posix functions fegetexcept(3) and feenableexcept(3).
    feclearexcept (FE_ALL_EXCEPT);
    if (theFloatingSignal)
    {
-@@ -947,7 +947,7 @@
+@@ -1010,7 +1010,7 @@ void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  //=======================================================================
  Standard_Boolean OSD::ToCatchFloatingSignals()
  {
diff --git a/srcpkgs/occt/patches/musl-mallinfo.patch b/srcpkgs/occt/patches/musl-mallinfo.patch
index 4e5825bf1cb0..6ae94992eaf8 100644
--- a/srcpkgs/occt/patches/musl-mallinfo.patch
+++ b/srcpkgs/occt/patches/musl-mallinfo.patch
@@ -1,17 +1,38 @@
-In musl libc there is no struct mallinfo and no function mallinf()
+Adapted from alpine's patch
 
+diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx
+index d9bb91398..d608e04fc 100644
 --- a/src/OSD/OSD_MemInfo.cxx
 +++ b/src/OSD/OSD_MemInfo.cxx
-@@ -147,8 +147,12 @@
-   }
-   aFile.close();
+@@ -35,6 +35,9 @@
+ #include <sstream>
+ #include <fstream>
+ 
++#include <sys/time.h>
++#include <sys/resource.h>
++
+ #include <OSD_MemInfo.hxx>
  
-+  #if defined(__GLIBC__)
-   struct mallinfo aMI = mallinfo();
-   myCounters[MemHeapUsage] = aMI.uordblks;
-+  #else /* XXX not yet coded */
-+  myCounters[MemHeapUsage] = 0;
-+  #endif
+ #if defined(__EMSCRIPTEN__)
+@@ -182,18 +185,9 @@ void OSD_MemInfo::Update()
+ #elif (defined(__linux__) || defined(__linux))
+   if (IsActive (MemHeapUsage))
+   {
+-  #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+-    #if __GLIBC_PREREQ(2,33)
+-      #define HAS_MALLINFO2
+-    #endif
+-  #endif
+-
+-  #ifdef HAS_MALLINFO2
+-    const struct mallinfo2 aMI = mallinfo2();
+-  #else
+-    const struct mallinfo aMI = mallinfo();
+-  #endif
+-    myCounters[MemHeapUsage] = aMI.uordblks;
++    struct rusage ru = { .ru_maxrss = 0 };
++    getrusage(RUSAGE_SELF, &ru);
++    myCounters[MemHeapUsage] = ru.ru_maxrss;
+   }
  
- #elif (defined(__APPLE__))
-   struct task_basic_info aTaskInfo;
+   if (!IsActive (MemVirtual)
diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template
index 6624fea8b53f..ca3e101a30ad 100644
--- a/srcpkgs/occt/template
+++ b/srcpkgs/occt/template
@@ -1,26 +1,27 @@
 # Template file for 'occt'
 pkgname=occt
-reverts=7.5.0_1
-version=7.4.0p1
-revision=5
-_gittag="V${version//./_}"
-wrksrc=occt-${_gittag}
+version=7.6.1
+revision=1
+_ver="${version//./_}"
+wrksrc=OCCT-${_ver}
 build_style=cmake
-# XXX: re-enable -DUSE_TBB=ON if possible when updating
-configure_args="-DUSE_FREEIMAGE=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
+configure_args="-DUSE_FREEIMAGE=ON -DUSE_TBB=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
  -DINSTALL_SAMPLES=ON"
-makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tcl-devel
- tk-devel"
+makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tbb-devel
+ tcl-devel tk-devel"
 short_desc="OpenCASCADE Technology - library for CAD/CAM/CAE applications"
 maintainer="Piraty <piraty1@inbox.ru>"
 license="custom:LGPL-2.1-only-with-exceptions"
 homepage="https://www.opencascade.com"
-# distfile: use git instead of official tarball, which requires registration
-# see https://www.opencascade.com/content/packaging-again-debian
-distfiles="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_gittag};sf=tgz>occt-${_gittag}.tar.gz"
-checksum=e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0
+distfiles="https://github.com/Open-Cascade-SAS/OCCT/archive/V${_ver}.tar.gz"
+checksum=48969bf9130966a30b370b335133f87e8614b7cbc077b0df9d895bbefc5cfeae
 conflicts="oce>=0"
 
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" libexecinfo-devel"
+	LDFLAGS="-lexecinfo"
+fi
+
 post_install() {
 	rm ${PKGDESTDIR}/usr/share/doc/opencascade/*_LGPL_*.txt
 	vlicense OCCT_LGPL_EXCEPTION.txt
diff --git a/srcpkgs/occt/update b/srcpkgs/occt/update
deleted file mode 100644
index c128eec6d9c9..000000000000
--- a/srcpkgs/occt/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=tags"
-pattern=">V\K[\d_p]+(?=</a>)"

From 715906c6a63a78513fca2d8234910e0d0b045a56 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 26 Mar 2022 11:25:11 -0400
Subject: [PATCH 3/4] freecad: update to 0.19.4.

---
 srcpkgs/freecad/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template
index a2f04bd91f1b..1e2aec024fd7 100644
--- a/srcpkgs/freecad/template
+++ b/srcpkgs/freecad/template
@@ -1,7 +1,7 @@
 # Template file for 'freecad'
 pkgname=freecad
-version=0.19.2
-revision=4
+version=0.19.4
+revision=1
 wrksrc="FreeCAD-${version}"
 build_style=cmake
 
@@ -36,7 +36,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=47e39e3d6fcafe6e0c68923fb1b86acda16986268e5e6011694057b940139fba
+checksum=e40a1c343956e13c56cc8578d025ae83d68d9d20acda1732953bc8a3883e9722
 
 if [ "$XBPS_TARGET_LIBC" = musl ]; then
 	makedepends+=" libexecinfo-devel"

From f69f69acf34b009a3921efd92067dbcf30266441 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sun, 1 May 2022 16:20:12 -0400
Subject: [PATCH 4/4] occt: update to 7.6.2.

---
 srcpkgs/occt/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template
index ca3e101a30ad..b17c91b0058b 100644
--- a/srcpkgs/occt/template
+++ b/srcpkgs/occt/template
@@ -1,6 +1,6 @@
 # Template file for 'occt'
 pkgname=occt
-version=7.6.1
+version=7.6.2
 revision=1
 _ver="${version//./_}"
 wrksrc=OCCT-${_ver}
@@ -14,7 +14,7 @@ maintainer="Piraty <piraty1@inbox.ru>"
 license="custom:LGPL-2.1-only-with-exceptions"
 homepage="https://www.opencascade.com"
 distfiles="https://github.com/Open-Cascade-SAS/OCCT/archive/V${_ver}.tar.gz"
-checksum=48969bf9130966a30b370b335133f87e8614b7cbc077b0df9d895bbefc5cfeae
+checksum=dea04077d71507c666aaa7ccaeacc73ab580d6572d7f75e90a1984c4c0302a7a
 conflicts="oce>=0"
 
 if [ "$XBPS_TARGET_LIBC" = musl ]; then

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

* Re: [PR PATCH] [Updated] [WIP] occt: update to 7.6.1
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (4 preceding siblings ...)
  2022-05-01 20:24 ` karl-nilsson
@ 2022-05-01 20:24 ` karl-nilsson
  2022-05-02 14:17 ` karl-nilsson
                   ` (35 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: karl-nilsson @ 2022-05-01 20:24 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by karl-nilsson against master on the void-packages repository

https://github.com/karl-nilsson/void-packages occt_7.6
https://github.com/void-linux/void-packages/pull/36356

[WIP] occt: update to 7.6.1


#### Testing the changes
- I tested the changes in this PR: **briefly**


#### Local build testing
- I built this PR locally for my native architecture, x64-glibc


Like previously, broken ABI
```console
During initialization the error "/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv" occurred in /home/nilsson/.FreeCAD/Mod/A2plus/InitGui.py                                                                                                                        
Please look into the log file for further information                                                                                                
Wizard shaft module cannot be loaded                                                                                                                 
/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv                                                              
connect failed: No such file or directory      
```

Looks like we'll have to update or patch freecad
```console
In file included from /usr/include/opencascade/Extrema_POnSurf.lxx:15,
                 from /usr/include/opencascade/Extrema_POnSurf.hxx:75,
                 from /usr/include/opencascade/Extrema_ExtPElS.hxx:27,
                 from /usr/include/opencascade/Extrema_ExtPS.hxx:24,
                 from /usr/include/opencascade/ShapeAnalysis_Surface.hxx:20,
                 from ../src/3rdParty/salomesmesh/inc/SMESH_MesherHelper.hxx:37,
                 from ../src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp:34:
/usr/include/opencascade/Precision.hxx:98:7: note: previous definition of 'class Precision'
   98 | class Precision
      |       ^~~~~~~~~

```

ping @Piraty 

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-occt_7.6-36356.patch --]
[-- Type: text/x-diff, Size: 10824 bytes --]

From af2f676f81add4ade99da51300221e2d6aa3a2c1 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 20:24:49 -0400
Subject: [PATCH 1/3] python3-occ: remove package

* upstream is well behind occt
---
 srcpkgs/python3-occ/patches/python3.10.patch | 15 ---------------
 srcpkgs/python3-occ/template                 | 17 -----------------
 srcpkgs/removed-packages/template            |  3 ++-
 3 files changed, 2 insertions(+), 33 deletions(-)
 delete mode 100644 srcpkgs/python3-occ/patches/python3.10.patch
 delete mode 100644 srcpkgs/python3-occ/template

diff --git a/srcpkgs/python3-occ/patches/python3.10.patch b/srcpkgs/python3-occ/patches/python3.10.patch
deleted file mode 100644
index e192608fd3b3..000000000000
--- a/srcpkgs/python3-occ/patches/python3.10.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/src/Display/SimpleGui.py b/src/Display/SimpleGui.py
-index 42705a82..6a274c16 100644
---- a/src/Display/SimpleGui.py
-+++ b/src/Display/SimpleGui.py
-@@ -161,8 +161,8 @@ def init_display(backend_str: Optional[str]=None,
-             def centerOnScreen(self) -> None:
-                 '''Centers the window on the screen.'''
-                 resolution = QtWidgets.QApplication.desktop().screenGeometry()
--                x = (resolution.width() - self.frameSize().width()) / 2
--                y = (resolution.height() - self.frameSize().height()) / 2
-+                x = (resolution.width() - self.frameSize().width()) // 2
-+                y = (resolution.height() - self.frameSize().height()) // 2
-                 self.move(x, y)
- 
-             def add_menu(self, menu_name: str) -> None:
diff --git a/srcpkgs/python3-occ/template b/srcpkgs/python3-occ/template
deleted file mode 100644
index bee03373a3d1..000000000000
--- a/srcpkgs/python3-occ/template
+++ /dev/null
@@ -1,17 +0,0 @@
-# Template file for 'python3-occ'
-pkgname=python3-occ
-version=7.4.1
-revision=3
-archs="i686* x86_64* armv7l* aarch64* ppc*"
-wrksrc="pythonocc-core-${version}"
-build_style=cmake
-configure_args="-DPYTHONOCC_BUILD_TYPE=None -DCMAKE_BUILD_TYPE=None"
-hostmakedepends="python3 swig"
-makedepends="python3-devel occt-devel freetype-devel swig"
-depends="python3 occt freetype"
-short_desc="Industrial strength 3D CAD Python3 package"
-maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
-license="LGPL-3.0-or-later"
-homepage="http://pythonocc.org"
-distfiles="https://github.com/tpaviot/pythonocc-core/archive/${version}.tar.gz"
-checksum=6d62002244a0e7f4e5c1ad590d332a60601c44b2501ad017361443b54371e667
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 0923c53cfc05..de77c08a449f 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,7 +1,7 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
 version=0.1
-revision=69
+revision=70
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
 maintainer="Piotr Wójcik <chocimier@tlen.pl>"
@@ -338,6 +338,7 @@ replaces="
  python3-keepalive<=0.5_6
  python3-pgpdump<=1.5_10
  python3-lockfile<=0.12.2_7
+ python3-occ<=7.4.1_3
  python3-pyPEG2<=2.15.2_7
  python3-pyenet<=5.15.0_2
  python3-pyside-phonon<=5.15.0_2

From b7322fd6a13eec676c04cecad9db0548957b89e5 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 19:29:00 -0400
Subject: [PATCH 2/3] occt: update to 7.6.2.

---
 .../occt/patches/cmake-build-type-none.patch  |  6 +--
 srcpkgs/occt/patches/musl-fenv.patch          | 18 ++++----
 srcpkgs/occt/patches/musl-mallinfo.patch      | 45 ++++++++++++++-----
 srcpkgs/occt/template                         | 27 +++++------
 srcpkgs/occt/update                           |  2 -
 5 files changed, 60 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/occt/update

diff --git a/srcpkgs/occt/patches/cmake-build-type-none.patch b/srcpkgs/occt/patches/cmake-build-type-none.patch
index ecb0e3da3929..d2caec8c4e87 100644
--- a/srcpkgs/occt/patches/cmake-build-type-none.patch
+++ b/srcpkgs/occt/patches/cmake-build-type-none.patch
@@ -1,8 +1,8 @@
-Index: CMakeLists.txt
-===================================================================
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f4ec871f5..9b0644e94 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_D
+@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
  
  set (CMAKE_SUPPRESS_REGENERATION TRUE)
  
diff --git a/srcpkgs/occt/patches/musl-fenv.patch b/srcpkgs/occt/patches/musl-fenv.patch
index 09da8d0afeae..06a8e3a89cfd 100644
--- a/srcpkgs/occt/patches/musl-fenv.patch
+++ b/srcpkgs/occt/patches/musl-fenv.patch
@@ -5,18 +5,20 @@ is probably wrong, but I don't have a replacement for the
 non-posix functions fegetexcept(3) and feenableexcept(3).
 """
 
+diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx
+index 007f5ccaa..fe39e07ac 100644
 --- a/src/OSD/OSD_signal.cxx
 +++ b/src/OSD/OSD_signal.cxx
-@@ -703,7 +703,7 @@
- 
+@@ -761,7 +761,7 @@ typedef void (* SIG_PFV) (int);
+
  #include <signal.h>
- 
--#if !defined(__ANDROID__) && !defined(__QNX__)
-+#if !defined(__ANDROID__) && !defined(__QNX__) && defined(__GLIBC__)
+
+-#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
++#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && defined(__GLIBC__)
    #include <sys/signal.h>
  #endif
- 
-@@ -914,7 +914,7 @@
+
+@@ -977,7 +977,7 @@ static void SegvHandler(const int theSignal,
  //=======================================================================
  void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  {
@@ -25,7 +27,7 @@ non-posix functions fegetexcept(3) and feenableexcept(3).
    feclearexcept (FE_ALL_EXCEPT);
    if (theFloatingSignal)
    {
-@@ -947,7 +947,7 @@
+@@ -1010,7 +1010,7 @@ void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  //=======================================================================
  Standard_Boolean OSD::ToCatchFloatingSignals()
  {
diff --git a/srcpkgs/occt/patches/musl-mallinfo.patch b/srcpkgs/occt/patches/musl-mallinfo.patch
index 4e5825bf1cb0..6ae94992eaf8 100644
--- a/srcpkgs/occt/patches/musl-mallinfo.patch
+++ b/srcpkgs/occt/patches/musl-mallinfo.patch
@@ -1,17 +1,38 @@
-In musl libc there is no struct mallinfo and no function mallinf()
+Adapted from alpine's patch
 
+diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx
+index d9bb91398..d608e04fc 100644
 --- a/src/OSD/OSD_MemInfo.cxx
 +++ b/src/OSD/OSD_MemInfo.cxx
-@@ -147,8 +147,12 @@
-   }
-   aFile.close();
+@@ -35,6 +35,9 @@
+ #include <sstream>
+ #include <fstream>
+ 
++#include <sys/time.h>
++#include <sys/resource.h>
++
+ #include <OSD_MemInfo.hxx>
  
-+  #if defined(__GLIBC__)
-   struct mallinfo aMI = mallinfo();
-   myCounters[MemHeapUsage] = aMI.uordblks;
-+  #else /* XXX not yet coded */
-+  myCounters[MemHeapUsage] = 0;
-+  #endif
+ #if defined(__EMSCRIPTEN__)
+@@ -182,18 +185,9 @@ void OSD_MemInfo::Update()
+ #elif (defined(__linux__) || defined(__linux))
+   if (IsActive (MemHeapUsage))
+   {
+-  #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+-    #if __GLIBC_PREREQ(2,33)
+-      #define HAS_MALLINFO2
+-    #endif
+-  #endif
+-
+-  #ifdef HAS_MALLINFO2
+-    const struct mallinfo2 aMI = mallinfo2();
+-  #else
+-    const struct mallinfo aMI = mallinfo();
+-  #endif
+-    myCounters[MemHeapUsage] = aMI.uordblks;
++    struct rusage ru = { .ru_maxrss = 0 };
++    getrusage(RUSAGE_SELF, &ru);
++    myCounters[MemHeapUsage] = ru.ru_maxrss;
+   }
  
- #elif (defined(__APPLE__))
-   struct task_basic_info aTaskInfo;
+   if (!IsActive (MemVirtual)
diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template
index 6624fea8b53f..b17c91b0058b 100644
--- a/srcpkgs/occt/template
+++ b/srcpkgs/occt/template
@@ -1,26 +1,27 @@
 # Template file for 'occt'
 pkgname=occt
-reverts=7.5.0_1
-version=7.4.0p1
-revision=5
-_gittag="V${version//./_}"
-wrksrc=occt-${_gittag}
+version=7.6.2
+revision=1
+_ver="${version//./_}"
+wrksrc=OCCT-${_ver}
 build_style=cmake
-# XXX: re-enable -DUSE_TBB=ON if possible when updating
-configure_args="-DUSE_FREEIMAGE=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
+configure_args="-DUSE_FREEIMAGE=ON -DUSE_TBB=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
  -DINSTALL_SAMPLES=ON"
-makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tcl-devel
- tk-devel"
+makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tbb-devel
+ tcl-devel tk-devel"
 short_desc="OpenCASCADE Technology - library for CAD/CAM/CAE applications"
 maintainer="Piraty <piraty1@inbox.ru>"
 license="custom:LGPL-2.1-only-with-exceptions"
 homepage="https://www.opencascade.com"
-# distfile: use git instead of official tarball, which requires registration
-# see https://www.opencascade.com/content/packaging-again-debian
-distfiles="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_gittag};sf=tgz>occt-${_gittag}.tar.gz"
-checksum=e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0
+distfiles="https://github.com/Open-Cascade-SAS/OCCT/archive/V${_ver}.tar.gz"
+checksum=dea04077d71507c666aaa7ccaeacc73ab580d6572d7f75e90a1984c4c0302a7a
 conflicts="oce>=0"
 
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" libexecinfo-devel"
+	LDFLAGS="-lexecinfo"
+fi
+
 post_install() {
 	rm ${PKGDESTDIR}/usr/share/doc/opencascade/*_LGPL_*.txt
 	vlicense OCCT_LGPL_EXCEPTION.txt
diff --git a/srcpkgs/occt/update b/srcpkgs/occt/update
deleted file mode 100644
index c128eec6d9c9..000000000000
--- a/srcpkgs/occt/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=tags"
-pattern=">V\K[\d_p]+(?=</a>)"

From f4b52ec7b0524c9da317a9d9230e9d49a832cab5 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 26 Mar 2022 11:25:11 -0400
Subject: [PATCH 3/3] freecad: update to 0.19.4.

---
 srcpkgs/freecad/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template
index a2f04bd91f1b..1e2aec024fd7 100644
--- a/srcpkgs/freecad/template
+++ b/srcpkgs/freecad/template
@@ -1,7 +1,7 @@
 # Template file for 'freecad'
 pkgname=freecad
-version=0.19.2
-revision=4
+version=0.19.4
+revision=1
 wrksrc="FreeCAD-${version}"
 build_style=cmake
 
@@ -36,7 +36,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=47e39e3d6fcafe6e0c68923fb1b86acda16986268e5e6011694057b940139fba
+checksum=e40a1c343956e13c56cc8578d025ae83d68d9d20acda1732953bc8a3883e9722
 
 if [ "$XBPS_TARGET_LIBC" = musl ]; then
 	makedepends+=" libexecinfo-devel"

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

* Re: [PR PATCH] [Updated] [WIP] occt: update to 7.6.1
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (5 preceding siblings ...)
  2022-05-01 20:24 ` karl-nilsson
@ 2022-05-02 14:17 ` karl-nilsson
  2022-05-02 14:18 ` karl-nilsson
                   ` (34 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: karl-nilsson @ 2022-05-02 14:17 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by karl-nilsson against master on the void-packages repository

https://github.com/karl-nilsson/void-packages occt_7.6
https://github.com/void-linux/void-packages/pull/36356

[WIP] occt: update to 7.6.1


#### Testing the changes
- I tested the changes in this PR: **briefly**


#### Local build testing
- I built this PR locally for my native architecture, x64-glibc


Like previously, broken ABI
```console
During initialization the error "/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv" occurred in /home/nilsson/.FreeCAD/Mod/A2plus/InitGui.py                                                                                                                        
Please look into the log file for further information                                                                                                
Wizard shaft module cannot be loaded                                                                                                                 
/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv                                                              
connect failed: No such file or directory      
```

Looks like we'll have to update or patch freecad
```console
In file included from /usr/include/opencascade/Extrema_POnSurf.lxx:15,
                 from /usr/include/opencascade/Extrema_POnSurf.hxx:75,
                 from /usr/include/opencascade/Extrema_ExtPElS.hxx:27,
                 from /usr/include/opencascade/Extrema_ExtPS.hxx:24,
                 from /usr/include/opencascade/ShapeAnalysis_Surface.hxx:20,
                 from ../src/3rdParty/salomesmesh/inc/SMESH_MesherHelper.hxx:37,
                 from ../src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp:34:
/usr/include/opencascade/Precision.hxx:98:7: note: previous definition of 'class Precision'
   98 | class Precision
      |       ^~~~~~~~~

```

ping @Piraty 

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-occt_7.6-36356.patch --]
[-- Type: text/x-diff, Size: 18536 bytes --]

From af2f676f81add4ade99da51300221e2d6aa3a2c1 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 20:24:49 -0400
Subject: [PATCH 1/3] python3-occ: remove package

* upstream is well behind occt
---
 srcpkgs/python3-occ/patches/python3.10.patch | 15 ---------------
 srcpkgs/python3-occ/template                 | 17 -----------------
 srcpkgs/removed-packages/template            |  3 ++-
 3 files changed, 2 insertions(+), 33 deletions(-)
 delete mode 100644 srcpkgs/python3-occ/patches/python3.10.patch
 delete mode 100644 srcpkgs/python3-occ/template

diff --git a/srcpkgs/python3-occ/patches/python3.10.patch b/srcpkgs/python3-occ/patches/python3.10.patch
deleted file mode 100644
index e192608fd3b3..000000000000
--- a/srcpkgs/python3-occ/patches/python3.10.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/src/Display/SimpleGui.py b/src/Display/SimpleGui.py
-index 42705a82..6a274c16 100644
---- a/src/Display/SimpleGui.py
-+++ b/src/Display/SimpleGui.py
-@@ -161,8 +161,8 @@ def init_display(backend_str: Optional[str]=None,
-             def centerOnScreen(self) -> None:
-                 '''Centers the window on the screen.'''
-                 resolution = QtWidgets.QApplication.desktop().screenGeometry()
--                x = (resolution.width() - self.frameSize().width()) / 2
--                y = (resolution.height() - self.frameSize().height()) / 2
-+                x = (resolution.width() - self.frameSize().width()) // 2
-+                y = (resolution.height() - self.frameSize().height()) // 2
-                 self.move(x, y)
- 
-             def add_menu(self, menu_name: str) -> None:
diff --git a/srcpkgs/python3-occ/template b/srcpkgs/python3-occ/template
deleted file mode 100644
index bee03373a3d1..000000000000
--- a/srcpkgs/python3-occ/template
+++ /dev/null
@@ -1,17 +0,0 @@
-# Template file for 'python3-occ'
-pkgname=python3-occ
-version=7.4.1
-revision=3
-archs="i686* x86_64* armv7l* aarch64* ppc*"
-wrksrc="pythonocc-core-${version}"
-build_style=cmake
-configure_args="-DPYTHONOCC_BUILD_TYPE=None -DCMAKE_BUILD_TYPE=None"
-hostmakedepends="python3 swig"
-makedepends="python3-devel occt-devel freetype-devel swig"
-depends="python3 occt freetype"
-short_desc="Industrial strength 3D CAD Python3 package"
-maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
-license="LGPL-3.0-or-later"
-homepage="http://pythonocc.org"
-distfiles="https://github.com/tpaviot/pythonocc-core/archive/${version}.tar.gz"
-checksum=6d62002244a0e7f4e5c1ad590d332a60601c44b2501ad017361443b54371e667
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 0923c53cfc05..de77c08a449f 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,7 +1,7 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
 version=0.1
-revision=69
+revision=70
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
 maintainer="Piotr Wójcik <chocimier@tlen.pl>"
@@ -338,6 +338,7 @@ replaces="
  python3-keepalive<=0.5_6
  python3-pgpdump<=1.5_10
  python3-lockfile<=0.12.2_7
+ python3-occ<=7.4.1_3
  python3-pyPEG2<=2.15.2_7
  python3-pyenet<=5.15.0_2
  python3-pyside-phonon<=5.15.0_2

From b7322fd6a13eec676c04cecad9db0548957b89e5 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 19:29:00 -0400
Subject: [PATCH 2/3] occt: update to 7.6.2.

---
 .../occt/patches/cmake-build-type-none.patch  |  6 +--
 srcpkgs/occt/patches/musl-fenv.patch          | 18 ++++----
 srcpkgs/occt/patches/musl-mallinfo.patch      | 45 ++++++++++++++-----
 srcpkgs/occt/template                         | 27 +++++------
 srcpkgs/occt/update                           |  2 -
 5 files changed, 60 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/occt/update

diff --git a/srcpkgs/occt/patches/cmake-build-type-none.patch b/srcpkgs/occt/patches/cmake-build-type-none.patch
index ecb0e3da3929..d2caec8c4e87 100644
--- a/srcpkgs/occt/patches/cmake-build-type-none.patch
+++ b/srcpkgs/occt/patches/cmake-build-type-none.patch
@@ -1,8 +1,8 @@
-Index: CMakeLists.txt
-===================================================================
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f4ec871f5..9b0644e94 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_D
+@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
  
  set (CMAKE_SUPPRESS_REGENERATION TRUE)
  
diff --git a/srcpkgs/occt/patches/musl-fenv.patch b/srcpkgs/occt/patches/musl-fenv.patch
index 09da8d0afeae..06a8e3a89cfd 100644
--- a/srcpkgs/occt/patches/musl-fenv.patch
+++ b/srcpkgs/occt/patches/musl-fenv.patch
@@ -5,18 +5,20 @@ is probably wrong, but I don't have a replacement for the
 non-posix functions fegetexcept(3) and feenableexcept(3).
 """
 
+diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx
+index 007f5ccaa..fe39e07ac 100644
 --- a/src/OSD/OSD_signal.cxx
 +++ b/src/OSD/OSD_signal.cxx
-@@ -703,7 +703,7 @@
- 
+@@ -761,7 +761,7 @@ typedef void (* SIG_PFV) (int);
+
  #include <signal.h>
- 
--#if !defined(__ANDROID__) && !defined(__QNX__)
-+#if !defined(__ANDROID__) && !defined(__QNX__) && defined(__GLIBC__)
+
+-#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
++#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && defined(__GLIBC__)
    #include <sys/signal.h>
  #endif
- 
-@@ -914,7 +914,7 @@
+
+@@ -977,7 +977,7 @@ static void SegvHandler(const int theSignal,
  //=======================================================================
  void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  {
@@ -25,7 +27,7 @@ non-posix functions fegetexcept(3) and feenableexcept(3).
    feclearexcept (FE_ALL_EXCEPT);
    if (theFloatingSignal)
    {
-@@ -947,7 +947,7 @@
+@@ -1010,7 +1010,7 @@ void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  //=======================================================================
  Standard_Boolean OSD::ToCatchFloatingSignals()
  {
diff --git a/srcpkgs/occt/patches/musl-mallinfo.patch b/srcpkgs/occt/patches/musl-mallinfo.patch
index 4e5825bf1cb0..6ae94992eaf8 100644
--- a/srcpkgs/occt/patches/musl-mallinfo.patch
+++ b/srcpkgs/occt/patches/musl-mallinfo.patch
@@ -1,17 +1,38 @@
-In musl libc there is no struct mallinfo and no function mallinf()
+Adapted from alpine's patch
 
+diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx
+index d9bb91398..d608e04fc 100644
 --- a/src/OSD/OSD_MemInfo.cxx
 +++ b/src/OSD/OSD_MemInfo.cxx
-@@ -147,8 +147,12 @@
-   }
-   aFile.close();
+@@ -35,6 +35,9 @@
+ #include <sstream>
+ #include <fstream>
+ 
++#include <sys/time.h>
++#include <sys/resource.h>
++
+ #include <OSD_MemInfo.hxx>
  
-+  #if defined(__GLIBC__)
-   struct mallinfo aMI = mallinfo();
-   myCounters[MemHeapUsage] = aMI.uordblks;
-+  #else /* XXX not yet coded */
-+  myCounters[MemHeapUsage] = 0;
-+  #endif
+ #if defined(__EMSCRIPTEN__)
+@@ -182,18 +185,9 @@ void OSD_MemInfo::Update()
+ #elif (defined(__linux__) || defined(__linux))
+   if (IsActive (MemHeapUsage))
+   {
+-  #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+-    #if __GLIBC_PREREQ(2,33)
+-      #define HAS_MALLINFO2
+-    #endif
+-  #endif
+-
+-  #ifdef HAS_MALLINFO2
+-    const struct mallinfo2 aMI = mallinfo2();
+-  #else
+-    const struct mallinfo aMI = mallinfo();
+-  #endif
+-    myCounters[MemHeapUsage] = aMI.uordblks;
++    struct rusage ru = { .ru_maxrss = 0 };
++    getrusage(RUSAGE_SELF, &ru);
++    myCounters[MemHeapUsage] = ru.ru_maxrss;
+   }
  
- #elif (defined(__APPLE__))
-   struct task_basic_info aTaskInfo;
+   if (!IsActive (MemVirtual)
diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template
index 6624fea8b53f..b17c91b0058b 100644
--- a/srcpkgs/occt/template
+++ b/srcpkgs/occt/template
@@ -1,26 +1,27 @@
 # Template file for 'occt'
 pkgname=occt
-reverts=7.5.0_1
-version=7.4.0p1
-revision=5
-_gittag="V${version//./_}"
-wrksrc=occt-${_gittag}
+version=7.6.2
+revision=1
+_ver="${version//./_}"
+wrksrc=OCCT-${_ver}
 build_style=cmake
-# XXX: re-enable -DUSE_TBB=ON if possible when updating
-configure_args="-DUSE_FREEIMAGE=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
+configure_args="-DUSE_FREEIMAGE=ON -DUSE_TBB=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
  -DINSTALL_SAMPLES=ON"
-makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tcl-devel
- tk-devel"
+makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tbb-devel
+ tcl-devel tk-devel"
 short_desc="OpenCASCADE Technology - library for CAD/CAM/CAE applications"
 maintainer="Piraty <piraty1@inbox.ru>"
 license="custom:LGPL-2.1-only-with-exceptions"
 homepage="https://www.opencascade.com"
-# distfile: use git instead of official tarball, which requires registration
-# see https://www.opencascade.com/content/packaging-again-debian
-distfiles="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_gittag};sf=tgz>occt-${_gittag}.tar.gz"
-checksum=e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0
+distfiles="https://github.com/Open-Cascade-SAS/OCCT/archive/V${_ver}.tar.gz"
+checksum=dea04077d71507c666aaa7ccaeacc73ab580d6572d7f75e90a1984c4c0302a7a
 conflicts="oce>=0"
 
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" libexecinfo-devel"
+	LDFLAGS="-lexecinfo"
+fi
+
 post_install() {
 	rm ${PKGDESTDIR}/usr/share/doc/opencascade/*_LGPL_*.txt
 	vlicense OCCT_LGPL_EXCEPTION.txt
diff --git a/srcpkgs/occt/update b/srcpkgs/occt/update
deleted file mode 100644
index c128eec6d9c9..000000000000
--- a/srcpkgs/occt/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=tags"
-pattern=">V\K[\d_p]+(?=</a>)"

From 8825851cdbd6dc1cfda1ad3a1862ff7205b78084 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 26 Mar 2022 11:25:11 -0400
Subject: [PATCH 3/3] freecad: update to 0.19.4.

---
 srcpkgs/freecad/patches/050-occt76.patch | 140 +++++++++++++++++++++++
 srcpkgs/freecad/patches/occt762.patch    |  27 +++++
 srcpkgs/freecad/template                 |   6 +-
 3 files changed, 170 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/freecad/patches/050-occt76.patch
 create mode 100644 srcpkgs/freecad/patches/occt762.patch

diff --git a/srcpkgs/freecad/patches/050-occt76.patch b/srcpkgs/freecad/patches/050-occt76.patch
new file mode 100644
index 000000000000..7865a59bceef
--- /dev/null
+++ b/srcpkgs/freecad/patches/050-occt76.patch
@@ -0,0 +1,140 @@
+From 6f3b00d67ec0bd0072b7b493e2a38d2a2e3af27d Mon Sep 17 00:00:00 2001
+From: wmayer <wmayer@users.sourceforge.net>
+Date: Mon, 11 Oct 2021 00:30:22 +0200
+Subject: [PATCH] SMESH: port to OCCT 7.6
+
+---
+ .../src/NETGENPlugin/NETGENPlugin_Mesher.cpp       |  7 +++++++
+ .../salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp      |  7 +++++--
+ .../src/StdMeshers/StdMeshers_Adaptive1D.cpp       | 14 ++++++++++++++
+ .../src/StdMeshers/StdMeshers_Quadrangle_2D.cpp    |  2 +-
+ .../src/StdMeshers/StdMeshers_ViscousLayers.cpp    |  8 ++++++++
+ 5 files changed, 35 insertions(+), 3 deletions(-)
+
+diff --git a/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp b/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp
+index cd6f0b2b0758..ea83984b9768 100644
+--- a/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp
++++ b/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp
+@@ -56,6 +56,7 @@
+ #include <NCollection_Map.hxx>
+ #include <Standard_ErrorHandler.hxx>
+ #include <Standard_ProgramError.hxx>
++#include <Standard_Version.hxx>
+ #include <TColStd_MapOfInteger.hxx>
+ #include <TopExp.hxx>
+ #include <TopExp_Explorer.hxx>
+@@ -700,7 +701,13 @@ double NETGENPlugin_Mesher::GetDefaultMinSize(const TopoDS_Shape& geom,
+       BRep_Tool::Triangulation ( TopoDS::Face( fExp.Current() ), loc);
+     if ( triangulation.IsNull() ) continue;
+     const double fTol = BRep_Tool::Tolerance( TopoDS::Face( fExp.Current() ));
++#if OCC_VERSION_HEX < 0x070600
+     const TColgp_Array1OfPnt&   points = triangulation->Nodes();
++#else
++    auto points = [&triangulation](Standard_Integer index) {
++        return triangulation->Node(index);
++    };
++#endif
+     const Poly_Array1OfTriangle& trias = triangulation->Triangles();
+     for ( int iT = trias.Lower(); iT <= trias.Upper(); ++iT )
+     {
+diff --git a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
+index 5a07308310ea..fbb1b250087f 100644
+--- a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
++++ b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
+@@ -38,10 +38,13 @@
+ #include <GC_MakeSegment.hxx>
+ #include <GeomAPI_ExtremaCurveCurve.hxx>
+ #include <Geom_Line.hxx>
+-#include <IntAna_IntConicQuad.hxx>
+-#include <IntAna_Quadric.hxx>
++#include <gp_Cone.hxx>
++#include <gp_Cylinder.hxx>
+ #include <gp_Lin.hxx>
+ #include <gp_Pln.hxx>
++#include <gp_Sphere.hxx>
++#include <IntAna_IntConicQuad.hxx>
++#include <IntAna_Quadric.hxx>
+ 
+ #include <limits>
+ #include <numeric>
+diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp
+index 88970f36b557..7c51601c7bbe 100644
+--- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp
++++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp
+@@ -46,6 +46,7 @@
+ #include <Poly_Array1OfTriangle.hxx>
+ #include <Poly_PolygonOnTriangulation.hxx>
+ #include <Poly_Triangulation.hxx>
++#include <Standard_Version.hxx>
+ #include <TColgp_Array1OfPnt.hxx>
+ #include <TopExp.hxx>
+ #include <TopExp_Explorer.hxx>
+@@ -318,13 +319,26 @@ namespace // internal utils
+     {
+       myFaceTol         = SMESH_MesherHelper::MaxTolerance( face );
+       myTree            = triaTree;
++#if OCC_VERSION_HEX < 0x070600
+       myNodes           = & tr->Nodes();
++#else
++      TColgp_Array1OfPnt* trNodes = new TColgp_Array1OfPnt( 1, tr->NbNodes() );
++      for (Standard_Integer i = myNodes->Lower(); i <= myNodes->Upper(); i++)
++      {
++        trNodes->SetValue(i, tr->Node(i));
++      }
++      myNodes = trNodes;
++      myOwnNodes = true;
++#endif
+       myPolyTrias       = & tr->Triangles();
+       myTriasDeflection = tr->Deflection();
+       if ( !loc.IsIdentity() ) // transform nodes if necessary
+       {
+         TColgp_Array1OfPnt* trsfNodes = new TColgp_Array1OfPnt( myNodes->Lower(), myNodes->Upper() );
+         trsfNodes->Assign( *myNodes );
++#if OCC_VERSION_HEX >= 0x070600
++        delete myNodes; // it's already a copy
++#endif
+         myNodes    = trsfNodes;
+         myOwnNodes = true;
+         const gp_Trsf& trsf = loc;
+diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp
+index f7ac411d9a55..5d5c15c36612 100644
+--- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp
++++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp
+@@ -50,7 +50,7 @@
+ #include <Geom_Surface.hxx>
+ #include <NCollection_DefineArray2.hxx>
+ #include <Precision.hxx>
+-#include <Quantity_Parameter.hxx>
++#include <Standard_Real.hxx>
+ #include <TColStd_SequenceOfInteger.hxx>
+ #include <TColStd_SequenceOfReal.hxx>
+ #include <TColgp_SequenceOfXY.hxx>
+diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp
+index 8ee0e2683259..e9f46183059e 100644
+--- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp
++++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp
+@@ -44,7 +44,10 @@
+ #include "SMESH_subMeshEventListener.hxx"
+ #include "StdMeshers_FaceSide.hxx"
+ 
++#include <Standard_Version.hxx>
++#if OCC_VERSION_HEX < 0x070600
+ #include <Adaptor3d_HSurface.hxx>
++#endif
+ #include <BRepAdaptor_Curve2d.hxx>
+ #include <BRepAdaptor_Surface.hxx>
+ #include <BRepLProp_SLProps.hxx>
+@@ -1340,8 +1343,13 @@ namespace VISCOUS_3D
+     //case GeomAbs_SurfaceOfExtrusion:
+     case GeomAbs_OffsetSurface:
+     {
++#if OCC_VERSION_HEX < 0x070600
+       Handle(Adaptor3d_HSurface) base = surface.BasisSurface();
+       return getRovolutionAxis( base->Surface(), axis );
++#else
++      Handle(Adaptor3d_Surface) base = surface.BasisSurface();
++      return getRovolutionAxis( *base, axis );
++#endif
+     }
+     default: return false;
+     }
diff --git a/srcpkgs/freecad/patches/occt762.patch b/srcpkgs/freecad/patches/occt762.patch
new file mode 100644
index 000000000000..4d59c2c0cfab
--- /dev/null
+++ b/srcpkgs/freecad/patches/occt762.patch
@@ -0,0 +1,27 @@
+diff --git a/src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp b/src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp
+index 24dc2d00a6..f95a92985b 100644
+--- a/src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp
++++ b/src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp
+@@ -64,7 +64,7 @@
+ 
+ #include <GEOMUtils.hxx>
+ 
+-#undef _Precision_HeaderFile
++// #undef _Precision_HeaderFile
+ #include <BRepBndLib.hxx>
+ #include <BRepPrimAPI_MakeBox.hxx>
+ #include <Bnd_Box.hxx>
+diff --git a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
+index 5a07308310..fae4a5faa4 100644
+--- a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
++++ b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
+@@ -42,6 +42,9 @@
+ #include <IntAna_Quadric.hxx>
+ #include <gp_Lin.hxx>
+ #include <gp_Pln.hxx>
++#include <gp_Sphere.hxx>
++#include <gp_Cylinder.hxx>
++#include <gp_Cone.hxx>
+ 
+ #include <limits>
+ #include <numeric>
diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template
index a2f04bd91f1b..1e2aec024fd7 100644
--- a/srcpkgs/freecad/template
+++ b/srcpkgs/freecad/template
@@ -1,7 +1,7 @@
 # Template file for 'freecad'
 pkgname=freecad
-version=0.19.2
-revision=4
+version=0.19.4
+revision=1
 wrksrc="FreeCAD-${version}"
 build_style=cmake
 
@@ -36,7 +36,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=47e39e3d6fcafe6e0c68923fb1b86acda16986268e5e6011694057b940139fba
+checksum=e40a1c343956e13c56cc8578d025ae83d68d9d20acda1732953bc8a3883e9722
 
 if [ "$XBPS_TARGET_LIBC" = musl ]; then
 	makedepends+=" libexecinfo-devel"

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

* Re: [PR PATCH] [Updated] [WIP] occt: update to 7.6.1
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (6 preceding siblings ...)
  2022-05-02 14:17 ` karl-nilsson
@ 2022-05-02 14:18 ` karl-nilsson
  2022-05-02 14:51 ` [WIP] occt: update to 7.6.2 karl-nilsson
                   ` (33 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: karl-nilsson @ 2022-05-02 14:18 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by karl-nilsson against master on the void-packages repository

https://github.com/karl-nilsson/void-packages occt_7.6
https://github.com/void-linux/void-packages/pull/36356

[WIP] occt: update to 7.6.1


#### Testing the changes
- I tested the changes in this PR: **briefly**


#### Local build testing
- I built this PR locally for my native architecture, x64-glibc


Like previously, broken ABI
```console
During initialization the error "/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv" occurred in /home/nilsson/.FreeCAD/Mod/A2plus/InitGui.py                                                                                                                        
Please look into the log file for further information                                                                                                
Wizard shaft module cannot be loaded                                                                                                                 
/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv                                                              
connect failed: No such file or directory      
```

Looks like we'll have to update or patch freecad
```console
In file included from /usr/include/opencascade/Extrema_POnSurf.lxx:15,
                 from /usr/include/opencascade/Extrema_POnSurf.hxx:75,
                 from /usr/include/opencascade/Extrema_ExtPElS.hxx:27,
                 from /usr/include/opencascade/Extrema_ExtPS.hxx:24,
                 from /usr/include/opencascade/ShapeAnalysis_Surface.hxx:20,
                 from ../src/3rdParty/salomesmesh/inc/SMESH_MesherHelper.hxx:37,
                 from ../src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp:34:
/usr/include/opencascade/Precision.hxx:98:7: note: previous definition of 'class Precision'
   98 | class Precision
      |       ^~~~~~~~~

```

ping @Piraty 

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-occt_7.6-36356.patch --]
[-- Type: text/x-diff, Size: 18536 bytes --]

From 92d0491a07443d6004247fc2ba46f18ffc627726 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 20:24:49 -0400
Subject: [PATCH 1/3] python3-occ: remove package

* upstream is well behind occt
---
 srcpkgs/python3-occ/patches/python3.10.patch | 15 ---------------
 srcpkgs/python3-occ/template                 | 17 -----------------
 srcpkgs/removed-packages/template            |  3 ++-
 3 files changed, 2 insertions(+), 33 deletions(-)
 delete mode 100644 srcpkgs/python3-occ/patches/python3.10.patch
 delete mode 100644 srcpkgs/python3-occ/template

diff --git a/srcpkgs/python3-occ/patches/python3.10.patch b/srcpkgs/python3-occ/patches/python3.10.patch
deleted file mode 100644
index e192608fd3b3..000000000000
--- a/srcpkgs/python3-occ/patches/python3.10.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/src/Display/SimpleGui.py b/src/Display/SimpleGui.py
-index 42705a82..6a274c16 100644
---- a/src/Display/SimpleGui.py
-+++ b/src/Display/SimpleGui.py
-@@ -161,8 +161,8 @@ def init_display(backend_str: Optional[str]=None,
-             def centerOnScreen(self) -> None:
-                 '''Centers the window on the screen.'''
-                 resolution = QtWidgets.QApplication.desktop().screenGeometry()
--                x = (resolution.width() - self.frameSize().width()) / 2
--                y = (resolution.height() - self.frameSize().height()) / 2
-+                x = (resolution.width() - self.frameSize().width()) // 2
-+                y = (resolution.height() - self.frameSize().height()) // 2
-                 self.move(x, y)
- 
-             def add_menu(self, menu_name: str) -> None:
diff --git a/srcpkgs/python3-occ/template b/srcpkgs/python3-occ/template
deleted file mode 100644
index bee03373a3d1..000000000000
--- a/srcpkgs/python3-occ/template
+++ /dev/null
@@ -1,17 +0,0 @@
-# Template file for 'python3-occ'
-pkgname=python3-occ
-version=7.4.1
-revision=3
-archs="i686* x86_64* armv7l* aarch64* ppc*"
-wrksrc="pythonocc-core-${version}"
-build_style=cmake
-configure_args="-DPYTHONOCC_BUILD_TYPE=None -DCMAKE_BUILD_TYPE=None"
-hostmakedepends="python3 swig"
-makedepends="python3-devel occt-devel freetype-devel swig"
-depends="python3 occt freetype"
-short_desc="Industrial strength 3D CAD Python3 package"
-maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
-license="LGPL-3.0-or-later"
-homepage="http://pythonocc.org"
-distfiles="https://github.com/tpaviot/pythonocc-core/archive/${version}.tar.gz"
-checksum=6d62002244a0e7f4e5c1ad590d332a60601c44b2501ad017361443b54371e667
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 0923c53cfc05..de77c08a449f 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,7 +1,7 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
 version=0.1
-revision=69
+revision=70
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
 maintainer="Piotr Wójcik <chocimier@tlen.pl>"
@@ -338,6 +338,7 @@ replaces="
  python3-keepalive<=0.5_6
  python3-pgpdump<=1.5_10
  python3-lockfile<=0.12.2_7
+ python3-occ<=7.4.1_3
  python3-pyPEG2<=2.15.2_7
  python3-pyenet<=5.15.0_2
  python3-pyside-phonon<=5.15.0_2

From d95410c8623155a447322336bae9ad1c6570e727 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 19:29:00 -0400
Subject: [PATCH 2/3] occt: update to 7.6.2.

---
 .../occt/patches/cmake-build-type-none.patch  |  6 +--
 srcpkgs/occt/patches/musl-fenv.patch          | 18 ++++----
 srcpkgs/occt/patches/musl-mallinfo.patch      | 45 ++++++++++++++-----
 srcpkgs/occt/template                         | 27 +++++------
 srcpkgs/occt/update                           |  2 -
 5 files changed, 60 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/occt/update

diff --git a/srcpkgs/occt/patches/cmake-build-type-none.patch b/srcpkgs/occt/patches/cmake-build-type-none.patch
index ecb0e3da3929..d2caec8c4e87 100644
--- a/srcpkgs/occt/patches/cmake-build-type-none.patch
+++ b/srcpkgs/occt/patches/cmake-build-type-none.patch
@@ -1,8 +1,8 @@
-Index: CMakeLists.txt
-===================================================================
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f4ec871f5..9b0644e94 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_D
+@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
  
  set (CMAKE_SUPPRESS_REGENERATION TRUE)
  
diff --git a/srcpkgs/occt/patches/musl-fenv.patch b/srcpkgs/occt/patches/musl-fenv.patch
index 09da8d0afeae..06a8e3a89cfd 100644
--- a/srcpkgs/occt/patches/musl-fenv.patch
+++ b/srcpkgs/occt/patches/musl-fenv.patch
@@ -5,18 +5,20 @@ is probably wrong, but I don't have a replacement for the
 non-posix functions fegetexcept(3) and feenableexcept(3).
 """
 
+diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx
+index 007f5ccaa..fe39e07ac 100644
 --- a/src/OSD/OSD_signal.cxx
 +++ b/src/OSD/OSD_signal.cxx
-@@ -703,7 +703,7 @@
- 
+@@ -761,7 +761,7 @@ typedef void (* SIG_PFV) (int);
+
  #include <signal.h>
- 
--#if !defined(__ANDROID__) && !defined(__QNX__)
-+#if !defined(__ANDROID__) && !defined(__QNX__) && defined(__GLIBC__)
+
+-#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
++#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && defined(__GLIBC__)
    #include <sys/signal.h>
  #endif
- 
-@@ -914,7 +914,7 @@
+
+@@ -977,7 +977,7 @@ static void SegvHandler(const int theSignal,
  //=======================================================================
  void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  {
@@ -25,7 +27,7 @@ non-posix functions fegetexcept(3) and feenableexcept(3).
    feclearexcept (FE_ALL_EXCEPT);
    if (theFloatingSignal)
    {
-@@ -947,7 +947,7 @@
+@@ -1010,7 +1010,7 @@ void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  //=======================================================================
  Standard_Boolean OSD::ToCatchFloatingSignals()
  {
diff --git a/srcpkgs/occt/patches/musl-mallinfo.patch b/srcpkgs/occt/patches/musl-mallinfo.patch
index 4e5825bf1cb0..6ae94992eaf8 100644
--- a/srcpkgs/occt/patches/musl-mallinfo.patch
+++ b/srcpkgs/occt/patches/musl-mallinfo.patch
@@ -1,17 +1,38 @@
-In musl libc there is no struct mallinfo and no function mallinf()
+Adapted from alpine's patch
 
+diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx
+index d9bb91398..d608e04fc 100644
 --- a/src/OSD/OSD_MemInfo.cxx
 +++ b/src/OSD/OSD_MemInfo.cxx
-@@ -147,8 +147,12 @@
-   }
-   aFile.close();
+@@ -35,6 +35,9 @@
+ #include <sstream>
+ #include <fstream>
+ 
++#include <sys/time.h>
++#include <sys/resource.h>
++
+ #include <OSD_MemInfo.hxx>
  
-+  #if defined(__GLIBC__)
-   struct mallinfo aMI = mallinfo();
-   myCounters[MemHeapUsage] = aMI.uordblks;
-+  #else /* XXX not yet coded */
-+  myCounters[MemHeapUsage] = 0;
-+  #endif
+ #if defined(__EMSCRIPTEN__)
+@@ -182,18 +185,9 @@ void OSD_MemInfo::Update()
+ #elif (defined(__linux__) || defined(__linux))
+   if (IsActive (MemHeapUsage))
+   {
+-  #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+-    #if __GLIBC_PREREQ(2,33)
+-      #define HAS_MALLINFO2
+-    #endif
+-  #endif
+-
+-  #ifdef HAS_MALLINFO2
+-    const struct mallinfo2 aMI = mallinfo2();
+-  #else
+-    const struct mallinfo aMI = mallinfo();
+-  #endif
+-    myCounters[MemHeapUsage] = aMI.uordblks;
++    struct rusage ru = { .ru_maxrss = 0 };
++    getrusage(RUSAGE_SELF, &ru);
++    myCounters[MemHeapUsage] = ru.ru_maxrss;
+   }
  
- #elif (defined(__APPLE__))
-   struct task_basic_info aTaskInfo;
+   if (!IsActive (MemVirtual)
diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template
index 6624fea8b53f..b17c91b0058b 100644
--- a/srcpkgs/occt/template
+++ b/srcpkgs/occt/template
@@ -1,26 +1,27 @@
 # Template file for 'occt'
 pkgname=occt
-reverts=7.5.0_1
-version=7.4.0p1
-revision=5
-_gittag="V${version//./_}"
-wrksrc=occt-${_gittag}
+version=7.6.2
+revision=1
+_ver="${version//./_}"
+wrksrc=OCCT-${_ver}
 build_style=cmake
-# XXX: re-enable -DUSE_TBB=ON if possible when updating
-configure_args="-DUSE_FREEIMAGE=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
+configure_args="-DUSE_FREEIMAGE=ON -DUSE_TBB=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
  -DINSTALL_SAMPLES=ON"
-makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tcl-devel
- tk-devel"
+makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tbb-devel
+ tcl-devel tk-devel"
 short_desc="OpenCASCADE Technology - library for CAD/CAM/CAE applications"
 maintainer="Piraty <piraty1@inbox.ru>"
 license="custom:LGPL-2.1-only-with-exceptions"
 homepage="https://www.opencascade.com"
-# distfile: use git instead of official tarball, which requires registration
-# see https://www.opencascade.com/content/packaging-again-debian
-distfiles="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_gittag};sf=tgz>occt-${_gittag}.tar.gz"
-checksum=e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0
+distfiles="https://github.com/Open-Cascade-SAS/OCCT/archive/V${_ver}.tar.gz"
+checksum=dea04077d71507c666aaa7ccaeacc73ab580d6572d7f75e90a1984c4c0302a7a
 conflicts="oce>=0"
 
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" libexecinfo-devel"
+	LDFLAGS="-lexecinfo"
+fi
+
 post_install() {
 	rm ${PKGDESTDIR}/usr/share/doc/opencascade/*_LGPL_*.txt
 	vlicense OCCT_LGPL_EXCEPTION.txt
diff --git a/srcpkgs/occt/update b/srcpkgs/occt/update
deleted file mode 100644
index c128eec6d9c9..000000000000
--- a/srcpkgs/occt/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=tags"
-pattern=">V\K[\d_p]+(?=</a>)"

From 31196c52d13e671c700c8ebe297dfb626fc384ee Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 26 Mar 2022 11:25:11 -0400
Subject: [PATCH 3/3] freecad: update to 0.19.4.

---
 srcpkgs/freecad/patches/050-occt76.patch | 140 +++++++++++++++++++++++
 srcpkgs/freecad/patches/occt762.patch    |  27 +++++
 srcpkgs/freecad/template                 |   6 +-
 3 files changed, 170 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/freecad/patches/050-occt76.patch
 create mode 100644 srcpkgs/freecad/patches/occt762.patch

diff --git a/srcpkgs/freecad/patches/050-occt76.patch b/srcpkgs/freecad/patches/050-occt76.patch
new file mode 100644
index 000000000000..7865a59bceef
--- /dev/null
+++ b/srcpkgs/freecad/patches/050-occt76.patch
@@ -0,0 +1,140 @@
+From 6f3b00d67ec0bd0072b7b493e2a38d2a2e3af27d Mon Sep 17 00:00:00 2001
+From: wmayer <wmayer@users.sourceforge.net>
+Date: Mon, 11 Oct 2021 00:30:22 +0200
+Subject: [PATCH] SMESH: port to OCCT 7.6
+
+---
+ .../src/NETGENPlugin/NETGENPlugin_Mesher.cpp       |  7 +++++++
+ .../salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp      |  7 +++++--
+ .../src/StdMeshers/StdMeshers_Adaptive1D.cpp       | 14 ++++++++++++++
+ .../src/StdMeshers/StdMeshers_Quadrangle_2D.cpp    |  2 +-
+ .../src/StdMeshers/StdMeshers_ViscousLayers.cpp    |  8 ++++++++
+ 5 files changed, 35 insertions(+), 3 deletions(-)
+
+diff --git a/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp b/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp
+index cd6f0b2b0758..ea83984b9768 100644
+--- a/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp
++++ b/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp
+@@ -56,6 +56,7 @@
+ #include <NCollection_Map.hxx>
+ #include <Standard_ErrorHandler.hxx>
+ #include <Standard_ProgramError.hxx>
++#include <Standard_Version.hxx>
+ #include <TColStd_MapOfInteger.hxx>
+ #include <TopExp.hxx>
+ #include <TopExp_Explorer.hxx>
+@@ -700,7 +701,13 @@ double NETGENPlugin_Mesher::GetDefaultMinSize(const TopoDS_Shape& geom,
+       BRep_Tool::Triangulation ( TopoDS::Face( fExp.Current() ), loc);
+     if ( triangulation.IsNull() ) continue;
+     const double fTol = BRep_Tool::Tolerance( TopoDS::Face( fExp.Current() ));
++#if OCC_VERSION_HEX < 0x070600
+     const TColgp_Array1OfPnt&   points = triangulation->Nodes();
++#else
++    auto points = [&triangulation](Standard_Integer index) {
++        return triangulation->Node(index);
++    };
++#endif
+     const Poly_Array1OfTriangle& trias = triangulation->Triangles();
+     for ( int iT = trias.Lower(); iT <= trias.Upper(); ++iT )
+     {
+diff --git a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
+index 5a07308310ea..fbb1b250087f 100644
+--- a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
++++ b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
+@@ -38,10 +38,13 @@
+ #include <GC_MakeSegment.hxx>
+ #include <GeomAPI_ExtremaCurveCurve.hxx>
+ #include <Geom_Line.hxx>
+-#include <IntAna_IntConicQuad.hxx>
+-#include <IntAna_Quadric.hxx>
++#include <gp_Cone.hxx>
++#include <gp_Cylinder.hxx>
+ #include <gp_Lin.hxx>
+ #include <gp_Pln.hxx>
++#include <gp_Sphere.hxx>
++#include <IntAna_IntConicQuad.hxx>
++#include <IntAna_Quadric.hxx>
+ 
+ #include <limits>
+ #include <numeric>
+diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp
+index 88970f36b557..7c51601c7bbe 100644
+--- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp
++++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp
+@@ -46,6 +46,7 @@
+ #include <Poly_Array1OfTriangle.hxx>
+ #include <Poly_PolygonOnTriangulation.hxx>
+ #include <Poly_Triangulation.hxx>
++#include <Standard_Version.hxx>
+ #include <TColgp_Array1OfPnt.hxx>
+ #include <TopExp.hxx>
+ #include <TopExp_Explorer.hxx>
+@@ -318,13 +319,26 @@ namespace // internal utils
+     {
+       myFaceTol         = SMESH_MesherHelper::MaxTolerance( face );
+       myTree            = triaTree;
++#if OCC_VERSION_HEX < 0x070600
+       myNodes           = & tr->Nodes();
++#else
++      TColgp_Array1OfPnt* trNodes = new TColgp_Array1OfPnt( 1, tr->NbNodes() );
++      for (Standard_Integer i = myNodes->Lower(); i <= myNodes->Upper(); i++)
++      {
++        trNodes->SetValue(i, tr->Node(i));
++      }
++      myNodes = trNodes;
++      myOwnNodes = true;
++#endif
+       myPolyTrias       = & tr->Triangles();
+       myTriasDeflection = tr->Deflection();
+       if ( !loc.IsIdentity() ) // transform nodes if necessary
+       {
+         TColgp_Array1OfPnt* trsfNodes = new TColgp_Array1OfPnt( myNodes->Lower(), myNodes->Upper() );
+         trsfNodes->Assign( *myNodes );
++#if OCC_VERSION_HEX >= 0x070600
++        delete myNodes; // it's already a copy
++#endif
+         myNodes    = trsfNodes;
+         myOwnNodes = true;
+         const gp_Trsf& trsf = loc;
+diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp
+index f7ac411d9a55..5d5c15c36612 100644
+--- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp
++++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp
+@@ -50,7 +50,7 @@
+ #include <Geom_Surface.hxx>
+ #include <NCollection_DefineArray2.hxx>
+ #include <Precision.hxx>
+-#include <Quantity_Parameter.hxx>
++#include <Standard_Real.hxx>
+ #include <TColStd_SequenceOfInteger.hxx>
+ #include <TColStd_SequenceOfReal.hxx>
+ #include <TColgp_SequenceOfXY.hxx>
+diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp
+index 8ee0e2683259..e9f46183059e 100644
+--- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp
++++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp
+@@ -44,7 +44,10 @@
+ #include "SMESH_subMeshEventListener.hxx"
+ #include "StdMeshers_FaceSide.hxx"
+ 
++#include <Standard_Version.hxx>
++#if OCC_VERSION_HEX < 0x070600
+ #include <Adaptor3d_HSurface.hxx>
++#endif
+ #include <BRepAdaptor_Curve2d.hxx>
+ #include <BRepAdaptor_Surface.hxx>
+ #include <BRepLProp_SLProps.hxx>
+@@ -1340,8 +1343,13 @@ namespace VISCOUS_3D
+     //case GeomAbs_SurfaceOfExtrusion:
+     case GeomAbs_OffsetSurface:
+     {
++#if OCC_VERSION_HEX < 0x070600
+       Handle(Adaptor3d_HSurface) base = surface.BasisSurface();
+       return getRovolutionAxis( base->Surface(), axis );
++#else
++      Handle(Adaptor3d_Surface) base = surface.BasisSurface();
++      return getRovolutionAxis( *base, axis );
++#endif
+     }
+     default: return false;
+     }
diff --git a/srcpkgs/freecad/patches/occt762.patch b/srcpkgs/freecad/patches/occt762.patch
new file mode 100644
index 000000000000..4d59c2c0cfab
--- /dev/null
+++ b/srcpkgs/freecad/patches/occt762.patch
@@ -0,0 +1,27 @@
+diff --git a/src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp b/src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp
+index 24dc2d00a6..f95a92985b 100644
+--- a/src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp
++++ b/src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp
+@@ -64,7 +64,7 @@
+ 
+ #include <GEOMUtils.hxx>
+ 
+-#undef _Precision_HeaderFile
++// #undef _Precision_HeaderFile
+ #include <BRepBndLib.hxx>
+ #include <BRepPrimAPI_MakeBox.hxx>
+ #include <Bnd_Box.hxx>
+diff --git a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
+index 5a07308310..fae4a5faa4 100644
+--- a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
++++ b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
+@@ -42,6 +42,9 @@
+ #include <IntAna_Quadric.hxx>
+ #include <gp_Lin.hxx>
+ #include <gp_Pln.hxx>
++#include <gp_Sphere.hxx>
++#include <gp_Cylinder.hxx>
++#include <gp_Cone.hxx>
+ 
+ #include <limits>
+ #include <numeric>
diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template
index a2f04bd91f1b..1e2aec024fd7 100644
--- a/srcpkgs/freecad/template
+++ b/srcpkgs/freecad/template
@@ -1,7 +1,7 @@
 # Template file for 'freecad'
 pkgname=freecad
-version=0.19.2
-revision=4
+version=0.19.4
+revision=1
 wrksrc="FreeCAD-${version}"
 build_style=cmake
 
@@ -36,7 +36,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=47e39e3d6fcafe6e0c68923fb1b86acda16986268e5e6011694057b940139fba
+checksum=e40a1c343956e13c56cc8578d025ae83d68d9d20acda1732953bc8a3883e9722
 
 if [ "$XBPS_TARGET_LIBC" = musl ]; then
 	makedepends+=" libexecinfo-devel"

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

* Re: [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (7 preceding siblings ...)
  2022-05-02 14:18 ` karl-nilsson
@ 2022-05-02 14:51 ` karl-nilsson
  2022-07-04 11:21 ` luzpaz
                   ` (32 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: karl-nilsson @ 2022-05-02 14:51 UTC (permalink / raw)
  To: ml

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

New comment by karl-nilsson on void-packages repository

https://github.com/void-linux/void-packages/pull/36356#issuecomment-1114993298

Comment:
I'm just going to wait for the release of freecad v0.20. There's a slew of patches required to build with occt 7.6.x

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

* Re: [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (8 preceding siblings ...)
  2022-05-02 14:51 ` [WIP] occt: update to 7.6.2 karl-nilsson
@ 2022-07-04 11:21 ` luzpaz
  2022-07-24  1:21 ` [PR PATCH] [Updated] " karl-nilsson
                   ` (31 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: luzpaz @ 2022-07-04 11:21 UTC (permalink / raw)
  To: ml

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

New comment by luzpaz on void-packages repository

https://github.com/void-linux/void-packages/pull/36356#issuecomment-1173699779

Comment:
@karl-nilsson Heads-up: FreeCAD v0.20 has been released 

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

* Re: [PR PATCH] [Updated] [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (9 preceding siblings ...)
  2022-07-04 11:21 ` luzpaz
@ 2022-07-24  1:21 ` karl-nilsson
  2022-07-24  1:40 ` karl-nilsson
                   ` (30 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: karl-nilsson @ 2022-07-24  1:21 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by karl-nilsson against master on the void-packages repository

https://github.com/karl-nilsson/void-packages occt_7.6
https://github.com/void-linux/void-packages/pull/36356

[WIP] occt: update to 7.6.2


#### Testing the changes
- I tested the changes in this PR: **briefly**


#### Local build testing
- I built this PR locally for my native architecture, x64-glibc


Like previously, broken ABI
```console
During initialization the error "/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv" occurred in /home/nilsson/.FreeCAD/Mod/A2plus/InitGui.py                                                                                                                        
Please look into the log file for further information                                                                                                
Wizard shaft module cannot be loaded                                                                                                                 
/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv                                                              
connect failed: No such file or directory      
```

Looks like we'll have to update or patch freecad
```console
In file included from /usr/include/opencascade/Extrema_POnSurf.lxx:15,
                 from /usr/include/opencascade/Extrema_POnSurf.hxx:75,
                 from /usr/include/opencascade/Extrema_ExtPElS.hxx:27,
                 from /usr/include/opencascade/Extrema_ExtPS.hxx:24,
                 from /usr/include/opencascade/ShapeAnalysis_Surface.hxx:20,
                 from ../src/3rdParty/salomesmesh/inc/SMESH_MesherHelper.hxx:37,
                 from ../src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp:34:
/usr/include/opencascade/Precision.hxx:98:7: note: previous definition of 'class Precision'
   98 | class Precision
      |       ^~~~~~~~~

```

ping @Piraty 

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-occt_7.6-36356.patch --]
[-- Type: text/x-diff, Size: 17201 bytes --]

From dcfe834d428aefed1e66f7009e97af2c1bf06041 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 20:24:49 -0400
Subject: [PATCH 1/3] python3-occ: remove package

* upstream is well behind occt
---
 srcpkgs/python3-occ/patches/python3.10.patch | 15 ---------------
 srcpkgs/python3-occ/template                 | 17 -----------------
 srcpkgs/removed-packages/template            |  1 +
 3 files changed, 1 insertion(+), 32 deletions(-)
 delete mode 100644 srcpkgs/python3-occ/patches/python3.10.patch
 delete mode 100644 srcpkgs/python3-occ/template

diff --git a/srcpkgs/python3-occ/patches/python3.10.patch b/srcpkgs/python3-occ/patches/python3.10.patch
deleted file mode 100644
index e192608fd3b3..000000000000
--- a/srcpkgs/python3-occ/patches/python3.10.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/src/Display/SimpleGui.py b/src/Display/SimpleGui.py
-index 42705a82..6a274c16 100644
---- a/src/Display/SimpleGui.py
-+++ b/src/Display/SimpleGui.py
-@@ -161,8 +161,8 @@ def init_display(backend_str: Optional[str]=None,
-             def centerOnScreen(self) -> None:
-                 '''Centers the window on the screen.'''
-                 resolution = QtWidgets.QApplication.desktop().screenGeometry()
--                x = (resolution.width() - self.frameSize().width()) / 2
--                y = (resolution.height() - self.frameSize().height()) / 2
-+                x = (resolution.width() - self.frameSize().width()) // 2
-+                y = (resolution.height() - self.frameSize().height()) // 2
-                 self.move(x, y)
- 
-             def add_menu(self, menu_name: str) -> None:
diff --git a/srcpkgs/python3-occ/template b/srcpkgs/python3-occ/template
deleted file mode 100644
index bee03373a3d1..000000000000
--- a/srcpkgs/python3-occ/template
+++ /dev/null
@@ -1,17 +0,0 @@
-# Template file for 'python3-occ'
-pkgname=python3-occ
-version=7.4.1
-revision=3
-archs="i686* x86_64* armv7l* aarch64* ppc*"
-wrksrc="pythonocc-core-${version}"
-build_style=cmake
-configure_args="-DPYTHONOCC_BUILD_TYPE=None -DCMAKE_BUILD_TYPE=None"
-hostmakedepends="python3 swig"
-makedepends="python3-devel occt-devel freetype-devel swig"
-depends="python3 occt freetype"
-short_desc="Industrial strength 3D CAD Python3 package"
-maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
-license="LGPL-3.0-or-later"
-homepage="http://pythonocc.org"
-distfiles="https://github.com/tpaviot/pythonocc-core/archive/${version}.tar.gz"
-checksum=6d62002244a0e7f4e5c1ad590d332a60601c44b2501ad017361443b54371e667
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 8456cb959d35..488e62ec105a 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -343,6 +343,7 @@ replaces="
  python3-keepalive<=0.5_6
  python3-pgpdump<=1.5_10
  python3-lockfile<=0.12.2_7
+ python3-occ<=7.4.1_3
  python3-pyPEG2<=2.15.2_7
  python3-pyenet<=5.15.0_2
  python3-pyside-phonon<=5.15.0_2

From e88702808294445d157bef3697c9a6a75b27c6c1 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 19:29:00 -0400
Subject: [PATCH 2/3] occt: update to 7.6.2.

---
 .../occt/patches/cmake-build-type-none.patch  |  6 +--
 srcpkgs/occt/patches/musl-fenv.patch          | 18 ++++----
 srcpkgs/occt/patches/musl-mallinfo.patch      | 45 ++++++++++++++-----
 srcpkgs/occt/template                         | 27 +++++------
 srcpkgs/occt/update                           |  2 -
 5 files changed, 60 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/occt/update

diff --git a/srcpkgs/occt/patches/cmake-build-type-none.patch b/srcpkgs/occt/patches/cmake-build-type-none.patch
index ecb0e3da3929..d2caec8c4e87 100644
--- a/srcpkgs/occt/patches/cmake-build-type-none.patch
+++ b/srcpkgs/occt/patches/cmake-build-type-none.patch
@@ -1,8 +1,8 @@
-Index: CMakeLists.txt
-===================================================================
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f4ec871f5..9b0644e94 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_D
+@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
  
  set (CMAKE_SUPPRESS_REGENERATION TRUE)
  
diff --git a/srcpkgs/occt/patches/musl-fenv.patch b/srcpkgs/occt/patches/musl-fenv.patch
index 09da8d0afeae..06a8e3a89cfd 100644
--- a/srcpkgs/occt/patches/musl-fenv.patch
+++ b/srcpkgs/occt/patches/musl-fenv.patch
@@ -5,18 +5,20 @@ is probably wrong, but I don't have a replacement for the
 non-posix functions fegetexcept(3) and feenableexcept(3).
 """
 
+diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx
+index 007f5ccaa..fe39e07ac 100644
 --- a/src/OSD/OSD_signal.cxx
 +++ b/src/OSD/OSD_signal.cxx
-@@ -703,7 +703,7 @@
- 
+@@ -761,7 +761,7 @@ typedef void (* SIG_PFV) (int);
+
  #include <signal.h>
- 
--#if !defined(__ANDROID__) && !defined(__QNX__)
-+#if !defined(__ANDROID__) && !defined(__QNX__) && defined(__GLIBC__)
+
+-#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
++#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && defined(__GLIBC__)
    #include <sys/signal.h>
  #endif
- 
-@@ -914,7 +914,7 @@
+
+@@ -977,7 +977,7 @@ static void SegvHandler(const int theSignal,
  //=======================================================================
  void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  {
@@ -25,7 +27,7 @@ non-posix functions fegetexcept(3) and feenableexcept(3).
    feclearexcept (FE_ALL_EXCEPT);
    if (theFloatingSignal)
    {
-@@ -947,7 +947,7 @@
+@@ -1010,7 +1010,7 @@ void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  //=======================================================================
  Standard_Boolean OSD::ToCatchFloatingSignals()
  {
diff --git a/srcpkgs/occt/patches/musl-mallinfo.patch b/srcpkgs/occt/patches/musl-mallinfo.patch
index 4e5825bf1cb0..6ae94992eaf8 100644
--- a/srcpkgs/occt/patches/musl-mallinfo.patch
+++ b/srcpkgs/occt/patches/musl-mallinfo.patch
@@ -1,17 +1,38 @@
-In musl libc there is no struct mallinfo and no function mallinf()
+Adapted from alpine's patch
 
+diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx
+index d9bb91398..d608e04fc 100644
 --- a/src/OSD/OSD_MemInfo.cxx
 +++ b/src/OSD/OSD_MemInfo.cxx
-@@ -147,8 +147,12 @@
-   }
-   aFile.close();
+@@ -35,6 +35,9 @@
+ #include <sstream>
+ #include <fstream>
+ 
++#include <sys/time.h>
++#include <sys/resource.h>
++
+ #include <OSD_MemInfo.hxx>
  
-+  #if defined(__GLIBC__)
-   struct mallinfo aMI = mallinfo();
-   myCounters[MemHeapUsage] = aMI.uordblks;
-+  #else /* XXX not yet coded */
-+  myCounters[MemHeapUsage] = 0;
-+  #endif
+ #if defined(__EMSCRIPTEN__)
+@@ -182,18 +185,9 @@ void OSD_MemInfo::Update()
+ #elif (defined(__linux__) || defined(__linux))
+   if (IsActive (MemHeapUsage))
+   {
+-  #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+-    #if __GLIBC_PREREQ(2,33)
+-      #define HAS_MALLINFO2
+-    #endif
+-  #endif
+-
+-  #ifdef HAS_MALLINFO2
+-    const struct mallinfo2 aMI = mallinfo2();
+-  #else
+-    const struct mallinfo aMI = mallinfo();
+-  #endif
+-    myCounters[MemHeapUsage] = aMI.uordblks;
++    struct rusage ru = { .ru_maxrss = 0 };
++    getrusage(RUSAGE_SELF, &ru);
++    myCounters[MemHeapUsage] = ru.ru_maxrss;
+   }
  
- #elif (defined(__APPLE__))
-   struct task_basic_info aTaskInfo;
+   if (!IsActive (MemVirtual)
diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template
index 6624fea8b53f..b17c91b0058b 100644
--- a/srcpkgs/occt/template
+++ b/srcpkgs/occt/template
@@ -1,26 +1,27 @@
 # Template file for 'occt'
 pkgname=occt
-reverts=7.5.0_1
-version=7.4.0p1
-revision=5
-_gittag="V${version//./_}"
-wrksrc=occt-${_gittag}
+version=7.6.2
+revision=1
+_ver="${version//./_}"
+wrksrc=OCCT-${_ver}
 build_style=cmake
-# XXX: re-enable -DUSE_TBB=ON if possible when updating
-configure_args="-DUSE_FREEIMAGE=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
+configure_args="-DUSE_FREEIMAGE=ON -DUSE_TBB=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
  -DINSTALL_SAMPLES=ON"
-makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tcl-devel
- tk-devel"
+makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tbb-devel
+ tcl-devel tk-devel"
 short_desc="OpenCASCADE Technology - library for CAD/CAM/CAE applications"
 maintainer="Piraty <piraty1@inbox.ru>"
 license="custom:LGPL-2.1-only-with-exceptions"
 homepage="https://www.opencascade.com"
-# distfile: use git instead of official tarball, which requires registration
-# see https://www.opencascade.com/content/packaging-again-debian
-distfiles="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_gittag};sf=tgz>occt-${_gittag}.tar.gz"
-checksum=e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0
+distfiles="https://github.com/Open-Cascade-SAS/OCCT/archive/V${_ver}.tar.gz"
+checksum=dea04077d71507c666aaa7ccaeacc73ab580d6572d7f75e90a1984c4c0302a7a
 conflicts="oce>=0"
 
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" libexecinfo-devel"
+	LDFLAGS="-lexecinfo"
+fi
+
 post_install() {
 	rm ${PKGDESTDIR}/usr/share/doc/opencascade/*_LGPL_*.txt
 	vlicense OCCT_LGPL_EXCEPTION.txt
diff --git a/srcpkgs/occt/update b/srcpkgs/occt/update
deleted file mode 100644
index c128eec6d9c9..000000000000
--- a/srcpkgs/occt/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=tags"
-pattern=">V\K[\d_p]+(?=</a>)"

From 16680526a5c3d20464ff4b56ed1adfe926245f9c Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 26 Mar 2022 11:25:11 -0400
Subject: [PATCH 3/3] freecad: update to 0.20.0.

---
 srcpkgs/freecad/patches/050-occt76.patch | 140 +++++++++++++++++++++++
 srcpkgs/freecad/template                 |   8 +-
 2 files changed, 145 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/freecad/patches/050-occt76.patch

diff --git a/srcpkgs/freecad/patches/050-occt76.patch b/srcpkgs/freecad/patches/050-occt76.patch
new file mode 100644
index 000000000000..7865a59bceef
--- /dev/null
+++ b/srcpkgs/freecad/patches/050-occt76.patch
@@ -0,0 +1,140 @@
+From 6f3b00d67ec0bd0072b7b493e2a38d2a2e3af27d Mon Sep 17 00:00:00 2001
+From: wmayer <wmayer@users.sourceforge.net>
+Date: Mon, 11 Oct 2021 00:30:22 +0200
+Subject: [PATCH] SMESH: port to OCCT 7.6
+
+---
+ .../src/NETGENPlugin/NETGENPlugin_Mesher.cpp       |  7 +++++++
+ .../salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp      |  7 +++++--
+ .../src/StdMeshers/StdMeshers_Adaptive1D.cpp       | 14 ++++++++++++++
+ .../src/StdMeshers/StdMeshers_Quadrangle_2D.cpp    |  2 +-
+ .../src/StdMeshers/StdMeshers_ViscousLayers.cpp    |  8 ++++++++
+ 5 files changed, 35 insertions(+), 3 deletions(-)
+
+diff --git a/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp b/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp
+index cd6f0b2b0758..ea83984b9768 100644
+--- a/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp
++++ b/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp
+@@ -56,6 +56,7 @@
+ #include <NCollection_Map.hxx>
+ #include <Standard_ErrorHandler.hxx>
+ #include <Standard_ProgramError.hxx>
++#include <Standard_Version.hxx>
+ #include <TColStd_MapOfInteger.hxx>
+ #include <TopExp.hxx>
+ #include <TopExp_Explorer.hxx>
+@@ -700,7 +701,13 @@ double NETGENPlugin_Mesher::GetDefaultMinSize(const TopoDS_Shape& geom,
+       BRep_Tool::Triangulation ( TopoDS::Face( fExp.Current() ), loc);
+     if ( triangulation.IsNull() ) continue;
+     const double fTol = BRep_Tool::Tolerance( TopoDS::Face( fExp.Current() ));
++#if OCC_VERSION_HEX < 0x070600
+     const TColgp_Array1OfPnt&   points = triangulation->Nodes();
++#else
++    auto points = [&triangulation](Standard_Integer index) {
++        return triangulation->Node(index);
++    };
++#endif
+     const Poly_Array1OfTriangle& trias = triangulation->Triangles();
+     for ( int iT = trias.Lower(); iT <= trias.Upper(); ++iT )
+     {
+diff --git a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
+index 5a07308310ea..fbb1b250087f 100644
+--- a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
++++ b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
+@@ -38,10 +38,13 @@
+ #include <GC_MakeSegment.hxx>
+ #include <GeomAPI_ExtremaCurveCurve.hxx>
+ #include <Geom_Line.hxx>
+-#include <IntAna_IntConicQuad.hxx>
+-#include <IntAna_Quadric.hxx>
++#include <gp_Cone.hxx>
++#include <gp_Cylinder.hxx>
+ #include <gp_Lin.hxx>
+ #include <gp_Pln.hxx>
++#include <gp_Sphere.hxx>
++#include <IntAna_IntConicQuad.hxx>
++#include <IntAna_Quadric.hxx>
+ 
+ #include <limits>
+ #include <numeric>
+diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp
+index 88970f36b557..7c51601c7bbe 100644
+--- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp
++++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp
+@@ -46,6 +46,7 @@
+ #include <Poly_Array1OfTriangle.hxx>
+ #include <Poly_PolygonOnTriangulation.hxx>
+ #include <Poly_Triangulation.hxx>
++#include <Standard_Version.hxx>
+ #include <TColgp_Array1OfPnt.hxx>
+ #include <TopExp.hxx>
+ #include <TopExp_Explorer.hxx>
+@@ -318,13 +319,26 @@ namespace // internal utils
+     {
+       myFaceTol         = SMESH_MesherHelper::MaxTolerance( face );
+       myTree            = triaTree;
++#if OCC_VERSION_HEX < 0x070600
+       myNodes           = & tr->Nodes();
++#else
++      TColgp_Array1OfPnt* trNodes = new TColgp_Array1OfPnt( 1, tr->NbNodes() );
++      for (Standard_Integer i = myNodes->Lower(); i <= myNodes->Upper(); i++)
++      {
++        trNodes->SetValue(i, tr->Node(i));
++      }
++      myNodes = trNodes;
++      myOwnNodes = true;
++#endif
+       myPolyTrias       = & tr->Triangles();
+       myTriasDeflection = tr->Deflection();
+       if ( !loc.IsIdentity() ) // transform nodes if necessary
+       {
+         TColgp_Array1OfPnt* trsfNodes = new TColgp_Array1OfPnt( myNodes->Lower(), myNodes->Upper() );
+         trsfNodes->Assign( *myNodes );
++#if OCC_VERSION_HEX >= 0x070600
++        delete myNodes; // it's already a copy
++#endif
+         myNodes    = trsfNodes;
+         myOwnNodes = true;
+         const gp_Trsf& trsf = loc;
+diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp
+index f7ac411d9a55..5d5c15c36612 100644
+--- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp
++++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp
+@@ -50,7 +50,7 @@
+ #include <Geom_Surface.hxx>
+ #include <NCollection_DefineArray2.hxx>
+ #include <Precision.hxx>
+-#include <Quantity_Parameter.hxx>
++#include <Standard_Real.hxx>
+ #include <TColStd_SequenceOfInteger.hxx>
+ #include <TColStd_SequenceOfReal.hxx>
+ #include <TColgp_SequenceOfXY.hxx>
+diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp
+index 8ee0e2683259..e9f46183059e 100644
+--- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp
++++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp
+@@ -44,7 +44,10 @@
+ #include "SMESH_subMeshEventListener.hxx"
+ #include "StdMeshers_FaceSide.hxx"
+ 
++#include <Standard_Version.hxx>
++#if OCC_VERSION_HEX < 0x070600
+ #include <Adaptor3d_HSurface.hxx>
++#endif
+ #include <BRepAdaptor_Curve2d.hxx>
+ #include <BRepAdaptor_Surface.hxx>
+ #include <BRepLProp_SLProps.hxx>
+@@ -1340,8 +1343,13 @@ namespace VISCOUS_3D
+     //case GeomAbs_SurfaceOfExtrusion:
+     case GeomAbs_OffsetSurface:
+     {
++#if OCC_VERSION_HEX < 0x070600
+       Handle(Adaptor3d_HSurface) base = surface.BasisSurface();
+       return getRovolutionAxis( base->Surface(), axis );
++#else
++      Handle(Adaptor3d_Surface) base = surface.BasisSurface();
++      return getRovolutionAxis( *base, axis );
++#endif
+     }
+     default: return false;
+     }
diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template
index 1e2aec024fd7..52dc8857c7bf 100644
--- a/srcpkgs/freecad/template
+++ b/srcpkgs/freecad/template
@@ -1,10 +1,12 @@
 # Template file for 'freecad'
 pkgname=freecad
-version=0.19.4
+version=0.20.0
 revision=1
 wrksrc="FreeCAD-${version}"
 build_style=cmake
 
+distfile_fixup=0.20
+
 _inst_prefix=/usr/lib/${pkgname}
 configure_args="
  -DPYTHON_EXECUTABLE=/usr/bin/python3
@@ -35,8 +37,8 @@ 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=e40a1c343956e13c56cc8578d025ae83d68d9d20acda1732953bc8a3883e9722
+distfiles="https://github.com/FreeCAD/FreeCAD/archive/${distfile_fixup}.tar.gz"
+checksum=c4d9ce782d3da0edfa16d6218db4ce8613e346124ee47b3fe6a6dae40c0a61d9
 
 if [ "$XBPS_TARGET_LIBC" = musl ]; then
 	makedepends+=" libexecinfo-devel"

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

* Re: [PR PATCH] [Updated] [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (10 preceding siblings ...)
  2022-07-24  1:21 ` [PR PATCH] [Updated] " karl-nilsson
@ 2022-07-24  1:40 ` karl-nilsson
  2022-07-24  3:02 ` karl-nilsson
                   ` (29 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: karl-nilsson @ 2022-07-24  1:40 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by karl-nilsson against master on the void-packages repository

https://github.com/karl-nilsson/void-packages occt_7.6
https://github.com/void-linux/void-packages/pull/36356

[WIP] occt: update to 7.6.2


#### Testing the changes
- I tested the changes in this PR: **briefly**


#### Local build testing
- I built this PR locally for my native architecture, x64-glibc


Like previously, broken ABI
```console
During initialization the error "/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv" occurred in /home/nilsson/.FreeCAD/Mod/A2plus/InitGui.py                                                                                                                        
Please look into the log file for further information                                                                                                
Wizard shaft module cannot be loaded                                                                                                                 
/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv                                                              
connect failed: No such file or directory      
```

Looks like we'll have to update or patch freecad
```console
In file included from /usr/include/opencascade/Extrema_POnSurf.lxx:15,
                 from /usr/include/opencascade/Extrema_POnSurf.hxx:75,
                 from /usr/include/opencascade/Extrema_ExtPElS.hxx:27,
                 from /usr/include/opencascade/Extrema_ExtPS.hxx:24,
                 from /usr/include/opencascade/ShapeAnalysis_Surface.hxx:20,
                 from ../src/3rdParty/salomesmesh/inc/SMESH_MesherHelper.hxx:37,
                 from ../src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp:34:
/usr/include/opencascade/Precision.hxx:98:7: note: previous definition of 'class Precision'
   98 | class Precision
      |       ^~~~~~~~~

```

ping @Piraty 

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-occt_7.6-36356.patch --]
[-- Type: text/x-diff, Size: 16955 bytes --]

From dcfe834d428aefed1e66f7009e97af2c1bf06041 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 20:24:49 -0400
Subject: [PATCH 1/3] python3-occ: remove package

* upstream is well behind occt
---
 srcpkgs/python3-occ/patches/python3.10.patch | 15 ---------------
 srcpkgs/python3-occ/template                 | 17 -----------------
 srcpkgs/removed-packages/template            |  1 +
 3 files changed, 1 insertion(+), 32 deletions(-)
 delete mode 100644 srcpkgs/python3-occ/patches/python3.10.patch
 delete mode 100644 srcpkgs/python3-occ/template

diff --git a/srcpkgs/python3-occ/patches/python3.10.patch b/srcpkgs/python3-occ/patches/python3.10.patch
deleted file mode 100644
index e192608fd3b3..000000000000
--- a/srcpkgs/python3-occ/patches/python3.10.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/src/Display/SimpleGui.py b/src/Display/SimpleGui.py
-index 42705a82..6a274c16 100644
---- a/src/Display/SimpleGui.py
-+++ b/src/Display/SimpleGui.py
-@@ -161,8 +161,8 @@ def init_display(backend_str: Optional[str]=None,
-             def centerOnScreen(self) -> None:
-                 '''Centers the window on the screen.'''
-                 resolution = QtWidgets.QApplication.desktop().screenGeometry()
--                x = (resolution.width() - self.frameSize().width()) / 2
--                y = (resolution.height() - self.frameSize().height()) / 2
-+                x = (resolution.width() - self.frameSize().width()) // 2
-+                y = (resolution.height() - self.frameSize().height()) // 2
-                 self.move(x, y)
- 
-             def add_menu(self, menu_name: str) -> None:
diff --git a/srcpkgs/python3-occ/template b/srcpkgs/python3-occ/template
deleted file mode 100644
index bee03373a3d1..000000000000
--- a/srcpkgs/python3-occ/template
+++ /dev/null
@@ -1,17 +0,0 @@
-# Template file for 'python3-occ'
-pkgname=python3-occ
-version=7.4.1
-revision=3
-archs="i686* x86_64* armv7l* aarch64* ppc*"
-wrksrc="pythonocc-core-${version}"
-build_style=cmake
-configure_args="-DPYTHONOCC_BUILD_TYPE=None -DCMAKE_BUILD_TYPE=None"
-hostmakedepends="python3 swig"
-makedepends="python3-devel occt-devel freetype-devel swig"
-depends="python3 occt freetype"
-short_desc="Industrial strength 3D CAD Python3 package"
-maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
-license="LGPL-3.0-or-later"
-homepage="http://pythonocc.org"
-distfiles="https://github.com/tpaviot/pythonocc-core/archive/${version}.tar.gz"
-checksum=6d62002244a0e7f4e5c1ad590d332a60601c44b2501ad017361443b54371e667
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 8456cb959d35..488e62ec105a 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -343,6 +343,7 @@ replaces="
  python3-keepalive<=0.5_6
  python3-pgpdump<=1.5_10
  python3-lockfile<=0.12.2_7
+ python3-occ<=7.4.1_3
  python3-pyPEG2<=2.15.2_7
  python3-pyenet<=5.15.0_2
  python3-pyside-phonon<=5.15.0_2

From e88702808294445d157bef3697c9a6a75b27c6c1 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 19:29:00 -0400
Subject: [PATCH 2/3] occt: update to 7.6.2.

---
 .../occt/patches/cmake-build-type-none.patch  |  6 +--
 srcpkgs/occt/patches/musl-fenv.patch          | 18 ++++----
 srcpkgs/occt/patches/musl-mallinfo.patch      | 45 ++++++++++++++-----
 srcpkgs/occt/template                         | 27 +++++------
 srcpkgs/occt/update                           |  2 -
 5 files changed, 60 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/occt/update

diff --git a/srcpkgs/occt/patches/cmake-build-type-none.patch b/srcpkgs/occt/patches/cmake-build-type-none.patch
index ecb0e3da3929..d2caec8c4e87 100644
--- a/srcpkgs/occt/patches/cmake-build-type-none.patch
+++ b/srcpkgs/occt/patches/cmake-build-type-none.patch
@@ -1,8 +1,8 @@
-Index: CMakeLists.txt
-===================================================================
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f4ec871f5..9b0644e94 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_D
+@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
  
  set (CMAKE_SUPPRESS_REGENERATION TRUE)
  
diff --git a/srcpkgs/occt/patches/musl-fenv.patch b/srcpkgs/occt/patches/musl-fenv.patch
index 09da8d0afeae..06a8e3a89cfd 100644
--- a/srcpkgs/occt/patches/musl-fenv.patch
+++ b/srcpkgs/occt/patches/musl-fenv.patch
@@ -5,18 +5,20 @@ is probably wrong, but I don't have a replacement for the
 non-posix functions fegetexcept(3) and feenableexcept(3).
 """
 
+diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx
+index 007f5ccaa..fe39e07ac 100644
 --- a/src/OSD/OSD_signal.cxx
 +++ b/src/OSD/OSD_signal.cxx
-@@ -703,7 +703,7 @@
- 
+@@ -761,7 +761,7 @@ typedef void (* SIG_PFV) (int);
+
  #include <signal.h>
- 
--#if !defined(__ANDROID__) && !defined(__QNX__)
-+#if !defined(__ANDROID__) && !defined(__QNX__) && defined(__GLIBC__)
+
+-#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
++#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && defined(__GLIBC__)
    #include <sys/signal.h>
  #endif
- 
-@@ -914,7 +914,7 @@
+
+@@ -977,7 +977,7 @@ static void SegvHandler(const int theSignal,
  //=======================================================================
  void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  {
@@ -25,7 +27,7 @@ non-posix functions fegetexcept(3) and feenableexcept(3).
    feclearexcept (FE_ALL_EXCEPT);
    if (theFloatingSignal)
    {
-@@ -947,7 +947,7 @@
+@@ -1010,7 +1010,7 @@ void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  //=======================================================================
  Standard_Boolean OSD::ToCatchFloatingSignals()
  {
diff --git a/srcpkgs/occt/patches/musl-mallinfo.patch b/srcpkgs/occt/patches/musl-mallinfo.patch
index 4e5825bf1cb0..6ae94992eaf8 100644
--- a/srcpkgs/occt/patches/musl-mallinfo.patch
+++ b/srcpkgs/occt/patches/musl-mallinfo.patch
@@ -1,17 +1,38 @@
-In musl libc there is no struct mallinfo and no function mallinf()
+Adapted from alpine's patch
 
+diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx
+index d9bb91398..d608e04fc 100644
 --- a/src/OSD/OSD_MemInfo.cxx
 +++ b/src/OSD/OSD_MemInfo.cxx
-@@ -147,8 +147,12 @@
-   }
-   aFile.close();
+@@ -35,6 +35,9 @@
+ #include <sstream>
+ #include <fstream>
+ 
++#include <sys/time.h>
++#include <sys/resource.h>
++
+ #include <OSD_MemInfo.hxx>
  
-+  #if defined(__GLIBC__)
-   struct mallinfo aMI = mallinfo();
-   myCounters[MemHeapUsage] = aMI.uordblks;
-+  #else /* XXX not yet coded */
-+  myCounters[MemHeapUsage] = 0;
-+  #endif
+ #if defined(__EMSCRIPTEN__)
+@@ -182,18 +185,9 @@ void OSD_MemInfo::Update()
+ #elif (defined(__linux__) || defined(__linux))
+   if (IsActive (MemHeapUsage))
+   {
+-  #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+-    #if __GLIBC_PREREQ(2,33)
+-      #define HAS_MALLINFO2
+-    #endif
+-  #endif
+-
+-  #ifdef HAS_MALLINFO2
+-    const struct mallinfo2 aMI = mallinfo2();
+-  #else
+-    const struct mallinfo aMI = mallinfo();
+-  #endif
+-    myCounters[MemHeapUsage] = aMI.uordblks;
++    struct rusage ru = { .ru_maxrss = 0 };
++    getrusage(RUSAGE_SELF, &ru);
++    myCounters[MemHeapUsage] = ru.ru_maxrss;
+   }
  
- #elif (defined(__APPLE__))
-   struct task_basic_info aTaskInfo;
+   if (!IsActive (MemVirtual)
diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template
index 6624fea8b53f..b17c91b0058b 100644
--- a/srcpkgs/occt/template
+++ b/srcpkgs/occt/template
@@ -1,26 +1,27 @@
 # Template file for 'occt'
 pkgname=occt
-reverts=7.5.0_1
-version=7.4.0p1
-revision=5
-_gittag="V${version//./_}"
-wrksrc=occt-${_gittag}
+version=7.6.2
+revision=1
+_ver="${version//./_}"
+wrksrc=OCCT-${_ver}
 build_style=cmake
-# XXX: re-enable -DUSE_TBB=ON if possible when updating
-configure_args="-DUSE_FREEIMAGE=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
+configure_args="-DUSE_FREEIMAGE=ON -DUSE_TBB=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
  -DINSTALL_SAMPLES=ON"
-makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tcl-devel
- tk-devel"
+makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tbb-devel
+ tcl-devel tk-devel"
 short_desc="OpenCASCADE Technology - library for CAD/CAM/CAE applications"
 maintainer="Piraty <piraty1@inbox.ru>"
 license="custom:LGPL-2.1-only-with-exceptions"
 homepage="https://www.opencascade.com"
-# distfile: use git instead of official tarball, which requires registration
-# see https://www.opencascade.com/content/packaging-again-debian
-distfiles="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_gittag};sf=tgz>occt-${_gittag}.tar.gz"
-checksum=e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0
+distfiles="https://github.com/Open-Cascade-SAS/OCCT/archive/V${_ver}.tar.gz"
+checksum=dea04077d71507c666aaa7ccaeacc73ab580d6572d7f75e90a1984c4c0302a7a
 conflicts="oce>=0"
 
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" libexecinfo-devel"
+	LDFLAGS="-lexecinfo"
+fi
+
 post_install() {
 	rm ${PKGDESTDIR}/usr/share/doc/opencascade/*_LGPL_*.txt
 	vlicense OCCT_LGPL_EXCEPTION.txt
diff --git a/srcpkgs/occt/update b/srcpkgs/occt/update
deleted file mode 100644
index c128eec6d9c9..000000000000
--- a/srcpkgs/occt/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=tags"
-pattern=">V\K[\d_p]+(?=</a>)"

From 69c0d490db006141437bcd2c552009b89d1a4c1a Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 26 Mar 2022 11:25:11 -0400
Subject: [PATCH 3/3] freecad: update to 0.20.0.

---
 srcpkgs/freecad/patches/050-occt76.patch | 140 +++++++++++++++++++++++
 srcpkgs/freecad/template                 |   4 +-
 2 files changed, 142 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/freecad/patches/050-occt76.patch

diff --git a/srcpkgs/freecad/patches/050-occt76.patch b/srcpkgs/freecad/patches/050-occt76.patch
new file mode 100644
index 000000000000..7865a59bceef
--- /dev/null
+++ b/srcpkgs/freecad/patches/050-occt76.patch
@@ -0,0 +1,140 @@
+From 6f3b00d67ec0bd0072b7b493e2a38d2a2e3af27d Mon Sep 17 00:00:00 2001
+From: wmayer <wmayer@users.sourceforge.net>
+Date: Mon, 11 Oct 2021 00:30:22 +0200
+Subject: [PATCH] SMESH: port to OCCT 7.6
+
+---
+ .../src/NETGENPlugin/NETGENPlugin_Mesher.cpp       |  7 +++++++
+ .../salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp      |  7 +++++--
+ .../src/StdMeshers/StdMeshers_Adaptive1D.cpp       | 14 ++++++++++++++
+ .../src/StdMeshers/StdMeshers_Quadrangle_2D.cpp    |  2 +-
+ .../src/StdMeshers/StdMeshers_ViscousLayers.cpp    |  8 ++++++++
+ 5 files changed, 35 insertions(+), 3 deletions(-)
+
+diff --git a/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp b/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp
+index cd6f0b2b0758..ea83984b9768 100644
+--- a/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp
++++ b/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp
+@@ -56,6 +56,7 @@
+ #include <NCollection_Map.hxx>
+ #include <Standard_ErrorHandler.hxx>
+ #include <Standard_ProgramError.hxx>
++#include <Standard_Version.hxx>
+ #include <TColStd_MapOfInteger.hxx>
+ #include <TopExp.hxx>
+ #include <TopExp_Explorer.hxx>
+@@ -700,7 +701,13 @@ double NETGENPlugin_Mesher::GetDefaultMinSize(const TopoDS_Shape& geom,
+       BRep_Tool::Triangulation ( TopoDS::Face( fExp.Current() ), loc);
+     if ( triangulation.IsNull() ) continue;
+     const double fTol = BRep_Tool::Tolerance( TopoDS::Face( fExp.Current() ));
++#if OCC_VERSION_HEX < 0x070600
+     const TColgp_Array1OfPnt&   points = triangulation->Nodes();
++#else
++    auto points = [&triangulation](Standard_Integer index) {
++        return triangulation->Node(index);
++    };
++#endif
+     const Poly_Array1OfTriangle& trias = triangulation->Triangles();
+     for ( int iT = trias.Lower(); iT <= trias.Upper(); ++iT )
+     {
+diff --git a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
+index 5a07308310ea..fbb1b250087f 100644
+--- a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
++++ b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
+@@ -38,10 +38,13 @@
+ #include <GC_MakeSegment.hxx>
+ #include <GeomAPI_ExtremaCurveCurve.hxx>
+ #include <Geom_Line.hxx>
+-#include <IntAna_IntConicQuad.hxx>
+-#include <IntAna_Quadric.hxx>
++#include <gp_Cone.hxx>
++#include <gp_Cylinder.hxx>
+ #include <gp_Lin.hxx>
+ #include <gp_Pln.hxx>
++#include <gp_Sphere.hxx>
++#include <IntAna_IntConicQuad.hxx>
++#include <IntAna_Quadric.hxx>
+ 
+ #include <limits>
+ #include <numeric>
+diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp
+index 88970f36b557..7c51601c7bbe 100644
+--- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp
++++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp
+@@ -46,6 +46,7 @@
+ #include <Poly_Array1OfTriangle.hxx>
+ #include <Poly_PolygonOnTriangulation.hxx>
+ #include <Poly_Triangulation.hxx>
++#include <Standard_Version.hxx>
+ #include <TColgp_Array1OfPnt.hxx>
+ #include <TopExp.hxx>
+ #include <TopExp_Explorer.hxx>
+@@ -318,13 +319,26 @@ namespace // internal utils
+     {
+       myFaceTol         = SMESH_MesherHelper::MaxTolerance( face );
+       myTree            = triaTree;
++#if OCC_VERSION_HEX < 0x070600
+       myNodes           = & tr->Nodes();
++#else
++      TColgp_Array1OfPnt* trNodes = new TColgp_Array1OfPnt( 1, tr->NbNodes() );
++      for (Standard_Integer i = myNodes->Lower(); i <= myNodes->Upper(); i++)
++      {
++        trNodes->SetValue(i, tr->Node(i));
++      }
++      myNodes = trNodes;
++      myOwnNodes = true;
++#endif
+       myPolyTrias       = & tr->Triangles();
+       myTriasDeflection = tr->Deflection();
+       if ( !loc.IsIdentity() ) // transform nodes if necessary
+       {
+         TColgp_Array1OfPnt* trsfNodes = new TColgp_Array1OfPnt( myNodes->Lower(), myNodes->Upper() );
+         trsfNodes->Assign( *myNodes );
++#if OCC_VERSION_HEX >= 0x070600
++        delete myNodes; // it's already a copy
++#endif
+         myNodes    = trsfNodes;
+         myOwnNodes = true;
+         const gp_Trsf& trsf = loc;
+diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp
+index f7ac411d9a55..5d5c15c36612 100644
+--- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp
++++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp
+@@ -50,7 +50,7 @@
+ #include <Geom_Surface.hxx>
+ #include <NCollection_DefineArray2.hxx>
+ #include <Precision.hxx>
+-#include <Quantity_Parameter.hxx>
++#include <Standard_Real.hxx>
+ #include <TColStd_SequenceOfInteger.hxx>
+ #include <TColStd_SequenceOfReal.hxx>
+ #include <TColgp_SequenceOfXY.hxx>
+diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp
+index 8ee0e2683259..e9f46183059e 100644
+--- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp
++++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp
+@@ -44,7 +44,10 @@
+ #include "SMESH_subMeshEventListener.hxx"
+ #include "StdMeshers_FaceSide.hxx"
+ 
++#include <Standard_Version.hxx>
++#if OCC_VERSION_HEX < 0x070600
+ #include <Adaptor3d_HSurface.hxx>
++#endif
+ #include <BRepAdaptor_Curve2d.hxx>
+ #include <BRepAdaptor_Surface.hxx>
+ #include <BRepLProp_SLProps.hxx>
+@@ -1340,8 +1343,13 @@ namespace VISCOUS_3D
+     //case GeomAbs_SurfaceOfExtrusion:
+     case GeomAbs_OffsetSurface:
+     {
++#if OCC_VERSION_HEX < 0x070600
+       Handle(Adaptor3d_HSurface) base = surface.BasisSurface();
+       return getRovolutionAxis( base->Surface(), axis );
++#else
++      Handle(Adaptor3d_Surface) base = surface.BasisSurface();
++      return getRovolutionAxis( *base, axis );
++#endif
+     }
+     default: return false;
+     }
diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template
index 1e2aec024fd7..c6587ae809ac 100644
--- a/srcpkgs/freecad/template
+++ b/srcpkgs/freecad/template
@@ -1,6 +1,6 @@
 # Template file for 'freecad'
 pkgname=freecad
-version=0.19.4
+version=0.20
 revision=1
 wrksrc="FreeCAD-${version}"
 build_style=cmake
@@ -36,7 +36,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=e40a1c343956e13c56cc8578d025ae83d68d9d20acda1732953bc8a3883e9722
+checksum=c4d9ce782d3da0edfa16d6218db4ce8613e346124ee47b3fe6a6dae40c0a61d9
 
 if [ "$XBPS_TARGET_LIBC" = musl ]; then
 	makedepends+=" libexecinfo-devel"

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

* Re: [PR PATCH] [Updated] [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (11 preceding siblings ...)
  2022-07-24  1:40 ` karl-nilsson
@ 2022-07-24  3:02 ` karl-nilsson
  2022-07-24  4:11 ` luzpaz
                   ` (28 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: karl-nilsson @ 2022-07-24  3:02 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by karl-nilsson against master on the void-packages repository

https://github.com/karl-nilsson/void-packages occt_7.6
https://github.com/void-linux/void-packages/pull/36356

[WIP] occt: update to 7.6.2


#### Testing the changes
- I tested the changes in this PR: **briefly**


#### Local build testing
- I built this PR locally for my native architecture, x64-glibc


Like previously, broken ABI
```console
During initialization the error "/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv" occurred in /home/nilsson/.FreeCAD/Mod/A2plus/InitGui.py                                                                                                                        
Please look into the log file for further information                                                                                                
Wizard shaft module cannot be loaded                                                                                                                 
/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv                                                              
connect failed: No such file or directory      
```

Looks like we'll have to update or patch freecad
```console
In file included from /usr/include/opencascade/Extrema_POnSurf.lxx:15,
                 from /usr/include/opencascade/Extrema_POnSurf.hxx:75,
                 from /usr/include/opencascade/Extrema_ExtPElS.hxx:27,
                 from /usr/include/opencascade/Extrema_ExtPS.hxx:24,
                 from /usr/include/opencascade/ShapeAnalysis_Surface.hxx:20,
                 from ../src/3rdParty/salomesmesh/inc/SMESH_MesherHelper.hxx:37,
                 from ../src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp:34:
/usr/include/opencascade/Precision.hxx:98:7: note: previous definition of 'class Precision'
   98 | class Precision
      |       ^~~~~~~~~

```

ping @Piraty 

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-occt_7.6-36356.patch --]
[-- Type: text/x-diff, Size: 19685 bytes --]

From dcfe834d428aefed1e66f7009e97af2c1bf06041 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 20:24:49 -0400
Subject: [PATCH 1/4] python3-occ: remove package

* upstream is well behind occt
---
 srcpkgs/python3-occ/patches/python3.10.patch | 15 ---------------
 srcpkgs/python3-occ/template                 | 17 -----------------
 srcpkgs/removed-packages/template            |  1 +
 3 files changed, 1 insertion(+), 32 deletions(-)
 delete mode 100644 srcpkgs/python3-occ/patches/python3.10.patch
 delete mode 100644 srcpkgs/python3-occ/template

diff --git a/srcpkgs/python3-occ/patches/python3.10.patch b/srcpkgs/python3-occ/patches/python3.10.patch
deleted file mode 100644
index e192608fd3b3..000000000000
--- a/srcpkgs/python3-occ/patches/python3.10.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/src/Display/SimpleGui.py b/src/Display/SimpleGui.py
-index 42705a82..6a274c16 100644
---- a/src/Display/SimpleGui.py
-+++ b/src/Display/SimpleGui.py
-@@ -161,8 +161,8 @@ def init_display(backend_str: Optional[str]=None,
-             def centerOnScreen(self) -> None:
-                 '''Centers the window on the screen.'''
-                 resolution = QtWidgets.QApplication.desktop().screenGeometry()
--                x = (resolution.width() - self.frameSize().width()) / 2
--                y = (resolution.height() - self.frameSize().height()) / 2
-+                x = (resolution.width() - self.frameSize().width()) // 2
-+                y = (resolution.height() - self.frameSize().height()) // 2
-                 self.move(x, y)
- 
-             def add_menu(self, menu_name: str) -> None:
diff --git a/srcpkgs/python3-occ/template b/srcpkgs/python3-occ/template
deleted file mode 100644
index bee03373a3d1..000000000000
--- a/srcpkgs/python3-occ/template
+++ /dev/null
@@ -1,17 +0,0 @@
-# Template file for 'python3-occ'
-pkgname=python3-occ
-version=7.4.1
-revision=3
-archs="i686* x86_64* armv7l* aarch64* ppc*"
-wrksrc="pythonocc-core-${version}"
-build_style=cmake
-configure_args="-DPYTHONOCC_BUILD_TYPE=None -DCMAKE_BUILD_TYPE=None"
-hostmakedepends="python3 swig"
-makedepends="python3-devel occt-devel freetype-devel swig"
-depends="python3 occt freetype"
-short_desc="Industrial strength 3D CAD Python3 package"
-maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
-license="LGPL-3.0-or-later"
-homepage="http://pythonocc.org"
-distfiles="https://github.com/tpaviot/pythonocc-core/archive/${version}.tar.gz"
-checksum=6d62002244a0e7f4e5c1ad590d332a60601c44b2501ad017361443b54371e667
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 8456cb959d35..488e62ec105a 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -343,6 +343,7 @@ replaces="
  python3-keepalive<=0.5_6
  python3-pgpdump<=1.5_10
  python3-lockfile<=0.12.2_7
+ python3-occ<=7.4.1_3
  python3-pyPEG2<=2.15.2_7
  python3-pyenet<=5.15.0_2
  python3-pyside-phonon<=5.15.0_2

From e88702808294445d157bef3697c9a6a75b27c6c1 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 19:29:00 -0400
Subject: [PATCH 2/4] occt: update to 7.6.2.

---
 .../occt/patches/cmake-build-type-none.patch  |  6 +--
 srcpkgs/occt/patches/musl-fenv.patch          | 18 ++++----
 srcpkgs/occt/patches/musl-mallinfo.patch      | 45 ++++++++++++++-----
 srcpkgs/occt/template                         | 27 +++++------
 srcpkgs/occt/update                           |  2 -
 5 files changed, 60 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/occt/update

diff --git a/srcpkgs/occt/patches/cmake-build-type-none.patch b/srcpkgs/occt/patches/cmake-build-type-none.patch
index ecb0e3da3929..d2caec8c4e87 100644
--- a/srcpkgs/occt/patches/cmake-build-type-none.patch
+++ b/srcpkgs/occt/patches/cmake-build-type-none.patch
@@ -1,8 +1,8 @@
-Index: CMakeLists.txt
-===================================================================
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f4ec871f5..9b0644e94 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_D
+@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
  
  set (CMAKE_SUPPRESS_REGENERATION TRUE)
  
diff --git a/srcpkgs/occt/patches/musl-fenv.patch b/srcpkgs/occt/patches/musl-fenv.patch
index 09da8d0afeae..06a8e3a89cfd 100644
--- a/srcpkgs/occt/patches/musl-fenv.patch
+++ b/srcpkgs/occt/patches/musl-fenv.patch
@@ -5,18 +5,20 @@ is probably wrong, but I don't have a replacement for the
 non-posix functions fegetexcept(3) and feenableexcept(3).
 """
 
+diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx
+index 007f5ccaa..fe39e07ac 100644
 --- a/src/OSD/OSD_signal.cxx
 +++ b/src/OSD/OSD_signal.cxx
-@@ -703,7 +703,7 @@
- 
+@@ -761,7 +761,7 @@ typedef void (* SIG_PFV) (int);
+
  #include <signal.h>
- 
--#if !defined(__ANDROID__) && !defined(__QNX__)
-+#if !defined(__ANDROID__) && !defined(__QNX__) && defined(__GLIBC__)
+
+-#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
++#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && defined(__GLIBC__)
    #include <sys/signal.h>
  #endif
- 
-@@ -914,7 +914,7 @@
+
+@@ -977,7 +977,7 @@ static void SegvHandler(const int theSignal,
  //=======================================================================
  void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  {
@@ -25,7 +27,7 @@ non-posix functions fegetexcept(3) and feenableexcept(3).
    feclearexcept (FE_ALL_EXCEPT);
    if (theFloatingSignal)
    {
-@@ -947,7 +947,7 @@
+@@ -1010,7 +1010,7 @@ void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  //=======================================================================
  Standard_Boolean OSD::ToCatchFloatingSignals()
  {
diff --git a/srcpkgs/occt/patches/musl-mallinfo.patch b/srcpkgs/occt/patches/musl-mallinfo.patch
index 4e5825bf1cb0..6ae94992eaf8 100644
--- a/srcpkgs/occt/patches/musl-mallinfo.patch
+++ b/srcpkgs/occt/patches/musl-mallinfo.patch
@@ -1,17 +1,38 @@
-In musl libc there is no struct mallinfo and no function mallinf()
+Adapted from alpine's patch
 
+diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx
+index d9bb91398..d608e04fc 100644
 --- a/src/OSD/OSD_MemInfo.cxx
 +++ b/src/OSD/OSD_MemInfo.cxx
-@@ -147,8 +147,12 @@
-   }
-   aFile.close();
+@@ -35,6 +35,9 @@
+ #include <sstream>
+ #include <fstream>
+ 
++#include <sys/time.h>
++#include <sys/resource.h>
++
+ #include <OSD_MemInfo.hxx>
  
-+  #if defined(__GLIBC__)
-   struct mallinfo aMI = mallinfo();
-   myCounters[MemHeapUsage] = aMI.uordblks;
-+  #else /* XXX not yet coded */
-+  myCounters[MemHeapUsage] = 0;
-+  #endif
+ #if defined(__EMSCRIPTEN__)
+@@ -182,18 +185,9 @@ void OSD_MemInfo::Update()
+ #elif (defined(__linux__) || defined(__linux))
+   if (IsActive (MemHeapUsage))
+   {
+-  #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+-    #if __GLIBC_PREREQ(2,33)
+-      #define HAS_MALLINFO2
+-    #endif
+-  #endif
+-
+-  #ifdef HAS_MALLINFO2
+-    const struct mallinfo2 aMI = mallinfo2();
+-  #else
+-    const struct mallinfo aMI = mallinfo();
+-  #endif
+-    myCounters[MemHeapUsage] = aMI.uordblks;
++    struct rusage ru = { .ru_maxrss = 0 };
++    getrusage(RUSAGE_SELF, &ru);
++    myCounters[MemHeapUsage] = ru.ru_maxrss;
+   }
  
- #elif (defined(__APPLE__))
-   struct task_basic_info aTaskInfo;
+   if (!IsActive (MemVirtual)
diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template
index 6624fea8b53f..b17c91b0058b 100644
--- a/srcpkgs/occt/template
+++ b/srcpkgs/occt/template
@@ -1,26 +1,27 @@
 # Template file for 'occt'
 pkgname=occt
-reverts=7.5.0_1
-version=7.4.0p1
-revision=5
-_gittag="V${version//./_}"
-wrksrc=occt-${_gittag}
+version=7.6.2
+revision=1
+_ver="${version//./_}"
+wrksrc=OCCT-${_ver}
 build_style=cmake
-# XXX: re-enable -DUSE_TBB=ON if possible when updating
-configure_args="-DUSE_FREEIMAGE=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
+configure_args="-DUSE_FREEIMAGE=ON -DUSE_TBB=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
  -DINSTALL_SAMPLES=ON"
-makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tcl-devel
- tk-devel"
+makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tbb-devel
+ tcl-devel tk-devel"
 short_desc="OpenCASCADE Technology - library for CAD/CAM/CAE applications"
 maintainer="Piraty <piraty1@inbox.ru>"
 license="custom:LGPL-2.1-only-with-exceptions"
 homepage="https://www.opencascade.com"
-# distfile: use git instead of official tarball, which requires registration
-# see https://www.opencascade.com/content/packaging-again-debian
-distfiles="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_gittag};sf=tgz>occt-${_gittag}.tar.gz"
-checksum=e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0
+distfiles="https://github.com/Open-Cascade-SAS/OCCT/archive/V${_ver}.tar.gz"
+checksum=dea04077d71507c666aaa7ccaeacc73ab580d6572d7f75e90a1984c4c0302a7a
 conflicts="oce>=0"
 
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" libexecinfo-devel"
+	LDFLAGS="-lexecinfo"
+fi
+
 post_install() {
 	rm ${PKGDESTDIR}/usr/share/doc/opencascade/*_LGPL_*.txt
 	vlicense OCCT_LGPL_EXCEPTION.txt
diff --git a/srcpkgs/occt/update b/srcpkgs/occt/update
deleted file mode 100644
index c128eec6d9c9..000000000000
--- a/srcpkgs/occt/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=tags"
-pattern=">V\K[\d_p]+(?=</a>)"

From 69c0d490db006141437bcd2c552009b89d1a4c1a Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 26 Mar 2022 11:25:11 -0400
Subject: [PATCH 3/4] freecad: update to 0.20.0.

---
 srcpkgs/freecad/patches/050-occt76.patch | 140 +++++++++++++++++++++++
 srcpkgs/freecad/template                 |   4 +-
 2 files changed, 142 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/freecad/patches/050-occt76.patch

diff --git a/srcpkgs/freecad/patches/050-occt76.patch b/srcpkgs/freecad/patches/050-occt76.patch
new file mode 100644
index 000000000000..7865a59bceef
--- /dev/null
+++ b/srcpkgs/freecad/patches/050-occt76.patch
@@ -0,0 +1,140 @@
+From 6f3b00d67ec0bd0072b7b493e2a38d2a2e3af27d Mon Sep 17 00:00:00 2001
+From: wmayer <wmayer@users.sourceforge.net>
+Date: Mon, 11 Oct 2021 00:30:22 +0200
+Subject: [PATCH] SMESH: port to OCCT 7.6
+
+---
+ .../src/NETGENPlugin/NETGENPlugin_Mesher.cpp       |  7 +++++++
+ .../salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp      |  7 +++++--
+ .../src/StdMeshers/StdMeshers_Adaptive1D.cpp       | 14 ++++++++++++++
+ .../src/StdMeshers/StdMeshers_Quadrangle_2D.cpp    |  2 +-
+ .../src/StdMeshers/StdMeshers_ViscousLayers.cpp    |  8 ++++++++
+ 5 files changed, 35 insertions(+), 3 deletions(-)
+
+diff --git a/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp b/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp
+index cd6f0b2b0758..ea83984b9768 100644
+--- a/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp
++++ b/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp
+@@ -56,6 +56,7 @@
+ #include <NCollection_Map.hxx>
+ #include <Standard_ErrorHandler.hxx>
+ #include <Standard_ProgramError.hxx>
++#include <Standard_Version.hxx>
+ #include <TColStd_MapOfInteger.hxx>
+ #include <TopExp.hxx>
+ #include <TopExp_Explorer.hxx>
+@@ -700,7 +701,13 @@ double NETGENPlugin_Mesher::GetDefaultMinSize(const TopoDS_Shape& geom,
+       BRep_Tool::Triangulation ( TopoDS::Face( fExp.Current() ), loc);
+     if ( triangulation.IsNull() ) continue;
+     const double fTol = BRep_Tool::Tolerance( TopoDS::Face( fExp.Current() ));
++#if OCC_VERSION_HEX < 0x070600
+     const TColgp_Array1OfPnt&   points = triangulation->Nodes();
++#else
++    auto points = [&triangulation](Standard_Integer index) {
++        return triangulation->Node(index);
++    };
++#endif
+     const Poly_Array1OfTriangle& trias = triangulation->Triangles();
+     for ( int iT = trias.Lower(); iT <= trias.Upper(); ++iT )
+     {
+diff --git a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
+index 5a07308310ea..fbb1b250087f 100644
+--- a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
++++ b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
+@@ -38,10 +38,13 @@
+ #include <GC_MakeSegment.hxx>
+ #include <GeomAPI_ExtremaCurveCurve.hxx>
+ #include <Geom_Line.hxx>
+-#include <IntAna_IntConicQuad.hxx>
+-#include <IntAna_Quadric.hxx>
++#include <gp_Cone.hxx>
++#include <gp_Cylinder.hxx>
+ #include <gp_Lin.hxx>
+ #include <gp_Pln.hxx>
++#include <gp_Sphere.hxx>
++#include <IntAna_IntConicQuad.hxx>
++#include <IntAna_Quadric.hxx>
+ 
+ #include <limits>
+ #include <numeric>
+diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp
+index 88970f36b557..7c51601c7bbe 100644
+--- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp
++++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp
+@@ -46,6 +46,7 @@
+ #include <Poly_Array1OfTriangle.hxx>
+ #include <Poly_PolygonOnTriangulation.hxx>
+ #include <Poly_Triangulation.hxx>
++#include <Standard_Version.hxx>
+ #include <TColgp_Array1OfPnt.hxx>
+ #include <TopExp.hxx>
+ #include <TopExp_Explorer.hxx>
+@@ -318,13 +319,26 @@ namespace // internal utils
+     {
+       myFaceTol         = SMESH_MesherHelper::MaxTolerance( face );
+       myTree            = triaTree;
++#if OCC_VERSION_HEX < 0x070600
+       myNodes           = & tr->Nodes();
++#else
++      TColgp_Array1OfPnt* trNodes = new TColgp_Array1OfPnt( 1, tr->NbNodes() );
++      for (Standard_Integer i = myNodes->Lower(); i <= myNodes->Upper(); i++)
++      {
++        trNodes->SetValue(i, tr->Node(i));
++      }
++      myNodes = trNodes;
++      myOwnNodes = true;
++#endif
+       myPolyTrias       = & tr->Triangles();
+       myTriasDeflection = tr->Deflection();
+       if ( !loc.IsIdentity() ) // transform nodes if necessary
+       {
+         TColgp_Array1OfPnt* trsfNodes = new TColgp_Array1OfPnt( myNodes->Lower(), myNodes->Upper() );
+         trsfNodes->Assign( *myNodes );
++#if OCC_VERSION_HEX >= 0x070600
++        delete myNodes; // it's already a copy
++#endif
+         myNodes    = trsfNodes;
+         myOwnNodes = true;
+         const gp_Trsf& trsf = loc;
+diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp
+index f7ac411d9a55..5d5c15c36612 100644
+--- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp
++++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp
+@@ -50,7 +50,7 @@
+ #include <Geom_Surface.hxx>
+ #include <NCollection_DefineArray2.hxx>
+ #include <Precision.hxx>
+-#include <Quantity_Parameter.hxx>
++#include <Standard_Real.hxx>
+ #include <TColStd_SequenceOfInteger.hxx>
+ #include <TColStd_SequenceOfReal.hxx>
+ #include <TColgp_SequenceOfXY.hxx>
+diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp
+index 8ee0e2683259..e9f46183059e 100644
+--- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp
++++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp
+@@ -44,7 +44,10 @@
+ #include "SMESH_subMeshEventListener.hxx"
+ #include "StdMeshers_FaceSide.hxx"
+ 
++#include <Standard_Version.hxx>
++#if OCC_VERSION_HEX < 0x070600
+ #include <Adaptor3d_HSurface.hxx>
++#endif
+ #include <BRepAdaptor_Curve2d.hxx>
+ #include <BRepAdaptor_Surface.hxx>
+ #include <BRepLProp_SLProps.hxx>
+@@ -1340,8 +1343,13 @@ namespace VISCOUS_3D
+     //case GeomAbs_SurfaceOfExtrusion:
+     case GeomAbs_OffsetSurface:
+     {
++#if OCC_VERSION_HEX < 0x070600
+       Handle(Adaptor3d_HSurface) base = surface.BasisSurface();
+       return getRovolutionAxis( base->Surface(), axis );
++#else
++      Handle(Adaptor3d_Surface) base = surface.BasisSurface();
++      return getRovolutionAxis( *base, axis );
++#endif
+     }
+     default: return false;
+     }
diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template
index 1e2aec024fd7..c6587ae809ac 100644
--- a/srcpkgs/freecad/template
+++ b/srcpkgs/freecad/template
@@ -1,6 +1,6 @@
 # Template file for 'freecad'
 pkgname=freecad
-version=0.19.4
+version=0.20
 revision=1
 wrksrc="FreeCAD-${version}"
 build_style=cmake
@@ -36,7 +36,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=e40a1c343956e13c56cc8578d025ae83d68d9d20acda1732953bc8a3883e9722
+checksum=c4d9ce782d3da0edfa16d6218db4ce8613e346124ee47b3fe6a6dae40c0a61d9
 
 if [ "$XBPS_TARGET_LIBC" = musl ]; then
 	makedepends+=" libexecinfo-devel"

From 4b01893c8d6892b41f2189586237cf5cb69932dd Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 23 Jul 2022 23:01:39 -0400
Subject: [PATCH 4/4] freecad: fix patches

---
 srcpkgs/freecad/patches/002-execinfo.patch    | 30 -------------------
 .../patches/010-salomesmesh-execinfo.patch    | 15 ++++++----
 2 files changed, 9 insertions(+), 36 deletions(-)
 delete mode 100644 srcpkgs/freecad/patches/002-execinfo.patch

diff --git a/srcpkgs/freecad/patches/002-execinfo.patch b/srcpkgs/freecad/patches/002-execinfo.patch
deleted file mode 100644
index bcdca77a72a4..000000000000
--- a/srcpkgs/freecad/patches/002-execinfo.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/src/App/Application.cpp	2020-01-22 23:27:42.709273087 +0100
-+++ b/src/App/Application.cpp	2020-01-22 23:50:53.915075955 +0100
-@@ -1485,7 +1485,9 @@
- #endif
- 
- #if defined(FC_OS_LINUX)
-+#ifdef __GLIBC__
- #include <execinfo.h>
-+#endif
- #include <dlfcn.h>
- #include <cxxabi.h>
- 
-@@ -1497,6 +1499,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);
-@@ -1527,6 +1530,9 @@
-     }
- 
-     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
index cc6bdc9ff485..f0aa51852c36 100644
--- a/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch
+++ b/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch
@@ -1,16 +1,19 @@
+diff --git a/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp b/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
+index 23c5083fdf..4547d714d4 100644
 --- a/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
 +++ b/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
-@@ -29,7 +29,9 @@
+@@ -29,8 +29,10 @@
  #ifndef WIN32
  #include <unistd.h>
  #include <sys/stat.h>
 +#ifdef __GLIBC__
  #include <execinfo.h>
-+#endif
  #endif
++#endif
  
  
-@@ -109,6 +111,7 @@
+ namespace Kernel_Utils
+@@ -109,6 +111,7 @@ namespace Kernel_Utils
  #ifndef WIN32
    void print_traceback()
    {
@@ -18,12 +21,12 @@
      void *array[50];
      size_t size;
      char **strings;
-@@ -123,6 +126,9 @@
+@@ -123,6 +126,9 @@ namespace Kernel_Utils
        }
  
      free (strings);
-+#else     
-+   std::cerr << "sorry, no backtrace on musl libc";
++#else
++    std::cerr << "sorry, no backtrace on musl libc";
 +#endif
    }
  #else

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

* Re: [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (12 preceding siblings ...)
  2022-07-24  3:02 ` karl-nilsson
@ 2022-07-24  4:11 ` luzpaz
  2022-07-25  1:10 ` [PR PATCH] [Updated] " karl-nilsson
                   ` (27 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: luzpaz @ 2022-07-24  4:11 UTC (permalink / raw)
  To: ml

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

New comment by luzpaz on void-packages repository

https://github.com/void-linux/void-packages/pull/36356#issuecomment-1193242745

Comment:
Thanks for you work on this!

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

* Re: [PR PATCH] [Updated] [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (13 preceding siblings ...)
  2022-07-24  4:11 ` luzpaz
@ 2022-07-25  1:10 ` karl-nilsson
  2022-07-25  1:31 ` karl-nilsson
                   ` (26 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: karl-nilsson @ 2022-07-25  1:10 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by karl-nilsson against master on the void-packages repository

https://github.com/karl-nilsson/void-packages occt_7.6
https://github.com/void-linux/void-packages/pull/36356

[WIP] occt: update to 7.6.2


#### Testing the changes
- I tested the changes in this PR: **briefly**


#### Local build testing
- I built this PR locally for my native architecture, x64-glibc


Like previously, broken ABI
```console
During initialization the error "/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv" occurred in /home/nilsson/.FreeCAD/Mod/A2plus/InitGui.py                                                                                                                        
Please look into the log file for further information                                                                                                
Wizard shaft module cannot be loaded                                                                                                                 
/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv                                                              
connect failed: No such file or directory      
```

Looks like we'll have to update or patch freecad
```console
In file included from /usr/include/opencascade/Extrema_POnSurf.lxx:15,
                 from /usr/include/opencascade/Extrema_POnSurf.hxx:75,
                 from /usr/include/opencascade/Extrema_ExtPElS.hxx:27,
                 from /usr/include/opencascade/Extrema_ExtPS.hxx:24,
                 from /usr/include/opencascade/ShapeAnalysis_Surface.hxx:20,
                 from ../src/3rdParty/salomesmesh/inc/SMESH_MesherHelper.hxx:37,
                 from ../src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp:34:
/usr/include/opencascade/Precision.hxx:98:7: note: previous definition of 'class Precision'
   98 | class Precision
      |       ^~~~~~~~~

```

ping @Piraty 

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-occt_7.6-36356.patch --]
[-- Type: text/x-diff, Size: 27903 bytes --]

From 7f1c7b752442abc3161a5e7f448080056f961035 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 20:24:49 -0400
Subject: [PATCH 1/5] python3-occ: remove package

* upstream is well behind occt
---
 srcpkgs/python3-occ/patches/python3.10.patch | 15 ---------------
 srcpkgs/python3-occ/template                 | 17 -----------------
 srcpkgs/removed-packages/template            |  1 +
 3 files changed, 1 insertion(+), 32 deletions(-)
 delete mode 100644 srcpkgs/python3-occ/patches/python3.10.patch
 delete mode 100644 srcpkgs/python3-occ/template

diff --git a/srcpkgs/python3-occ/patches/python3.10.patch b/srcpkgs/python3-occ/patches/python3.10.patch
deleted file mode 100644
index e192608fd3b3..000000000000
--- a/srcpkgs/python3-occ/patches/python3.10.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/src/Display/SimpleGui.py b/src/Display/SimpleGui.py
-index 42705a82..6a274c16 100644
---- a/src/Display/SimpleGui.py
-+++ b/src/Display/SimpleGui.py
-@@ -161,8 +161,8 @@ def init_display(backend_str: Optional[str]=None,
-             def centerOnScreen(self) -> None:
-                 '''Centers the window on the screen.'''
-                 resolution = QtWidgets.QApplication.desktop().screenGeometry()
--                x = (resolution.width() - self.frameSize().width()) / 2
--                y = (resolution.height() - self.frameSize().height()) / 2
-+                x = (resolution.width() - self.frameSize().width()) // 2
-+                y = (resolution.height() - self.frameSize().height()) // 2
-                 self.move(x, y)
- 
-             def add_menu(self, menu_name: str) -> None:
diff --git a/srcpkgs/python3-occ/template b/srcpkgs/python3-occ/template
deleted file mode 100644
index bee03373a3d1..000000000000
--- a/srcpkgs/python3-occ/template
+++ /dev/null
@@ -1,17 +0,0 @@
-# Template file for 'python3-occ'
-pkgname=python3-occ
-version=7.4.1
-revision=3
-archs="i686* x86_64* armv7l* aarch64* ppc*"
-wrksrc="pythonocc-core-${version}"
-build_style=cmake
-configure_args="-DPYTHONOCC_BUILD_TYPE=None -DCMAKE_BUILD_TYPE=None"
-hostmakedepends="python3 swig"
-makedepends="python3-devel occt-devel freetype-devel swig"
-depends="python3 occt freetype"
-short_desc="Industrial strength 3D CAD Python3 package"
-maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
-license="LGPL-3.0-or-later"
-homepage="http://pythonocc.org"
-distfiles="https://github.com/tpaviot/pythonocc-core/archive/${version}.tar.gz"
-checksum=6d62002244a0e7f4e5c1ad590d332a60601c44b2501ad017361443b54371e667
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 8456cb959d35..488e62ec105a 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -343,6 +343,7 @@ replaces="
  python3-keepalive<=0.5_6
  python3-pgpdump<=1.5_10
  python3-lockfile<=0.12.2_7
+ python3-occ<=7.4.1_3
  python3-pyPEG2<=2.15.2_7
  python3-pyenet<=5.15.0_2
  python3-pyside-phonon<=5.15.0_2

From 9dab74dc6b5acec06545396e3cbdd3c5e2f9e9fb Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 19:29:00 -0400
Subject: [PATCH 2/5] occt: update to 7.6.2.

---
 .../occt/patches/cmake-build-type-none.patch  |  6 +--
 srcpkgs/occt/patches/musl-fenv.patch          | 18 ++++----
 srcpkgs/occt/patches/musl-mallinfo.patch      | 45 ++++++++++++++-----
 srcpkgs/occt/template                         | 27 +++++------
 srcpkgs/occt/update                           |  2 -
 5 files changed, 60 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/occt/update

diff --git a/srcpkgs/occt/patches/cmake-build-type-none.patch b/srcpkgs/occt/patches/cmake-build-type-none.patch
index ecb0e3da3929..d2caec8c4e87 100644
--- a/srcpkgs/occt/patches/cmake-build-type-none.patch
+++ b/srcpkgs/occt/patches/cmake-build-type-none.patch
@@ -1,8 +1,8 @@
-Index: CMakeLists.txt
-===================================================================
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f4ec871f5..9b0644e94 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_D
+@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
  
  set (CMAKE_SUPPRESS_REGENERATION TRUE)
  
diff --git a/srcpkgs/occt/patches/musl-fenv.patch b/srcpkgs/occt/patches/musl-fenv.patch
index 09da8d0afeae..06a8e3a89cfd 100644
--- a/srcpkgs/occt/patches/musl-fenv.patch
+++ b/srcpkgs/occt/patches/musl-fenv.patch
@@ -5,18 +5,20 @@ is probably wrong, but I don't have a replacement for the
 non-posix functions fegetexcept(3) and feenableexcept(3).
 """
 
+diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx
+index 007f5ccaa..fe39e07ac 100644
 --- a/src/OSD/OSD_signal.cxx
 +++ b/src/OSD/OSD_signal.cxx
-@@ -703,7 +703,7 @@
- 
+@@ -761,7 +761,7 @@ typedef void (* SIG_PFV) (int);
+
  #include <signal.h>
- 
--#if !defined(__ANDROID__) && !defined(__QNX__)
-+#if !defined(__ANDROID__) && !defined(__QNX__) && defined(__GLIBC__)
+
+-#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
++#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && defined(__GLIBC__)
    #include <sys/signal.h>
  #endif
- 
-@@ -914,7 +914,7 @@
+
+@@ -977,7 +977,7 @@ static void SegvHandler(const int theSignal,
  //=======================================================================
  void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  {
@@ -25,7 +27,7 @@ non-posix functions fegetexcept(3) and feenableexcept(3).
    feclearexcept (FE_ALL_EXCEPT);
    if (theFloatingSignal)
    {
-@@ -947,7 +947,7 @@
+@@ -1010,7 +1010,7 @@ void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  //=======================================================================
  Standard_Boolean OSD::ToCatchFloatingSignals()
  {
diff --git a/srcpkgs/occt/patches/musl-mallinfo.patch b/srcpkgs/occt/patches/musl-mallinfo.patch
index 4e5825bf1cb0..6ae94992eaf8 100644
--- a/srcpkgs/occt/patches/musl-mallinfo.patch
+++ b/srcpkgs/occt/patches/musl-mallinfo.patch
@@ -1,17 +1,38 @@
-In musl libc there is no struct mallinfo and no function mallinf()
+Adapted from alpine's patch
 
+diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx
+index d9bb91398..d608e04fc 100644
 --- a/src/OSD/OSD_MemInfo.cxx
 +++ b/src/OSD/OSD_MemInfo.cxx
-@@ -147,8 +147,12 @@
-   }
-   aFile.close();
+@@ -35,6 +35,9 @@
+ #include <sstream>
+ #include <fstream>
+ 
++#include <sys/time.h>
++#include <sys/resource.h>
++
+ #include <OSD_MemInfo.hxx>
  
-+  #if defined(__GLIBC__)
-   struct mallinfo aMI = mallinfo();
-   myCounters[MemHeapUsage] = aMI.uordblks;
-+  #else /* XXX not yet coded */
-+  myCounters[MemHeapUsage] = 0;
-+  #endif
+ #if defined(__EMSCRIPTEN__)
+@@ -182,18 +185,9 @@ void OSD_MemInfo::Update()
+ #elif (defined(__linux__) || defined(__linux))
+   if (IsActive (MemHeapUsage))
+   {
+-  #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+-    #if __GLIBC_PREREQ(2,33)
+-      #define HAS_MALLINFO2
+-    #endif
+-  #endif
+-
+-  #ifdef HAS_MALLINFO2
+-    const struct mallinfo2 aMI = mallinfo2();
+-  #else
+-    const struct mallinfo aMI = mallinfo();
+-  #endif
+-    myCounters[MemHeapUsage] = aMI.uordblks;
++    struct rusage ru = { .ru_maxrss = 0 };
++    getrusage(RUSAGE_SELF, &ru);
++    myCounters[MemHeapUsage] = ru.ru_maxrss;
+   }
  
- #elif (defined(__APPLE__))
-   struct task_basic_info aTaskInfo;
+   if (!IsActive (MemVirtual)
diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template
index 6624fea8b53f..b17c91b0058b 100644
--- a/srcpkgs/occt/template
+++ b/srcpkgs/occt/template
@@ -1,26 +1,27 @@
 # Template file for 'occt'
 pkgname=occt
-reverts=7.5.0_1
-version=7.4.0p1
-revision=5
-_gittag="V${version//./_}"
-wrksrc=occt-${_gittag}
+version=7.6.2
+revision=1
+_ver="${version//./_}"
+wrksrc=OCCT-${_ver}
 build_style=cmake
-# XXX: re-enable -DUSE_TBB=ON if possible when updating
-configure_args="-DUSE_FREEIMAGE=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
+configure_args="-DUSE_FREEIMAGE=ON -DUSE_TBB=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
  -DINSTALL_SAMPLES=ON"
-makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tcl-devel
- tk-devel"
+makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tbb-devel
+ tcl-devel tk-devel"
 short_desc="OpenCASCADE Technology - library for CAD/CAM/CAE applications"
 maintainer="Piraty <piraty1@inbox.ru>"
 license="custom:LGPL-2.1-only-with-exceptions"
 homepage="https://www.opencascade.com"
-# distfile: use git instead of official tarball, which requires registration
-# see https://www.opencascade.com/content/packaging-again-debian
-distfiles="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_gittag};sf=tgz>occt-${_gittag}.tar.gz"
-checksum=e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0
+distfiles="https://github.com/Open-Cascade-SAS/OCCT/archive/V${_ver}.tar.gz"
+checksum=dea04077d71507c666aaa7ccaeacc73ab580d6572d7f75e90a1984c4c0302a7a
 conflicts="oce>=0"
 
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" libexecinfo-devel"
+	LDFLAGS="-lexecinfo"
+fi
+
 post_install() {
 	rm ${PKGDESTDIR}/usr/share/doc/opencascade/*_LGPL_*.txt
 	vlicense OCCT_LGPL_EXCEPTION.txt
diff --git a/srcpkgs/occt/update b/srcpkgs/occt/update
deleted file mode 100644
index c128eec6d9c9..000000000000
--- a/srcpkgs/occt/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=tags"
-pattern=">V\K[\d_p]+(?=</a>)"

From 573af487f3f08503011f0ff708d049825038063f Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 26 Mar 2022 11:25:11 -0400
Subject: [PATCH 3/5] freecad: update to 0.20.0.

---
 srcpkgs/freecad/patches/050-occt76.patch | 140 +++++++++++++++++++++++
 srcpkgs/freecad/template                 |   4 +-
 2 files changed, 142 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/freecad/patches/050-occt76.patch

diff --git a/srcpkgs/freecad/patches/050-occt76.patch b/srcpkgs/freecad/patches/050-occt76.patch
new file mode 100644
index 000000000000..7865a59bceef
--- /dev/null
+++ b/srcpkgs/freecad/patches/050-occt76.patch
@@ -0,0 +1,140 @@
+From 6f3b00d67ec0bd0072b7b493e2a38d2a2e3af27d Mon Sep 17 00:00:00 2001
+From: wmayer <wmayer@users.sourceforge.net>
+Date: Mon, 11 Oct 2021 00:30:22 +0200
+Subject: [PATCH] SMESH: port to OCCT 7.6
+
+---
+ .../src/NETGENPlugin/NETGENPlugin_Mesher.cpp       |  7 +++++++
+ .../salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp      |  7 +++++--
+ .../src/StdMeshers/StdMeshers_Adaptive1D.cpp       | 14 ++++++++++++++
+ .../src/StdMeshers/StdMeshers_Quadrangle_2D.cpp    |  2 +-
+ .../src/StdMeshers/StdMeshers_ViscousLayers.cpp    |  8 ++++++++
+ 5 files changed, 35 insertions(+), 3 deletions(-)
+
+diff --git a/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp b/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp
+index cd6f0b2b0758..ea83984b9768 100644
+--- a/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp
++++ b/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp
+@@ -56,6 +56,7 @@
+ #include <NCollection_Map.hxx>
+ #include <Standard_ErrorHandler.hxx>
+ #include <Standard_ProgramError.hxx>
++#include <Standard_Version.hxx>
+ #include <TColStd_MapOfInteger.hxx>
+ #include <TopExp.hxx>
+ #include <TopExp_Explorer.hxx>
+@@ -700,7 +701,13 @@ double NETGENPlugin_Mesher::GetDefaultMinSize(const TopoDS_Shape& geom,
+       BRep_Tool::Triangulation ( TopoDS::Face( fExp.Current() ), loc);
+     if ( triangulation.IsNull() ) continue;
+     const double fTol = BRep_Tool::Tolerance( TopoDS::Face( fExp.Current() ));
++#if OCC_VERSION_HEX < 0x070600
+     const TColgp_Array1OfPnt&   points = triangulation->Nodes();
++#else
++    auto points = [&triangulation](Standard_Integer index) {
++        return triangulation->Node(index);
++    };
++#endif
+     const Poly_Array1OfTriangle& trias = triangulation->Triangles();
+     for ( int iT = trias.Lower(); iT <= trias.Upper(); ++iT )
+     {
+diff --git a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
+index 5a07308310ea..fbb1b250087f 100644
+--- a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
++++ b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
+@@ -38,10 +38,13 @@
+ #include <GC_MakeSegment.hxx>
+ #include <GeomAPI_ExtremaCurveCurve.hxx>
+ #include <Geom_Line.hxx>
+-#include <IntAna_IntConicQuad.hxx>
+-#include <IntAna_Quadric.hxx>
++#include <gp_Cone.hxx>
++#include <gp_Cylinder.hxx>
+ #include <gp_Lin.hxx>
+ #include <gp_Pln.hxx>
++#include <gp_Sphere.hxx>
++#include <IntAna_IntConicQuad.hxx>
++#include <IntAna_Quadric.hxx>
+ 
+ #include <limits>
+ #include <numeric>
+diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp
+index 88970f36b557..7c51601c7bbe 100644
+--- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp
++++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp
+@@ -46,6 +46,7 @@
+ #include <Poly_Array1OfTriangle.hxx>
+ #include <Poly_PolygonOnTriangulation.hxx>
+ #include <Poly_Triangulation.hxx>
++#include <Standard_Version.hxx>
+ #include <TColgp_Array1OfPnt.hxx>
+ #include <TopExp.hxx>
+ #include <TopExp_Explorer.hxx>
+@@ -318,13 +319,26 @@ namespace // internal utils
+     {
+       myFaceTol         = SMESH_MesherHelper::MaxTolerance( face );
+       myTree            = triaTree;
++#if OCC_VERSION_HEX < 0x070600
+       myNodes           = & tr->Nodes();
++#else
++      TColgp_Array1OfPnt* trNodes = new TColgp_Array1OfPnt( 1, tr->NbNodes() );
++      for (Standard_Integer i = myNodes->Lower(); i <= myNodes->Upper(); i++)
++      {
++        trNodes->SetValue(i, tr->Node(i));
++      }
++      myNodes = trNodes;
++      myOwnNodes = true;
++#endif
+       myPolyTrias       = & tr->Triangles();
+       myTriasDeflection = tr->Deflection();
+       if ( !loc.IsIdentity() ) // transform nodes if necessary
+       {
+         TColgp_Array1OfPnt* trsfNodes = new TColgp_Array1OfPnt( myNodes->Lower(), myNodes->Upper() );
+         trsfNodes->Assign( *myNodes );
++#if OCC_VERSION_HEX >= 0x070600
++        delete myNodes; // it's already a copy
++#endif
+         myNodes    = trsfNodes;
+         myOwnNodes = true;
+         const gp_Trsf& trsf = loc;
+diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp
+index f7ac411d9a55..5d5c15c36612 100644
+--- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp
++++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp
+@@ -50,7 +50,7 @@
+ #include <Geom_Surface.hxx>
+ #include <NCollection_DefineArray2.hxx>
+ #include <Precision.hxx>
+-#include <Quantity_Parameter.hxx>
++#include <Standard_Real.hxx>
+ #include <TColStd_SequenceOfInteger.hxx>
+ #include <TColStd_SequenceOfReal.hxx>
+ #include <TColgp_SequenceOfXY.hxx>
+diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp
+index 8ee0e2683259..e9f46183059e 100644
+--- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp
++++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp
+@@ -44,7 +44,10 @@
+ #include "SMESH_subMeshEventListener.hxx"
+ #include "StdMeshers_FaceSide.hxx"
+ 
++#include <Standard_Version.hxx>
++#if OCC_VERSION_HEX < 0x070600
+ #include <Adaptor3d_HSurface.hxx>
++#endif
+ #include <BRepAdaptor_Curve2d.hxx>
+ #include <BRepAdaptor_Surface.hxx>
+ #include <BRepLProp_SLProps.hxx>
+@@ -1340,8 +1343,13 @@ namespace VISCOUS_3D
+     //case GeomAbs_SurfaceOfExtrusion:
+     case GeomAbs_OffsetSurface:
+     {
++#if OCC_VERSION_HEX < 0x070600
+       Handle(Adaptor3d_HSurface) base = surface.BasisSurface();
+       return getRovolutionAxis( base->Surface(), axis );
++#else
++      Handle(Adaptor3d_Surface) base = surface.BasisSurface();
++      return getRovolutionAxis( *base, axis );
++#endif
+     }
+     default: return false;
+     }
diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template
index 1e2aec024fd7..c6587ae809ac 100644
--- a/srcpkgs/freecad/template
+++ b/srcpkgs/freecad/template
@@ -1,6 +1,6 @@
 # Template file for 'freecad'
 pkgname=freecad
-version=0.19.4
+version=0.20
 revision=1
 wrksrc="FreeCAD-${version}"
 build_style=cmake
@@ -36,7 +36,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=e40a1c343956e13c56cc8578d025ae83d68d9d20acda1732953bc8a3883e9722
+checksum=c4d9ce782d3da0edfa16d6218db4ce8613e346124ee47b3fe6a6dae40c0a61d9
 
 if [ "$XBPS_TARGET_LIBC" = musl ]; then
 	makedepends+=" libexecinfo-devel"

From 558b803af61bba2eb0f9c15b90b461598f1351fd Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 23 Jul 2022 23:01:39 -0400
Subject: [PATCH 4/5] freecad: fix patches

---
 srcpkgs/freecad/patches/002-execinfo.patch    | 30 -------------------
 .../patches/010-salomesmesh-execinfo.patch    | 15 ++++++----
 2 files changed, 9 insertions(+), 36 deletions(-)
 delete mode 100644 srcpkgs/freecad/patches/002-execinfo.patch

diff --git a/srcpkgs/freecad/patches/002-execinfo.patch b/srcpkgs/freecad/patches/002-execinfo.patch
deleted file mode 100644
index bcdca77a72a4..000000000000
--- a/srcpkgs/freecad/patches/002-execinfo.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/src/App/Application.cpp	2020-01-22 23:27:42.709273087 +0100
-+++ b/src/App/Application.cpp	2020-01-22 23:50:53.915075955 +0100
-@@ -1485,7 +1485,9 @@
- #endif
- 
- #if defined(FC_OS_LINUX)
-+#ifdef __GLIBC__
- #include <execinfo.h>
-+#endif
- #include <dlfcn.h>
- #include <cxxabi.h>
- 
-@@ -1497,6 +1499,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);
-@@ -1527,6 +1530,9 @@
-     }
- 
-     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
index cc6bdc9ff485..f0aa51852c36 100644
--- a/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch
+++ b/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch
@@ -1,16 +1,19 @@
+diff --git a/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp b/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
+index 23c5083fdf..4547d714d4 100644
 --- a/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
 +++ b/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
-@@ -29,7 +29,9 @@
+@@ -29,8 +29,10 @@
  #ifndef WIN32
  #include <unistd.h>
  #include <sys/stat.h>
 +#ifdef __GLIBC__
  #include <execinfo.h>
-+#endif
  #endif
++#endif
  
  
-@@ -109,6 +111,7 @@
+ namespace Kernel_Utils
+@@ -109,6 +111,7 @@ namespace Kernel_Utils
  #ifndef WIN32
    void print_traceback()
    {
@@ -18,12 +21,12 @@
      void *array[50];
      size_t size;
      char **strings;
-@@ -123,6 +126,9 @@
+@@ -123,6 +126,9 @@ namespace Kernel_Utils
        }
  
      free (strings);
-+#else     
-+   std::cerr << "sorry, no backtrace on musl libc";
++#else
++    std::cerr << "sorry, no backtrace on musl libc";
 +#endif
    }
  #else

From a4ae2f4d8d5d8401958fd4feab6ee4c8c9e6105d Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sun, 24 Jul 2022 21:09:45 -0400
Subject: [PATCH 5/5] freecad: fix patches

---
 .../patches/010-salomesmesh-execinfo.patch    |  52 +++----
 srcpkgs/freecad/patches/050-occt76.patch      | 140 ------------------
 2 files changed, 26 insertions(+), 166 deletions(-)
 delete mode 100644 srcpkgs/freecad/patches/050-occt76.patch

diff --git a/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch b/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch
index f0aa51852c36..fc8a7ef11daf 100644
--- a/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch
+++ b/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch
@@ -3,31 +3,31 @@ index 23c5083fdf..4547d714d4 100644
 --- a/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
 +++ b/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
 @@ -29,8 +29,10 @@
- #ifndef WIN32
- #include <unistd.h>
- #include <sys/stat.h>
-+#ifdef __GLIBC__
- #include <execinfo.h>
- #endif
-+#endif
- 
- 
- namespace Kernel_Utils
+ #ifndef WIN32
+ #include <unistd.h>
+ #include <sys/stat.h>
++#ifdef __GLIBC__
+ #include <execinfo.h>
+ #endif
++#endif
+ 
+ 
+ namespace Kernel_Utils
 @@ -109,6 +111,7 @@ namespace Kernel_Utils
- #ifndef WIN32
-   void print_traceback()
-   {
-+#ifdef __GLIBC__
-     void *array[50];
-     size_t size;
-     char **strings;
+ #ifndef WIN32
+   void print_traceback()
+   {
++#ifdef __GLIBC__
+     void *array[50];
+     size_t size;
+     char **strings;
 @@ -123,6 +126,9 @@ namespace Kernel_Utils
-       }
- 
-     free (strings);
-+#else
-+    std::cerr << "sorry, no backtrace on musl libc";
-+#endif
-   }
- #else
-   #if (_MSC_VER >= 1400) // Visual Studio 2005
+       }
+ 
+     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/050-occt76.patch b/srcpkgs/freecad/patches/050-occt76.patch
deleted file mode 100644
index 7865a59bceef..000000000000
--- a/srcpkgs/freecad/patches/050-occt76.patch
+++ /dev/null
@@ -1,140 +0,0 @@
-From 6f3b00d67ec0bd0072b7b493e2a38d2a2e3af27d Mon Sep 17 00:00:00 2001
-From: wmayer <wmayer@users.sourceforge.net>
-Date: Mon, 11 Oct 2021 00:30:22 +0200
-Subject: [PATCH] SMESH: port to OCCT 7.6
-
----
- .../src/NETGENPlugin/NETGENPlugin_Mesher.cpp       |  7 +++++++
- .../salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp      |  7 +++++--
- .../src/StdMeshers/StdMeshers_Adaptive1D.cpp       | 14 ++++++++++++++
- .../src/StdMeshers/StdMeshers_Quadrangle_2D.cpp    |  2 +-
- .../src/StdMeshers/StdMeshers_ViscousLayers.cpp    |  8 ++++++++
- 5 files changed, 35 insertions(+), 3 deletions(-)
-
-diff --git a/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp b/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp
-index cd6f0b2b0758..ea83984b9768 100644
---- a/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp
-+++ b/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp
-@@ -56,6 +56,7 @@
- #include <NCollection_Map.hxx>
- #include <Standard_ErrorHandler.hxx>
- #include <Standard_ProgramError.hxx>
-+#include <Standard_Version.hxx>
- #include <TColStd_MapOfInteger.hxx>
- #include <TopExp.hxx>
- #include <TopExp_Explorer.hxx>
-@@ -700,7 +701,13 @@ double NETGENPlugin_Mesher::GetDefaultMinSize(const TopoDS_Shape& geom,
-       BRep_Tool::Triangulation ( TopoDS::Face( fExp.Current() ), loc);
-     if ( triangulation.IsNull() ) continue;
-     const double fTol = BRep_Tool::Tolerance( TopoDS::Face( fExp.Current() ));
-+#if OCC_VERSION_HEX < 0x070600
-     const TColgp_Array1OfPnt&   points = triangulation->Nodes();
-+#else
-+    auto points = [&triangulation](Standard_Integer index) {
-+        return triangulation->Node(index);
-+    };
-+#endif
-     const Poly_Array1OfTriangle& trias = triangulation->Triangles();
-     for ( int iT = trias.Lower(); iT <= trias.Upper(); ++iT )
-     {
-diff --git a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
-index 5a07308310ea..fbb1b250087f 100644
---- a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
-+++ b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
-@@ -38,10 +38,13 @@
- #include <GC_MakeSegment.hxx>
- #include <GeomAPI_ExtremaCurveCurve.hxx>
- #include <Geom_Line.hxx>
--#include <IntAna_IntConicQuad.hxx>
--#include <IntAna_Quadric.hxx>
-+#include <gp_Cone.hxx>
-+#include <gp_Cylinder.hxx>
- #include <gp_Lin.hxx>
- #include <gp_Pln.hxx>
-+#include <gp_Sphere.hxx>
-+#include <IntAna_IntConicQuad.hxx>
-+#include <IntAna_Quadric.hxx>
- 
- #include <limits>
- #include <numeric>
-diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp
-index 88970f36b557..7c51601c7bbe 100644
---- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp
-+++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp
-@@ -46,6 +46,7 @@
- #include <Poly_Array1OfTriangle.hxx>
- #include <Poly_PolygonOnTriangulation.hxx>
- #include <Poly_Triangulation.hxx>
-+#include <Standard_Version.hxx>
- #include <TColgp_Array1OfPnt.hxx>
- #include <TopExp.hxx>
- #include <TopExp_Explorer.hxx>
-@@ -318,13 +319,26 @@ namespace // internal utils
-     {
-       myFaceTol         = SMESH_MesherHelper::MaxTolerance( face );
-       myTree            = triaTree;
-+#if OCC_VERSION_HEX < 0x070600
-       myNodes           = & tr->Nodes();
-+#else
-+      TColgp_Array1OfPnt* trNodes = new TColgp_Array1OfPnt( 1, tr->NbNodes() );
-+      for (Standard_Integer i = myNodes->Lower(); i <= myNodes->Upper(); i++)
-+      {
-+        trNodes->SetValue(i, tr->Node(i));
-+      }
-+      myNodes = trNodes;
-+      myOwnNodes = true;
-+#endif
-       myPolyTrias       = & tr->Triangles();
-       myTriasDeflection = tr->Deflection();
-       if ( !loc.IsIdentity() ) // transform nodes if necessary
-       {
-         TColgp_Array1OfPnt* trsfNodes = new TColgp_Array1OfPnt( myNodes->Lower(), myNodes->Upper() );
-         trsfNodes->Assign( *myNodes );
-+#if OCC_VERSION_HEX >= 0x070600
-+        delete myNodes; // it's already a copy
-+#endif
-         myNodes    = trsfNodes;
-         myOwnNodes = true;
-         const gp_Trsf& trsf = loc;
-diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp
-index f7ac411d9a55..5d5c15c36612 100644
---- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp
-+++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp
-@@ -50,7 +50,7 @@
- #include <Geom_Surface.hxx>
- #include <NCollection_DefineArray2.hxx>
- #include <Precision.hxx>
--#include <Quantity_Parameter.hxx>
-+#include <Standard_Real.hxx>
- #include <TColStd_SequenceOfInteger.hxx>
- #include <TColStd_SequenceOfReal.hxx>
- #include <TColgp_SequenceOfXY.hxx>
-diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp
-index 8ee0e2683259..e9f46183059e 100644
---- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp
-+++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp
-@@ -44,7 +44,10 @@
- #include "SMESH_subMeshEventListener.hxx"
- #include "StdMeshers_FaceSide.hxx"
- 
-+#include <Standard_Version.hxx>
-+#if OCC_VERSION_HEX < 0x070600
- #include <Adaptor3d_HSurface.hxx>
-+#endif
- #include <BRepAdaptor_Curve2d.hxx>
- #include <BRepAdaptor_Surface.hxx>
- #include <BRepLProp_SLProps.hxx>
-@@ -1340,8 +1343,13 @@ namespace VISCOUS_3D
-     //case GeomAbs_SurfaceOfExtrusion:
-     case GeomAbs_OffsetSurface:
-     {
-+#if OCC_VERSION_HEX < 0x070600
-       Handle(Adaptor3d_HSurface) base = surface.BasisSurface();
-       return getRovolutionAxis( base->Surface(), axis );
-+#else
-+      Handle(Adaptor3d_Surface) base = surface.BasisSurface();
-+      return getRovolutionAxis( *base, axis );
-+#endif
-     }
-     default: return false;
-     }

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

* Re: [PR PATCH] [Updated] [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (14 preceding siblings ...)
  2022-07-25  1:10 ` [PR PATCH] [Updated] " karl-nilsson
@ 2022-07-25  1:31 ` karl-nilsson
  2022-07-25  3:02 ` karl-nilsson
                   ` (25 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: karl-nilsson @ 2022-07-25  1:31 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by karl-nilsson against master on the void-packages repository

https://github.com/karl-nilsson/void-packages occt_7.6
https://github.com/void-linux/void-packages/pull/36356

[WIP] occt: update to 7.6.2


#### Testing the changes
- I tested the changes in this PR: **briefly**


#### Local build testing
- I built this PR locally for my native architecture, x64-glibc


Like previously, broken ABI
```console
During initialization the error "/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv" occurred in /home/nilsson/.FreeCAD/Mod/A2plus/InitGui.py                                                                                                                        
Please look into the log file for further information                                                                                                
Wizard shaft module cannot be loaded                                                                                                                 
/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv                                                              
connect failed: No such file or directory      
```

Looks like we'll have to update or patch freecad
```console
In file included from /usr/include/opencascade/Extrema_POnSurf.lxx:15,
                 from /usr/include/opencascade/Extrema_POnSurf.hxx:75,
                 from /usr/include/opencascade/Extrema_ExtPElS.hxx:27,
                 from /usr/include/opencascade/Extrema_ExtPS.hxx:24,
                 from /usr/include/opencascade/ShapeAnalysis_Surface.hxx:20,
                 from ../src/3rdParty/salomesmesh/inc/SMESH_MesherHelper.hxx:37,
                 from ../src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp:34:
/usr/include/opencascade/Precision.hxx:98:7: note: previous definition of 'class Precision'
   98 | class Precision
      |       ^~~~~~~~~

```

ping @Piraty 

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-occt_7.6-36356.patch --]
[-- Type: text/x-diff, Size: 65619 bytes --]

From 7f1c7b752442abc3161a5e7f448080056f961035 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 20:24:49 -0400
Subject: [PATCH 1/6] python3-occ: remove package

* upstream is well behind occt
---
 srcpkgs/python3-occ/patches/python3.10.patch | 15 ---------------
 srcpkgs/python3-occ/template                 | 17 -----------------
 srcpkgs/removed-packages/template            |  1 +
 3 files changed, 1 insertion(+), 32 deletions(-)
 delete mode 100644 srcpkgs/python3-occ/patches/python3.10.patch
 delete mode 100644 srcpkgs/python3-occ/template

diff --git a/srcpkgs/python3-occ/patches/python3.10.patch b/srcpkgs/python3-occ/patches/python3.10.patch
deleted file mode 100644
index e192608fd3b3..000000000000
--- a/srcpkgs/python3-occ/patches/python3.10.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/src/Display/SimpleGui.py b/src/Display/SimpleGui.py
-index 42705a82..6a274c16 100644
---- a/src/Display/SimpleGui.py
-+++ b/src/Display/SimpleGui.py
-@@ -161,8 +161,8 @@ def init_display(backend_str: Optional[str]=None,
-             def centerOnScreen(self) -> None:
-                 '''Centers the window on the screen.'''
-                 resolution = QtWidgets.QApplication.desktop().screenGeometry()
--                x = (resolution.width() - self.frameSize().width()) / 2
--                y = (resolution.height() - self.frameSize().height()) / 2
-+                x = (resolution.width() - self.frameSize().width()) // 2
-+                y = (resolution.height() - self.frameSize().height()) // 2
-                 self.move(x, y)
- 
-             def add_menu(self, menu_name: str) -> None:
diff --git a/srcpkgs/python3-occ/template b/srcpkgs/python3-occ/template
deleted file mode 100644
index bee03373a3d1..000000000000
--- a/srcpkgs/python3-occ/template
+++ /dev/null
@@ -1,17 +0,0 @@
-# Template file for 'python3-occ'
-pkgname=python3-occ
-version=7.4.1
-revision=3
-archs="i686* x86_64* armv7l* aarch64* ppc*"
-wrksrc="pythonocc-core-${version}"
-build_style=cmake
-configure_args="-DPYTHONOCC_BUILD_TYPE=None -DCMAKE_BUILD_TYPE=None"
-hostmakedepends="python3 swig"
-makedepends="python3-devel occt-devel freetype-devel swig"
-depends="python3 occt freetype"
-short_desc="Industrial strength 3D CAD Python3 package"
-maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
-license="LGPL-3.0-or-later"
-homepage="http://pythonocc.org"
-distfiles="https://github.com/tpaviot/pythonocc-core/archive/${version}.tar.gz"
-checksum=6d62002244a0e7f4e5c1ad590d332a60601c44b2501ad017361443b54371e667
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 8456cb959d35..488e62ec105a 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -343,6 +343,7 @@ replaces="
  python3-keepalive<=0.5_6
  python3-pgpdump<=1.5_10
  python3-lockfile<=0.12.2_7
+ python3-occ<=7.4.1_3
  python3-pyPEG2<=2.15.2_7
  python3-pyenet<=5.15.0_2
  python3-pyside-phonon<=5.15.0_2

From 9dab74dc6b5acec06545396e3cbdd3c5e2f9e9fb Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 19:29:00 -0400
Subject: [PATCH 2/6] occt: update to 7.6.2.

---
 .../occt/patches/cmake-build-type-none.patch  |  6 +--
 srcpkgs/occt/patches/musl-fenv.patch          | 18 ++++----
 srcpkgs/occt/patches/musl-mallinfo.patch      | 45 ++++++++++++++-----
 srcpkgs/occt/template                         | 27 +++++------
 srcpkgs/occt/update                           |  2 -
 5 files changed, 60 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/occt/update

diff --git a/srcpkgs/occt/patches/cmake-build-type-none.patch b/srcpkgs/occt/patches/cmake-build-type-none.patch
index ecb0e3da3929..d2caec8c4e87 100644
--- a/srcpkgs/occt/patches/cmake-build-type-none.patch
+++ b/srcpkgs/occt/patches/cmake-build-type-none.patch
@@ -1,8 +1,8 @@
-Index: CMakeLists.txt
-===================================================================
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f4ec871f5..9b0644e94 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_D
+@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
  
  set (CMAKE_SUPPRESS_REGENERATION TRUE)
  
diff --git a/srcpkgs/occt/patches/musl-fenv.patch b/srcpkgs/occt/patches/musl-fenv.patch
index 09da8d0afeae..06a8e3a89cfd 100644
--- a/srcpkgs/occt/patches/musl-fenv.patch
+++ b/srcpkgs/occt/patches/musl-fenv.patch
@@ -5,18 +5,20 @@ is probably wrong, but I don't have a replacement for the
 non-posix functions fegetexcept(3) and feenableexcept(3).
 """
 
+diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx
+index 007f5ccaa..fe39e07ac 100644
 --- a/src/OSD/OSD_signal.cxx
 +++ b/src/OSD/OSD_signal.cxx
-@@ -703,7 +703,7 @@
- 
+@@ -761,7 +761,7 @@ typedef void (* SIG_PFV) (int);
+
  #include <signal.h>
- 
--#if !defined(__ANDROID__) && !defined(__QNX__)
-+#if !defined(__ANDROID__) && !defined(__QNX__) && defined(__GLIBC__)
+
+-#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
++#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && defined(__GLIBC__)
    #include <sys/signal.h>
  #endif
- 
-@@ -914,7 +914,7 @@
+
+@@ -977,7 +977,7 @@ static void SegvHandler(const int theSignal,
  //=======================================================================
  void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  {
@@ -25,7 +27,7 @@ non-posix functions fegetexcept(3) and feenableexcept(3).
    feclearexcept (FE_ALL_EXCEPT);
    if (theFloatingSignal)
    {
-@@ -947,7 +947,7 @@
+@@ -1010,7 +1010,7 @@ void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  //=======================================================================
  Standard_Boolean OSD::ToCatchFloatingSignals()
  {
diff --git a/srcpkgs/occt/patches/musl-mallinfo.patch b/srcpkgs/occt/patches/musl-mallinfo.patch
index 4e5825bf1cb0..6ae94992eaf8 100644
--- a/srcpkgs/occt/patches/musl-mallinfo.patch
+++ b/srcpkgs/occt/patches/musl-mallinfo.patch
@@ -1,17 +1,38 @@
-In musl libc there is no struct mallinfo and no function mallinf()
+Adapted from alpine's patch
 
+diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx
+index d9bb91398..d608e04fc 100644
 --- a/src/OSD/OSD_MemInfo.cxx
 +++ b/src/OSD/OSD_MemInfo.cxx
-@@ -147,8 +147,12 @@
-   }
-   aFile.close();
+@@ -35,6 +35,9 @@
+ #include <sstream>
+ #include <fstream>
+ 
++#include <sys/time.h>
++#include <sys/resource.h>
++
+ #include <OSD_MemInfo.hxx>
  
-+  #if defined(__GLIBC__)
-   struct mallinfo aMI = mallinfo();
-   myCounters[MemHeapUsage] = aMI.uordblks;
-+  #else /* XXX not yet coded */
-+  myCounters[MemHeapUsage] = 0;
-+  #endif
+ #if defined(__EMSCRIPTEN__)
+@@ -182,18 +185,9 @@ void OSD_MemInfo::Update()
+ #elif (defined(__linux__) || defined(__linux))
+   if (IsActive (MemHeapUsage))
+   {
+-  #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+-    #if __GLIBC_PREREQ(2,33)
+-      #define HAS_MALLINFO2
+-    #endif
+-  #endif
+-
+-  #ifdef HAS_MALLINFO2
+-    const struct mallinfo2 aMI = mallinfo2();
+-  #else
+-    const struct mallinfo aMI = mallinfo();
+-  #endif
+-    myCounters[MemHeapUsage] = aMI.uordblks;
++    struct rusage ru = { .ru_maxrss = 0 };
++    getrusage(RUSAGE_SELF, &ru);
++    myCounters[MemHeapUsage] = ru.ru_maxrss;
+   }
  
- #elif (defined(__APPLE__))
-   struct task_basic_info aTaskInfo;
+   if (!IsActive (MemVirtual)
diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template
index 6624fea8b53f..b17c91b0058b 100644
--- a/srcpkgs/occt/template
+++ b/srcpkgs/occt/template
@@ -1,26 +1,27 @@
 # Template file for 'occt'
 pkgname=occt
-reverts=7.5.0_1
-version=7.4.0p1
-revision=5
-_gittag="V${version//./_}"
-wrksrc=occt-${_gittag}
+version=7.6.2
+revision=1
+_ver="${version//./_}"
+wrksrc=OCCT-${_ver}
 build_style=cmake
-# XXX: re-enable -DUSE_TBB=ON if possible when updating
-configure_args="-DUSE_FREEIMAGE=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
+configure_args="-DUSE_FREEIMAGE=ON -DUSE_TBB=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
  -DINSTALL_SAMPLES=ON"
-makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tcl-devel
- tk-devel"
+makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tbb-devel
+ tcl-devel tk-devel"
 short_desc="OpenCASCADE Technology - library for CAD/CAM/CAE applications"
 maintainer="Piraty <piraty1@inbox.ru>"
 license="custom:LGPL-2.1-only-with-exceptions"
 homepage="https://www.opencascade.com"
-# distfile: use git instead of official tarball, which requires registration
-# see https://www.opencascade.com/content/packaging-again-debian
-distfiles="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_gittag};sf=tgz>occt-${_gittag}.tar.gz"
-checksum=e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0
+distfiles="https://github.com/Open-Cascade-SAS/OCCT/archive/V${_ver}.tar.gz"
+checksum=dea04077d71507c666aaa7ccaeacc73ab580d6572d7f75e90a1984c4c0302a7a
 conflicts="oce>=0"
 
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" libexecinfo-devel"
+	LDFLAGS="-lexecinfo"
+fi
+
 post_install() {
 	rm ${PKGDESTDIR}/usr/share/doc/opencascade/*_LGPL_*.txt
 	vlicense OCCT_LGPL_EXCEPTION.txt
diff --git a/srcpkgs/occt/update b/srcpkgs/occt/update
deleted file mode 100644
index c128eec6d9c9..000000000000
--- a/srcpkgs/occt/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=tags"
-pattern=">V\K[\d_p]+(?=</a>)"

From 573af487f3f08503011f0ff708d049825038063f Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 26 Mar 2022 11:25:11 -0400
Subject: [PATCH 3/6] freecad: update to 0.20.0.

---
 srcpkgs/freecad/patches/050-occt76.patch | 140 +++++++++++++++++++++++
 srcpkgs/freecad/template                 |   4 +-
 2 files changed, 142 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/freecad/patches/050-occt76.patch

diff --git a/srcpkgs/freecad/patches/050-occt76.patch b/srcpkgs/freecad/patches/050-occt76.patch
new file mode 100644
index 000000000000..7865a59bceef
--- /dev/null
+++ b/srcpkgs/freecad/patches/050-occt76.patch
@@ -0,0 +1,140 @@
+From 6f3b00d67ec0bd0072b7b493e2a38d2a2e3af27d Mon Sep 17 00:00:00 2001
+From: wmayer <wmayer@users.sourceforge.net>
+Date: Mon, 11 Oct 2021 00:30:22 +0200
+Subject: [PATCH] SMESH: port to OCCT 7.6
+
+---
+ .../src/NETGENPlugin/NETGENPlugin_Mesher.cpp       |  7 +++++++
+ .../salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp      |  7 +++++--
+ .../src/StdMeshers/StdMeshers_Adaptive1D.cpp       | 14 ++++++++++++++
+ .../src/StdMeshers/StdMeshers_Quadrangle_2D.cpp    |  2 +-
+ .../src/StdMeshers/StdMeshers_ViscousLayers.cpp    |  8 ++++++++
+ 5 files changed, 35 insertions(+), 3 deletions(-)
+
+diff --git a/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp b/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp
+index cd6f0b2b0758..ea83984b9768 100644
+--- a/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp
++++ b/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp
+@@ -56,6 +56,7 @@
+ #include <NCollection_Map.hxx>
+ #include <Standard_ErrorHandler.hxx>
+ #include <Standard_ProgramError.hxx>
++#include <Standard_Version.hxx>
+ #include <TColStd_MapOfInteger.hxx>
+ #include <TopExp.hxx>
+ #include <TopExp_Explorer.hxx>
+@@ -700,7 +701,13 @@ double NETGENPlugin_Mesher::GetDefaultMinSize(const TopoDS_Shape& geom,
+       BRep_Tool::Triangulation ( TopoDS::Face( fExp.Current() ), loc);
+     if ( triangulation.IsNull() ) continue;
+     const double fTol = BRep_Tool::Tolerance( TopoDS::Face( fExp.Current() ));
++#if OCC_VERSION_HEX < 0x070600
+     const TColgp_Array1OfPnt&   points = triangulation->Nodes();
++#else
++    auto points = [&triangulation](Standard_Integer index) {
++        return triangulation->Node(index);
++    };
++#endif
+     const Poly_Array1OfTriangle& trias = triangulation->Triangles();
+     for ( int iT = trias.Lower(); iT <= trias.Upper(); ++iT )
+     {
+diff --git a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
+index 5a07308310ea..fbb1b250087f 100644
+--- a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
++++ b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
+@@ -38,10 +38,13 @@
+ #include <GC_MakeSegment.hxx>
+ #include <GeomAPI_ExtremaCurveCurve.hxx>
+ #include <Geom_Line.hxx>
+-#include <IntAna_IntConicQuad.hxx>
+-#include <IntAna_Quadric.hxx>
++#include <gp_Cone.hxx>
++#include <gp_Cylinder.hxx>
+ #include <gp_Lin.hxx>
+ #include <gp_Pln.hxx>
++#include <gp_Sphere.hxx>
++#include <IntAna_IntConicQuad.hxx>
++#include <IntAna_Quadric.hxx>
+ 
+ #include <limits>
+ #include <numeric>
+diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp
+index 88970f36b557..7c51601c7bbe 100644
+--- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp
++++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp
+@@ -46,6 +46,7 @@
+ #include <Poly_Array1OfTriangle.hxx>
+ #include <Poly_PolygonOnTriangulation.hxx>
+ #include <Poly_Triangulation.hxx>
++#include <Standard_Version.hxx>
+ #include <TColgp_Array1OfPnt.hxx>
+ #include <TopExp.hxx>
+ #include <TopExp_Explorer.hxx>
+@@ -318,13 +319,26 @@ namespace // internal utils
+     {
+       myFaceTol         = SMESH_MesherHelper::MaxTolerance( face );
+       myTree            = triaTree;
++#if OCC_VERSION_HEX < 0x070600
+       myNodes           = & tr->Nodes();
++#else
++      TColgp_Array1OfPnt* trNodes = new TColgp_Array1OfPnt( 1, tr->NbNodes() );
++      for (Standard_Integer i = myNodes->Lower(); i <= myNodes->Upper(); i++)
++      {
++        trNodes->SetValue(i, tr->Node(i));
++      }
++      myNodes = trNodes;
++      myOwnNodes = true;
++#endif
+       myPolyTrias       = & tr->Triangles();
+       myTriasDeflection = tr->Deflection();
+       if ( !loc.IsIdentity() ) // transform nodes if necessary
+       {
+         TColgp_Array1OfPnt* trsfNodes = new TColgp_Array1OfPnt( myNodes->Lower(), myNodes->Upper() );
+         trsfNodes->Assign( *myNodes );
++#if OCC_VERSION_HEX >= 0x070600
++        delete myNodes; // it's already a copy
++#endif
+         myNodes    = trsfNodes;
+         myOwnNodes = true;
+         const gp_Trsf& trsf = loc;
+diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp
+index f7ac411d9a55..5d5c15c36612 100644
+--- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp
++++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp
+@@ -50,7 +50,7 @@
+ #include <Geom_Surface.hxx>
+ #include <NCollection_DefineArray2.hxx>
+ #include <Precision.hxx>
+-#include <Quantity_Parameter.hxx>
++#include <Standard_Real.hxx>
+ #include <TColStd_SequenceOfInteger.hxx>
+ #include <TColStd_SequenceOfReal.hxx>
+ #include <TColgp_SequenceOfXY.hxx>
+diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp
+index 8ee0e2683259..e9f46183059e 100644
+--- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp
++++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp
+@@ -44,7 +44,10 @@
+ #include "SMESH_subMeshEventListener.hxx"
+ #include "StdMeshers_FaceSide.hxx"
+ 
++#include <Standard_Version.hxx>
++#if OCC_VERSION_HEX < 0x070600
+ #include <Adaptor3d_HSurface.hxx>
++#endif
+ #include <BRepAdaptor_Curve2d.hxx>
+ #include <BRepAdaptor_Surface.hxx>
+ #include <BRepLProp_SLProps.hxx>
+@@ -1340,8 +1343,13 @@ namespace VISCOUS_3D
+     //case GeomAbs_SurfaceOfExtrusion:
+     case GeomAbs_OffsetSurface:
+     {
++#if OCC_VERSION_HEX < 0x070600
+       Handle(Adaptor3d_HSurface) base = surface.BasisSurface();
+       return getRovolutionAxis( base->Surface(), axis );
++#else
++      Handle(Adaptor3d_Surface) base = surface.BasisSurface();
++      return getRovolutionAxis( *base, axis );
++#endif
+     }
+     default: return false;
+     }
diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template
index 1e2aec024fd7..c6587ae809ac 100644
--- a/srcpkgs/freecad/template
+++ b/srcpkgs/freecad/template
@@ -1,6 +1,6 @@
 # Template file for 'freecad'
 pkgname=freecad
-version=0.19.4
+version=0.20
 revision=1
 wrksrc="FreeCAD-${version}"
 build_style=cmake
@@ -36,7 +36,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=e40a1c343956e13c56cc8578d025ae83d68d9d20acda1732953bc8a3883e9722
+checksum=c4d9ce782d3da0edfa16d6218db4ce8613e346124ee47b3fe6a6dae40c0a61d9
 
 if [ "$XBPS_TARGET_LIBC" = musl ]; then
 	makedepends+=" libexecinfo-devel"

From 558b803af61bba2eb0f9c15b90b461598f1351fd Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 23 Jul 2022 23:01:39 -0400
Subject: [PATCH 4/6] freecad: fix patches

---
 srcpkgs/freecad/patches/002-execinfo.patch    | 30 -------------------
 .../patches/010-salomesmesh-execinfo.patch    | 15 ++++++----
 2 files changed, 9 insertions(+), 36 deletions(-)
 delete mode 100644 srcpkgs/freecad/patches/002-execinfo.patch

diff --git a/srcpkgs/freecad/patches/002-execinfo.patch b/srcpkgs/freecad/patches/002-execinfo.patch
deleted file mode 100644
index bcdca77a72a4..000000000000
--- a/srcpkgs/freecad/patches/002-execinfo.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/src/App/Application.cpp	2020-01-22 23:27:42.709273087 +0100
-+++ b/src/App/Application.cpp	2020-01-22 23:50:53.915075955 +0100
-@@ -1485,7 +1485,9 @@
- #endif
- 
- #if defined(FC_OS_LINUX)
-+#ifdef __GLIBC__
- #include <execinfo.h>
-+#endif
- #include <dlfcn.h>
- #include <cxxabi.h>
- 
-@@ -1497,6 +1499,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);
-@@ -1527,6 +1530,9 @@
-     }
- 
-     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
index cc6bdc9ff485..f0aa51852c36 100644
--- a/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch
+++ b/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch
@@ -1,16 +1,19 @@
+diff --git a/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp b/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
+index 23c5083fdf..4547d714d4 100644
 --- a/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
 +++ b/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
-@@ -29,7 +29,9 @@
+@@ -29,8 +29,10 @@
  #ifndef WIN32
  #include <unistd.h>
  #include <sys/stat.h>
 +#ifdef __GLIBC__
  #include <execinfo.h>
-+#endif
  #endif
++#endif
  
  
-@@ -109,6 +111,7 @@
+ namespace Kernel_Utils
+@@ -109,6 +111,7 @@ namespace Kernel_Utils
  #ifndef WIN32
    void print_traceback()
    {
@@ -18,12 +21,12 @@
      void *array[50];
      size_t size;
      char **strings;
-@@ -123,6 +126,9 @@
+@@ -123,6 +126,9 @@ namespace Kernel_Utils
        }
  
      free (strings);
-+#else     
-+   std::cerr << "sorry, no backtrace on musl libc";
++#else
++    std::cerr << "sorry, no backtrace on musl libc";
 +#endif
    }
  #else

From a4ae2f4d8d5d8401958fd4feab6ee4c8c9e6105d Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sun, 24 Jul 2022 21:09:45 -0400
Subject: [PATCH 5/6] freecad: fix patches

---
 .../patches/010-salomesmesh-execinfo.patch    |  52 +++----
 srcpkgs/freecad/patches/050-occt76.patch      | 140 ------------------
 2 files changed, 26 insertions(+), 166 deletions(-)
 delete mode 100644 srcpkgs/freecad/patches/050-occt76.patch

diff --git a/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch b/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch
index f0aa51852c36..fc8a7ef11daf 100644
--- a/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch
+++ b/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch
@@ -3,31 +3,31 @@ index 23c5083fdf..4547d714d4 100644
 --- a/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
 +++ b/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
 @@ -29,8 +29,10 @@
- #ifndef WIN32
- #include <unistd.h>
- #include <sys/stat.h>
-+#ifdef __GLIBC__
- #include <execinfo.h>
- #endif
-+#endif
- 
- 
- namespace Kernel_Utils
+ #ifndef WIN32
+ #include <unistd.h>
+ #include <sys/stat.h>
++#ifdef __GLIBC__
+ #include <execinfo.h>
+ #endif
++#endif
+ 
+ 
+ namespace Kernel_Utils
 @@ -109,6 +111,7 @@ namespace Kernel_Utils
- #ifndef WIN32
-   void print_traceback()
-   {
-+#ifdef __GLIBC__
-     void *array[50];
-     size_t size;
-     char **strings;
+ #ifndef WIN32
+   void print_traceback()
+   {
++#ifdef __GLIBC__
+     void *array[50];
+     size_t size;
+     char **strings;
 @@ -123,6 +126,9 @@ namespace Kernel_Utils
-       }
- 
-     free (strings);
-+#else
-+    std::cerr << "sorry, no backtrace on musl libc";
-+#endif
-   }
- #else
-   #if (_MSC_VER >= 1400) // Visual Studio 2005
+       }
+ 
+     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/050-occt76.patch b/srcpkgs/freecad/patches/050-occt76.patch
deleted file mode 100644
index 7865a59bceef..000000000000
--- a/srcpkgs/freecad/patches/050-occt76.patch
+++ /dev/null
@@ -1,140 +0,0 @@
-From 6f3b00d67ec0bd0072b7b493e2a38d2a2e3af27d Mon Sep 17 00:00:00 2001
-From: wmayer <wmayer@users.sourceforge.net>
-Date: Mon, 11 Oct 2021 00:30:22 +0200
-Subject: [PATCH] SMESH: port to OCCT 7.6
-
----
- .../src/NETGENPlugin/NETGENPlugin_Mesher.cpp       |  7 +++++++
- .../salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp      |  7 +++++--
- .../src/StdMeshers/StdMeshers_Adaptive1D.cpp       | 14 ++++++++++++++
- .../src/StdMeshers/StdMeshers_Quadrangle_2D.cpp    |  2 +-
- .../src/StdMeshers/StdMeshers_ViscousLayers.cpp    |  8 ++++++++
- 5 files changed, 35 insertions(+), 3 deletions(-)
-
-diff --git a/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp b/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp
-index cd6f0b2b0758..ea83984b9768 100644
---- a/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp
-+++ b/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp
-@@ -56,6 +56,7 @@
- #include <NCollection_Map.hxx>
- #include <Standard_ErrorHandler.hxx>
- #include <Standard_ProgramError.hxx>
-+#include <Standard_Version.hxx>
- #include <TColStd_MapOfInteger.hxx>
- #include <TopExp.hxx>
- #include <TopExp_Explorer.hxx>
-@@ -700,7 +701,13 @@ double NETGENPlugin_Mesher::GetDefaultMinSize(const TopoDS_Shape& geom,
-       BRep_Tool::Triangulation ( TopoDS::Face( fExp.Current() ), loc);
-     if ( triangulation.IsNull() ) continue;
-     const double fTol = BRep_Tool::Tolerance( TopoDS::Face( fExp.Current() ));
-+#if OCC_VERSION_HEX < 0x070600
-     const TColgp_Array1OfPnt&   points = triangulation->Nodes();
-+#else
-+    auto points = [&triangulation](Standard_Integer index) {
-+        return triangulation->Node(index);
-+    };
-+#endif
-     const Poly_Array1OfTriangle& trias = triangulation->Triangles();
-     for ( int iT = trias.Lower(); iT <= trias.Upper(); ++iT )
-     {
-diff --git a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
-index 5a07308310ea..fbb1b250087f 100644
---- a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
-+++ b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshAlgos.cpp
-@@ -38,10 +38,13 @@
- #include <GC_MakeSegment.hxx>
- #include <GeomAPI_ExtremaCurveCurve.hxx>
- #include <Geom_Line.hxx>
--#include <IntAna_IntConicQuad.hxx>
--#include <IntAna_Quadric.hxx>
-+#include <gp_Cone.hxx>
-+#include <gp_Cylinder.hxx>
- #include <gp_Lin.hxx>
- #include <gp_Pln.hxx>
-+#include <gp_Sphere.hxx>
-+#include <IntAna_IntConicQuad.hxx>
-+#include <IntAna_Quadric.hxx>
- 
- #include <limits>
- #include <numeric>
-diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp
-index 88970f36b557..7c51601c7bbe 100644
---- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp
-+++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Adaptive1D.cpp
-@@ -46,6 +46,7 @@
- #include <Poly_Array1OfTriangle.hxx>
- #include <Poly_PolygonOnTriangulation.hxx>
- #include <Poly_Triangulation.hxx>
-+#include <Standard_Version.hxx>
- #include <TColgp_Array1OfPnt.hxx>
- #include <TopExp.hxx>
- #include <TopExp_Explorer.hxx>
-@@ -318,13 +319,26 @@ namespace // internal utils
-     {
-       myFaceTol         = SMESH_MesherHelper::MaxTolerance( face );
-       myTree            = triaTree;
-+#if OCC_VERSION_HEX < 0x070600
-       myNodes           = & tr->Nodes();
-+#else
-+      TColgp_Array1OfPnt* trNodes = new TColgp_Array1OfPnt( 1, tr->NbNodes() );
-+      for (Standard_Integer i = myNodes->Lower(); i <= myNodes->Upper(); i++)
-+      {
-+        trNodes->SetValue(i, tr->Node(i));
-+      }
-+      myNodes = trNodes;
-+      myOwnNodes = true;
-+#endif
-       myPolyTrias       = & tr->Triangles();
-       myTriasDeflection = tr->Deflection();
-       if ( !loc.IsIdentity() ) // transform nodes if necessary
-       {
-         TColgp_Array1OfPnt* trsfNodes = new TColgp_Array1OfPnt( myNodes->Lower(), myNodes->Upper() );
-         trsfNodes->Assign( *myNodes );
-+#if OCC_VERSION_HEX >= 0x070600
-+        delete myNodes; // it's already a copy
-+#endif
-         myNodes    = trsfNodes;
-         myOwnNodes = true;
-         const gp_Trsf& trsf = loc;
-diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp
-index f7ac411d9a55..5d5c15c36612 100644
---- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp
-+++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Quadrangle_2D.cpp
-@@ -50,7 +50,7 @@
- #include <Geom_Surface.hxx>
- #include <NCollection_DefineArray2.hxx>
- #include <Precision.hxx>
--#include <Quantity_Parameter.hxx>
-+#include <Standard_Real.hxx>
- #include <TColStd_SequenceOfInteger.hxx>
- #include <TColStd_SequenceOfReal.hxx>
- #include <TColgp_SequenceOfXY.hxx>
-diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp
-index 8ee0e2683259..e9f46183059e 100644
---- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp
-+++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_ViscousLayers.cpp
-@@ -44,7 +44,10 @@
- #include "SMESH_subMeshEventListener.hxx"
- #include "StdMeshers_FaceSide.hxx"
- 
-+#include <Standard_Version.hxx>
-+#if OCC_VERSION_HEX < 0x070600
- #include <Adaptor3d_HSurface.hxx>
-+#endif
- #include <BRepAdaptor_Curve2d.hxx>
- #include <BRepAdaptor_Surface.hxx>
- #include <BRepLProp_SLProps.hxx>
-@@ -1340,8 +1343,13 @@ namespace VISCOUS_3D
-     //case GeomAbs_SurfaceOfExtrusion:
-     case GeomAbs_OffsetSurface:
-     {
-+#if OCC_VERSION_HEX < 0x070600
-       Handle(Adaptor3d_HSurface) base = surface.BasisSurface();
-       return getRovolutionAxis( base->Surface(), axis );
-+#else
-+      Handle(Adaptor3d_Surface) base = surface.BasisSurface();
-+      return getRovolutionAxis( *base, axis );
-+#endif
-     }
-     default: return false;
-     }

From 6f94e8310b8d527a04c70af860e3616cc5f17044 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sun, 24 Jul 2022 21:31:10 -0400
Subject: [PATCH 6/6] cleanup freecad patches

---
 srcpkgs/freecad/patches/150-vtk9.patch       | 796 -------------------
 srcpkgs/freecad/patches/152-cmake-vtk9.patch |  53 --
 2 files changed, 849 deletions(-)
 delete mode 100644 srcpkgs/freecad/patches/150-vtk9.patch
 delete mode 100644 srcpkgs/freecad/patches/152-cmake-vtk9.patch

diff --git a/srcpkgs/freecad/patches/150-vtk9.patch b/srcpkgs/freecad/patches/150-vtk9.patch
deleted file mode 100644
index 92673e7c9b9f..000000000000
--- a/srcpkgs/freecad/patches/150-vtk9.patch
+++ /dev/null
@@ -1,796 +0,0 @@
-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 14a6d9a763f..0e9b9e6c905 100644
---- a/src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx
-+++ b/src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx
-@@ -40,11 +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;
- class SMDS_MeshFace;
-@@ -192,7 +197,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 9e4a23eddfb..77465814541 100644
---- a/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx
-+++ b/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 299093c94f6..2680c217305 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp
-+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp
-@@ -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();
-+#ifdef VTK_CELL_ARRAY_V2
-+  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 +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();
--  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 d6049c0bd19..a41f5c18e78 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp
-+++ b/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);
-@@ -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
- 
-   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++)
-@@ -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)
- {
-   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 61c8e751d94..1eac2907d3d 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp
-+++ b/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 95438eab064..0df32e3b97c 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp
-+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp
-@@ -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;
-     grid->GetCellPoints(myVtkID, npts, pts);
-@@ -156,6 +167,7 @@ bool SMDS_Mesh0DElement::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbN
-     }
-     myNode = nodes[0];
-     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 f647a5f1b8f..5b903c8fb55 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp
-+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp
-@@ -191,7 +191,7 @@ class SMDS_MeshNode_MyInvIterator: public SMDS_ElemIterator
- 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 fbd903b1e74..ff2b81e9694 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
-+++ b/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 = this->GetCellLocationsArray()->GetValue(j);
-+#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 );
-@@ -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)
- {
-+#ifdef VTK_CELL_ARRAY_V2
-+  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
-   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);
-         }
-     }
-+#endif
- }
- 
- /*! reorder the nodes of a face
-@@ -995,11 +1015,20 @@ void SMDS_UnstructuredGrid::BuildLinks()
-     this->Links->UnRegister(this);
-     }
- 
-+#ifdef VTK_CELL_ARRAY_V2
-+  this->Links = SMDS_CellLinks::New();
-+  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());
-   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 deb05985f00..63b6eabb704 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp
-+++ b/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 9786abf9aae..6d772a3cd4a 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp
-+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp
-@@ -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;
-   grid->GetCellPoints(myVtkID, npts, pts);
-@@ -79,6 +92,7 @@ bool SMDS_VtkEdge::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
-     {
-       pts[i] = nodes[i]->getVtkId();
-     }
-+#endif
-   SMDS_Mesh::_meshList[myMeshId]->setMyModified();
-   return true;
- }
-@@ -87,7 +101,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 +151,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 1389e0d3585..cb981bfb18e 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp
-+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp
-@@ -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;
-   grid->GetCellPoints(myVtkID, npts, pts);
-@@ -113,6 +126,7 @@ bool SMDS_VtkFace::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
-     {
-       pts[i] = nodes[i]->getVtkId();
-     }
-+#endif
-   SMDS_Mesh::_meshList[myMeshId]->setMyModified();
-   return true;
- }
-@@ -173,7 +187,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 +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();
--  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 +267,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++)
-@@ -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;
-   grid->GetCellPoints(myVtkID, npts, pts);
-   grid->RemoveReferenceToCell(pts[0], myVtkID);
-   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 015edf75fd2..19ebd0746c8 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp
-+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp
-@@ -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;
-   grid->GetCellPoints(myVtkID, npts, pts);
-@@ -145,6 +158,7 @@ bool SMDS_VtkVolume::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes
-     {
-       pts[i] = nodes[i]->getVtkId();
-     }
-+#endif
-   SMDS_Mesh::_meshList[myMeshId]->setMyModified();
-   return true;
- }
-@@ -207,7 +221,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 +250,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 +290,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 +326,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 +356,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 +386,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 +444,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 +457,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 +475,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 +488,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 +550,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 fcd044b00f2..f54c24f8618 100644
---- a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
-+++ b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
-@@ -11348,7 +11348,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];
-@@ -11527,7 +11527,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)
-@@ -11708,7 +11708,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];
-@@ -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;
--          vtkIdType* pts = 0;
-+          vtkIdTypePtr pts = 0;
-           grid->GetCellPoints(vtkId, npts, pts);
-           for (int i=0; i<npts; i++)
-             {
diff --git a/srcpkgs/freecad/patches/152-cmake-vtk9.patch b/srcpkgs/freecad/patches/152-cmake-vtk9.patch
deleted file mode 100644
index 7abffcf57e84..000000000000
--- a/srcpkgs/freecad/patches/152-cmake-vtk9.patch
+++ /dev/null
@@ -1,53 +0,0 @@
---- a/cMake/FreeCAD_Helpers/SetupSalomeSMESH.cmake	2020-11-26 15:59:27.000000000 +0100
-+++ b/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)

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

* Re: [PR PATCH] [Updated] [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (15 preceding siblings ...)
  2022-07-25  1:31 ` karl-nilsson
@ 2022-07-25  3:02 ` karl-nilsson
  2022-07-25  3:38 ` karl-nilsson
                   ` (24 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: karl-nilsson @ 2022-07-25  3:02 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by karl-nilsson against master on the void-packages repository

https://github.com/karl-nilsson/void-packages occt_7.6
https://github.com/void-linux/void-packages/pull/36356

[WIP] occt: update to 7.6.2


#### Testing the changes
- I tested the changes in this PR: **briefly**


#### Local build testing
- I built this PR locally for my native architecture, x64-glibc


Like previously, broken ABI
```console
During initialization the error "/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv" occurred in /home/nilsson/.FreeCAD/Mod/A2plus/InitGui.py                                                                                                                        
Please look into the log file for further information                                                                                                
Wizard shaft module cannot be loaded                                                                                                                 
/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv                                                              
connect failed: No such file or directory      
```

Looks like we'll have to update or patch freecad
```console
In file included from /usr/include/opencascade/Extrema_POnSurf.lxx:15,
                 from /usr/include/opencascade/Extrema_POnSurf.hxx:75,
                 from /usr/include/opencascade/Extrema_ExtPElS.hxx:27,
                 from /usr/include/opencascade/Extrema_ExtPS.hxx:24,
                 from /usr/include/opencascade/ShapeAnalysis_Surface.hxx:20,
                 from ../src/3rdParty/salomesmesh/inc/SMESH_MesherHelper.hxx:37,
                 from ../src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp:34:
/usr/include/opencascade/Precision.hxx:98:7: note: previous definition of 'class Precision'
   98 | class Precision
      |       ^~~~~~~~~

```

ping @Piraty 

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-occt_7.6-36356.patch --]
[-- Type: text/x-diff, Size: 50932 bytes --]

From 7f1c7b752442abc3161a5e7f448080056f961035 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 20:24:49 -0400
Subject: [PATCH 1/3] python3-occ: remove package

* upstream is well behind occt
---
 srcpkgs/python3-occ/patches/python3.10.patch | 15 ---------------
 srcpkgs/python3-occ/template                 | 17 -----------------
 srcpkgs/removed-packages/template            |  1 +
 3 files changed, 1 insertion(+), 32 deletions(-)
 delete mode 100644 srcpkgs/python3-occ/patches/python3.10.patch
 delete mode 100644 srcpkgs/python3-occ/template

diff --git a/srcpkgs/python3-occ/patches/python3.10.patch b/srcpkgs/python3-occ/patches/python3.10.patch
deleted file mode 100644
index e192608fd3b3..000000000000
--- a/srcpkgs/python3-occ/patches/python3.10.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/src/Display/SimpleGui.py b/src/Display/SimpleGui.py
-index 42705a82..6a274c16 100644
---- a/src/Display/SimpleGui.py
-+++ b/src/Display/SimpleGui.py
-@@ -161,8 +161,8 @@ def init_display(backend_str: Optional[str]=None,
-             def centerOnScreen(self) -> None:
-                 '''Centers the window on the screen.'''
-                 resolution = QtWidgets.QApplication.desktop().screenGeometry()
--                x = (resolution.width() - self.frameSize().width()) / 2
--                y = (resolution.height() - self.frameSize().height()) / 2
-+                x = (resolution.width() - self.frameSize().width()) // 2
-+                y = (resolution.height() - self.frameSize().height()) // 2
-                 self.move(x, y)
- 
-             def add_menu(self, menu_name: str) -> None:
diff --git a/srcpkgs/python3-occ/template b/srcpkgs/python3-occ/template
deleted file mode 100644
index bee03373a3d1..000000000000
--- a/srcpkgs/python3-occ/template
+++ /dev/null
@@ -1,17 +0,0 @@
-# Template file for 'python3-occ'
-pkgname=python3-occ
-version=7.4.1
-revision=3
-archs="i686* x86_64* armv7l* aarch64* ppc*"
-wrksrc="pythonocc-core-${version}"
-build_style=cmake
-configure_args="-DPYTHONOCC_BUILD_TYPE=None -DCMAKE_BUILD_TYPE=None"
-hostmakedepends="python3 swig"
-makedepends="python3-devel occt-devel freetype-devel swig"
-depends="python3 occt freetype"
-short_desc="Industrial strength 3D CAD Python3 package"
-maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
-license="LGPL-3.0-or-later"
-homepage="http://pythonocc.org"
-distfiles="https://github.com/tpaviot/pythonocc-core/archive/${version}.tar.gz"
-checksum=6d62002244a0e7f4e5c1ad590d332a60601c44b2501ad017361443b54371e667
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 8456cb959d35..488e62ec105a 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -343,6 +343,7 @@ replaces="
  python3-keepalive<=0.5_6
  python3-pgpdump<=1.5_10
  python3-lockfile<=0.12.2_7
+ python3-occ<=7.4.1_3
  python3-pyPEG2<=2.15.2_7
  python3-pyenet<=5.15.0_2
  python3-pyside-phonon<=5.15.0_2

From 9dab74dc6b5acec06545396e3cbdd3c5e2f9e9fb Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 19:29:00 -0400
Subject: [PATCH 2/3] occt: update to 7.6.2.

---
 .../occt/patches/cmake-build-type-none.patch  |  6 +--
 srcpkgs/occt/patches/musl-fenv.patch          | 18 ++++----
 srcpkgs/occt/patches/musl-mallinfo.patch      | 45 ++++++++++++++-----
 srcpkgs/occt/template                         | 27 +++++------
 srcpkgs/occt/update                           |  2 -
 5 files changed, 60 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/occt/update

diff --git a/srcpkgs/occt/patches/cmake-build-type-none.patch b/srcpkgs/occt/patches/cmake-build-type-none.patch
index ecb0e3da3929..d2caec8c4e87 100644
--- a/srcpkgs/occt/patches/cmake-build-type-none.patch
+++ b/srcpkgs/occt/patches/cmake-build-type-none.patch
@@ -1,8 +1,8 @@
-Index: CMakeLists.txt
-===================================================================
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f4ec871f5..9b0644e94 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_D
+@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
  
  set (CMAKE_SUPPRESS_REGENERATION TRUE)
  
diff --git a/srcpkgs/occt/patches/musl-fenv.patch b/srcpkgs/occt/patches/musl-fenv.patch
index 09da8d0afeae..06a8e3a89cfd 100644
--- a/srcpkgs/occt/patches/musl-fenv.patch
+++ b/srcpkgs/occt/patches/musl-fenv.patch
@@ -5,18 +5,20 @@ is probably wrong, but I don't have a replacement for the
 non-posix functions fegetexcept(3) and feenableexcept(3).
 """
 
+diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx
+index 007f5ccaa..fe39e07ac 100644
 --- a/src/OSD/OSD_signal.cxx
 +++ b/src/OSD/OSD_signal.cxx
-@@ -703,7 +703,7 @@
- 
+@@ -761,7 +761,7 @@ typedef void (* SIG_PFV) (int);
+
  #include <signal.h>
- 
--#if !defined(__ANDROID__) && !defined(__QNX__)
-+#if !defined(__ANDROID__) && !defined(__QNX__) && defined(__GLIBC__)
+
+-#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
++#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && defined(__GLIBC__)
    #include <sys/signal.h>
  #endif
- 
-@@ -914,7 +914,7 @@
+
+@@ -977,7 +977,7 @@ static void SegvHandler(const int theSignal,
  //=======================================================================
  void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  {
@@ -25,7 +27,7 @@ non-posix functions fegetexcept(3) and feenableexcept(3).
    feclearexcept (FE_ALL_EXCEPT);
    if (theFloatingSignal)
    {
-@@ -947,7 +947,7 @@
+@@ -1010,7 +1010,7 @@ void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  //=======================================================================
  Standard_Boolean OSD::ToCatchFloatingSignals()
  {
diff --git a/srcpkgs/occt/patches/musl-mallinfo.patch b/srcpkgs/occt/patches/musl-mallinfo.patch
index 4e5825bf1cb0..6ae94992eaf8 100644
--- a/srcpkgs/occt/patches/musl-mallinfo.patch
+++ b/srcpkgs/occt/patches/musl-mallinfo.patch
@@ -1,17 +1,38 @@
-In musl libc there is no struct mallinfo and no function mallinf()
+Adapted from alpine's patch
 
+diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx
+index d9bb91398..d608e04fc 100644
 --- a/src/OSD/OSD_MemInfo.cxx
 +++ b/src/OSD/OSD_MemInfo.cxx
-@@ -147,8 +147,12 @@
-   }
-   aFile.close();
+@@ -35,6 +35,9 @@
+ #include <sstream>
+ #include <fstream>
+ 
++#include <sys/time.h>
++#include <sys/resource.h>
++
+ #include <OSD_MemInfo.hxx>
  
-+  #if defined(__GLIBC__)
-   struct mallinfo aMI = mallinfo();
-   myCounters[MemHeapUsage] = aMI.uordblks;
-+  #else /* XXX not yet coded */
-+  myCounters[MemHeapUsage] = 0;
-+  #endif
+ #if defined(__EMSCRIPTEN__)
+@@ -182,18 +185,9 @@ void OSD_MemInfo::Update()
+ #elif (defined(__linux__) || defined(__linux))
+   if (IsActive (MemHeapUsage))
+   {
+-  #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+-    #if __GLIBC_PREREQ(2,33)
+-      #define HAS_MALLINFO2
+-    #endif
+-  #endif
+-
+-  #ifdef HAS_MALLINFO2
+-    const struct mallinfo2 aMI = mallinfo2();
+-  #else
+-    const struct mallinfo aMI = mallinfo();
+-  #endif
+-    myCounters[MemHeapUsage] = aMI.uordblks;
++    struct rusage ru = { .ru_maxrss = 0 };
++    getrusage(RUSAGE_SELF, &ru);
++    myCounters[MemHeapUsage] = ru.ru_maxrss;
+   }
  
- #elif (defined(__APPLE__))
-   struct task_basic_info aTaskInfo;
+   if (!IsActive (MemVirtual)
diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template
index 6624fea8b53f..b17c91b0058b 100644
--- a/srcpkgs/occt/template
+++ b/srcpkgs/occt/template
@@ -1,26 +1,27 @@
 # Template file for 'occt'
 pkgname=occt
-reverts=7.5.0_1
-version=7.4.0p1
-revision=5
-_gittag="V${version//./_}"
-wrksrc=occt-${_gittag}
+version=7.6.2
+revision=1
+_ver="${version//./_}"
+wrksrc=OCCT-${_ver}
 build_style=cmake
-# XXX: re-enable -DUSE_TBB=ON if possible when updating
-configure_args="-DUSE_FREEIMAGE=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
+configure_args="-DUSE_FREEIMAGE=ON -DUSE_TBB=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
  -DINSTALL_SAMPLES=ON"
-makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tcl-devel
- tk-devel"
+makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tbb-devel
+ tcl-devel tk-devel"
 short_desc="OpenCASCADE Technology - library for CAD/CAM/CAE applications"
 maintainer="Piraty <piraty1@inbox.ru>"
 license="custom:LGPL-2.1-only-with-exceptions"
 homepage="https://www.opencascade.com"
-# distfile: use git instead of official tarball, which requires registration
-# see https://www.opencascade.com/content/packaging-again-debian
-distfiles="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_gittag};sf=tgz>occt-${_gittag}.tar.gz"
-checksum=e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0
+distfiles="https://github.com/Open-Cascade-SAS/OCCT/archive/V${_ver}.tar.gz"
+checksum=dea04077d71507c666aaa7ccaeacc73ab580d6572d7f75e90a1984c4c0302a7a
 conflicts="oce>=0"
 
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" libexecinfo-devel"
+	LDFLAGS="-lexecinfo"
+fi
+
 post_install() {
 	rm ${PKGDESTDIR}/usr/share/doc/opencascade/*_LGPL_*.txt
 	vlicense OCCT_LGPL_EXCEPTION.txt
diff --git a/srcpkgs/occt/update b/srcpkgs/occt/update
deleted file mode 100644
index c128eec6d9c9..000000000000
--- a/srcpkgs/occt/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=tags"
-pattern=">V\K[\d_p]+(?=</a>)"

From 37007e03777ddd134265ca54841aec09d34204bd Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 26 Mar 2022 11:25:11 -0400
Subject: [PATCH 3/3] freecad: update to 0.20.0.

---
 srcpkgs/freecad/patches/002-execinfo.patch    |  30 -
 .../patches/010-salomesmesh-execinfo.patch    |  59 +-
 srcpkgs/freecad/patches/150-vtk9.patch        | 796 ------------------
 srcpkgs/freecad/patches/152-cmake-vtk9.patch  |  53 --
 srcpkgs/freecad/template                      |   4 +-
 5 files changed, 33 insertions(+), 909 deletions(-)
 delete mode 100644 srcpkgs/freecad/patches/002-execinfo.patch
 delete mode 100644 srcpkgs/freecad/patches/150-vtk9.patch
 delete mode 100644 srcpkgs/freecad/patches/152-cmake-vtk9.patch

diff --git a/srcpkgs/freecad/patches/002-execinfo.patch b/srcpkgs/freecad/patches/002-execinfo.patch
deleted file mode 100644
index bcdca77a72a4..000000000000
--- a/srcpkgs/freecad/patches/002-execinfo.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/src/App/Application.cpp	2020-01-22 23:27:42.709273087 +0100
-+++ b/src/App/Application.cpp	2020-01-22 23:50:53.915075955 +0100
-@@ -1485,7 +1485,9 @@
- #endif
- 
- #if defined(FC_OS_LINUX)
-+#ifdef __GLIBC__
- #include <execinfo.h>
-+#endif
- #include <dlfcn.h>
- #include <cxxabi.h>
- 
-@@ -1497,6 +1499,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);
-@@ -1527,6 +1530,9 @@
-     }
- 
-     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
index cc6bdc9ff485..fc8a7ef11daf 100644
--- a/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch
+++ b/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch
@@ -1,30 +1,33 @@
+diff --git a/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp b/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
+index 23c5083fdf..4547d714d4 100644
 --- a/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
 +++ b/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
+@@ -29,8 +29,10 @@
+ #ifndef WIN32
+ #include <unistd.h>
+ #include <sys/stat.h>
++#ifdef __GLIBC__
+ #include <execinfo.h>
+ #endif
++#endif
+ 
+ 
+ namespace Kernel_Utils
+@@ -109,6 +111,7 @@ namespace Kernel_Utils
+ #ifndef WIN32
+   void print_traceback()
+   {
++#ifdef __GLIBC__
+     void *array[50];
+     size_t size;
+     char **strings;
+@@ -123,6 +126,9 @@ namespace Kernel_Utils
+       }
+ 
+     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/150-vtk9.patch b/srcpkgs/freecad/patches/150-vtk9.patch
deleted file mode 100644
index 92673e7c9b9f..000000000000
--- a/srcpkgs/freecad/patches/150-vtk9.patch
+++ /dev/null
@@ -1,796 +0,0 @@
-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 14a6d9a763f..0e9b9e6c905 100644
---- a/src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx
-+++ b/src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx
-@@ -40,11 +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;
- class SMDS_MeshFace;
-@@ -192,7 +197,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 9e4a23eddfb..77465814541 100644
---- a/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx
-+++ b/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 299093c94f6..2680c217305 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp
-+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp
-@@ -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();
-+#ifdef VTK_CELL_ARRAY_V2
-+  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 +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();
--  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 d6049c0bd19..a41f5c18e78 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp
-+++ b/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);
-@@ -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
- 
-   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++)
-@@ -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)
- {
-   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 61c8e751d94..1eac2907d3d 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp
-+++ b/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 95438eab064..0df32e3b97c 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp
-+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp
-@@ -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;
-     grid->GetCellPoints(myVtkID, npts, pts);
-@@ -156,6 +167,7 @@ bool SMDS_Mesh0DElement::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbN
-     }
-     myNode = nodes[0];
-     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 f647a5f1b8f..5b903c8fb55 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp
-+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp
-@@ -191,7 +191,7 @@ class SMDS_MeshNode_MyInvIterator: public SMDS_ElemIterator
- 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 fbd903b1e74..ff2b81e9694 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
-+++ b/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 = this->GetCellLocationsArray()->GetValue(j);
-+#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 );
-@@ -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)
- {
-+#ifdef VTK_CELL_ARRAY_V2
-+  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
-   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);
-         }
-     }
-+#endif
- }
- 
- /*! reorder the nodes of a face
-@@ -995,11 +1015,20 @@ void SMDS_UnstructuredGrid::BuildLinks()
-     this->Links->UnRegister(this);
-     }
- 
-+#ifdef VTK_CELL_ARRAY_V2
-+  this->Links = SMDS_CellLinks::New();
-+  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());
-   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 deb05985f00..63b6eabb704 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp
-+++ b/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 9786abf9aae..6d772a3cd4a 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp
-+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp
-@@ -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;
-   grid->GetCellPoints(myVtkID, npts, pts);
-@@ -79,6 +92,7 @@ bool SMDS_VtkEdge::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
-     {
-       pts[i] = nodes[i]->getVtkId();
-     }
-+#endif
-   SMDS_Mesh::_meshList[myMeshId]->setMyModified();
-   return true;
- }
-@@ -87,7 +101,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 +151,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 1389e0d3585..cb981bfb18e 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp
-+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp
-@@ -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;
-   grid->GetCellPoints(myVtkID, npts, pts);
-@@ -113,6 +126,7 @@ bool SMDS_VtkFace::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
-     {
-       pts[i] = nodes[i]->getVtkId();
-     }
-+#endif
-   SMDS_Mesh::_meshList[myMeshId]->setMyModified();
-   return true;
- }
-@@ -173,7 +187,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 +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();
--  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 +267,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++)
-@@ -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;
-   grid->GetCellPoints(myVtkID, npts, pts);
-   grid->RemoveReferenceToCell(pts[0], myVtkID);
-   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 015edf75fd2..19ebd0746c8 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp
-+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp
-@@ -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;
-   grid->GetCellPoints(myVtkID, npts, pts);
-@@ -145,6 +158,7 @@ bool SMDS_VtkVolume::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes
-     {
-       pts[i] = nodes[i]->getVtkId();
-     }
-+#endif
-   SMDS_Mesh::_meshList[myMeshId]->setMyModified();
-   return true;
- }
-@@ -207,7 +221,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 +250,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 +290,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 +326,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 +356,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 +386,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 +444,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 +457,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 +475,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 +488,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 +550,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 fcd044b00f2..f54c24f8618 100644
---- a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
-+++ b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
-@@ -11348,7 +11348,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];
-@@ -11527,7 +11527,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)
-@@ -11708,7 +11708,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];
-@@ -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;
--          vtkIdType* pts = 0;
-+          vtkIdTypePtr pts = 0;
-           grid->GetCellPoints(vtkId, npts, pts);
-           for (int i=0; i<npts; i++)
-             {
diff --git a/srcpkgs/freecad/patches/152-cmake-vtk9.patch b/srcpkgs/freecad/patches/152-cmake-vtk9.patch
deleted file mode 100644
index 7abffcf57e84..000000000000
--- a/srcpkgs/freecad/patches/152-cmake-vtk9.patch
+++ /dev/null
@@ -1,53 +0,0 @@
---- a/cMake/FreeCAD_Helpers/SetupSalomeSMESH.cmake	2020-11-26 15:59:27.000000000 +0100
-+++ b/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 1e2aec024fd7..c6587ae809ac 100644
--- a/srcpkgs/freecad/template
+++ b/srcpkgs/freecad/template
@@ -1,6 +1,6 @@
 # Template file for 'freecad'
 pkgname=freecad
-version=0.19.4
+version=0.20
 revision=1
 wrksrc="FreeCAD-${version}"
 build_style=cmake
@@ -36,7 +36,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=e40a1c343956e13c56cc8578d025ae83d68d9d20acda1732953bc8a3883e9722
+checksum=c4d9ce782d3da0edfa16d6218db4ce8613e346124ee47b3fe6a6dae40c0a61d9
 
 if [ "$XBPS_TARGET_LIBC" = musl ]; then
 	makedepends+=" libexecinfo-devel"

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

* Re: [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (16 preceding siblings ...)
  2022-07-25  3:02 ` karl-nilsson
@ 2022-07-25  3:38 ` karl-nilsson
  2022-07-25 13:16 ` [PR PATCH] [Updated] " karl-nilsson
                   ` (23 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: karl-nilsson @ 2022-07-25  3:38 UTC (permalink / raw)
  To: ml

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

New comment by karl-nilsson on void-packages repository

https://github.com/void-linux/void-packages/pull/36356#issuecomment-1193519957

Comment:
@Piraty I think it's ready

@yopito I updated FreeCAD to v0.20, and it looks like most of the patches were upstreamed. Could you please double-check my work?

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

* Re: [PR PATCH] [Updated] [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (17 preceding siblings ...)
  2022-07-25  3:38 ` karl-nilsson
@ 2022-07-25 13:16 ` karl-nilsson
  2022-07-26  3:39 ` [PR REVIEW] " yopito
                   ` (22 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: karl-nilsson @ 2022-07-25 13:16 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by karl-nilsson against master on the void-packages repository

https://github.com/karl-nilsson/void-packages occt_7.6
https://github.com/void-linux/void-packages/pull/36356

[WIP] occt: update to 7.6.2


#### Testing the changes
- I tested the changes in this PR: **briefly**


#### Local build testing
- I built this PR locally for my native architecture, x64-glibc


Like previously, broken ABI
```console
During initialization the error "/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv" occurred in /home/nilsson/.FreeCAD/Mod/A2plus/InitGui.py                                                                                                                        
Please look into the log file for further information                                                                                                
Wizard shaft module cannot be loaded                                                                                                                 
/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv                                                              
connect failed: No such file or directory      
```

Looks like we'll have to update or patch freecad
```console
In file included from /usr/include/opencascade/Extrema_POnSurf.lxx:15,
                 from /usr/include/opencascade/Extrema_POnSurf.hxx:75,
                 from /usr/include/opencascade/Extrema_ExtPElS.hxx:27,
                 from /usr/include/opencascade/Extrema_ExtPS.hxx:24,
                 from /usr/include/opencascade/ShapeAnalysis_Surface.hxx:20,
                 from ../src/3rdParty/salomesmesh/inc/SMESH_MesherHelper.hxx:37,
                 from ../src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp:34:
/usr/include/opencascade/Precision.hxx:98:7: note: previous definition of 'class Precision'
   98 | class Precision
      |       ^~~~~~~~~

```

ping @Piraty 

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-occt_7.6-36356.patch --]
[-- Type: text/x-diff, Size: 51307 bytes --]

From 7f1c7b752442abc3161a5e7f448080056f961035 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 20:24:49 -0400
Subject: [PATCH 1/3] python3-occ: remove package

* upstream is well behind occt
---
 srcpkgs/python3-occ/patches/python3.10.patch | 15 ---------------
 srcpkgs/python3-occ/template                 | 17 -----------------
 srcpkgs/removed-packages/template            |  1 +
 3 files changed, 1 insertion(+), 32 deletions(-)
 delete mode 100644 srcpkgs/python3-occ/patches/python3.10.patch
 delete mode 100644 srcpkgs/python3-occ/template

diff --git a/srcpkgs/python3-occ/patches/python3.10.patch b/srcpkgs/python3-occ/patches/python3.10.patch
deleted file mode 100644
index e192608fd3b3..000000000000
--- a/srcpkgs/python3-occ/patches/python3.10.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/src/Display/SimpleGui.py b/src/Display/SimpleGui.py
-index 42705a82..6a274c16 100644
---- a/src/Display/SimpleGui.py
-+++ b/src/Display/SimpleGui.py
-@@ -161,8 +161,8 @@ def init_display(backend_str: Optional[str]=None,
-             def centerOnScreen(self) -> None:
-                 '''Centers the window on the screen.'''
-                 resolution = QtWidgets.QApplication.desktop().screenGeometry()
--                x = (resolution.width() - self.frameSize().width()) / 2
--                y = (resolution.height() - self.frameSize().height()) / 2
-+                x = (resolution.width() - self.frameSize().width()) // 2
-+                y = (resolution.height() - self.frameSize().height()) // 2
-                 self.move(x, y)
- 
-             def add_menu(self, menu_name: str) -> None:
diff --git a/srcpkgs/python3-occ/template b/srcpkgs/python3-occ/template
deleted file mode 100644
index bee03373a3d1..000000000000
--- a/srcpkgs/python3-occ/template
+++ /dev/null
@@ -1,17 +0,0 @@
-# Template file for 'python3-occ'
-pkgname=python3-occ
-version=7.4.1
-revision=3
-archs="i686* x86_64* armv7l* aarch64* ppc*"
-wrksrc="pythonocc-core-${version}"
-build_style=cmake
-configure_args="-DPYTHONOCC_BUILD_TYPE=None -DCMAKE_BUILD_TYPE=None"
-hostmakedepends="python3 swig"
-makedepends="python3-devel occt-devel freetype-devel swig"
-depends="python3 occt freetype"
-short_desc="Industrial strength 3D CAD Python3 package"
-maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
-license="LGPL-3.0-or-later"
-homepage="http://pythonocc.org"
-distfiles="https://github.com/tpaviot/pythonocc-core/archive/${version}.tar.gz"
-checksum=6d62002244a0e7f4e5c1ad590d332a60601c44b2501ad017361443b54371e667
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 8456cb959d35..488e62ec105a 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -343,6 +343,7 @@ replaces="
  python3-keepalive<=0.5_6
  python3-pgpdump<=1.5_10
  python3-lockfile<=0.12.2_7
+ python3-occ<=7.4.1_3
  python3-pyPEG2<=2.15.2_7
  python3-pyenet<=5.15.0_2
  python3-pyside-phonon<=5.15.0_2

From 9dab74dc6b5acec06545396e3cbdd3c5e2f9e9fb Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 19:29:00 -0400
Subject: [PATCH 2/3] occt: update to 7.6.2.

---
 .../occt/patches/cmake-build-type-none.patch  |  6 +--
 srcpkgs/occt/patches/musl-fenv.patch          | 18 ++++----
 srcpkgs/occt/patches/musl-mallinfo.patch      | 45 ++++++++++++++-----
 srcpkgs/occt/template                         | 27 +++++------
 srcpkgs/occt/update                           |  2 -
 5 files changed, 60 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/occt/update

diff --git a/srcpkgs/occt/patches/cmake-build-type-none.patch b/srcpkgs/occt/patches/cmake-build-type-none.patch
index ecb0e3da3929..d2caec8c4e87 100644
--- a/srcpkgs/occt/patches/cmake-build-type-none.patch
+++ b/srcpkgs/occt/patches/cmake-build-type-none.patch
@@ -1,8 +1,8 @@
-Index: CMakeLists.txt
-===================================================================
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f4ec871f5..9b0644e94 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_D
+@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
  
  set (CMAKE_SUPPRESS_REGENERATION TRUE)
  
diff --git a/srcpkgs/occt/patches/musl-fenv.patch b/srcpkgs/occt/patches/musl-fenv.patch
index 09da8d0afeae..06a8e3a89cfd 100644
--- a/srcpkgs/occt/patches/musl-fenv.patch
+++ b/srcpkgs/occt/patches/musl-fenv.patch
@@ -5,18 +5,20 @@ is probably wrong, but I don't have a replacement for the
 non-posix functions fegetexcept(3) and feenableexcept(3).
 """
 
+diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx
+index 007f5ccaa..fe39e07ac 100644
 --- a/src/OSD/OSD_signal.cxx
 +++ b/src/OSD/OSD_signal.cxx
-@@ -703,7 +703,7 @@
- 
+@@ -761,7 +761,7 @@ typedef void (* SIG_PFV) (int);
+
  #include <signal.h>
- 
--#if !defined(__ANDROID__) && !defined(__QNX__)
-+#if !defined(__ANDROID__) && !defined(__QNX__) && defined(__GLIBC__)
+
+-#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
++#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && defined(__GLIBC__)
    #include <sys/signal.h>
  #endif
- 
-@@ -914,7 +914,7 @@
+
+@@ -977,7 +977,7 @@ static void SegvHandler(const int theSignal,
  //=======================================================================
  void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  {
@@ -25,7 +27,7 @@ non-posix functions fegetexcept(3) and feenableexcept(3).
    feclearexcept (FE_ALL_EXCEPT);
    if (theFloatingSignal)
    {
-@@ -947,7 +947,7 @@
+@@ -1010,7 +1010,7 @@ void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  //=======================================================================
  Standard_Boolean OSD::ToCatchFloatingSignals()
  {
diff --git a/srcpkgs/occt/patches/musl-mallinfo.patch b/srcpkgs/occt/patches/musl-mallinfo.patch
index 4e5825bf1cb0..6ae94992eaf8 100644
--- a/srcpkgs/occt/patches/musl-mallinfo.patch
+++ b/srcpkgs/occt/patches/musl-mallinfo.patch
@@ -1,17 +1,38 @@
-In musl libc there is no struct mallinfo and no function mallinf()
+Adapted from alpine's patch
 
+diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx
+index d9bb91398..d608e04fc 100644
 --- a/src/OSD/OSD_MemInfo.cxx
 +++ b/src/OSD/OSD_MemInfo.cxx
-@@ -147,8 +147,12 @@
-   }
-   aFile.close();
+@@ -35,6 +35,9 @@
+ #include <sstream>
+ #include <fstream>
+ 
++#include <sys/time.h>
++#include <sys/resource.h>
++
+ #include <OSD_MemInfo.hxx>
  
-+  #if defined(__GLIBC__)
-   struct mallinfo aMI = mallinfo();
-   myCounters[MemHeapUsage] = aMI.uordblks;
-+  #else /* XXX not yet coded */
-+  myCounters[MemHeapUsage] = 0;
-+  #endif
+ #if defined(__EMSCRIPTEN__)
+@@ -182,18 +185,9 @@ void OSD_MemInfo::Update()
+ #elif (defined(__linux__) || defined(__linux))
+   if (IsActive (MemHeapUsage))
+   {
+-  #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+-    #if __GLIBC_PREREQ(2,33)
+-      #define HAS_MALLINFO2
+-    #endif
+-  #endif
+-
+-  #ifdef HAS_MALLINFO2
+-    const struct mallinfo2 aMI = mallinfo2();
+-  #else
+-    const struct mallinfo aMI = mallinfo();
+-  #endif
+-    myCounters[MemHeapUsage] = aMI.uordblks;
++    struct rusage ru = { .ru_maxrss = 0 };
++    getrusage(RUSAGE_SELF, &ru);
++    myCounters[MemHeapUsage] = ru.ru_maxrss;
+   }
  
- #elif (defined(__APPLE__))
-   struct task_basic_info aTaskInfo;
+   if (!IsActive (MemVirtual)
diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template
index 6624fea8b53f..b17c91b0058b 100644
--- a/srcpkgs/occt/template
+++ b/srcpkgs/occt/template
@@ -1,26 +1,27 @@
 # Template file for 'occt'
 pkgname=occt
-reverts=7.5.0_1
-version=7.4.0p1
-revision=5
-_gittag="V${version//./_}"
-wrksrc=occt-${_gittag}
+version=7.6.2
+revision=1
+_ver="${version//./_}"
+wrksrc=OCCT-${_ver}
 build_style=cmake
-# XXX: re-enable -DUSE_TBB=ON if possible when updating
-configure_args="-DUSE_FREEIMAGE=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
+configure_args="-DUSE_FREEIMAGE=ON -DUSE_TBB=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
  -DINSTALL_SAMPLES=ON"
-makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tcl-devel
- tk-devel"
+makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tbb-devel
+ tcl-devel tk-devel"
 short_desc="OpenCASCADE Technology - library for CAD/CAM/CAE applications"
 maintainer="Piraty <piraty1@inbox.ru>"
 license="custom:LGPL-2.1-only-with-exceptions"
 homepage="https://www.opencascade.com"
-# distfile: use git instead of official tarball, which requires registration
-# see https://www.opencascade.com/content/packaging-again-debian
-distfiles="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_gittag};sf=tgz>occt-${_gittag}.tar.gz"
-checksum=e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0
+distfiles="https://github.com/Open-Cascade-SAS/OCCT/archive/V${_ver}.tar.gz"
+checksum=dea04077d71507c666aaa7ccaeacc73ab580d6572d7f75e90a1984c4c0302a7a
 conflicts="oce>=0"
 
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" libexecinfo-devel"
+	LDFLAGS="-lexecinfo"
+fi
+
 post_install() {
 	rm ${PKGDESTDIR}/usr/share/doc/opencascade/*_LGPL_*.txt
 	vlicense OCCT_LGPL_EXCEPTION.txt
diff --git a/srcpkgs/occt/update b/srcpkgs/occt/update
deleted file mode 100644
index c128eec6d9c9..000000000000
--- a/srcpkgs/occt/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=tags"
-pattern=">V\K[\d_p]+(?=</a>)"

From 38d0c4d8b93cad4572f1b2363d835d2205c24822 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 26 Mar 2022 11:25:11 -0400
Subject: [PATCH 3/3] freecad: update to 0.20.0.

---
 srcpkgs/freecad/patches/002-execinfo.patch    |  30 -
 .../patches/010-salomesmesh-execinfo.patch    |  59 +-
 srcpkgs/freecad/patches/150-vtk9.patch        | 796 ------------------
 srcpkgs/freecad/patches/152-cmake-vtk9.patch  |  53 --
 srcpkgs/freecad/template                      |   7 +-
 5 files changed, 33 insertions(+), 912 deletions(-)
 delete mode 100644 srcpkgs/freecad/patches/002-execinfo.patch
 delete mode 100644 srcpkgs/freecad/patches/150-vtk9.patch
 delete mode 100644 srcpkgs/freecad/patches/152-cmake-vtk9.patch

diff --git a/srcpkgs/freecad/patches/002-execinfo.patch b/srcpkgs/freecad/patches/002-execinfo.patch
deleted file mode 100644
index bcdca77a72a4..000000000000
--- a/srcpkgs/freecad/patches/002-execinfo.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/src/App/Application.cpp	2020-01-22 23:27:42.709273087 +0100
-+++ b/src/App/Application.cpp	2020-01-22 23:50:53.915075955 +0100
-@@ -1485,7 +1485,9 @@
- #endif
- 
- #if defined(FC_OS_LINUX)
-+#ifdef __GLIBC__
- #include <execinfo.h>
-+#endif
- #include <dlfcn.h>
- #include <cxxabi.h>
- 
-@@ -1497,6 +1499,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);
-@@ -1527,6 +1530,9 @@
-     }
- 
-     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
index cc6bdc9ff485..fc8a7ef11daf 100644
--- a/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch
+++ b/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch
@@ -1,30 +1,33 @@
+diff --git a/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp b/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
+index 23c5083fdf..4547d714d4 100644
 --- a/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
 +++ b/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
+@@ -29,8 +29,10 @@
+ #ifndef WIN32
+ #include <unistd.h>
+ #include <sys/stat.h>
++#ifdef __GLIBC__
+ #include <execinfo.h>
+ #endif
++#endif
+ 
+ 
+ namespace Kernel_Utils
+@@ -109,6 +111,7 @@ namespace Kernel_Utils
+ #ifndef WIN32
+   void print_traceback()
+   {
++#ifdef __GLIBC__
+     void *array[50];
+     size_t size;
+     char **strings;
+@@ -123,6 +126,9 @@ namespace Kernel_Utils
+       }
+ 
+     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/150-vtk9.patch b/srcpkgs/freecad/patches/150-vtk9.patch
deleted file mode 100644
index 92673e7c9b9f..000000000000
--- a/srcpkgs/freecad/patches/150-vtk9.patch
+++ /dev/null
@@ -1,796 +0,0 @@
-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 14a6d9a763f..0e9b9e6c905 100644
---- a/src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx
-+++ b/src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx
-@@ -40,11 +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;
- class SMDS_MeshFace;
-@@ -192,7 +197,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 9e4a23eddfb..77465814541 100644
---- a/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx
-+++ b/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 299093c94f6..2680c217305 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp
-+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp
-@@ -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();
-+#ifdef VTK_CELL_ARRAY_V2
-+  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 +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();
--  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 d6049c0bd19..a41f5c18e78 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp
-+++ b/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);
-@@ -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
- 
-   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++)
-@@ -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)
- {
-   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 61c8e751d94..1eac2907d3d 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp
-+++ b/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 95438eab064..0df32e3b97c 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp
-+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp
-@@ -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;
-     grid->GetCellPoints(myVtkID, npts, pts);
-@@ -156,6 +167,7 @@ bool SMDS_Mesh0DElement::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbN
-     }
-     myNode = nodes[0];
-     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 f647a5f1b8f..5b903c8fb55 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp
-+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp
-@@ -191,7 +191,7 @@ class SMDS_MeshNode_MyInvIterator: public SMDS_ElemIterator
- 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 fbd903b1e74..ff2b81e9694 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
-+++ b/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 = this->GetCellLocationsArray()->GetValue(j);
-+#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 );
-@@ -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)
- {
-+#ifdef VTK_CELL_ARRAY_V2
-+  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
-   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);
-         }
-     }
-+#endif
- }
- 
- /*! reorder the nodes of a face
-@@ -995,11 +1015,20 @@ void SMDS_UnstructuredGrid::BuildLinks()
-     this->Links->UnRegister(this);
-     }
- 
-+#ifdef VTK_CELL_ARRAY_V2
-+  this->Links = SMDS_CellLinks::New();
-+  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());
-   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 deb05985f00..63b6eabb704 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp
-+++ b/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 9786abf9aae..6d772a3cd4a 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp
-+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp
-@@ -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;
-   grid->GetCellPoints(myVtkID, npts, pts);
-@@ -79,6 +92,7 @@ bool SMDS_VtkEdge::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
-     {
-       pts[i] = nodes[i]->getVtkId();
-     }
-+#endif
-   SMDS_Mesh::_meshList[myMeshId]->setMyModified();
-   return true;
- }
-@@ -87,7 +101,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 +151,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 1389e0d3585..cb981bfb18e 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp
-+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp
-@@ -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;
-   grid->GetCellPoints(myVtkID, npts, pts);
-@@ -113,6 +126,7 @@ bool SMDS_VtkFace::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
-     {
-       pts[i] = nodes[i]->getVtkId();
-     }
-+#endif
-   SMDS_Mesh::_meshList[myMeshId]->setMyModified();
-   return true;
- }
-@@ -173,7 +187,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 +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();
--  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 +267,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++)
-@@ -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;
-   grid->GetCellPoints(myVtkID, npts, pts);
-   grid->RemoveReferenceToCell(pts[0], myVtkID);
-   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 015edf75fd2..19ebd0746c8 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp
-+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp
-@@ -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;
-   grid->GetCellPoints(myVtkID, npts, pts);
-@@ -145,6 +158,7 @@ bool SMDS_VtkVolume::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes
-     {
-       pts[i] = nodes[i]->getVtkId();
-     }
-+#endif
-   SMDS_Mesh::_meshList[myMeshId]->setMyModified();
-   return true;
- }
-@@ -207,7 +221,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 +250,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 +290,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 +326,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 +356,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 +386,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 +444,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 +457,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 +475,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 +488,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 +550,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 fcd044b00f2..f54c24f8618 100644
---- a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
-+++ b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
-@@ -11348,7 +11348,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];
-@@ -11527,7 +11527,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)
-@@ -11708,7 +11708,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];
-@@ -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;
--          vtkIdType* pts = 0;
-+          vtkIdTypePtr pts = 0;
-           grid->GetCellPoints(vtkId, npts, pts);
-           for (int i=0; i<npts; i++)
-             {
diff --git a/srcpkgs/freecad/patches/152-cmake-vtk9.patch b/srcpkgs/freecad/patches/152-cmake-vtk9.patch
deleted file mode 100644
index 7abffcf57e84..000000000000
--- a/srcpkgs/freecad/patches/152-cmake-vtk9.patch
+++ /dev/null
@@ -1,53 +0,0 @@
---- a/cMake/FreeCAD_Helpers/SetupSalomeSMESH.cmake	2020-11-26 15:59:27.000000000 +0100
-+++ b/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 1e2aec024fd7..a28dd6474076 100644
--- a/srcpkgs/freecad/template
+++ b/srcpkgs/freecad/template
@@ -1,6 +1,6 @@
 # Template file for 'freecad'
 pkgname=freecad
-version=0.19.4
+version=0.20
 revision=1
 wrksrc="FreeCAD-${version}"
 build_style=cmake
@@ -36,7 +36,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=e40a1c343956e13c56cc8578d025ae83d68d9d20acda1732953bc8a3883e9722
+checksum=c4d9ce782d3da0edfa16d6218db4ce8613e346124ee47b3fe6a6dae40c0a61d9
 
 if [ "$XBPS_TARGET_LIBC" = musl ]; then
 	makedepends+=" libexecinfo-devel"
@@ -44,9 +44,6 @@ if [ "$XBPS_TARGET_LIBC" = musl ]; then
 fi
 
 post_extract() {
-	# Report exact minor version
-	vsed -i -e "s,^\(set(PACKAGE_VERSION_MINOR\) .*,\1 \"${version#*.}\")," CMakeLists.txt
-
 	# SubWCRev.py (SCM check) reports "unknown" for these fields
 	vsed -e "s,\${PACKAGE_WCREF},${revision}_voidlinux," \
 	     -e "s,\${PACKAGE_WCDATE},(from release)," \

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

* Re: [PR REVIEW] [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (18 preceding siblings ...)
  2022-07-25 13:16 ` [PR PATCH] [Updated] " karl-nilsson
@ 2022-07-26  3:39 ` yopito
  2022-07-26  3:40 ` yopito
                   ` (21 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: yopito @ 2022-07-26  3:39 UTC (permalink / raw)
  To: ml

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

New review comment by yopito on void-packages repository

https://github.com/void-linux/void-packages/pull/36356#discussion_r929494065

Comment:
don't remove this vsed: will be usefull on next minor minor release

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

* Re: [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (19 preceding siblings ...)
  2022-07-26  3:39 ` [PR REVIEW] " yopito
@ 2022-07-26  3:40 ` yopito
  2022-08-12  9:12 ` yopito
                   ` (20 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: yopito @ 2022-07-26  3:40 UTC (permalink / raw)
  To: ml

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

New comment by yopito on void-packages repository

https://github.com/void-linux/void-packages/pull/36356#issuecomment-1194959837

Comment:
regarding FreeCAD 0.20 (only): I have some WIP on it, here some points about it:
* help is not generated anymore from source by available (only) from online: see my review of your freecad/template
* `freecad/patches/010-salomesmesh-execinfo.patch` is uneeded anymore
* I've also update libspnav to 1.0 on my side, so additional patch for freecad is needed: could you add these into your commits ?
    * libspnav : update to 1.0: https://gist.github.com/yopito/2757c1a501e2772143814b4a3553cbea
    * freecad: : fix PATH_MAX on musl libc : https://gist.github.com/yopito/fd25b30edcbc762babd9069641a9b86e
* another fix:
    * freecad: : fix build (stderr resource is readonly): https://gist.github.com/yopito/3ac7d4c8fee646171ca900ff17452567
* I have some SIGSEGV on running FreeCAD (x86_64 musl)  when it's using Coin/pivy and shiboken2/pyside2 in 5.15.5 (in WIP) : don't know yet if related to shiboken2/pyside2 in 5.15.5 : see https://github.com/coin3d/pivy/issues/98
   => could you run at least `FreeCAD  -t MeshTestsApp` to see if you have the same trouble ?

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

* Re: [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (20 preceding siblings ...)
  2022-07-26  3:40 ` yopito
@ 2022-08-12  9:12 ` yopito
  2022-08-12 14:24 ` luzpaz
                   ` (19 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: yopito @ 2022-08-12  9:12 UTC (permalink / raw)
  To: ml

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

New comment by yopito on void-packages repository

https://github.com/void-linux/void-packages/pull/36356#issuecomment-1212899703

Comment:
hello, any news regarding FreeCAD packaging ?

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

* Re: [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (21 preceding siblings ...)
  2022-08-12  9:12 ` yopito
@ 2022-08-12 14:24 ` luzpaz
  2022-08-12 14:25 ` luzpaz
                   ` (18 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: luzpaz @ 2022-08-12 14:24 UTC (permalink / raw)
  To: ml

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

New comment by luzpaz on void-packages repository

https://github.com/void-linux/void-packages/pull/36356#issuecomment-1213167861

Comment:
JFYI, OCCT release v7.6.3 has been [released](https://github.com/Open-Cascade-SAS/OCCT/releases/tag/V7_6_3)

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

* Re: [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (22 preceding siblings ...)
  2022-08-12 14:24 ` luzpaz
@ 2022-08-12 14:25 ` luzpaz
  2022-08-22 11:48 ` yopito
                   ` (17 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: luzpaz @ 2022-08-12 14:25 UTC (permalink / raw)
  To: ml

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

New comment by luzpaz on void-packages repository

https://github.com/void-linux/void-packages/pull/36356#issuecomment-1213167861

Comment:
JFYI, OCCT v7.6.3 has been [released](https://github.com/Open-Cascade-SAS/OCCT/releases/tag/V7_6_3)

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

* Re: [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (23 preceding siblings ...)
  2022-08-12 14:25 ` luzpaz
@ 2022-08-22 11:48 ` yopito
  2022-08-22 11:57 ` yopito
                   ` (16 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: yopito @ 2022-08-22 11:48 UTC (permalink / raw)
  To: ml

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

New comment by yopito on void-packages repository

https://github.com/void-linux/void-packages/pull/36356#issuecomment-1222244025

Comment:
hello, since this PR looks stale, I will shortly open another PR focused on freecad 0.20.1 and related updated stuff  (pyside2, libspnav).
Then this one could focus on OCCT solely ?

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

* Re: [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (24 preceding siblings ...)
  2022-08-22 11:48 ` yopito
@ 2022-08-22 11:57 ` yopito
  2022-08-22 13:59 ` karl-nilsson
                   ` (15 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: yopito @ 2022-08-22 11:57 UTC (permalink / raw)
  To: ml

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

New comment by yopito on void-packages repository

https://github.com/void-linux/void-packages/pull/36356#issuecomment-1222244025

Comment:
hello, since this PR looks stale, I will shortly open another PR focused on freecad 0.20.1 and related updated stuff  (pyside2, libspnav).
Then this one could focus on OCCT solely ?

Edit: this is just a proposal, don't hesitate to react.

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

* Re: [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (25 preceding siblings ...)
  2022-08-22 11:57 ` yopito
@ 2022-08-22 13:59 ` karl-nilsson
  2022-08-23 13:29 ` yopito
                   ` (14 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: karl-nilsson @ 2022-08-22 13:59 UTC (permalink / raw)
  To: ml

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

New comment by karl-nilsson on void-packages repository

https://github.com/void-linux/void-packages/pull/36356#issuecomment-1222402676

Comment:
> hello, since this PR looks stale, I will shortly open another PR focused on freecad 0.20.1 and related updated stuff (pyside2, libspnav). Then this one could focus on OCCT solely ?
> 
> Edit: this is just a proposal, don't hesitate to react.

Please do!
I've been swamped with work lately, I should have some time in the coming weeks to finish this PR.

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

* Re: [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (26 preceding siblings ...)
  2022-08-22 13:59 ` karl-nilsson
@ 2022-08-23 13:29 ` yopito
  2022-09-27 19:34 ` enderger
                   ` (13 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: yopito @ 2022-08-23 13:29 UTC (permalink / raw)
  To: ml

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

New comment by yopito on void-packages repository

https://github.com/void-linux/void-packages/pull/36356#issuecomment-1224080066

Comment:
> > hello, since this PR looks stale, I will shortly open another PR focused on freecad 0.20.1 and related updated stuff (pyside2, libspnav). Then this one could focus on OCCT solely ?
> > Edit: this is just a proposal, don't hesitate to react.
> 
> Please do! I've been swamped with work lately, I should have some time in the coming weeks to finish this PR.

OK, thanks. Here it is: #38856 
I suggest to close this PR ?


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

* Re: [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (27 preceding siblings ...)
  2022-08-23 13:29 ` yopito
@ 2022-09-27 19:34 ` enderger
  2022-10-01 16:02 ` [PR PATCH] [Updated] " karl-nilsson
                   ` (12 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: enderger @ 2022-09-27 19:34 UTC (permalink / raw)
  To: ml

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

New comment by enderger on void-packages repository

https://github.com/void-linux/void-packages/pull/36356#issuecomment-1259960709

Comment:
For the musl build, `libexecinfo-devel` should allow it to work. Got about 75% through the build after adding it to the dependency list.

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

* Re: [PR PATCH] [Updated] [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (28 preceding siblings ...)
  2022-09-27 19:34 ` enderger
@ 2022-10-01 16:02 ` karl-nilsson
  2022-10-01 21:16 ` karl-nilsson
                   ` (11 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: karl-nilsson @ 2022-10-01 16:02 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by karl-nilsson against master on the void-packages repository

https://github.com/karl-nilsson/void-packages occt_7.6
https://github.com/void-linux/void-packages/pull/36356

[WIP] occt: update to 7.6.2


#### Testing the changes
- I tested the changes in this PR: **briefly**


#### Local build testing
- I built this PR locally for my native architecture, x64-glibc


Like previously, broken ABI
```console
During initialization the error "/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv" occurred in /home/nilsson/.FreeCAD/Mod/A2plus/InitGui.py                                                                                                                        
Please look into the log file for further information                                                                                                
Wizard shaft module cannot be loaded                                                                                                                 
/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv                                                              
connect failed: No such file or directory      
```

Looks like we'll have to update or patch freecad
```console
In file included from /usr/include/opencascade/Extrema_POnSurf.lxx:15,
                 from /usr/include/opencascade/Extrema_POnSurf.hxx:75,
                 from /usr/include/opencascade/Extrema_ExtPElS.hxx:27,
                 from /usr/include/opencascade/Extrema_ExtPS.hxx:24,
                 from /usr/include/opencascade/ShapeAnalysis_Surface.hxx:20,
                 from ../src/3rdParty/salomesmesh/inc/SMESH_MesherHelper.hxx:37,
                 from ../src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp:34:
/usr/include/opencascade/Precision.hxx:98:7: note: previous definition of 'class Precision'
   98 | class Precision
      |       ^~~~~~~~~

```

ping @Piraty 

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-occt_7.6-36356.patch --]
[-- Type: text/x-diff, Size: 6504 bytes --]

From 4693d9e5a5bf0764eba5df372504e4a0b7353156 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 19:29:00 -0400
Subject: [PATCH] occt: update to 7.6.2.

---
 .../occt/patches/cmake-build-type-none.patch  |  6 +--
 srcpkgs/occt/patches/musl-fenv.patch          | 18 ++++----
 srcpkgs/occt/patches/musl-mallinfo.patch      | 45 ++++++++++++++-----
 srcpkgs/occt/template                         | 27 +++++------
 srcpkgs/occt/update                           |  2 -
 5 files changed, 60 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/occt/update

diff --git a/srcpkgs/occt/patches/cmake-build-type-none.patch b/srcpkgs/occt/patches/cmake-build-type-none.patch
index ecb0e3da3929..d2caec8c4e87 100644
--- a/srcpkgs/occt/patches/cmake-build-type-none.patch
+++ b/srcpkgs/occt/patches/cmake-build-type-none.patch
@@ -1,8 +1,8 @@
-Index: CMakeLists.txt
-===================================================================
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f4ec871f5..9b0644e94 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_D
+@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
  
  set (CMAKE_SUPPRESS_REGENERATION TRUE)
  
diff --git a/srcpkgs/occt/patches/musl-fenv.patch b/srcpkgs/occt/patches/musl-fenv.patch
index 09da8d0afeae..06a8e3a89cfd 100644
--- a/srcpkgs/occt/patches/musl-fenv.patch
+++ b/srcpkgs/occt/patches/musl-fenv.patch
@@ -5,18 +5,20 @@ is probably wrong, but I don't have a replacement for the
 non-posix functions fegetexcept(3) and feenableexcept(3).
 """
 
+diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx
+index 007f5ccaa..fe39e07ac 100644
 --- a/src/OSD/OSD_signal.cxx
 +++ b/src/OSD/OSD_signal.cxx
-@@ -703,7 +703,7 @@
- 
+@@ -761,7 +761,7 @@ typedef void (* SIG_PFV) (int);
+
  #include <signal.h>
- 
--#if !defined(__ANDROID__) && !defined(__QNX__)
-+#if !defined(__ANDROID__) && !defined(__QNX__) && defined(__GLIBC__)
+
+-#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
++#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && defined(__GLIBC__)
    #include <sys/signal.h>
  #endif
- 
-@@ -914,7 +914,7 @@
+
+@@ -977,7 +977,7 @@ static void SegvHandler(const int theSignal,
  //=======================================================================
  void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  {
@@ -25,7 +27,7 @@ non-posix functions fegetexcept(3) and feenableexcept(3).
    feclearexcept (FE_ALL_EXCEPT);
    if (theFloatingSignal)
    {
-@@ -947,7 +947,7 @@
+@@ -1010,7 +1010,7 @@ void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  //=======================================================================
  Standard_Boolean OSD::ToCatchFloatingSignals()
  {
diff --git a/srcpkgs/occt/patches/musl-mallinfo.patch b/srcpkgs/occt/patches/musl-mallinfo.patch
index 4e5825bf1cb0..6ae94992eaf8 100644
--- a/srcpkgs/occt/patches/musl-mallinfo.patch
+++ b/srcpkgs/occt/patches/musl-mallinfo.patch
@@ -1,17 +1,38 @@
-In musl libc there is no struct mallinfo and no function mallinf()
+Adapted from alpine's patch
 
+diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx
+index d9bb91398..d608e04fc 100644
 --- a/src/OSD/OSD_MemInfo.cxx
 +++ b/src/OSD/OSD_MemInfo.cxx
-@@ -147,8 +147,12 @@
-   }
-   aFile.close();
+@@ -35,6 +35,9 @@
+ #include <sstream>
+ #include <fstream>
+ 
++#include <sys/time.h>
++#include <sys/resource.h>
++
+ #include <OSD_MemInfo.hxx>
  
-+  #if defined(__GLIBC__)
-   struct mallinfo aMI = mallinfo();
-   myCounters[MemHeapUsage] = aMI.uordblks;
-+  #else /* XXX not yet coded */
-+  myCounters[MemHeapUsage] = 0;
-+  #endif
+ #if defined(__EMSCRIPTEN__)
+@@ -182,18 +185,9 @@ void OSD_MemInfo::Update()
+ #elif (defined(__linux__) || defined(__linux))
+   if (IsActive (MemHeapUsage))
+   {
+-  #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+-    #if __GLIBC_PREREQ(2,33)
+-      #define HAS_MALLINFO2
+-    #endif
+-  #endif
+-
+-  #ifdef HAS_MALLINFO2
+-    const struct mallinfo2 aMI = mallinfo2();
+-  #else
+-    const struct mallinfo aMI = mallinfo();
+-  #endif
+-    myCounters[MemHeapUsage] = aMI.uordblks;
++    struct rusage ru = { .ru_maxrss = 0 };
++    getrusage(RUSAGE_SELF, &ru);
++    myCounters[MemHeapUsage] = ru.ru_maxrss;
+   }
  
- #elif (defined(__APPLE__))
-   struct task_basic_info aTaskInfo;
+   if (!IsActive (MemVirtual)
diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template
index 6624fea8b53f..b17c91b0058b 100644
--- a/srcpkgs/occt/template
+++ b/srcpkgs/occt/template
@@ -1,26 +1,27 @@
 # Template file for 'occt'
 pkgname=occt
-reverts=7.5.0_1
-version=7.4.0p1
-revision=5
-_gittag="V${version//./_}"
-wrksrc=occt-${_gittag}
+version=7.6.2
+revision=1
+_ver="${version//./_}"
+wrksrc=OCCT-${_ver}
 build_style=cmake
-# XXX: re-enable -DUSE_TBB=ON if possible when updating
-configure_args="-DUSE_FREEIMAGE=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
+configure_args="-DUSE_FREEIMAGE=ON -DUSE_TBB=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
  -DINSTALL_SAMPLES=ON"
-makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tcl-devel
- tk-devel"
+makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tbb-devel
+ tcl-devel tk-devel"
 short_desc="OpenCASCADE Technology - library for CAD/CAM/CAE applications"
 maintainer="Piraty <piraty1@inbox.ru>"
 license="custom:LGPL-2.1-only-with-exceptions"
 homepage="https://www.opencascade.com"
-# distfile: use git instead of official tarball, which requires registration
-# see https://www.opencascade.com/content/packaging-again-debian
-distfiles="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_gittag};sf=tgz>occt-${_gittag}.tar.gz"
-checksum=e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0
+distfiles="https://github.com/Open-Cascade-SAS/OCCT/archive/V${_ver}.tar.gz"
+checksum=dea04077d71507c666aaa7ccaeacc73ab580d6572d7f75e90a1984c4c0302a7a
 conflicts="oce>=0"
 
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" libexecinfo-devel"
+	LDFLAGS="-lexecinfo"
+fi
+
 post_install() {
 	rm ${PKGDESTDIR}/usr/share/doc/opencascade/*_LGPL_*.txt
 	vlicense OCCT_LGPL_EXCEPTION.txt
diff --git a/srcpkgs/occt/update b/srcpkgs/occt/update
deleted file mode 100644
index c128eec6d9c9..000000000000
--- a/srcpkgs/occt/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=tags"
-pattern=">V\K[\d_p]+(?=</a>)"

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

* Re: [PR PATCH] [Updated] [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (29 preceding siblings ...)
  2022-10-01 16:02 ` [PR PATCH] [Updated] " karl-nilsson
@ 2022-10-01 21:16 ` karl-nilsson
  2022-10-01 21:18 ` karl-nilsson
                   ` (10 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: karl-nilsson @ 2022-10-01 21:16 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by karl-nilsson against master on the void-packages repository

https://github.com/karl-nilsson/void-packages occt_7.6
https://github.com/void-linux/void-packages/pull/36356

[WIP] occt: update to 7.6.2


#### Testing the changes
- I tested the changes in this PR: **briefly**


#### Local build testing
- I built this PR locally for my native architecture, x64-glibc


Like previously, broken ABI
```console
During initialization the error "/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv" occurred in /home/nilsson/.FreeCAD/Mod/A2plus/InitGui.py                                                                                                                        
Please look into the log file for further information                                                                                                
Wizard shaft module cannot be loaded                                                                                                                 
/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv                                                              
connect failed: No such file or directory      
```

Looks like we'll have to update or patch freecad
```console
In file included from /usr/include/opencascade/Extrema_POnSurf.lxx:15,
                 from /usr/include/opencascade/Extrema_POnSurf.hxx:75,
                 from /usr/include/opencascade/Extrema_ExtPElS.hxx:27,
                 from /usr/include/opencascade/Extrema_ExtPS.hxx:24,
                 from /usr/include/opencascade/ShapeAnalysis_Surface.hxx:20,
                 from ../src/3rdParty/salomesmesh/inc/SMESH_MesherHelper.hxx:37,
                 from ../src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp:34:
/usr/include/opencascade/Precision.hxx:98:7: note: previous definition of 'class Precision'
   98 | class Precision
      |       ^~~~~~~~~

```

ping @Piraty 

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-occt_7.6-36356.patch --]
[-- Type: text/x-diff, Size: 6504 bytes --]

From 2d5676f20c2a3694e95b011e5eaf90308ac4be0c Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 19:29:00 -0400
Subject: [PATCH] occt: update to 7.6.2.

---
 .../occt/patches/cmake-build-type-none.patch  |  6 +--
 srcpkgs/occt/patches/musl-fenv.patch          | 18 ++++----
 srcpkgs/occt/patches/musl-mallinfo.patch      | 45 ++++++++++++++-----
 srcpkgs/occt/template                         | 27 +++++------
 srcpkgs/occt/update                           |  2 -
 5 files changed, 60 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/occt/update

diff --git a/srcpkgs/occt/patches/cmake-build-type-none.patch b/srcpkgs/occt/patches/cmake-build-type-none.patch
index ecb0e3da3929..d2caec8c4e87 100644
--- a/srcpkgs/occt/patches/cmake-build-type-none.patch
+++ b/srcpkgs/occt/patches/cmake-build-type-none.patch
@@ -1,8 +1,8 @@
-Index: CMakeLists.txt
-===================================================================
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f4ec871f5..9b0644e94 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_D
+@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
  
  set (CMAKE_SUPPRESS_REGENERATION TRUE)
  
diff --git a/srcpkgs/occt/patches/musl-fenv.patch b/srcpkgs/occt/patches/musl-fenv.patch
index 09da8d0afeae..06a8e3a89cfd 100644
--- a/srcpkgs/occt/patches/musl-fenv.patch
+++ b/srcpkgs/occt/patches/musl-fenv.patch
@@ -5,18 +5,20 @@ is probably wrong, but I don't have a replacement for the
 non-posix functions fegetexcept(3) and feenableexcept(3).
 """
 
+diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx
+index 007f5ccaa..fe39e07ac 100644
 --- a/src/OSD/OSD_signal.cxx
 +++ b/src/OSD/OSD_signal.cxx
-@@ -703,7 +703,7 @@
- 
+@@ -761,7 +761,7 @@ typedef void (* SIG_PFV) (int);
+
  #include <signal.h>
- 
--#if !defined(__ANDROID__) && !defined(__QNX__)
-+#if !defined(__ANDROID__) && !defined(__QNX__) && defined(__GLIBC__)
+
+-#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
++#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && defined(__GLIBC__)
    #include <sys/signal.h>
  #endif
- 
-@@ -914,7 +914,7 @@
+
+@@ -977,7 +977,7 @@ static void SegvHandler(const int theSignal,
  //=======================================================================
  void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  {
@@ -25,7 +27,7 @@ non-posix functions fegetexcept(3) and feenableexcept(3).
    feclearexcept (FE_ALL_EXCEPT);
    if (theFloatingSignal)
    {
-@@ -947,7 +947,7 @@
+@@ -1010,7 +1010,7 @@ void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  //=======================================================================
  Standard_Boolean OSD::ToCatchFloatingSignals()
  {
diff --git a/srcpkgs/occt/patches/musl-mallinfo.patch b/srcpkgs/occt/patches/musl-mallinfo.patch
index 4e5825bf1cb0..6ae94992eaf8 100644
--- a/srcpkgs/occt/patches/musl-mallinfo.patch
+++ b/srcpkgs/occt/patches/musl-mallinfo.patch
@@ -1,17 +1,38 @@
-In musl libc there is no struct mallinfo and no function mallinf()
+Adapted from alpine's patch
 
+diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx
+index d9bb91398..d608e04fc 100644
 --- a/src/OSD/OSD_MemInfo.cxx
 +++ b/src/OSD/OSD_MemInfo.cxx
-@@ -147,8 +147,12 @@
-   }
-   aFile.close();
+@@ -35,6 +35,9 @@
+ #include <sstream>
+ #include <fstream>
+ 
++#include <sys/time.h>
++#include <sys/resource.h>
++
+ #include <OSD_MemInfo.hxx>
  
-+  #if defined(__GLIBC__)
-   struct mallinfo aMI = mallinfo();
-   myCounters[MemHeapUsage] = aMI.uordblks;
-+  #else /* XXX not yet coded */
-+  myCounters[MemHeapUsage] = 0;
-+  #endif
+ #if defined(__EMSCRIPTEN__)
+@@ -182,18 +185,9 @@ void OSD_MemInfo::Update()
+ #elif (defined(__linux__) || defined(__linux))
+   if (IsActive (MemHeapUsage))
+   {
+-  #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+-    #if __GLIBC_PREREQ(2,33)
+-      #define HAS_MALLINFO2
+-    #endif
+-  #endif
+-
+-  #ifdef HAS_MALLINFO2
+-    const struct mallinfo2 aMI = mallinfo2();
+-  #else
+-    const struct mallinfo aMI = mallinfo();
+-  #endif
+-    myCounters[MemHeapUsage] = aMI.uordblks;
++    struct rusage ru = { .ru_maxrss = 0 };
++    getrusage(RUSAGE_SELF, &ru);
++    myCounters[MemHeapUsage] = ru.ru_maxrss;
+   }
  
- #elif (defined(__APPLE__))
-   struct task_basic_info aTaskInfo;
+   if (!IsActive (MemVirtual)
diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template
index 6624fea8b53f..b17c91b0058b 100644
--- a/srcpkgs/occt/template
+++ b/srcpkgs/occt/template
@@ -1,26 +1,27 @@
 # Template file for 'occt'
 pkgname=occt
-reverts=7.5.0_1
-version=7.4.0p1
-revision=5
-_gittag="V${version//./_}"
-wrksrc=occt-${_gittag}
+version=7.6.2
+revision=1
+_ver="${version//./_}"
+wrksrc=OCCT-${_ver}
 build_style=cmake
-# XXX: re-enable -DUSE_TBB=ON if possible when updating
-configure_args="-DUSE_FREEIMAGE=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
+configure_args="-DUSE_FREEIMAGE=ON -DUSE_TBB=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
  -DINSTALL_SAMPLES=ON"
-makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tcl-devel
- tk-devel"
+makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tbb-devel
+ tcl-devel tk-devel"
 short_desc="OpenCASCADE Technology - library for CAD/CAM/CAE applications"
 maintainer="Piraty <piraty1@inbox.ru>"
 license="custom:LGPL-2.1-only-with-exceptions"
 homepage="https://www.opencascade.com"
-# distfile: use git instead of official tarball, which requires registration
-# see https://www.opencascade.com/content/packaging-again-debian
-distfiles="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_gittag};sf=tgz>occt-${_gittag}.tar.gz"
-checksum=e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0
+distfiles="https://github.com/Open-Cascade-SAS/OCCT/archive/V${_ver}.tar.gz"
+checksum=dea04077d71507c666aaa7ccaeacc73ab580d6572d7f75e90a1984c4c0302a7a
 conflicts="oce>=0"
 
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" libexecinfo-devel"
+	LDFLAGS="-lexecinfo"
+fi
+
 post_install() {
 	rm ${PKGDESTDIR}/usr/share/doc/opencascade/*_LGPL_*.txt
 	vlicense OCCT_LGPL_EXCEPTION.txt
diff --git a/srcpkgs/occt/update b/srcpkgs/occt/update
deleted file mode 100644
index c128eec6d9c9..000000000000
--- a/srcpkgs/occt/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=tags"
-pattern=">V\K[\d_p]+(?=</a>)"

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

* Re: [PR PATCH] [Updated] [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (30 preceding siblings ...)
  2022-10-01 21:16 ` karl-nilsson
@ 2022-10-01 21:18 ` karl-nilsson
  2022-10-01 21:35 ` karl-nilsson
                   ` (9 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: karl-nilsson @ 2022-10-01 21:18 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by karl-nilsson against master on the void-packages repository

https://github.com/karl-nilsson/void-packages occt_7.6
https://github.com/void-linux/void-packages/pull/36356

[WIP] occt: update to 7.6.2


#### Testing the changes
- I tested the changes in this PR: **briefly**


#### Local build testing
- I built this PR locally for my native architecture, x64-glibc


Like previously, broken ABI
```console
During initialization the error "/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv" occurred in /home/nilsson/.FreeCAD/Mod/A2plus/InitGui.py                                                                                                                        
Please look into the log file for further information                                                                                                
Wizard shaft module cannot be loaded                                                                                                                 
/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv                                                              
connect failed: No such file or directory      
```

Looks like we'll have to update or patch freecad
```console
In file included from /usr/include/opencascade/Extrema_POnSurf.lxx:15,
                 from /usr/include/opencascade/Extrema_POnSurf.hxx:75,
                 from /usr/include/opencascade/Extrema_ExtPElS.hxx:27,
                 from /usr/include/opencascade/Extrema_ExtPS.hxx:24,
                 from /usr/include/opencascade/ShapeAnalysis_Surface.hxx:20,
                 from ../src/3rdParty/salomesmesh/inc/SMESH_MesherHelper.hxx:37,
                 from ../src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp:34:
/usr/include/opencascade/Precision.hxx:98:7: note: previous definition of 'class Precision'
   98 | class Precision
      |       ^~~~~~~~~

```

ping @Piraty 

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-occt_7.6-36356.patch --]
[-- Type: text/x-diff, Size: 7593 bytes --]

From 2d5676f20c2a3694e95b011e5eaf90308ac4be0c Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 19:29:00 -0400
Subject: [PATCH 1/2] occt: update to 7.6.2.

---
 .../occt/patches/cmake-build-type-none.patch  |  6 +--
 srcpkgs/occt/patches/musl-fenv.patch          | 18 ++++----
 srcpkgs/occt/patches/musl-mallinfo.patch      | 45 ++++++++++++++-----
 srcpkgs/occt/template                         | 27 +++++------
 srcpkgs/occt/update                           |  2 -
 5 files changed, 60 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/occt/update

diff --git a/srcpkgs/occt/patches/cmake-build-type-none.patch b/srcpkgs/occt/patches/cmake-build-type-none.patch
index ecb0e3da3929..d2caec8c4e87 100644
--- a/srcpkgs/occt/patches/cmake-build-type-none.patch
+++ b/srcpkgs/occt/patches/cmake-build-type-none.patch
@@ -1,8 +1,8 @@
-Index: CMakeLists.txt
-===================================================================
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f4ec871f5..9b0644e94 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_D
+@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
  
  set (CMAKE_SUPPRESS_REGENERATION TRUE)
  
diff --git a/srcpkgs/occt/patches/musl-fenv.patch b/srcpkgs/occt/patches/musl-fenv.patch
index 09da8d0afeae..06a8e3a89cfd 100644
--- a/srcpkgs/occt/patches/musl-fenv.patch
+++ b/srcpkgs/occt/patches/musl-fenv.patch
@@ -5,18 +5,20 @@ is probably wrong, but I don't have a replacement for the
 non-posix functions fegetexcept(3) and feenableexcept(3).
 """
 
+diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx
+index 007f5ccaa..fe39e07ac 100644
 --- a/src/OSD/OSD_signal.cxx
 +++ b/src/OSD/OSD_signal.cxx
-@@ -703,7 +703,7 @@
- 
+@@ -761,7 +761,7 @@ typedef void (* SIG_PFV) (int);
+
  #include <signal.h>
- 
--#if !defined(__ANDROID__) && !defined(__QNX__)
-+#if !defined(__ANDROID__) && !defined(__QNX__) && defined(__GLIBC__)
+
+-#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
++#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && defined(__GLIBC__)
    #include <sys/signal.h>
  #endif
- 
-@@ -914,7 +914,7 @@
+
+@@ -977,7 +977,7 @@ static void SegvHandler(const int theSignal,
  //=======================================================================
  void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  {
@@ -25,7 +27,7 @@ non-posix functions fegetexcept(3) and feenableexcept(3).
    feclearexcept (FE_ALL_EXCEPT);
    if (theFloatingSignal)
    {
-@@ -947,7 +947,7 @@
+@@ -1010,7 +1010,7 @@ void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  //=======================================================================
  Standard_Boolean OSD::ToCatchFloatingSignals()
  {
diff --git a/srcpkgs/occt/patches/musl-mallinfo.patch b/srcpkgs/occt/patches/musl-mallinfo.patch
index 4e5825bf1cb0..6ae94992eaf8 100644
--- a/srcpkgs/occt/patches/musl-mallinfo.patch
+++ b/srcpkgs/occt/patches/musl-mallinfo.patch
@@ -1,17 +1,38 @@
-In musl libc there is no struct mallinfo and no function mallinf()
+Adapted from alpine's patch
 
+diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx
+index d9bb91398..d608e04fc 100644
 --- a/src/OSD/OSD_MemInfo.cxx
 +++ b/src/OSD/OSD_MemInfo.cxx
-@@ -147,8 +147,12 @@
-   }
-   aFile.close();
+@@ -35,6 +35,9 @@
+ #include <sstream>
+ #include <fstream>
+ 
++#include <sys/time.h>
++#include <sys/resource.h>
++
+ #include <OSD_MemInfo.hxx>
  
-+  #if defined(__GLIBC__)
-   struct mallinfo aMI = mallinfo();
-   myCounters[MemHeapUsage] = aMI.uordblks;
-+  #else /* XXX not yet coded */
-+  myCounters[MemHeapUsage] = 0;
-+  #endif
+ #if defined(__EMSCRIPTEN__)
+@@ -182,18 +185,9 @@ void OSD_MemInfo::Update()
+ #elif (defined(__linux__) || defined(__linux))
+   if (IsActive (MemHeapUsage))
+   {
+-  #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+-    #if __GLIBC_PREREQ(2,33)
+-      #define HAS_MALLINFO2
+-    #endif
+-  #endif
+-
+-  #ifdef HAS_MALLINFO2
+-    const struct mallinfo2 aMI = mallinfo2();
+-  #else
+-    const struct mallinfo aMI = mallinfo();
+-  #endif
+-    myCounters[MemHeapUsage] = aMI.uordblks;
++    struct rusage ru = { .ru_maxrss = 0 };
++    getrusage(RUSAGE_SELF, &ru);
++    myCounters[MemHeapUsage] = ru.ru_maxrss;
+   }
  
- #elif (defined(__APPLE__))
-   struct task_basic_info aTaskInfo;
+   if (!IsActive (MemVirtual)
diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template
index 6624fea8b53f..b17c91b0058b 100644
--- a/srcpkgs/occt/template
+++ b/srcpkgs/occt/template
@@ -1,26 +1,27 @@
 # Template file for 'occt'
 pkgname=occt
-reverts=7.5.0_1
-version=7.4.0p1
-revision=5
-_gittag="V${version//./_}"
-wrksrc=occt-${_gittag}
+version=7.6.2
+revision=1
+_ver="${version//./_}"
+wrksrc=OCCT-${_ver}
 build_style=cmake
-# XXX: re-enable -DUSE_TBB=ON if possible when updating
-configure_args="-DUSE_FREEIMAGE=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
+configure_args="-DUSE_FREEIMAGE=ON -DUSE_TBB=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
  -DINSTALL_SAMPLES=ON"
-makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tcl-devel
- tk-devel"
+makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tbb-devel
+ tcl-devel tk-devel"
 short_desc="OpenCASCADE Technology - library for CAD/CAM/CAE applications"
 maintainer="Piraty <piraty1@inbox.ru>"
 license="custom:LGPL-2.1-only-with-exceptions"
 homepage="https://www.opencascade.com"
-# distfile: use git instead of official tarball, which requires registration
-# see https://www.opencascade.com/content/packaging-again-debian
-distfiles="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_gittag};sf=tgz>occt-${_gittag}.tar.gz"
-checksum=e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0
+distfiles="https://github.com/Open-Cascade-SAS/OCCT/archive/V${_ver}.tar.gz"
+checksum=dea04077d71507c666aaa7ccaeacc73ab580d6572d7f75e90a1984c4c0302a7a
 conflicts="oce>=0"
 
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" libexecinfo-devel"
+	LDFLAGS="-lexecinfo"
+fi
+
 post_install() {
 	rm ${PKGDESTDIR}/usr/share/doc/opencascade/*_LGPL_*.txt
 	vlicense OCCT_LGPL_EXCEPTION.txt
diff --git a/srcpkgs/occt/update b/srcpkgs/occt/update
deleted file mode 100644
index c128eec6d9c9..000000000000
--- a/srcpkgs/occt/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=tags"
-pattern=">V\K[\d_p]+(?=</a>)"

From 8613d015499d7d0046568121c2e9aa0a14c3efb3 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 1 Oct 2022 17:18:40 -0400
Subject: [PATCH 2/2] python3-occ: update to 7.6.2.

---
 srcpkgs/python3-occ/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/python3-occ/template b/srcpkgs/python3-occ/template
index bee03373a3d1..4a1db0553c12 100644
--- a/srcpkgs/python3-occ/template
+++ b/srcpkgs/python3-occ/template
@@ -1,7 +1,7 @@
 # Template file for 'python3-occ'
 pkgname=python3-occ
-version=7.4.1
-revision=3
+version=7.6.2
+revision=1
 archs="i686* x86_64* armv7l* aarch64* ppc*"
 wrksrc="pythonocc-core-${version}"
 build_style=cmake
@@ -14,4 +14,4 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
 license="LGPL-3.0-or-later"
 homepage="http://pythonocc.org"
 distfiles="https://github.com/tpaviot/pythonocc-core/archive/${version}.tar.gz"
-checksum=6d62002244a0e7f4e5c1ad590d332a60601c44b2501ad017361443b54371e667
+checksum=84b1dad3b262027efc3314ab1f7cc8167ac353a1ffeea081e741e4c60319b848

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

* Re: [PR PATCH] [Updated] [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (31 preceding siblings ...)
  2022-10-01 21:18 ` karl-nilsson
@ 2022-10-01 21:35 ` karl-nilsson
  2022-10-01 21:50 ` karl-nilsson
                   ` (8 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: karl-nilsson @ 2022-10-01 21:35 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by karl-nilsson against master on the void-packages repository

https://github.com/karl-nilsson/void-packages occt_7.6
https://github.com/void-linux/void-packages/pull/36356

[WIP] occt: update to 7.6.2


#### Testing the changes
- I tested the changes in this PR: **briefly**


#### Local build testing
- I built this PR locally for my native architecture, x64-glibc


Like previously, broken ABI
```console
During initialization the error "/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv" occurred in /home/nilsson/.FreeCAD/Mod/A2plus/InitGui.py                                                                                                                        
Please look into the log file for further information                                                                                                
Wizard shaft module cannot be loaded                                                                                                                 
/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv                                                              
connect failed: No such file or directory      
```

Looks like we'll have to update or patch freecad
```console
In file included from /usr/include/opencascade/Extrema_POnSurf.lxx:15,
                 from /usr/include/opencascade/Extrema_POnSurf.hxx:75,
                 from /usr/include/opencascade/Extrema_ExtPElS.hxx:27,
                 from /usr/include/opencascade/Extrema_ExtPS.hxx:24,
                 from /usr/include/opencascade/ShapeAnalysis_Surface.hxx:20,
                 from ../src/3rdParty/salomesmesh/inc/SMESH_MesherHelper.hxx:37,
                 from ../src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp:34:
/usr/include/opencascade/Precision.hxx:98:7: note: previous definition of 'class Precision'
   98 | class Precision
      |       ^~~~~~~~~

```

ping @Piraty 

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-occt_7.6-36356.patch --]
[-- Type: text/x-diff, Size: 10177 bytes --]

From 2d5676f20c2a3694e95b011e5eaf90308ac4be0c Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 19:29:00 -0400
Subject: [PATCH 1/6] occt: update to 7.6.2.

---
 .../occt/patches/cmake-build-type-none.patch  |  6 +--
 srcpkgs/occt/patches/musl-fenv.patch          | 18 ++++----
 srcpkgs/occt/patches/musl-mallinfo.patch      | 45 ++++++++++++++-----
 srcpkgs/occt/template                         | 27 +++++------
 srcpkgs/occt/update                           |  2 -
 5 files changed, 60 insertions(+), 38 deletions(-)
 delete mode 100644 srcpkgs/occt/update

diff --git a/srcpkgs/occt/patches/cmake-build-type-none.patch b/srcpkgs/occt/patches/cmake-build-type-none.patch
index ecb0e3da3929..d2caec8c4e87 100644
--- a/srcpkgs/occt/patches/cmake-build-type-none.patch
+++ b/srcpkgs/occt/patches/cmake-build-type-none.patch
@@ -1,8 +1,8 @@
-Index: CMakeLists.txt
-===================================================================
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f4ec871f5..9b0644e94 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_D
+@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
  
  set (CMAKE_SUPPRESS_REGENERATION TRUE)
  
diff --git a/srcpkgs/occt/patches/musl-fenv.patch b/srcpkgs/occt/patches/musl-fenv.patch
index 09da8d0afeae..06a8e3a89cfd 100644
--- a/srcpkgs/occt/patches/musl-fenv.patch
+++ b/srcpkgs/occt/patches/musl-fenv.patch
@@ -5,18 +5,20 @@ is probably wrong, but I don't have a replacement for the
 non-posix functions fegetexcept(3) and feenableexcept(3).
 """
 
+diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx
+index 007f5ccaa..fe39e07ac 100644
 --- a/src/OSD/OSD_signal.cxx
 +++ b/src/OSD/OSD_signal.cxx
-@@ -703,7 +703,7 @@
- 
+@@ -761,7 +761,7 @@ typedef void (* SIG_PFV) (int);
+
  #include <signal.h>
- 
--#if !defined(__ANDROID__) && !defined(__QNX__)
-+#if !defined(__ANDROID__) && !defined(__QNX__) && defined(__GLIBC__)
+
+-#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
++#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && defined(__GLIBC__)
    #include <sys/signal.h>
  #endif
- 
-@@ -914,7 +914,7 @@
+
+@@ -977,7 +977,7 @@ static void SegvHandler(const int theSignal,
  //=======================================================================
  void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  {
@@ -25,7 +27,7 @@ non-posix functions fegetexcept(3) and feenableexcept(3).
    feclearexcept (FE_ALL_EXCEPT);
    if (theFloatingSignal)
    {
-@@ -947,7 +947,7 @@
+@@ -1010,7 +1010,7 @@ void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  //=======================================================================
  Standard_Boolean OSD::ToCatchFloatingSignals()
  {
diff --git a/srcpkgs/occt/patches/musl-mallinfo.patch b/srcpkgs/occt/patches/musl-mallinfo.patch
index 4e5825bf1cb0..6ae94992eaf8 100644
--- a/srcpkgs/occt/patches/musl-mallinfo.patch
+++ b/srcpkgs/occt/patches/musl-mallinfo.patch
@@ -1,17 +1,38 @@
-In musl libc there is no struct mallinfo and no function mallinf()
+Adapted from alpine's patch
 
+diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx
+index d9bb91398..d608e04fc 100644
 --- a/src/OSD/OSD_MemInfo.cxx
 +++ b/src/OSD/OSD_MemInfo.cxx
-@@ -147,8 +147,12 @@
-   }
-   aFile.close();
+@@ -35,6 +35,9 @@
+ #include <sstream>
+ #include <fstream>
+ 
++#include <sys/time.h>
++#include <sys/resource.h>
++
+ #include <OSD_MemInfo.hxx>
  
-+  #if defined(__GLIBC__)
-   struct mallinfo aMI = mallinfo();
-   myCounters[MemHeapUsage] = aMI.uordblks;
-+  #else /* XXX not yet coded */
-+  myCounters[MemHeapUsage] = 0;
-+  #endif
+ #if defined(__EMSCRIPTEN__)
+@@ -182,18 +185,9 @@ void OSD_MemInfo::Update()
+ #elif (defined(__linux__) || defined(__linux))
+   if (IsActive (MemHeapUsage))
+   {
+-  #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+-    #if __GLIBC_PREREQ(2,33)
+-      #define HAS_MALLINFO2
+-    #endif
+-  #endif
+-
+-  #ifdef HAS_MALLINFO2
+-    const struct mallinfo2 aMI = mallinfo2();
+-  #else
+-    const struct mallinfo aMI = mallinfo();
+-  #endif
+-    myCounters[MemHeapUsage] = aMI.uordblks;
++    struct rusage ru = { .ru_maxrss = 0 };
++    getrusage(RUSAGE_SELF, &ru);
++    myCounters[MemHeapUsage] = ru.ru_maxrss;
+   }
  
- #elif (defined(__APPLE__))
-   struct task_basic_info aTaskInfo;
+   if (!IsActive (MemVirtual)
diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template
index 6624fea8b53f..b17c91b0058b 100644
--- a/srcpkgs/occt/template
+++ b/srcpkgs/occt/template
@@ -1,26 +1,27 @@
 # Template file for 'occt'
 pkgname=occt
-reverts=7.5.0_1
-version=7.4.0p1
-revision=5
-_gittag="V${version//./_}"
-wrksrc=occt-${_gittag}
+version=7.6.2
+revision=1
+_ver="${version//./_}"
+wrksrc=OCCT-${_ver}
 build_style=cmake
-# XXX: re-enable -DUSE_TBB=ON if possible when updating
-configure_args="-DUSE_FREEIMAGE=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
+configure_args="-DUSE_FREEIMAGE=ON -DUSE_TBB=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
  -DINSTALL_SAMPLES=ON"
-makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tcl-devel
- tk-devel"
+makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tbb-devel
+ tcl-devel tk-devel"
 short_desc="OpenCASCADE Technology - library for CAD/CAM/CAE applications"
 maintainer="Piraty <piraty1@inbox.ru>"
 license="custom:LGPL-2.1-only-with-exceptions"
 homepage="https://www.opencascade.com"
-# distfile: use git instead of official tarball, which requires registration
-# see https://www.opencascade.com/content/packaging-again-debian
-distfiles="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_gittag};sf=tgz>occt-${_gittag}.tar.gz"
-checksum=e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0
+distfiles="https://github.com/Open-Cascade-SAS/OCCT/archive/V${_ver}.tar.gz"
+checksum=dea04077d71507c666aaa7ccaeacc73ab580d6572d7f75e90a1984c4c0302a7a
 conflicts="oce>=0"
 
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" libexecinfo-devel"
+	LDFLAGS="-lexecinfo"
+fi
+
 post_install() {
 	rm ${PKGDESTDIR}/usr/share/doc/opencascade/*_LGPL_*.txt
 	vlicense OCCT_LGPL_EXCEPTION.txt
diff --git a/srcpkgs/occt/update b/srcpkgs/occt/update
deleted file mode 100644
index c128eec6d9c9..000000000000
--- a/srcpkgs/occt/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=tags"
-pattern=">V\K[\d_p]+(?=</a>)"

From 8613d015499d7d0046568121c2e9aa0a14c3efb3 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 1 Oct 2022 17:18:40 -0400
Subject: [PATCH 2/6] python3-occ: update to 7.6.2.

---
 srcpkgs/python3-occ/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/python3-occ/template b/srcpkgs/python3-occ/template
index bee03373a3d1..4a1db0553c12 100644
--- a/srcpkgs/python3-occ/template
+++ b/srcpkgs/python3-occ/template
@@ -1,7 +1,7 @@
 # Template file for 'python3-occ'
 pkgname=python3-occ
-version=7.4.1
-revision=3
+version=7.6.2
+revision=1
 archs="i686* x86_64* armv7l* aarch64* ppc*"
 wrksrc="pythonocc-core-${version}"
 build_style=cmake
@@ -14,4 +14,4 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
 license="LGPL-3.0-or-later"
 homepage="http://pythonocc.org"
 distfiles="https://github.com/tpaviot/pythonocc-core/archive/${version}.tar.gz"
-checksum=6d62002244a0e7f4e5c1ad590d332a60601c44b2501ad017361443b54371e667
+checksum=84b1dad3b262027efc3314ab1f7cc8167ac353a1ffeea081e741e4c60319b848

From 8c56afaa6c8e80ae3b63d77f5aa8331e22809983 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 1 Oct 2022 17:34:34 -0400
Subject: [PATCH 3/6] freecad: revbump for occt 7.6.2

---
 srcpkgs/freecad/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template
index 6963278981fc..077710f262fa 100644
--- a/srcpkgs/freecad/template
+++ b/srcpkgs/freecad/template
@@ -1,7 +1,7 @@
 # Template file for 'freecad'
 pkgname=freecad
 version=0.20.1
-revision=4
+revision=5
 wrksrc="FreeCAD-${version}"
 build_style=cmake
 

From 144ed62788611e77272d9e104a0a072eaa3e0114 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 1 Oct 2022 17:34:45 -0400
Subject: [PATCH 4/6] horizon: revbump for occt 7.6.2

---
 srcpkgs/horizon/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/horizon/template b/srcpkgs/horizon/template
index 7496696147c9..287bf6afde3e 100644
--- a/srcpkgs/horizon/template
+++ b/srcpkgs/horizon/template
@@ -1,7 +1,7 @@
 # Template file for 'horizon'
 pkgname=horizon
 version=2.3.1
-revision=1
+revision=2
 build_style=gnu-makefile
 make_build_args="GOLD="
 make_install_target="install install-man"

From 00cd31021d6feecad22b96d6e18c9adfceede248 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 1 Oct 2022 17:34:56 -0400
Subject: [PATCH 5/6] kicad: revbump for occt 7.6.2

---
 srcpkgs/kicad/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kicad/template b/srcpkgs/kicad/template
index 23b9ad9418d4..4db59d0bdd22 100644
--- a/srcpkgs/kicad/template
+++ b/srcpkgs/kicad/template
@@ -1,7 +1,7 @@
 # Template file for 'kicad'
 pkgname=kicad
 version=6.0.7
-revision=1
+revision=2
 build_style=cmake
 build_helper=cmake-wxWidgets-gtk3
 configure_args="-DKICAD_SCRIPTING_WXPYTHON=ON

From d8542676a0aca5dbb769ddc9c12868d2e4951a56 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 1 Oct 2022 17:35:28 -0400
Subject: [PATCH 6/6] gmsh: revbump for occt 7.6.2

---
 srcpkgs/gmsh/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/gmsh/template b/srcpkgs/gmsh/template
index 616e140277b1..286c2fc91645 100644
--- a/srcpkgs/gmsh/template
+++ b/srcpkgs/gmsh/template
@@ -1,7 +1,7 @@
 # Template file for 'gmsh'
 pkgname=gmsh
 version=4.8.4
-revision=1
+revision=2
 wrksrc="${pkgname}-${version}-source"
 build_style=cmake
 configure_args="-DENABLE_SYSTEM_CONTRIB=ON

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

* Re: [PR PATCH] [Updated] [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (32 preceding siblings ...)
  2022-10-01 21:35 ` karl-nilsson
@ 2022-10-01 21:50 ` karl-nilsson
  2022-10-02  2:13 ` karl-nilsson
                   ` (7 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: karl-nilsson @ 2022-10-01 21:50 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by karl-nilsson against master on the void-packages repository

https://github.com/karl-nilsson/void-packages occt_7.6
https://github.com/void-linux/void-packages/pull/36356

[WIP] occt: update to 7.6.2


#### Testing the changes
- I tested the changes in this PR: **briefly**


#### Local build testing
- I built this PR locally for my native architecture, x64-glibc


Like previously, broken ABI
```console
During initialization the error "/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv" occurred in /home/nilsson/.FreeCAD/Mod/A2plus/InitGui.py                                                                                                                        
Please look into the log file for further information                                                                                                
Wizard shaft module cannot be loaded                                                                                                                 
/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv                                                              
connect failed: No such file or directory      
```

Looks like we'll have to update or patch freecad
```console
In file included from /usr/include/opencascade/Extrema_POnSurf.lxx:15,
                 from /usr/include/opencascade/Extrema_POnSurf.hxx:75,
                 from /usr/include/opencascade/Extrema_ExtPElS.hxx:27,
                 from /usr/include/opencascade/Extrema_ExtPS.hxx:24,
                 from /usr/include/opencascade/ShapeAnalysis_Surface.hxx:20,
                 from ../src/3rdParty/salomesmesh/inc/SMESH_MesherHelper.hxx:37,
                 from ../src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp:34:
/usr/include/opencascade/Precision.hxx:98:7: note: previous definition of 'class Precision'
   98 | class Precision
      |       ^~~~~~~~~

```

ping @Piraty 

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-occt_7.6-36356.patch --]
[-- Type: text/x-diff, Size: 14200 bytes --]

From 577717adeba53f21e01dc3f4de2a00a70e0354bb Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 19:29:00 -0400
Subject: [PATCH 1/6] occt: update to 7.6.2.

---
 common/shlibs                                 | 114 +++++++++---------
 .../occt/patches/cmake-build-type-none.patch  |   6 +-
 srcpkgs/occt/patches/musl-fenv.patch          |  18 +--
 srcpkgs/occt/patches/musl-mallinfo.patch      |  45 +++++--
 srcpkgs/occt/template                         |  27 +++--
 srcpkgs/occt/update                           |   2 -
 6 files changed, 117 insertions(+), 95 deletions(-)
 delete mode 100644 srcpkgs/occt/update

diff --git a/common/shlibs b/common/shlibs
index 987cff25f146..a286a91ae9fa 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3352,63 +3352,63 @@ libvolume_key.so.1 volume_key-0.3.9_1
 librand48_r.so.0 rand48_r-0.1_1
 libxxhash.so.0 libxxHash-0.6.5_2
 libcapnp_c.so.0 c-capnproto-0.3_1
-libTKBin.so.7 occt-7.2.0p1_1
-libTKDraw.so.7 occt-7.2.0p1_1
-libTKSTEP209.so.7 occt-7.2.0p1_1
-libTKOpenGl.so.7 occt-7.2.0p1_1
-libTKBinTObj.so.7 occt-7.2.0p1_1
-libTKSTL.so.7 occt-7.2.0p1_1
-libTKViewerTest.so.7 occt-7.2.0p1_1
-libTKCAF.so.7 occt-7.2.0p1_1
-libTKService.so.7 occt-7.2.0p1_1
-libTKV3d.so.7 occt-7.2.0p1_1
-libTKXCAF.so.7 occt-7.2.0p1_1
-libTKMesh.so.7 occt-7.2.0p1_1
-libTKSTEP.so.7 occt-7.2.0p1_1
-libTKMath.so.7 occt-7.2.0p1_1
-libTKLCAF.so.7 occt-7.2.0p1_1
-libTKShHealing.so.7 occt-7.2.0p1_1
-libTKGeomAlgo.so.7 occt-7.2.0p1_1
-libTKTObjDRAW.so.7 occt-7.2.0p1_1
-libTKTObj.so.7 occt-7.2.0p1_1
-libTKStd.so.7 occt-7.2.0p1_1
-libTKSTEPBase.so.7 occt-7.2.0p1_1
-libTKIGES.so.7 occt-7.2.0p1_1
-libTKGeomBase.so.7 occt-7.2.0p1_1
-libTKFillet.so.7 occt-7.2.0p1_1
-libTKFeat.so.7 occt-7.2.0p1_1
-libTKG2d.so.7 occt-7.2.0p1_1
-libTKXSBase.so.7 occt-7.2.0p1_1
-libTKDCAF.so.7 occt-7.2.0p1_1
-libTKXml.so.7 occt-7.2.0p1_1
-libTKTopTest.so.7 occt-7.2.0p1_1
-libTKG3d.so.7 occt-7.2.0p1_1
-libTKBRep.so.7 occt-7.2.0p1_1
-libTKVRML.so.7 occt-7.2.0p1_1
-libTKCDF.so.7 occt-7.2.0p1_1
-libTKXSDRAW.so.7 occt-7.2.0p1_1
-libTKXMesh.so.7 occt-7.2.0p1_1
-libTKernel.so.7 occt-7.2.0p1_1
-libTKTopAlgo.so.7 occt-7.2.0p1_1
-libTKHLR.so.7 occt-7.2.0p1_1
-libTKBinXCAF.so.7 occt-7.2.0p1_1
-libTKVCAF.so.7 occt-7.2.0p1_1
-libTKBinL.so.7 occt-7.2.0p1_1
-libTKXmlXCAF.so.7 occt-7.2.0p1_1
-libTKXDEIGES.so.7 occt-7.2.0p1_1
-libTKBO.so.7 occt-7.2.0p1_1
-libTKStdL.so.7 occt-7.2.0p1_1
-libTKXDEDRAW.so.7 occt-7.2.0p1_1
-libTKXmlTObj.so.7 occt-7.2.0p1_1
-libTKPrim.so.7 occt-7.2.0p1_1
-libTKMeshVS.so.7 occt-7.2.0p1_1
-libTKSTEPAttr.so.7 occt-7.2.0p1_1
-libTKBool.so.7 occt-7.2.0p1_1
-libTKOffset.so.7 occt-7.2.0p1_1
-libTKXDESTEP.so.7 occt-7.2.0p1_1
-libTKQADraw.so.7 occt-7.2.0p1_1
-libTKXmlL.so.7 occt-7.2.0p1_1
-libTKRWMesh.so.7 occt-7.4.0_1
+libTKBin.so.7 occt-7.6.2_1
+libTKDraw.so.7 occt-7.6.2_1
+libTKSTEP209.so.7 occt-7.6.2_1
+libTKOpenGl.so.7 occt-7.6.2_1
+libTKBinTObj.so.7 occt-7.6.2_1
+libTKSTL.so.7 occt-7.6.2_1
+libTKViewerTest.so.7 occt-7.6.2_1
+libTKCAF.so.7 occt-7.6.2_1
+libTKService.so.7 occt-7.6.2_1
+libTKV3d.so.7 occt-7.6.2_1
+libTKXCAF.so.7 occt-7.6.2_1
+libTKMesh.so.7 occt-7.6.2_1
+libTKSTEP.so.7 occt-7.6.2_1
+libTKMath.so.7 occt-7.6.2_1
+libTKLCAF.so.7 occt-7.6.2_1
+libTKShHealing.so.7 occt-7.6.2_1
+libTKGeomAlgo.so.7 occt-7.6.2_1
+libTKTObjDRAW.so.7 occt-7.6.2_1
+libTKTObj.so.7 occt-7.6.2_1
+libTKStd.so.7 occt-7.6.2_1
+libTKSTEPBase.so.7 occt-7.6.2_1
+libTKIGES.so.7 occt-7.6.2_1
+libTKGeomBase.so.7 occt-7.6.2_1
+libTKFillet.so.7 occt-7.6.2_1
+libTKFeat.so.7 occt-7.6.2_1
+libTKG2d.so.7 occt-7.6.2_1
+libTKXSBase.so.7 occt-7.6.2_1
+libTKDCAF.so.7 occt-7.6.2_1
+libTKXml.so.7 occt-7.6.2_1
+libTKTopTest.so.7 occt-7.6.2_1
+libTKG3d.so.7 occt-7.6.2_1
+libTKBRep.so.7 occt-7.6.2_1
+libTKVRML.so.7 occt-7.6.2_1
+libTKCDF.so.7 occt-7.6.2_1
+libTKXSDRAW.so.7 occt-7.6.2_1
+libTKXMesh.so.7 occt-7.6.2_1
+libTKernel.so.7 occt-7.6.2_1
+libTKTopAlgo.so.7 occt-7.6.2_1
+libTKHLR.so.7 occt-7.6.2_1
+libTKBinXCAF.so.7 occt-7.6.2_1
+libTKVCAF.so.7 occt-7.6.2_1
+libTKBinL.so.7 occt-7.6.2_1
+libTKXmlXCAF.so.7 occt-7.6.2_1
+libTKXDEIGES.so.7 occt-7.6.2_1
+libTKBO.so.7 occt-7.6.2_1
+libTKStdL.so.7 occt-7.6.2_1
+libTKXDEDRAW.so.7 occt-7.6.2_1
+libTKXmlTObj.so.7 occt-7.6.2_1
+libTKPrim.so.7 occt-7.6.2_1
+libTKMeshVS.so.7 occt-7.6.2_1
+libTKSTEPAttr.so.7 occt-7.6.2_1
+libTKBool.so.7 occt-7.6.2_1
+libTKOffset.so.7 occt-7.6.2_1
+libTKXDESTEP.so.7 occt-7.6.2_1
+libTKQADraw.so.7 occt-7.6.2_1
+libTKXmlL.so.7 occt-7.6.2_1
+libTKRWMesh.so.7 occt-7.6.2_1
 libargon2.so.1 libargon2-20171227_1
 libdazzle-1.0.so.0 libdazzle-3.28.0_1
 libjsonrpc-glib-1.0.so.1 jsonrpc-glib-3.28.0_1
diff --git a/srcpkgs/occt/patches/cmake-build-type-none.patch b/srcpkgs/occt/patches/cmake-build-type-none.patch
index ecb0e3da3929..d2caec8c4e87 100644
--- a/srcpkgs/occt/patches/cmake-build-type-none.patch
+++ b/srcpkgs/occt/patches/cmake-build-type-none.patch
@@ -1,8 +1,8 @@
-Index: CMakeLists.txt
-===================================================================
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f4ec871f5..9b0644e94 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_D
+@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
  
  set (CMAKE_SUPPRESS_REGENERATION TRUE)
  
diff --git a/srcpkgs/occt/patches/musl-fenv.patch b/srcpkgs/occt/patches/musl-fenv.patch
index 09da8d0afeae..06a8e3a89cfd 100644
--- a/srcpkgs/occt/patches/musl-fenv.patch
+++ b/srcpkgs/occt/patches/musl-fenv.patch
@@ -5,18 +5,20 @@ is probably wrong, but I don't have a replacement for the
 non-posix functions fegetexcept(3) and feenableexcept(3).
 """
 
+diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx
+index 007f5ccaa..fe39e07ac 100644
 --- a/src/OSD/OSD_signal.cxx
 +++ b/src/OSD/OSD_signal.cxx
-@@ -703,7 +703,7 @@
- 
+@@ -761,7 +761,7 @@ typedef void (* SIG_PFV) (int);
+
  #include <signal.h>
- 
--#if !defined(__ANDROID__) && !defined(__QNX__)
-+#if !defined(__ANDROID__) && !defined(__QNX__) && defined(__GLIBC__)
+
+-#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
++#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && defined(__GLIBC__)
    #include <sys/signal.h>
  #endif
- 
-@@ -914,7 +914,7 @@
+
+@@ -977,7 +977,7 @@ static void SegvHandler(const int theSignal,
  //=======================================================================
  void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  {
@@ -25,7 +27,7 @@ non-posix functions fegetexcept(3) and feenableexcept(3).
    feclearexcept (FE_ALL_EXCEPT);
    if (theFloatingSignal)
    {
-@@ -947,7 +947,7 @@
+@@ -1010,7 +1010,7 @@ void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  //=======================================================================
  Standard_Boolean OSD::ToCatchFloatingSignals()
  {
diff --git a/srcpkgs/occt/patches/musl-mallinfo.patch b/srcpkgs/occt/patches/musl-mallinfo.patch
index 4e5825bf1cb0..6ae94992eaf8 100644
--- a/srcpkgs/occt/patches/musl-mallinfo.patch
+++ b/srcpkgs/occt/patches/musl-mallinfo.patch
@@ -1,17 +1,38 @@
-In musl libc there is no struct mallinfo and no function mallinf()
+Adapted from alpine's patch
 
+diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx
+index d9bb91398..d608e04fc 100644
 --- a/src/OSD/OSD_MemInfo.cxx
 +++ b/src/OSD/OSD_MemInfo.cxx
-@@ -147,8 +147,12 @@
-   }
-   aFile.close();
+@@ -35,6 +35,9 @@
+ #include <sstream>
+ #include <fstream>
+ 
++#include <sys/time.h>
++#include <sys/resource.h>
++
+ #include <OSD_MemInfo.hxx>
  
-+  #if defined(__GLIBC__)
-   struct mallinfo aMI = mallinfo();
-   myCounters[MemHeapUsage] = aMI.uordblks;
-+  #else /* XXX not yet coded */
-+  myCounters[MemHeapUsage] = 0;
-+  #endif
+ #if defined(__EMSCRIPTEN__)
+@@ -182,18 +185,9 @@ void OSD_MemInfo::Update()
+ #elif (defined(__linux__) || defined(__linux))
+   if (IsActive (MemHeapUsage))
+   {
+-  #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+-    #if __GLIBC_PREREQ(2,33)
+-      #define HAS_MALLINFO2
+-    #endif
+-  #endif
+-
+-  #ifdef HAS_MALLINFO2
+-    const struct mallinfo2 aMI = mallinfo2();
+-  #else
+-    const struct mallinfo aMI = mallinfo();
+-  #endif
+-    myCounters[MemHeapUsage] = aMI.uordblks;
++    struct rusage ru = { .ru_maxrss = 0 };
++    getrusage(RUSAGE_SELF, &ru);
++    myCounters[MemHeapUsage] = ru.ru_maxrss;
+   }
  
- #elif (defined(__APPLE__))
-   struct task_basic_info aTaskInfo;
+   if (!IsActive (MemVirtual)
diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template
index 6624fea8b53f..b17c91b0058b 100644
--- a/srcpkgs/occt/template
+++ b/srcpkgs/occt/template
@@ -1,26 +1,27 @@
 # Template file for 'occt'
 pkgname=occt
-reverts=7.5.0_1
-version=7.4.0p1
-revision=5
-_gittag="V${version//./_}"
-wrksrc=occt-${_gittag}
+version=7.6.2
+revision=1
+_ver="${version//./_}"
+wrksrc=OCCT-${_ver}
 build_style=cmake
-# XXX: re-enable -DUSE_TBB=ON if possible when updating
-configure_args="-DUSE_FREEIMAGE=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
+configure_args="-DUSE_FREEIMAGE=ON -DUSE_TBB=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
  -DINSTALL_SAMPLES=ON"
-makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tcl-devel
- tk-devel"
+makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tbb-devel
+ tcl-devel tk-devel"
 short_desc="OpenCASCADE Technology - library for CAD/CAM/CAE applications"
 maintainer="Piraty <piraty1@inbox.ru>"
 license="custom:LGPL-2.1-only-with-exceptions"
 homepage="https://www.opencascade.com"
-# distfile: use git instead of official tarball, which requires registration
-# see https://www.opencascade.com/content/packaging-again-debian
-distfiles="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_gittag};sf=tgz>occt-${_gittag}.tar.gz"
-checksum=e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0
+distfiles="https://github.com/Open-Cascade-SAS/OCCT/archive/V${_ver}.tar.gz"
+checksum=dea04077d71507c666aaa7ccaeacc73ab580d6572d7f75e90a1984c4c0302a7a
 conflicts="oce>=0"
 
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" libexecinfo-devel"
+	LDFLAGS="-lexecinfo"
+fi
+
 post_install() {
 	rm ${PKGDESTDIR}/usr/share/doc/opencascade/*_LGPL_*.txt
 	vlicense OCCT_LGPL_EXCEPTION.txt
diff --git a/srcpkgs/occt/update b/srcpkgs/occt/update
deleted file mode 100644
index c128eec6d9c9..000000000000
--- a/srcpkgs/occt/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=tags"
-pattern=">V\K[\d_p]+(?=</a>)"

From 9437fc2078e42e5dd814d721761346a6471a4bc0 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 1 Oct 2022 17:18:40 -0400
Subject: [PATCH 2/6] python3-occ: update to 7.6.2.

---
 srcpkgs/python3-occ/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/python3-occ/template b/srcpkgs/python3-occ/template
index bee03373a3d1..4a1db0553c12 100644
--- a/srcpkgs/python3-occ/template
+++ b/srcpkgs/python3-occ/template
@@ -1,7 +1,7 @@
 # Template file for 'python3-occ'
 pkgname=python3-occ
-version=7.4.1
-revision=3
+version=7.6.2
+revision=1
 archs="i686* x86_64* armv7l* aarch64* ppc*"
 wrksrc="pythonocc-core-${version}"
 build_style=cmake
@@ -14,4 +14,4 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
 license="LGPL-3.0-or-later"
 homepage="http://pythonocc.org"
 distfiles="https://github.com/tpaviot/pythonocc-core/archive/${version}.tar.gz"
-checksum=6d62002244a0e7f4e5c1ad590d332a60601c44b2501ad017361443b54371e667
+checksum=84b1dad3b262027efc3314ab1f7cc8167ac353a1ffeea081e741e4c60319b848

From 178bb57cb9f5263ca136f97faa12d2a2945eff9e Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 1 Oct 2022 17:34:34 -0400
Subject: [PATCH 3/6] freecad: revbump for occt 7.6.2

---
 srcpkgs/freecad/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template
index 6963278981fc..077710f262fa 100644
--- a/srcpkgs/freecad/template
+++ b/srcpkgs/freecad/template
@@ -1,7 +1,7 @@
 # Template file for 'freecad'
 pkgname=freecad
 version=0.20.1
-revision=4
+revision=5
 wrksrc="FreeCAD-${version}"
 build_style=cmake
 

From 762c7b46513532b0815d4ef22ad8208991e24868 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 1 Oct 2022 17:34:45 -0400
Subject: [PATCH 4/6] horizon: revbump for occt 7.6.2

---
 srcpkgs/horizon/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/horizon/template b/srcpkgs/horizon/template
index 7496696147c9..287bf6afde3e 100644
--- a/srcpkgs/horizon/template
+++ b/srcpkgs/horizon/template
@@ -1,7 +1,7 @@
 # Template file for 'horizon'
 pkgname=horizon
 version=2.3.1
-revision=1
+revision=2
 build_style=gnu-makefile
 make_build_args="GOLD="
 make_install_target="install install-man"

From dce6a96031b21538bfff8780719e1455b0eba86b Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 1 Oct 2022 17:34:56 -0400
Subject: [PATCH 5/6] kicad: revbump for occt 7.6.2

---
 srcpkgs/kicad/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kicad/template b/srcpkgs/kicad/template
index 23b9ad9418d4..4db59d0bdd22 100644
--- a/srcpkgs/kicad/template
+++ b/srcpkgs/kicad/template
@@ -1,7 +1,7 @@
 # Template file for 'kicad'
 pkgname=kicad
 version=6.0.7
-revision=1
+revision=2
 build_style=cmake
 build_helper=cmake-wxWidgets-gtk3
 configure_args="-DKICAD_SCRIPTING_WXPYTHON=ON

From 2f970325cdc5f9343832181464fcd69387070bf4 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 1 Oct 2022 17:35:28 -0400
Subject: [PATCH 6/6] gmsh: revbump for occt 7.6.2

---
 srcpkgs/gmsh/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/gmsh/template b/srcpkgs/gmsh/template
index 616e140277b1..286c2fc91645 100644
--- a/srcpkgs/gmsh/template
+++ b/srcpkgs/gmsh/template
@@ -1,7 +1,7 @@
 # Template file for 'gmsh'
 pkgname=gmsh
 version=4.8.4
-revision=1
+revision=2
 wrksrc="${pkgname}-${version}-source"
 build_style=cmake
 configure_args="-DENABLE_SYSTEM_CONTRIB=ON

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

* Re: [PR PATCH] [Updated] [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (33 preceding siblings ...)
  2022-10-01 21:50 ` karl-nilsson
@ 2022-10-02  2:13 ` karl-nilsson
  2022-10-02  2:31 ` karl-nilsson
                   ` (6 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: karl-nilsson @ 2022-10-02  2:13 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by karl-nilsson against master on the void-packages repository

https://github.com/karl-nilsson/void-packages occt_7.6
https://github.com/void-linux/void-packages/pull/36356

[WIP] occt: update to 7.6.2


#### Testing the changes
- I tested the changes in this PR: **briefly**


#### Local build testing
- I built this PR locally for my native architecture, x64-glibc


Like previously, broken ABI
```console
During initialization the error "/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv" occurred in /home/nilsson/.FreeCAD/Mod/A2plus/InitGui.py                                                                                                                        
Please look into the log file for further information                                                                                                
Wizard shaft module cannot be loaded                                                                                                                 
/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv                                                              
connect failed: No such file or directory      
```

Looks like we'll have to update or patch freecad
```console
In file included from /usr/include/opencascade/Extrema_POnSurf.lxx:15,
                 from /usr/include/opencascade/Extrema_POnSurf.hxx:75,
                 from /usr/include/opencascade/Extrema_ExtPElS.hxx:27,
                 from /usr/include/opencascade/Extrema_ExtPS.hxx:24,
                 from /usr/include/opencascade/ShapeAnalysis_Surface.hxx:20,
                 from ../src/3rdParty/salomesmesh/inc/SMESH_MesherHelper.hxx:37,
                 from ../src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp:34:
/usr/include/opencascade/Precision.hxx:98:7: note: previous definition of 'class Precision'
   98 | class Precision
      |       ^~~~~~~~~

```

ping @Piraty 

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-occt_7.6-36356.patch --]
[-- Type: text/x-diff, Size: 15414 bytes --]

From 577717adeba53f21e01dc3f4de2a00a70e0354bb Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 19:29:00 -0400
Subject: [PATCH 1/6] occt: update to 7.6.2.

---
 common/shlibs                                 | 114 +++++++++---------
 .../occt/patches/cmake-build-type-none.patch  |   6 +-
 srcpkgs/occt/patches/musl-fenv.patch          |  18 +--
 srcpkgs/occt/patches/musl-mallinfo.patch      |  45 +++++--
 srcpkgs/occt/template                         |  27 +++--
 srcpkgs/occt/update                           |   2 -
 6 files changed, 117 insertions(+), 95 deletions(-)
 delete mode 100644 srcpkgs/occt/update

diff --git a/common/shlibs b/common/shlibs
index 987cff25f146..a286a91ae9fa 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3352,63 +3352,63 @@ libvolume_key.so.1 volume_key-0.3.9_1
 librand48_r.so.0 rand48_r-0.1_1
 libxxhash.so.0 libxxHash-0.6.5_2
 libcapnp_c.so.0 c-capnproto-0.3_1
-libTKBin.so.7 occt-7.2.0p1_1
-libTKDraw.so.7 occt-7.2.0p1_1
-libTKSTEP209.so.7 occt-7.2.0p1_1
-libTKOpenGl.so.7 occt-7.2.0p1_1
-libTKBinTObj.so.7 occt-7.2.0p1_1
-libTKSTL.so.7 occt-7.2.0p1_1
-libTKViewerTest.so.7 occt-7.2.0p1_1
-libTKCAF.so.7 occt-7.2.0p1_1
-libTKService.so.7 occt-7.2.0p1_1
-libTKV3d.so.7 occt-7.2.0p1_1
-libTKXCAF.so.7 occt-7.2.0p1_1
-libTKMesh.so.7 occt-7.2.0p1_1
-libTKSTEP.so.7 occt-7.2.0p1_1
-libTKMath.so.7 occt-7.2.0p1_1
-libTKLCAF.so.7 occt-7.2.0p1_1
-libTKShHealing.so.7 occt-7.2.0p1_1
-libTKGeomAlgo.so.7 occt-7.2.0p1_1
-libTKTObjDRAW.so.7 occt-7.2.0p1_1
-libTKTObj.so.7 occt-7.2.0p1_1
-libTKStd.so.7 occt-7.2.0p1_1
-libTKSTEPBase.so.7 occt-7.2.0p1_1
-libTKIGES.so.7 occt-7.2.0p1_1
-libTKGeomBase.so.7 occt-7.2.0p1_1
-libTKFillet.so.7 occt-7.2.0p1_1
-libTKFeat.so.7 occt-7.2.0p1_1
-libTKG2d.so.7 occt-7.2.0p1_1
-libTKXSBase.so.7 occt-7.2.0p1_1
-libTKDCAF.so.7 occt-7.2.0p1_1
-libTKXml.so.7 occt-7.2.0p1_1
-libTKTopTest.so.7 occt-7.2.0p1_1
-libTKG3d.so.7 occt-7.2.0p1_1
-libTKBRep.so.7 occt-7.2.0p1_1
-libTKVRML.so.7 occt-7.2.0p1_1
-libTKCDF.so.7 occt-7.2.0p1_1
-libTKXSDRAW.so.7 occt-7.2.0p1_1
-libTKXMesh.so.7 occt-7.2.0p1_1
-libTKernel.so.7 occt-7.2.0p1_1
-libTKTopAlgo.so.7 occt-7.2.0p1_1
-libTKHLR.so.7 occt-7.2.0p1_1
-libTKBinXCAF.so.7 occt-7.2.0p1_1
-libTKVCAF.so.7 occt-7.2.0p1_1
-libTKBinL.so.7 occt-7.2.0p1_1
-libTKXmlXCAF.so.7 occt-7.2.0p1_1
-libTKXDEIGES.so.7 occt-7.2.0p1_1
-libTKBO.so.7 occt-7.2.0p1_1
-libTKStdL.so.7 occt-7.2.0p1_1
-libTKXDEDRAW.so.7 occt-7.2.0p1_1
-libTKXmlTObj.so.7 occt-7.2.0p1_1
-libTKPrim.so.7 occt-7.2.0p1_1
-libTKMeshVS.so.7 occt-7.2.0p1_1
-libTKSTEPAttr.so.7 occt-7.2.0p1_1
-libTKBool.so.7 occt-7.2.0p1_1
-libTKOffset.so.7 occt-7.2.0p1_1
-libTKXDESTEP.so.7 occt-7.2.0p1_1
-libTKQADraw.so.7 occt-7.2.0p1_1
-libTKXmlL.so.7 occt-7.2.0p1_1
-libTKRWMesh.so.7 occt-7.4.0_1
+libTKBin.so.7 occt-7.6.2_1
+libTKDraw.so.7 occt-7.6.2_1
+libTKSTEP209.so.7 occt-7.6.2_1
+libTKOpenGl.so.7 occt-7.6.2_1
+libTKBinTObj.so.7 occt-7.6.2_1
+libTKSTL.so.7 occt-7.6.2_1
+libTKViewerTest.so.7 occt-7.6.2_1
+libTKCAF.so.7 occt-7.6.2_1
+libTKService.so.7 occt-7.6.2_1
+libTKV3d.so.7 occt-7.6.2_1
+libTKXCAF.so.7 occt-7.6.2_1
+libTKMesh.so.7 occt-7.6.2_1
+libTKSTEP.so.7 occt-7.6.2_1
+libTKMath.so.7 occt-7.6.2_1
+libTKLCAF.so.7 occt-7.6.2_1
+libTKShHealing.so.7 occt-7.6.2_1
+libTKGeomAlgo.so.7 occt-7.6.2_1
+libTKTObjDRAW.so.7 occt-7.6.2_1
+libTKTObj.so.7 occt-7.6.2_1
+libTKStd.so.7 occt-7.6.2_1
+libTKSTEPBase.so.7 occt-7.6.2_1
+libTKIGES.so.7 occt-7.6.2_1
+libTKGeomBase.so.7 occt-7.6.2_1
+libTKFillet.so.7 occt-7.6.2_1
+libTKFeat.so.7 occt-7.6.2_1
+libTKG2d.so.7 occt-7.6.2_1
+libTKXSBase.so.7 occt-7.6.2_1
+libTKDCAF.so.7 occt-7.6.2_1
+libTKXml.so.7 occt-7.6.2_1
+libTKTopTest.so.7 occt-7.6.2_1
+libTKG3d.so.7 occt-7.6.2_1
+libTKBRep.so.7 occt-7.6.2_1
+libTKVRML.so.7 occt-7.6.2_1
+libTKCDF.so.7 occt-7.6.2_1
+libTKXSDRAW.so.7 occt-7.6.2_1
+libTKXMesh.so.7 occt-7.6.2_1
+libTKernel.so.7 occt-7.6.2_1
+libTKTopAlgo.so.7 occt-7.6.2_1
+libTKHLR.so.7 occt-7.6.2_1
+libTKBinXCAF.so.7 occt-7.6.2_1
+libTKVCAF.so.7 occt-7.6.2_1
+libTKBinL.so.7 occt-7.6.2_1
+libTKXmlXCAF.so.7 occt-7.6.2_1
+libTKXDEIGES.so.7 occt-7.6.2_1
+libTKBO.so.7 occt-7.6.2_1
+libTKStdL.so.7 occt-7.6.2_1
+libTKXDEDRAW.so.7 occt-7.6.2_1
+libTKXmlTObj.so.7 occt-7.6.2_1
+libTKPrim.so.7 occt-7.6.2_1
+libTKMeshVS.so.7 occt-7.6.2_1
+libTKSTEPAttr.so.7 occt-7.6.2_1
+libTKBool.so.7 occt-7.6.2_1
+libTKOffset.so.7 occt-7.6.2_1
+libTKXDESTEP.so.7 occt-7.6.2_1
+libTKQADraw.so.7 occt-7.6.2_1
+libTKXmlL.so.7 occt-7.6.2_1
+libTKRWMesh.so.7 occt-7.6.2_1
 libargon2.so.1 libargon2-20171227_1
 libdazzle-1.0.so.0 libdazzle-3.28.0_1
 libjsonrpc-glib-1.0.so.1 jsonrpc-glib-3.28.0_1
diff --git a/srcpkgs/occt/patches/cmake-build-type-none.patch b/srcpkgs/occt/patches/cmake-build-type-none.patch
index ecb0e3da3929..d2caec8c4e87 100644
--- a/srcpkgs/occt/patches/cmake-build-type-none.patch
+++ b/srcpkgs/occt/patches/cmake-build-type-none.patch
@@ -1,8 +1,8 @@
-Index: CMakeLists.txt
-===================================================================
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f4ec871f5..9b0644e94 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_D
+@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
  
  set (CMAKE_SUPPRESS_REGENERATION TRUE)
  
diff --git a/srcpkgs/occt/patches/musl-fenv.patch b/srcpkgs/occt/patches/musl-fenv.patch
index 09da8d0afeae..06a8e3a89cfd 100644
--- a/srcpkgs/occt/patches/musl-fenv.patch
+++ b/srcpkgs/occt/patches/musl-fenv.patch
@@ -5,18 +5,20 @@ is probably wrong, but I don't have a replacement for the
 non-posix functions fegetexcept(3) and feenableexcept(3).
 """
 
+diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx
+index 007f5ccaa..fe39e07ac 100644
 --- a/src/OSD/OSD_signal.cxx
 +++ b/src/OSD/OSD_signal.cxx
-@@ -703,7 +703,7 @@
- 
+@@ -761,7 +761,7 @@ typedef void (* SIG_PFV) (int);
+
  #include <signal.h>
- 
--#if !defined(__ANDROID__) && !defined(__QNX__)
-+#if !defined(__ANDROID__) && !defined(__QNX__) && defined(__GLIBC__)
+
+-#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
++#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && defined(__GLIBC__)
    #include <sys/signal.h>
  #endif
- 
-@@ -914,7 +914,7 @@
+
+@@ -977,7 +977,7 @@ static void SegvHandler(const int theSignal,
  //=======================================================================
  void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  {
@@ -25,7 +27,7 @@ non-posix functions fegetexcept(3) and feenableexcept(3).
    feclearexcept (FE_ALL_EXCEPT);
    if (theFloatingSignal)
    {
-@@ -947,7 +947,7 @@
+@@ -1010,7 +1010,7 @@ void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  //=======================================================================
  Standard_Boolean OSD::ToCatchFloatingSignals()
  {
diff --git a/srcpkgs/occt/patches/musl-mallinfo.patch b/srcpkgs/occt/patches/musl-mallinfo.patch
index 4e5825bf1cb0..6ae94992eaf8 100644
--- a/srcpkgs/occt/patches/musl-mallinfo.patch
+++ b/srcpkgs/occt/patches/musl-mallinfo.patch
@@ -1,17 +1,38 @@
-In musl libc there is no struct mallinfo and no function mallinf()
+Adapted from alpine's patch
 
+diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx
+index d9bb91398..d608e04fc 100644
 --- a/src/OSD/OSD_MemInfo.cxx
 +++ b/src/OSD/OSD_MemInfo.cxx
-@@ -147,8 +147,12 @@
-   }
-   aFile.close();
+@@ -35,6 +35,9 @@
+ #include <sstream>
+ #include <fstream>
+ 
++#include <sys/time.h>
++#include <sys/resource.h>
++
+ #include <OSD_MemInfo.hxx>
  
-+  #if defined(__GLIBC__)
-   struct mallinfo aMI = mallinfo();
-   myCounters[MemHeapUsage] = aMI.uordblks;
-+  #else /* XXX not yet coded */
-+  myCounters[MemHeapUsage] = 0;
-+  #endif
+ #if defined(__EMSCRIPTEN__)
+@@ -182,18 +185,9 @@ void OSD_MemInfo::Update()
+ #elif (defined(__linux__) || defined(__linux))
+   if (IsActive (MemHeapUsage))
+   {
+-  #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+-    #if __GLIBC_PREREQ(2,33)
+-      #define HAS_MALLINFO2
+-    #endif
+-  #endif
+-
+-  #ifdef HAS_MALLINFO2
+-    const struct mallinfo2 aMI = mallinfo2();
+-  #else
+-    const struct mallinfo aMI = mallinfo();
+-  #endif
+-    myCounters[MemHeapUsage] = aMI.uordblks;
++    struct rusage ru = { .ru_maxrss = 0 };
++    getrusage(RUSAGE_SELF, &ru);
++    myCounters[MemHeapUsage] = ru.ru_maxrss;
+   }
  
- #elif (defined(__APPLE__))
-   struct task_basic_info aTaskInfo;
+   if (!IsActive (MemVirtual)
diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template
index 6624fea8b53f..b17c91b0058b 100644
--- a/srcpkgs/occt/template
+++ b/srcpkgs/occt/template
@@ -1,26 +1,27 @@
 # Template file for 'occt'
 pkgname=occt
-reverts=7.5.0_1
-version=7.4.0p1
-revision=5
-_gittag="V${version//./_}"
-wrksrc=occt-${_gittag}
+version=7.6.2
+revision=1
+_ver="${version//./_}"
+wrksrc=OCCT-${_ver}
 build_style=cmake
-# XXX: re-enable -DUSE_TBB=ON if possible when updating
-configure_args="-DUSE_FREEIMAGE=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
+configure_args="-DUSE_FREEIMAGE=ON -DUSE_TBB=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
  -DINSTALL_SAMPLES=ON"
-makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tcl-devel
- tk-devel"
+makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tbb-devel
+ tcl-devel tk-devel"
 short_desc="OpenCASCADE Technology - library for CAD/CAM/CAE applications"
 maintainer="Piraty <piraty1@inbox.ru>"
 license="custom:LGPL-2.1-only-with-exceptions"
 homepage="https://www.opencascade.com"
-# distfile: use git instead of official tarball, which requires registration
-# see https://www.opencascade.com/content/packaging-again-debian
-distfiles="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_gittag};sf=tgz>occt-${_gittag}.tar.gz"
-checksum=e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0
+distfiles="https://github.com/Open-Cascade-SAS/OCCT/archive/V${_ver}.tar.gz"
+checksum=dea04077d71507c666aaa7ccaeacc73ab580d6572d7f75e90a1984c4c0302a7a
 conflicts="oce>=0"
 
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" libexecinfo-devel"
+	LDFLAGS="-lexecinfo"
+fi
+
 post_install() {
 	rm ${PKGDESTDIR}/usr/share/doc/opencascade/*_LGPL_*.txt
 	vlicense OCCT_LGPL_EXCEPTION.txt
diff --git a/srcpkgs/occt/update b/srcpkgs/occt/update
deleted file mode 100644
index c128eec6d9c9..000000000000
--- a/srcpkgs/occt/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=tags"
-pattern=">V\K[\d_p]+(?=</a>)"

From 1cdc69768b88617e96948aba13eeb8064631c9ea Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 1 Oct 2022 17:18:40 -0400
Subject: [PATCH 2/6] python3-occ: update to 7.6.2.

---
 srcpkgs/python3-occ/patches/python3.10.patch | 15 ---------------
 srcpkgs/python3-occ/template                 |  6 +++---
 2 files changed, 3 insertions(+), 18 deletions(-)
 delete mode 100644 srcpkgs/python3-occ/patches/python3.10.patch

diff --git a/srcpkgs/python3-occ/patches/python3.10.patch b/srcpkgs/python3-occ/patches/python3.10.patch
deleted file mode 100644
index e192608fd3b3..000000000000
--- a/srcpkgs/python3-occ/patches/python3.10.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/src/Display/SimpleGui.py b/src/Display/SimpleGui.py
-index 42705a82..6a274c16 100644
---- a/src/Display/SimpleGui.py
-+++ b/src/Display/SimpleGui.py
-@@ -161,8 +161,8 @@ def init_display(backend_str: Optional[str]=None,
-             def centerOnScreen(self) -> None:
-                 '''Centers the window on the screen.'''
-                 resolution = QtWidgets.QApplication.desktop().screenGeometry()
--                x = (resolution.width() - self.frameSize().width()) / 2
--                y = (resolution.height() - self.frameSize().height()) / 2
-+                x = (resolution.width() - self.frameSize().width()) // 2
-+                y = (resolution.height() - self.frameSize().height()) // 2
-                 self.move(x, y)
- 
-             def add_menu(self, menu_name: str) -> None:
diff --git a/srcpkgs/python3-occ/template b/srcpkgs/python3-occ/template
index bee03373a3d1..4a1db0553c12 100644
--- a/srcpkgs/python3-occ/template
+++ b/srcpkgs/python3-occ/template
@@ -1,7 +1,7 @@
 # Template file for 'python3-occ'
 pkgname=python3-occ
-version=7.4.1
-revision=3
+version=7.6.2
+revision=1
 archs="i686* x86_64* armv7l* aarch64* ppc*"
 wrksrc="pythonocc-core-${version}"
 build_style=cmake
@@ -14,4 +14,4 @@ maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
 license="LGPL-3.0-or-later"
 homepage="http://pythonocc.org"
 distfiles="https://github.com/tpaviot/pythonocc-core/archive/${version}.tar.gz"
-checksum=6d62002244a0e7f4e5c1ad590d332a60601c44b2501ad017361443b54371e667
+checksum=84b1dad3b262027efc3314ab1f7cc8167ac353a1ffeea081e741e4c60319b848

From cf3fb9578214524263e267528688bb3b7410948f Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 1 Oct 2022 17:34:34 -0400
Subject: [PATCH 3/6] freecad: revbump for occt 7.6.2

---
 srcpkgs/freecad/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template
index 6963278981fc..077710f262fa 100644
--- a/srcpkgs/freecad/template
+++ b/srcpkgs/freecad/template
@@ -1,7 +1,7 @@
 # Template file for 'freecad'
 pkgname=freecad
 version=0.20.1
-revision=4
+revision=5
 wrksrc="FreeCAD-${version}"
 build_style=cmake
 

From a4cc44c69ce2e682b35306d7e23c5d88120784d8 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 1 Oct 2022 17:34:45 -0400
Subject: [PATCH 4/6] horizon: revbump for occt 7.6.2

---
 srcpkgs/horizon/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/horizon/template b/srcpkgs/horizon/template
index 7496696147c9..287bf6afde3e 100644
--- a/srcpkgs/horizon/template
+++ b/srcpkgs/horizon/template
@@ -1,7 +1,7 @@
 # Template file for 'horizon'
 pkgname=horizon
 version=2.3.1
-revision=1
+revision=2
 build_style=gnu-makefile
 make_build_args="GOLD="
 make_install_target="install install-man"

From 1d4aeedb5e49d3177024a3f5245e55f95bfbca1e Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 1 Oct 2022 17:34:56 -0400
Subject: [PATCH 5/6] kicad: revbump for occt 7.6.2

---
 srcpkgs/kicad/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kicad/template b/srcpkgs/kicad/template
index 23b9ad9418d4..4db59d0bdd22 100644
--- a/srcpkgs/kicad/template
+++ b/srcpkgs/kicad/template
@@ -1,7 +1,7 @@
 # Template file for 'kicad'
 pkgname=kicad
 version=6.0.7
-revision=1
+revision=2
 build_style=cmake
 build_helper=cmake-wxWidgets-gtk3
 configure_args="-DKICAD_SCRIPTING_WXPYTHON=ON

From f082d625d5ab0b7806eeb07d34732c49b237e786 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 1 Oct 2022 17:35:28 -0400
Subject: [PATCH 6/6] gmsh: revbump for occt 7.6.2

---
 srcpkgs/gmsh/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/gmsh/template b/srcpkgs/gmsh/template
index 616e140277b1..286c2fc91645 100644
--- a/srcpkgs/gmsh/template
+++ b/srcpkgs/gmsh/template
@@ -1,7 +1,7 @@
 # Template file for 'gmsh'
 pkgname=gmsh
 version=4.8.4
-revision=1
+revision=2
 wrksrc="${pkgname}-${version}-source"
 build_style=cmake
 configure_args="-DENABLE_SYSTEM_CONTRIB=ON

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

* Re: [PR PATCH] [Updated] [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (34 preceding siblings ...)
  2022-10-02  2:13 ` karl-nilsson
@ 2022-10-02  2:31 ` karl-nilsson
  2022-12-19  0:31 ` Piraty
                   ` (5 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: karl-nilsson @ 2022-10-02  2:31 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by karl-nilsson against master on the void-packages repository

https://github.com/karl-nilsson/void-packages occt_7.6
https://github.com/void-linux/void-packages/pull/36356

[WIP] occt: update to 7.6.2


#### Testing the changes
- I tested the changes in this PR: **briefly**


#### Local build testing
- I built this PR locally for my native architecture, x64-glibc


Like previously, broken ABI
```console
During initialization the error "/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv" occurred in /home/nilsson/.FreeCAD/Mod/A2plus/InitGui.py                                                                                                                        
Please look into the log file for further information                                                                                                
Wizard shaft module cannot be loaded                                                                                                                 
/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv                                                              
connect failed: No such file or directory      
```

Looks like we'll have to update or patch freecad
```console
In file included from /usr/include/opencascade/Extrema_POnSurf.lxx:15,
                 from /usr/include/opencascade/Extrema_POnSurf.hxx:75,
                 from /usr/include/opencascade/Extrema_ExtPElS.hxx:27,
                 from /usr/include/opencascade/Extrema_ExtPS.hxx:24,
                 from /usr/include/opencascade/ShapeAnalysis_Surface.hxx:20,
                 from ../src/3rdParty/salomesmesh/inc/SMESH_MesherHelper.hxx:37,
                 from ../src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp:34:
/usr/include/opencascade/Precision.hxx:98:7: note: previous definition of 'class Precision'
   98 | class Precision
      |       ^~~~~~~~~

```

ping @Piraty 

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-occt_7.6-36356.patch --]
[-- Type: text/x-diff, Size: 15723 bytes --]

From 577717adeba53f21e01dc3f4de2a00a70e0354bb Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Fri, 25 Mar 2022 19:29:00 -0400
Subject: [PATCH 1/6] occt: update to 7.6.2.

---
 common/shlibs                                 | 114 +++++++++---------
 .../occt/patches/cmake-build-type-none.patch  |   6 +-
 srcpkgs/occt/patches/musl-fenv.patch          |  18 +--
 srcpkgs/occt/patches/musl-mallinfo.patch      |  45 +++++--
 srcpkgs/occt/template                         |  27 +++--
 srcpkgs/occt/update                           |   2 -
 6 files changed, 117 insertions(+), 95 deletions(-)
 delete mode 100644 srcpkgs/occt/update

diff --git a/common/shlibs b/common/shlibs
index 987cff25f146..a286a91ae9fa 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3352,63 +3352,63 @@ libvolume_key.so.1 volume_key-0.3.9_1
 librand48_r.so.0 rand48_r-0.1_1
 libxxhash.so.0 libxxHash-0.6.5_2
 libcapnp_c.so.0 c-capnproto-0.3_1
-libTKBin.so.7 occt-7.2.0p1_1
-libTKDraw.so.7 occt-7.2.0p1_1
-libTKSTEP209.so.7 occt-7.2.0p1_1
-libTKOpenGl.so.7 occt-7.2.0p1_1
-libTKBinTObj.so.7 occt-7.2.0p1_1
-libTKSTL.so.7 occt-7.2.0p1_1
-libTKViewerTest.so.7 occt-7.2.0p1_1
-libTKCAF.so.7 occt-7.2.0p1_1
-libTKService.so.7 occt-7.2.0p1_1
-libTKV3d.so.7 occt-7.2.0p1_1
-libTKXCAF.so.7 occt-7.2.0p1_1
-libTKMesh.so.7 occt-7.2.0p1_1
-libTKSTEP.so.7 occt-7.2.0p1_1
-libTKMath.so.7 occt-7.2.0p1_1
-libTKLCAF.so.7 occt-7.2.0p1_1
-libTKShHealing.so.7 occt-7.2.0p1_1
-libTKGeomAlgo.so.7 occt-7.2.0p1_1
-libTKTObjDRAW.so.7 occt-7.2.0p1_1
-libTKTObj.so.7 occt-7.2.0p1_1
-libTKStd.so.7 occt-7.2.0p1_1
-libTKSTEPBase.so.7 occt-7.2.0p1_1
-libTKIGES.so.7 occt-7.2.0p1_1
-libTKGeomBase.so.7 occt-7.2.0p1_1
-libTKFillet.so.7 occt-7.2.0p1_1
-libTKFeat.so.7 occt-7.2.0p1_1
-libTKG2d.so.7 occt-7.2.0p1_1
-libTKXSBase.so.7 occt-7.2.0p1_1
-libTKDCAF.so.7 occt-7.2.0p1_1
-libTKXml.so.7 occt-7.2.0p1_1
-libTKTopTest.so.7 occt-7.2.0p1_1
-libTKG3d.so.7 occt-7.2.0p1_1
-libTKBRep.so.7 occt-7.2.0p1_1
-libTKVRML.so.7 occt-7.2.0p1_1
-libTKCDF.so.7 occt-7.2.0p1_1
-libTKXSDRAW.so.7 occt-7.2.0p1_1
-libTKXMesh.so.7 occt-7.2.0p1_1
-libTKernel.so.7 occt-7.2.0p1_1
-libTKTopAlgo.so.7 occt-7.2.0p1_1
-libTKHLR.so.7 occt-7.2.0p1_1
-libTKBinXCAF.so.7 occt-7.2.0p1_1
-libTKVCAF.so.7 occt-7.2.0p1_1
-libTKBinL.so.7 occt-7.2.0p1_1
-libTKXmlXCAF.so.7 occt-7.2.0p1_1
-libTKXDEIGES.so.7 occt-7.2.0p1_1
-libTKBO.so.7 occt-7.2.0p1_1
-libTKStdL.so.7 occt-7.2.0p1_1
-libTKXDEDRAW.so.7 occt-7.2.0p1_1
-libTKXmlTObj.so.7 occt-7.2.0p1_1
-libTKPrim.so.7 occt-7.2.0p1_1
-libTKMeshVS.so.7 occt-7.2.0p1_1
-libTKSTEPAttr.so.7 occt-7.2.0p1_1
-libTKBool.so.7 occt-7.2.0p1_1
-libTKOffset.so.7 occt-7.2.0p1_1
-libTKXDESTEP.so.7 occt-7.2.0p1_1
-libTKQADraw.so.7 occt-7.2.0p1_1
-libTKXmlL.so.7 occt-7.2.0p1_1
-libTKRWMesh.so.7 occt-7.4.0_1
+libTKBin.so.7 occt-7.6.2_1
+libTKDraw.so.7 occt-7.6.2_1
+libTKSTEP209.so.7 occt-7.6.2_1
+libTKOpenGl.so.7 occt-7.6.2_1
+libTKBinTObj.so.7 occt-7.6.2_1
+libTKSTL.so.7 occt-7.6.2_1
+libTKViewerTest.so.7 occt-7.6.2_1
+libTKCAF.so.7 occt-7.6.2_1
+libTKService.so.7 occt-7.6.2_1
+libTKV3d.so.7 occt-7.6.2_1
+libTKXCAF.so.7 occt-7.6.2_1
+libTKMesh.so.7 occt-7.6.2_1
+libTKSTEP.so.7 occt-7.6.2_1
+libTKMath.so.7 occt-7.6.2_1
+libTKLCAF.so.7 occt-7.6.2_1
+libTKShHealing.so.7 occt-7.6.2_1
+libTKGeomAlgo.so.7 occt-7.6.2_1
+libTKTObjDRAW.so.7 occt-7.6.2_1
+libTKTObj.so.7 occt-7.6.2_1
+libTKStd.so.7 occt-7.6.2_1
+libTKSTEPBase.so.7 occt-7.6.2_1
+libTKIGES.so.7 occt-7.6.2_1
+libTKGeomBase.so.7 occt-7.6.2_1
+libTKFillet.so.7 occt-7.6.2_1
+libTKFeat.so.7 occt-7.6.2_1
+libTKG2d.so.7 occt-7.6.2_1
+libTKXSBase.so.7 occt-7.6.2_1
+libTKDCAF.so.7 occt-7.6.2_1
+libTKXml.so.7 occt-7.6.2_1
+libTKTopTest.so.7 occt-7.6.2_1
+libTKG3d.so.7 occt-7.6.2_1
+libTKBRep.so.7 occt-7.6.2_1
+libTKVRML.so.7 occt-7.6.2_1
+libTKCDF.so.7 occt-7.6.2_1
+libTKXSDRAW.so.7 occt-7.6.2_1
+libTKXMesh.so.7 occt-7.6.2_1
+libTKernel.so.7 occt-7.6.2_1
+libTKTopAlgo.so.7 occt-7.6.2_1
+libTKHLR.so.7 occt-7.6.2_1
+libTKBinXCAF.so.7 occt-7.6.2_1
+libTKVCAF.so.7 occt-7.6.2_1
+libTKBinL.so.7 occt-7.6.2_1
+libTKXmlXCAF.so.7 occt-7.6.2_1
+libTKXDEIGES.so.7 occt-7.6.2_1
+libTKBO.so.7 occt-7.6.2_1
+libTKStdL.so.7 occt-7.6.2_1
+libTKXDEDRAW.so.7 occt-7.6.2_1
+libTKXmlTObj.so.7 occt-7.6.2_1
+libTKPrim.so.7 occt-7.6.2_1
+libTKMeshVS.so.7 occt-7.6.2_1
+libTKSTEPAttr.so.7 occt-7.6.2_1
+libTKBool.so.7 occt-7.6.2_1
+libTKOffset.so.7 occt-7.6.2_1
+libTKXDESTEP.so.7 occt-7.6.2_1
+libTKQADraw.so.7 occt-7.6.2_1
+libTKXmlL.so.7 occt-7.6.2_1
+libTKRWMesh.so.7 occt-7.6.2_1
 libargon2.so.1 libargon2-20171227_1
 libdazzle-1.0.so.0 libdazzle-3.28.0_1
 libjsonrpc-glib-1.0.so.1 jsonrpc-glib-3.28.0_1
diff --git a/srcpkgs/occt/patches/cmake-build-type-none.patch b/srcpkgs/occt/patches/cmake-build-type-none.patch
index ecb0e3da3929..d2caec8c4e87 100644
--- a/srcpkgs/occt/patches/cmake-build-type-none.patch
+++ b/srcpkgs/occt/patches/cmake-build-type-none.patch
@@ -1,8 +1,8 @@
-Index: CMakeLists.txt
-===================================================================
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f4ec871f5..9b0644e94 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_D
+@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
  
  set (CMAKE_SUPPRESS_REGENERATION TRUE)
  
diff --git a/srcpkgs/occt/patches/musl-fenv.patch b/srcpkgs/occt/patches/musl-fenv.patch
index 09da8d0afeae..06a8e3a89cfd 100644
--- a/srcpkgs/occt/patches/musl-fenv.patch
+++ b/srcpkgs/occt/patches/musl-fenv.patch
@@ -5,18 +5,20 @@ is probably wrong, but I don't have a replacement for the
 non-posix functions fegetexcept(3) and feenableexcept(3).
 """
 
+diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx
+index 007f5ccaa..fe39e07ac 100644
 --- a/src/OSD/OSD_signal.cxx
 +++ b/src/OSD/OSD_signal.cxx
-@@ -703,7 +703,7 @@
- 
+@@ -761,7 +761,7 @@ typedef void (* SIG_PFV) (int);
+
  #include <signal.h>
- 
--#if !defined(__ANDROID__) && !defined(__QNX__)
-+#if !defined(__ANDROID__) && !defined(__QNX__) && defined(__GLIBC__)
+
+-#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
++#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && defined(__GLIBC__)
    #include <sys/signal.h>
  #endif
- 
-@@ -914,7 +914,7 @@
+
+@@ -977,7 +977,7 @@ static void SegvHandler(const int theSignal,
  //=======================================================================
  void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  {
@@ -25,7 +27,7 @@ non-posix functions fegetexcept(3) and feenableexcept(3).
    feclearexcept (FE_ALL_EXCEPT);
    if (theFloatingSignal)
    {
-@@ -947,7 +947,7 @@
+@@ -1010,7 +1010,7 @@ void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
  //=======================================================================
  Standard_Boolean OSD::ToCatchFloatingSignals()
  {
diff --git a/srcpkgs/occt/patches/musl-mallinfo.patch b/srcpkgs/occt/patches/musl-mallinfo.patch
index 4e5825bf1cb0..6ae94992eaf8 100644
--- a/srcpkgs/occt/patches/musl-mallinfo.patch
+++ b/srcpkgs/occt/patches/musl-mallinfo.patch
@@ -1,17 +1,38 @@
-In musl libc there is no struct mallinfo and no function mallinf()
+Adapted from alpine's patch
 
+diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx
+index d9bb91398..d608e04fc 100644
 --- a/src/OSD/OSD_MemInfo.cxx
 +++ b/src/OSD/OSD_MemInfo.cxx
-@@ -147,8 +147,12 @@
-   }
-   aFile.close();
+@@ -35,6 +35,9 @@
+ #include <sstream>
+ #include <fstream>
+ 
++#include <sys/time.h>
++#include <sys/resource.h>
++
+ #include <OSD_MemInfo.hxx>
  
-+  #if defined(__GLIBC__)
-   struct mallinfo aMI = mallinfo();
-   myCounters[MemHeapUsage] = aMI.uordblks;
-+  #else /* XXX not yet coded */
-+  myCounters[MemHeapUsage] = 0;
-+  #endif
+ #if defined(__EMSCRIPTEN__)
+@@ -182,18 +185,9 @@ void OSD_MemInfo::Update()
+ #elif (defined(__linux__) || defined(__linux))
+   if (IsActive (MemHeapUsage))
+   {
+-  #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+-    #if __GLIBC_PREREQ(2,33)
+-      #define HAS_MALLINFO2
+-    #endif
+-  #endif
+-
+-  #ifdef HAS_MALLINFO2
+-    const struct mallinfo2 aMI = mallinfo2();
+-  #else
+-    const struct mallinfo aMI = mallinfo();
+-  #endif
+-    myCounters[MemHeapUsage] = aMI.uordblks;
++    struct rusage ru = { .ru_maxrss = 0 };
++    getrusage(RUSAGE_SELF, &ru);
++    myCounters[MemHeapUsage] = ru.ru_maxrss;
+   }
  
- #elif (defined(__APPLE__))
-   struct task_basic_info aTaskInfo;
+   if (!IsActive (MemVirtual)
diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template
index 6624fea8b53f..b17c91b0058b 100644
--- a/srcpkgs/occt/template
+++ b/srcpkgs/occt/template
@@ -1,26 +1,27 @@
 # Template file for 'occt'
 pkgname=occt
-reverts=7.5.0_1
-version=7.4.0p1
-revision=5
-_gittag="V${version//./_}"
-wrksrc=occt-${_gittag}
+version=7.6.2
+revision=1
+_ver="${version//./_}"
+wrksrc=OCCT-${_ver}
 build_style=cmake
-# XXX: re-enable -DUSE_TBB=ON if possible when updating
-configure_args="-DUSE_FREEIMAGE=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
+configure_args="-DUSE_FREEIMAGE=ON -DUSE_TBB=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF
  -DINSTALL_SAMPLES=ON"
-makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tcl-devel
- tk-devel"
+makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tbb-devel
+ tcl-devel tk-devel"
 short_desc="OpenCASCADE Technology - library for CAD/CAM/CAE applications"
 maintainer="Piraty <piraty1@inbox.ru>"
 license="custom:LGPL-2.1-only-with-exceptions"
 homepage="https://www.opencascade.com"
-# distfile: use git instead of official tarball, which requires registration
-# see https://www.opencascade.com/content/packaging-again-debian
-distfiles="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_gittag};sf=tgz>occt-${_gittag}.tar.gz"
-checksum=e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0
+distfiles="https://github.com/Open-Cascade-SAS/OCCT/archive/V${_ver}.tar.gz"
+checksum=dea04077d71507c666aaa7ccaeacc73ab580d6572d7f75e90a1984c4c0302a7a
 conflicts="oce>=0"
 
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" libexecinfo-devel"
+	LDFLAGS="-lexecinfo"
+fi
+
 post_install() {
 	rm ${PKGDESTDIR}/usr/share/doc/opencascade/*_LGPL_*.txt
 	vlicense OCCT_LGPL_EXCEPTION.txt
diff --git a/srcpkgs/occt/update b/srcpkgs/occt/update
deleted file mode 100644
index c128eec6d9c9..000000000000
--- a/srcpkgs/occt/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=tags"
-pattern=">V\K[\d_p]+(?=</a>)"

From eed602acbc050e5cc732ceff0335561c0d8f587b Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 1 Oct 2022 17:18:40 -0400
Subject: [PATCH 2/6] python3-occ: update to 7.6.2.

---
 srcpkgs/python3-occ/patches/python3.10.patch | 15 ---------------
 srcpkgs/python3-occ/template                 |  8 ++++----
 2 files changed, 4 insertions(+), 19 deletions(-)
 delete mode 100644 srcpkgs/python3-occ/patches/python3.10.patch

diff --git a/srcpkgs/python3-occ/patches/python3.10.patch b/srcpkgs/python3-occ/patches/python3.10.patch
deleted file mode 100644
index e192608fd3b3..000000000000
--- a/srcpkgs/python3-occ/patches/python3.10.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/src/Display/SimpleGui.py b/src/Display/SimpleGui.py
-index 42705a82..6a274c16 100644
---- a/src/Display/SimpleGui.py
-+++ b/src/Display/SimpleGui.py
-@@ -161,8 +161,8 @@ def init_display(backend_str: Optional[str]=None,
-             def centerOnScreen(self) -> None:
-                 '''Centers the window on the screen.'''
-                 resolution = QtWidgets.QApplication.desktop().screenGeometry()
--                x = (resolution.width() - self.frameSize().width()) / 2
--                y = (resolution.height() - self.frameSize().height()) / 2
-+                x = (resolution.width() - self.frameSize().width()) // 2
-+                y = (resolution.height() - self.frameSize().height()) // 2
-                 self.move(x, y)
- 
-             def add_menu(self, menu_name: str) -> None:
diff --git a/srcpkgs/python3-occ/template b/srcpkgs/python3-occ/template
index bee03373a3d1..c0196261ee48 100644
--- a/srcpkgs/python3-occ/template
+++ b/srcpkgs/python3-occ/template
@@ -1,17 +1,17 @@
 # Template file for 'python3-occ'
 pkgname=python3-occ
-version=7.4.1
-revision=3
+version=7.6.2
+revision=1
 archs="i686* x86_64* armv7l* aarch64* ppc*"
 wrksrc="pythonocc-core-${version}"
 build_style=cmake
 configure_args="-DPYTHONOCC_BUILD_TYPE=None -DCMAKE_BUILD_TYPE=None"
 hostmakedepends="python3 swig"
-makedepends="python3-devel occt-devel freetype-devel swig"
+makedepends="python3-devel occt-devel freetype-devel swig rapidjson"
 depends="python3 occt freetype"
 short_desc="Industrial strength 3D CAD Python3 package"
 maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
 license="LGPL-3.0-or-later"
 homepage="http://pythonocc.org"
 distfiles="https://github.com/tpaviot/pythonocc-core/archive/${version}.tar.gz"
-checksum=6d62002244a0e7f4e5c1ad590d332a60601c44b2501ad017361443b54371e667
+checksum=84b1dad3b262027efc3314ab1f7cc8167ac353a1ffeea081e741e4c60319b848

From 66020ef523e691190c31facdef97b15d48a60a94 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 1 Oct 2022 17:34:34 -0400
Subject: [PATCH 3/6] freecad: revbump for occt 7.6.2

---
 srcpkgs/freecad/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template
index 6963278981fc..077710f262fa 100644
--- a/srcpkgs/freecad/template
+++ b/srcpkgs/freecad/template
@@ -1,7 +1,7 @@
 # Template file for 'freecad'
 pkgname=freecad
 version=0.20.1
-revision=4
+revision=5
 wrksrc="FreeCAD-${version}"
 build_style=cmake
 

From deb2d6971f2fae929d400a27048c2887f4432fb8 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 1 Oct 2022 17:34:45 -0400
Subject: [PATCH 4/6] horizon: revbump for occt 7.6.2

---
 srcpkgs/horizon/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/horizon/template b/srcpkgs/horizon/template
index 7496696147c9..287bf6afde3e 100644
--- a/srcpkgs/horizon/template
+++ b/srcpkgs/horizon/template
@@ -1,7 +1,7 @@
 # Template file for 'horizon'
 pkgname=horizon
 version=2.3.1
-revision=1
+revision=2
 build_style=gnu-makefile
 make_build_args="GOLD="
 make_install_target="install install-man"

From ff4bc3720ff6964696cb0027b7e62a0a2fe7b956 Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 1 Oct 2022 17:34:56 -0400
Subject: [PATCH 5/6] kicad: revbump for occt 7.6.2

---
 srcpkgs/kicad/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kicad/template b/srcpkgs/kicad/template
index 23b9ad9418d4..4db59d0bdd22 100644
--- a/srcpkgs/kicad/template
+++ b/srcpkgs/kicad/template
@@ -1,7 +1,7 @@
 # Template file for 'kicad'
 pkgname=kicad
 version=6.0.7
-revision=1
+revision=2
 build_style=cmake
 build_helper=cmake-wxWidgets-gtk3
 configure_args="-DKICAD_SCRIPTING_WXPYTHON=ON

From d21b9420846afa78500873e69a7e0e91ff08b7df Mon Sep 17 00:00:00 2001
From: Karl Nilsson <karl.robert.nilsson@gmail.com>
Date: Sat, 1 Oct 2022 17:35:28 -0400
Subject: [PATCH 6/6] gmsh: revbump for occt 7.6.2

---
 srcpkgs/gmsh/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/gmsh/template b/srcpkgs/gmsh/template
index 616e140277b1..286c2fc91645 100644
--- a/srcpkgs/gmsh/template
+++ b/srcpkgs/gmsh/template
@@ -1,7 +1,7 @@
 # Template file for 'gmsh'
 pkgname=gmsh
 version=4.8.4
-revision=1
+revision=2
 wrksrc="${pkgname}-${version}-source"
 build_style=cmake
 configure_args="-DENABLE_SYSTEM_CONTRIB=ON

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

* Re: [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (35 preceding siblings ...)
  2022-10-02  2:31 ` karl-nilsson
@ 2022-12-19  0:31 ` Piraty
  2023-01-20  3:23 ` luzpaz
                   ` (4 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Piraty @ 2022-12-19  0:31 UTC (permalink / raw)
  To: ml

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

New comment by Piraty on void-packages repository

https://github.com/void-linux/void-packages/pull/36356#issuecomment-1356924880

Comment:
ping

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

* Re: [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (36 preceding siblings ...)
  2022-12-19  0:31 ` Piraty
@ 2023-01-20  3:23 ` luzpaz
  2023-04-21  1:52 ` github-actions
                   ` (3 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: luzpaz @ 2023-01-20  3:23 UTC (permalink / raw)
  To: ml

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

New comment by luzpaz on void-packages repository

https://github.com/void-linux/void-packages/pull/36356#issuecomment-1397879814

Comment:
any more traction here ?

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

* Re: [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (37 preceding siblings ...)
  2023-01-20  3:23 ` luzpaz
@ 2023-04-21  1:52 ` github-actions
  2023-04-24 22:34 ` luzpaz
                   ` (2 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: github-actions @ 2023-04-21  1:52 UTC (permalink / raw)
  To: ml

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

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/36356#issuecomment-1517144358

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

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

* Re: [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (38 preceding siblings ...)
  2023-04-21  1:52 ` github-actions
@ 2023-04-24 22:34 ` luzpaz
  2023-04-30 19:32 ` Piraty
  2023-04-30 19:32 ` [PR PATCH] [Closed]: " Piraty
  41 siblings, 0 replies; 43+ messages in thread
From: luzpaz @ 2023-04-24 22:34 UTC (permalink / raw)
  To: ml

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

New comment by luzpaz on void-packages repository

https://github.com/void-linux/void-packages/pull/36356#issuecomment-1520911311

Comment:
bump

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

* Re: [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (39 preceding siblings ...)
  2023-04-24 22:34 ` luzpaz
@ 2023-04-30 19:32 ` Piraty
  2023-04-30 19:32 ` [PR PATCH] [Closed]: " Piraty
  41 siblings, 0 replies; 43+ messages in thread
From: Piraty @ 2023-04-30 19:32 UTC (permalink / raw)
  To: ml

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

New comment by Piraty on void-packages repository

https://github.com/void-linux/void-packages/pull/36356#issuecomment-1529122615

Comment:
I assume no. anyone interested in picking up is welcome to open a new PR

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

* Re: [PR PATCH] [Closed]: [WIP] occt: update to 7.6.2
  2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
                   ` (40 preceding siblings ...)
  2023-04-30 19:32 ` Piraty
@ 2023-04-30 19:32 ` Piraty
  41 siblings, 0 replies; 43+ messages in thread
From: Piraty @ 2023-04-30 19:32 UTC (permalink / raw)
  To: ml

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

There's a closed pull request on the void-packages repository

[WIP] occt: update to 7.6.2
https://github.com/void-linux/void-packages/pull/36356

Description:


#### Testing the changes
- I tested the changes in this PR: **briefly**


#### Local build testing
- I built this PR locally for my native architecture, x64-glibc


Like previously, broken ABI
```console
During initialization the error "/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv" occurred in /home/nilsson/.FreeCAD/Mod/A2plus/InitGui.py                                                                                                                        
Please look into the log file for further information                                                                                                
Wizard shaft module cannot be loaded                                                                                                                 
/usr/lib/freecad/lib64/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv                                                              
connect failed: No such file or directory      
```

Looks like we'll have to update or patch freecad
```console
In file included from /usr/include/opencascade/Extrema_POnSurf.lxx:15,
                 from /usr/include/opencascade/Extrema_POnSurf.hxx:75,
                 from /usr/include/opencascade/Extrema_ExtPElS.hxx:27,
                 from /usr/include/opencascade/Extrema_ExtPS.hxx:24,
                 from /usr/include/opencascade/ShapeAnalysis_Surface.hxx:20,
                 from ../src/3rdParty/salomesmesh/inc/SMESH_MesherHelper.hxx:37,
                 from ../src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp:34:
/usr/include/opencascade/Precision.hxx:98:7: note: previous definition of 'class Precision'
   98 | class Precision
      |       ^~~~~~~~~

```

ping @Piraty 

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

end of thread, other threads:[~2023-04-30 19:32 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-26  4:42 [PR PATCH] [WIP] occt: update to 7.6.1 karl-nilsson
2022-03-26 15:07 ` [PR PATCH] [Updated] " karl-nilsson
2022-03-26 15:26 ` karl-nilsson
2022-03-28 19:00 ` Piraty
2022-05-01 20:20 ` [PR PATCH] [Updated] " karl-nilsson
2022-05-01 20:24 ` karl-nilsson
2022-05-01 20:24 ` karl-nilsson
2022-05-02 14:17 ` karl-nilsson
2022-05-02 14:18 ` karl-nilsson
2022-05-02 14:51 ` [WIP] occt: update to 7.6.2 karl-nilsson
2022-07-04 11:21 ` luzpaz
2022-07-24  1:21 ` [PR PATCH] [Updated] " karl-nilsson
2022-07-24  1:40 ` karl-nilsson
2022-07-24  3:02 ` karl-nilsson
2022-07-24  4:11 ` luzpaz
2022-07-25  1:10 ` [PR PATCH] [Updated] " karl-nilsson
2022-07-25  1:31 ` karl-nilsson
2022-07-25  3:02 ` karl-nilsson
2022-07-25  3:38 ` karl-nilsson
2022-07-25 13:16 ` [PR PATCH] [Updated] " karl-nilsson
2022-07-26  3:39 ` [PR REVIEW] " yopito
2022-07-26  3:40 ` yopito
2022-08-12  9:12 ` yopito
2022-08-12 14:24 ` luzpaz
2022-08-12 14:25 ` luzpaz
2022-08-22 11:48 ` yopito
2022-08-22 11:57 ` yopito
2022-08-22 13:59 ` karl-nilsson
2022-08-23 13:29 ` yopito
2022-09-27 19:34 ` enderger
2022-10-01 16:02 ` [PR PATCH] [Updated] " karl-nilsson
2022-10-01 21:16 ` karl-nilsson
2022-10-01 21:18 ` karl-nilsson
2022-10-01 21:35 ` karl-nilsson
2022-10-01 21:50 ` karl-nilsson
2022-10-02  2:13 ` karl-nilsson
2022-10-02  2:31 ` karl-nilsson
2022-12-19  0:31 ` Piraty
2023-01-20  3:23 ` luzpaz
2023-04-21  1:52 ` github-actions
2023-04-24 22:34 ` luzpaz
2023-04-30 19:32 ` Piraty
2023-04-30 19:32 ` [PR PATCH] [Closed]: " Piraty

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).