summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-06-26 00:06:26 +0100
committerSam James <sam@gentoo.org>2022-06-26 00:33:23 +0100
commitd7f8763ca52ef8a17cf9271997fc8e4a4c83e75d (patch)
treee00db20a9c36f1139de1444cd0331579ee8a4542 /sci-libs
parentsci-libs/hdf5: attempt to delete perf binary only when USE=mpi (diff)
downloadgentoo-d7f8763ca52ef8a17cf9271997fc8e4a4c83e75d.tar.gz
gentoo-d7f8763ca52ef8a17cf9271997fc8e4a4c83e75d.tar.bz2
gentoo-d7f8763ca52ef8a17cf9271997fc8e4a4c83e75d.zip
sci-libs/opencascade: allow newer TBB
Bug: https://bugs.gentoo.org/851783 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/opencascade/files/opencascade-7.5.3-tbb-2021.patch51
-rw-r--r--sci-libs/opencascade/opencascade-7.5.3-r8.ebuild (renamed from sci-libs/opencascade/opencascade-7.5.3-r7.ebuild)3
-rw-r--r--sci-libs/opencascade/opencascade-7.6.1-r2.ebuild (renamed from sci-libs/opencascade/opencascade-7.6.1-r1.ebuild)3
-rw-r--r--sci-libs/opencascade/opencascade-7.6.2-r1.ebuild (renamed from sci-libs/opencascade/opencascade-7.6.2.ebuild)3
4 files changed, 57 insertions, 3 deletions
diff --git a/sci-libs/opencascade/files/opencascade-7.5.3-tbb-2021.patch b/sci-libs/opencascade/files/opencascade-7.5.3-tbb-2021.patch
new file mode 100644
index 000000000000..38770ac9a541
--- /dev/null
+++ b/sci-libs/opencascade/files/opencascade-7.5.3-tbb-2021.patch
@@ -0,0 +1,51 @@
+https://github.com/Open-Cascade-SAS/OCCT/commit/740833a6a88e481f474783c426b6f6311ed586d3
+
+From 740833a6a88e481f474783c426b6f6311ed586d3 Mon Sep 17 00:00:00 2001
+From: kgv <kgv@opencascade.com>
+Date: Mon, 29 Nov 2021 21:26:45 +0300
+Subject: [PATCH] 0032697: Configuration - fix compilation errors with oneTBB
+ 2021
+
+Removed usage of no more existing tbb::task_scheduler_init and tbb::captured_exception.
+--- a/src/OSD/OSD_Parallel_TBB.cxx
++++ b/src/OSD/OSD_Parallel_TBB.cxx
+@@ -25,7 +25,9 @@ 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>
++#if TBB_VERSION_MAJOR < 2021
++ #include <tbb/task_scheduler_init.h>
++#endif
+ Standard_ENABLE_DEPRECATION_WARNINGS
+
+ //=======================================================================
+@@ -38,12 +40,16 @@ void OSD_Parallel::forEachExternal (UniversalIterator& theBegin,
+ const FunctorInterface& theFunctor,
+ Standard_Integer theNbItems)
+ {
++#if TBB_VERSION_MAJOR >= 2021
++ // task_scheduler_init is removed,
++ // exceptions are captured without proxy tbb::captured_exception object
++ (void )theNbItems;
++ tbb::parallel_for_each (theBegin, theEnd, theFunctor);
++#else
+ try
+ {
+ const Handle(OSD_ThreadPool)& aThreadPool = OSD_ThreadPool::DefaultPool();
+- const Standard_Integer aNbThreads = theNbItems > 0 ?
+- aThreadPool->NbDefaultThreadsToLaunch() : -1;
+-
++ const Standard_Integer aNbThreads = theNbItems > 0 ? aThreadPool->NbDefaultThreadsToLaunch() : -1;
+ tbb::task_scheduler_init aScheduler (aNbThreads);
+ tbb::parallel_for_each (theBegin, theEnd, theFunctor);
+ }
+@@ -51,6 +57,7 @@ void OSD_Parallel::forEachExternal (UniversalIterator& theBegin,
+ {
+ throw Standard_ProgramError (anException.what());
+ }
++#endif
+ }
+
+ #endif /* HAVE_TBB */
+
diff --git a/sci-libs/opencascade/opencascade-7.5.3-r7.ebuild b/sci-libs/opencascade/opencascade-7.5.3-r8.ebuild
index 8287de53da6b..87b782fa5e6a 100644
--- a/sci-libs/opencascade/opencascade-7.5.3-r7.ebuild
+++ b/sci-libs/opencascade/opencascade-7.5.3-r8.ebuild
@@ -47,7 +47,7 @@ RDEPEND="
)
ffmpeg? ( media-video/ffmpeg:= )
freeimage? ( media-libs/freeimage )
- tbb? ( <dev-cpp/tbb-2021.4.0 )
+ tbb? ( dev-cpp/tbb:= )
vtk? ( sci-libs/vtk:=[rendering] )
"
DEPEND="${RDEPEND}"
@@ -68,6 +68,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-7.5.1-0006-fix-creation-of-custom.sh-script.patch
"${FILESDIR}"/${PN}-7.5.1-fix-AllValues-name-collision-with-vtk-9.0.patch
"${FILESDIR}"/${PN}-7.6.2-avoid-pre-stripping-binaries.patch
+ "${FILESDIR}"/${PN}-7.5.3-tbb-2021.patch
)
src_prepare() {
diff --git a/sci-libs/opencascade/opencascade-7.6.1-r1.ebuild b/sci-libs/opencascade/opencascade-7.6.1-r2.ebuild
index 41e15cf2bd76..e11b24187775 100644
--- a/sci-libs/opencascade/opencascade-7.6.1-r1.ebuild
+++ b/sci-libs/opencascade/opencascade-7.6.1-r2.ebuild
@@ -47,7 +47,7 @@ RDEPEND="
)
ffmpeg? ( <media-video/ffmpeg-5:= )
freeimage? ( media-libs/freeimage )
- tbb? ( <dev-cpp/tbb-2021.4 )
+ tbb? ( dev-cpp/tbb:= )
vtk? ( sci-libs/vtk:=[rendering] )
"
DEPEND="
@@ -65,6 +65,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-7.5.1-0005-fix-write-permissions-on-scripts.patch
"${FILESDIR}"/${PN}-7.5.1-0006-fix-creation-of-custom.sh-script.patch
"${FILESDIR}"/${PN}-7.6.2-avoid-pre-stripping-binaries.patch
+ "${FILESDIR}"/${PN}-7.5.3-tbb-2021.patch
)
src_prepare() {
diff --git a/sci-libs/opencascade/opencascade-7.6.2.ebuild b/sci-libs/opencascade/opencascade-7.6.2-r1.ebuild
index 7914fe259a7e..7773a90fb9f2 100644
--- a/sci-libs/opencascade/opencascade-7.6.2.ebuild
+++ b/sci-libs/opencascade/opencascade-7.6.2-r1.ebuild
@@ -47,7 +47,7 @@ RDEPEND="
)
ffmpeg? ( <media-video/ffmpeg-5:= )
freeimage? ( media-libs/freeimage )
- tbb? ( <dev-cpp/tbb-2021.4 )
+ tbb? ( dev-cpp/tbb:= )
vtk? ( sci-libs/vtk:=[rendering] )
"
DEPEND="
@@ -66,6 +66,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-7.5.1-0005-fix-write-permissions-on-scripts.patch
"${FILESDIR}"/${PN}-7.5.1-0006-fix-creation-of-custom.sh-script.patch
"${FILESDIR}"/${P}-avoid-pre-stripping-binaries.patch
+ "${FILESDIR}"/${PN}-7.5.3-tbb-2021.patch
)
src_prepare() {