summaryrefslogtreecommitdiff
path: root/sci-libs/opencascade/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /sci-libs/opencascade/files
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'sci-libs/opencascade/files')
-rw-r--r--sci-libs/opencascade/files/opencascade-7.5.3-tbb-2021.patch51
-rw-r--r--sci-libs/opencascade/files/opencascade-7.6.2-avoid-pre-stripping-binaries.patch33
2 files changed, 84 insertions, 0 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/files/opencascade-7.6.2-avoid-pre-stripping-binaries.patch b/sci-libs/opencascade/files/opencascade-7.6.2-avoid-pre-stripping-binaries.patch
new file mode 100644
index 000000000000..144047fba163
--- /dev/null
+++ b/sci-libs/opencascade/files/opencascade-7.6.2-avoid-pre-stripping-binaries.patch
@@ -0,0 +1,33 @@
+https://bugs.gentoo.org/831800
+https://dev.opencascade.org/content/dont-pre-strip-binaries
+
+From 88e59e0199daaf66184833e366e9deb1299078a9 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Sun, 5 Jun 2022 09:48:09 +0200
+Subject: [PATCH] avoid pre-stripping binaries
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+--- a/adm/cmake/occt_defs_flags.cmake
++++ b/adm/cmake/occt_defs_flags.cmake
+@@ -133,8 +133,6 @@ if ("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang")
+ # does not support option "-std=c++0x"
+ set (CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}")
+ endif()
+- # Optimize size of binaries
+- set (CMAKE_SHARED_LINKER_FLAGS "-Wl,-s ${CMAKE_SHARED_LINKER_FLAGS}")
+ elseif(MINGW)
+ add_definitions(-D_WIN32_WINNT=0x0601)
+ # _WIN32_WINNT=0x0601 (use Windows 7 SDK)
+@@ -150,9 +148,6 @@ elseif(MINGW)
+ elseif (DEFINED CMAKE_COMPILER_IS_GNUCXX)
+ # Require C++11
+ set (CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}")
+- # Optimize size of binaries
+- set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
+- set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
+ endif()
+
+ if (BUILD_RELEASE_DISABLE_EXCEPTIONS)
+--
+2.35.1
+