[arch-commits] Commit in opencascade/trunk (PKGBUILD opencascade-tbb-2021.patch)
Antonio Rojas
arojas at gemini.archlinux.org
Thu Nov 25 21:18:03 UTC 2021
Date: Thursday, November 25, 2021 @ 21:18:03
Author: arojas
Revision: 1054793
tbb 2021.4 rebuild
Added:
opencascade/trunk/opencascade-tbb-2021.patch
Modified:
opencascade/trunk/PKGBUILD
----------------------------+
PKGBUILD | 9 ++++++---
opencascade-tbb-2021.patch | 34 ++++++++++++++++++++++++++++++++++
2 files changed, 40 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2021-11-25 20:49:20 UTC (rev 1054792)
+++ PKGBUILD 2021-11-25 21:18:03 UTC (rev 1054793)
@@ -10,7 +10,7 @@
_pkgver=V7_5_3
#_pkgver=${pkgver//_/}
#_pkgver=V${_pkgver//./_}
-pkgrel=3
+pkgrel=4
pkgdesc="Open CASCADE Technology, 3D modeling & numerical simulation"
arch=('x86_64')
url="https://www.opencascade.org"
@@ -23,13 +23,15 @@
'opencascade.sh' 'fix-install-dir-references.patch'
'cmake-fix-variable.patch'
'vtk9.patch'
- "fix-freecad-build.patch::https://git.dev.opencascade.org/gitweb/?p=occt.git;a=patch;h=5e7632824302761b84cfceb5bfb2241d906d0eb4")
+ "fix-freecad-build.patch::https://git.dev.opencascade.org/gitweb/?p=occt.git;a=patch;h=5e7632824302761b84cfceb5bfb2241d906d0eb4"
+ 'opencascade-tbb-2021.patch')
sha256sums=('cc3d3fd9f76526502c3d9025b651f45b034187430f231414c97dda756572410b'
'2064536a85d46fee368a8f1a712b2c6c77ca79c5bffcc68cba79d70d36efa2f4'
'afb584aa453993ae8d9e2b983594558531ede735a5892754b812be30650c9fb5'
'c7427082400b2d1ac58c59549d4dd1ee5b27d06847b7907842e9e2f2b68980fa'
'ae24da8eac8b57af8f612c872c8ec1962b6e5243758aa39c92e805223fdfe157'
- '4782d4d93cbd7f5489d23a855a1d31801bd61383d7cf9dc0e613fae34541cfde')
+ '4782d4d93cbd7f5489d23a855a1d31801bd61383d7cf9dc0e613fae34541cfde'
+ 'b0c4601fd9b2905e4b3bc3ed8af1493960c80bfe10332a0c562c59786efd57a2')
prepare() {
cd "occt-${_pkgver}"
@@ -37,6 +39,7 @@
patch -Np1 -i "$srcdir/cmake-fix-variable.patch"
patch -p1 -i ../vtk9.patch # Fix build with VTK 9 https://gitlab.kitware.com/vtk/vtk/-/issues/18240
patch -p1 -i ../fix-freecad-build.patch # Fix build of FreeCAD
+ patch -p1 -i ../opencascade-tbb-2021.patch # Fix build with TBB 2021
}
build() {
Added: opencascade-tbb-2021.patch
===================================================================
--- opencascade-tbb-2021.patch (rev 0)
+++ opencascade-tbb-2021.patch 2021-11-25 21:18:03 UTC (rev 1054793)
@@ -0,0 +1,34 @@
+diff --git a/src/OSD/OSD_Parallel_TBB.cxx b/src/OSD/OSD_Parallel_TBB.cxx
+index 2344a6ca2..e1a3d89de 100644
+--- a/src/OSD/OSD_Parallel_TBB.cxx
++++ b/src/OSD/OSD_Parallel_TBB.cxx
+@@ -25,7 +25,7 @@ Standard_DISABLE_DEPRECATION_WARNINGS
+ #include <tbb/parallel_for.h>
+ #include <tbb/parallel_for_each.h>
+ #include <tbb/blocked_range.h>
+-#include <tbb/task_scheduler_init.h>
++#include <tbb/global_control.h>
+ Standard_ENABLE_DEPRECATION_WARNINGS
+
+ //=======================================================================
+@@ -38,19 +38,12 @@ void OSD_Parallel::forEachExternal (UniversalIterator& theBegin,
+ const FunctorInterface& theFunctor,
+ Standard_Integer theNbItems)
+ {
+- try
+- {
+ const Handle(OSD_ThreadPool)& aThreadPool = OSD_ThreadPool::DefaultPool();
+ const Standard_Integer aNbThreads = theNbItems > 0 ?
+ aThreadPool->NbDefaultThreadsToLaunch() : -1;
+
+- tbb::task_scheduler_init aScheduler (aNbThreads);
++ tbb::global_control global_limit(tbb::global_control::max_allowed_parallelism, aNbThreads);
+ tbb::parallel_for_each (theBegin, theEnd, theFunctor);
+- }
+- catch (tbb::captured_exception& anException)
+- {
+- throw Standard_ProgramError (anException.what());
+- }
+ }
+
+ #endif /* HAVE_TBB */
More information about the arch-commits
mailing list