1 |
commit: d7f8763ca52ef8a17cf9271997fc8e4a4c83e75d |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jun 25 23:06:26 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jun 25 23:33:23 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7f8763c |
7 |
|
8 |
sci-libs/opencascade: allow newer TBB |
9 |
|
10 |
Bug: https://bugs.gentoo.org/851783 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
.../files/opencascade-7.5.3-tbb-2021.patch | 51 ++++++++++++++++++++++ |
14 |
...7.5.3-r7.ebuild => opencascade-7.5.3-r8.ebuild} | 3 +- |
15 |
...7.6.1-r1.ebuild => opencascade-7.6.1-r2.ebuild} | 3 +- |
16 |
...de-7.6.2.ebuild => opencascade-7.6.2-r1.ebuild} | 3 +- |
17 |
4 files changed, 57 insertions(+), 3 deletions(-) |
18 |
|
19 |
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 |
20 |
new file mode 100644 |
21 |
index 000000000000..38770ac9a541 |
22 |
--- /dev/null |
23 |
+++ b/sci-libs/opencascade/files/opencascade-7.5.3-tbb-2021.patch |
24 |
@@ -0,0 +1,51 @@ |
25 |
+https://github.com/Open-Cascade-SAS/OCCT/commit/740833a6a88e481f474783c426b6f6311ed586d3 |
26 |
+ |
27 |
+From 740833a6a88e481f474783c426b6f6311ed586d3 Mon Sep 17 00:00:00 2001 |
28 |
+From: kgv <kgv@×××××××××××.com> |
29 |
+Date: Mon, 29 Nov 2021 21:26:45 +0300 |
30 |
+Subject: [PATCH] 0032697: Configuration - fix compilation errors with oneTBB |
31 |
+ 2021 |
32 |
+ |
33 |
+Removed usage of no more existing tbb::task_scheduler_init and tbb::captured_exception. |
34 |
+--- a/src/OSD/OSD_Parallel_TBB.cxx |
35 |
++++ b/src/OSD/OSD_Parallel_TBB.cxx |
36 |
+@@ -25,7 +25,9 @@ Standard_DISABLE_DEPRECATION_WARNINGS |
37 |
+ #include <tbb/parallel_for.h> |
38 |
+ #include <tbb/parallel_for_each.h> |
39 |
+ #include <tbb/blocked_range.h> |
40 |
+-#include <tbb/task_scheduler_init.h> |
41 |
++#if TBB_VERSION_MAJOR < 2021 |
42 |
++ #include <tbb/task_scheduler_init.h> |
43 |
++#endif |
44 |
+ Standard_ENABLE_DEPRECATION_WARNINGS |
45 |
+ |
46 |
+ //======================================================================= |
47 |
+@@ -38,12 +40,16 @@ void OSD_Parallel::forEachExternal (UniversalIterator& theBegin, |
48 |
+ const FunctorInterface& theFunctor, |
49 |
+ Standard_Integer theNbItems) |
50 |
+ { |
51 |
++#if TBB_VERSION_MAJOR >= 2021 |
52 |
++ // task_scheduler_init is removed, |
53 |
++ // exceptions are captured without proxy tbb::captured_exception object |
54 |
++ (void )theNbItems; |
55 |
++ tbb::parallel_for_each (theBegin, theEnd, theFunctor); |
56 |
++#else |
57 |
+ try |
58 |
+ { |
59 |
+ const Handle(OSD_ThreadPool)& aThreadPool = OSD_ThreadPool::DefaultPool(); |
60 |
+- const Standard_Integer aNbThreads = theNbItems > 0 ? |
61 |
+- aThreadPool->NbDefaultThreadsToLaunch() : -1; |
62 |
+- |
63 |
++ const Standard_Integer aNbThreads = theNbItems > 0 ? aThreadPool->NbDefaultThreadsToLaunch() : -1; |
64 |
+ tbb::task_scheduler_init aScheduler (aNbThreads); |
65 |
+ tbb::parallel_for_each (theBegin, theEnd, theFunctor); |
66 |
+ } |
67 |
+@@ -51,6 +57,7 @@ void OSD_Parallel::forEachExternal (UniversalIterator& theBegin, |
68 |
+ { |
69 |
+ throw Standard_ProgramError (anException.what()); |
70 |
+ } |
71 |
++#endif |
72 |
+ } |
73 |
+ |
74 |
+ #endif /* HAVE_TBB */ |
75 |
+ |
76 |
|
77 |
diff --git a/sci-libs/opencascade/opencascade-7.5.3-r7.ebuild b/sci-libs/opencascade/opencascade-7.5.3-r8.ebuild |
78 |
similarity index 98% |
79 |
rename from sci-libs/opencascade/opencascade-7.5.3-r7.ebuild |
80 |
rename to sci-libs/opencascade/opencascade-7.5.3-r8.ebuild |
81 |
index 8287de53da6b..87b782fa5e6a 100644 |
82 |
--- a/sci-libs/opencascade/opencascade-7.5.3-r7.ebuild |
83 |
+++ b/sci-libs/opencascade/opencascade-7.5.3-r8.ebuild |
84 |
@@ -47,7 +47,7 @@ RDEPEND=" |
85 |
) |
86 |
ffmpeg? ( media-video/ffmpeg:= ) |
87 |
freeimage? ( media-libs/freeimage ) |
88 |
- tbb? ( <dev-cpp/tbb-2021.4.0 ) |
89 |
+ tbb? ( dev-cpp/tbb:= ) |
90 |
vtk? ( sci-libs/vtk:=[rendering] ) |
91 |
" |
92 |
DEPEND="${RDEPEND}" |
93 |
@@ -68,6 +68,7 @@ PATCHES=( |
94 |
"${FILESDIR}"/${PN}-7.5.1-0006-fix-creation-of-custom.sh-script.patch |
95 |
"${FILESDIR}"/${PN}-7.5.1-fix-AllValues-name-collision-with-vtk-9.0.patch |
96 |
"${FILESDIR}"/${PN}-7.6.2-avoid-pre-stripping-binaries.patch |
97 |
+ "${FILESDIR}"/${PN}-7.5.3-tbb-2021.patch |
98 |
) |
99 |
|
100 |
src_prepare() { |
101 |
|
102 |
diff --git a/sci-libs/opencascade/opencascade-7.6.1-r1.ebuild b/sci-libs/opencascade/opencascade-7.6.1-r2.ebuild |
103 |
similarity index 98% |
104 |
rename from sci-libs/opencascade/opencascade-7.6.1-r1.ebuild |
105 |
rename to sci-libs/opencascade/opencascade-7.6.1-r2.ebuild |
106 |
index 41e15cf2bd76..e11b24187775 100644 |
107 |
--- a/sci-libs/opencascade/opencascade-7.6.1-r1.ebuild |
108 |
+++ b/sci-libs/opencascade/opencascade-7.6.1-r2.ebuild |
109 |
@@ -47,7 +47,7 @@ RDEPEND=" |
110 |
) |
111 |
ffmpeg? ( <media-video/ffmpeg-5:= ) |
112 |
freeimage? ( media-libs/freeimage ) |
113 |
- tbb? ( <dev-cpp/tbb-2021.4 ) |
114 |
+ tbb? ( dev-cpp/tbb:= ) |
115 |
vtk? ( sci-libs/vtk:=[rendering] ) |
116 |
" |
117 |
DEPEND=" |
118 |
@@ -65,6 +65,7 @@ PATCHES=( |
119 |
"${FILESDIR}"/${PN}-7.5.1-0005-fix-write-permissions-on-scripts.patch |
120 |
"${FILESDIR}"/${PN}-7.5.1-0006-fix-creation-of-custom.sh-script.patch |
121 |
"${FILESDIR}"/${PN}-7.6.2-avoid-pre-stripping-binaries.patch |
122 |
+ "${FILESDIR}"/${PN}-7.5.3-tbb-2021.patch |
123 |
) |
124 |
|
125 |
src_prepare() { |
126 |
|
127 |
diff --git a/sci-libs/opencascade/opencascade-7.6.2.ebuild b/sci-libs/opencascade/opencascade-7.6.2-r1.ebuild |
128 |
similarity index 98% |
129 |
rename from sci-libs/opencascade/opencascade-7.6.2.ebuild |
130 |
rename to sci-libs/opencascade/opencascade-7.6.2-r1.ebuild |
131 |
index 7914fe259a7e..7773a90fb9f2 100644 |
132 |
--- a/sci-libs/opencascade/opencascade-7.6.2.ebuild |
133 |
+++ b/sci-libs/opencascade/opencascade-7.6.2-r1.ebuild |
134 |
@@ -47,7 +47,7 @@ RDEPEND=" |
135 |
) |
136 |
ffmpeg? ( <media-video/ffmpeg-5:= ) |
137 |
freeimage? ( media-libs/freeimage ) |
138 |
- tbb? ( <dev-cpp/tbb-2021.4 ) |
139 |
+ tbb? ( dev-cpp/tbb:= ) |
140 |
vtk? ( sci-libs/vtk:=[rendering] ) |
141 |
" |
142 |
DEPEND=" |
143 |
@@ -66,6 +66,7 @@ PATCHES=( |
144 |
"${FILESDIR}"/${PN}-7.5.1-0005-fix-write-permissions-on-scripts.patch |
145 |
"${FILESDIR}"/${PN}-7.5.1-0006-fix-creation-of-custom.sh-script.patch |
146 |
"${FILESDIR}"/${P}-avoid-pre-stripping-binaries.patch |
147 |
+ "${FILESDIR}"/${PN}-7.5.3-tbb-2021.patch |
148 |
) |
149 |
|
150 |
src_prepare() { |