diff --git a/srcpkgs/OpenSubdiv/patches/tbb-2021.patch b/srcpkgs/OpenSubdiv/patches/tbb-2021.patch new file mode 100644 index 0000000000..5a812c84b2 --- /dev/null +++ b/srcpkgs/OpenSubdiv/patches/tbb-2021.patch @@ -0,0 +1,29 @@ +diff --git a/opensubdiv/osd/tbbEvaluator.cpp b/opensubdiv/osd/tbbEvaluator.cpp +index c98db9f..8dec0e1 100644 +--- a/opensubdiv/osd/tbbEvaluator.cpp ++++ b/opensubdiv/osd/tbbEvaluator.cpp +@@ -25,7 +25,7 @@ + #include "../osd/tbbEvaluator.h" + #include "../osd/tbbKernel.h" + +-#include ++#include + + namespace OpenSubdiv { + namespace OPENSUBDIV_VERSION { +@@ -215,10 +215,11 @@ TbbEvaluator::Synchronize(void *) { + /* static */ + void + TbbEvaluator::SetNumThreads(int numThreads) { +- if (numThreads == -1) { +- tbb::task_scheduler_init init; +- } else { +- tbb::task_scheduler_init init(numThreads); ++ if (numThreads != -1) { ++ tbb::global_control tbb_global_control( ++ tbb::global_control::max_allowed_parallelism, ++ numThreads ++ ); + } + } + diff --git a/srcpkgs/OpenSubdiv/template b/srcpkgs/OpenSubdiv/template index fd32e6bd69..0d6867b5a6 100644 --- a/srcpkgs/OpenSubdiv/template +++ b/srcpkgs/OpenSubdiv/template @@ -1,11 +1,12 @@ # Template file for 'OpenSubdiv' pkgname=OpenSubdiv version=3.4.3 -revision=1 +revision=2 wrksrc="OpenSubdiv-${version//./_}" build_style=cmake -configure_args="-DOpenGL_GL_PREFERENCE=GLVND" # TODO: CUDA/OpenCL support +# NO_GLTESTS: skip tests which require X11 & $DISPLAY environment variable +configure_args="-DOpenGL_GL_PREFERENCE=GLVND -DNO_GLTESTS=1 -DNO_CUDA=1" makedepends="libXrandr-devel libXinerama-devel libXcursor-devel zlib-devel libgomp-devel glfw-devel glew-devel tbb-devel libXxf86vm-devel" short_desc="Open-Source subdivision surface library"