From 4ef79e9e3f3320ca6d3bec474c9f5d853bb2def6 Mon Sep 17 00:00:00 2001 From: silvanshade Date: Tue, 13 May 2025 12:29:47 -0600 Subject: [PATCH] tbb_2021_11_0: address feedback from #405670 --- pkgs/development/libraries/tbb/default.nix | 11 +++++- ...ke-threads-threads-target-for-static.patch | 34 ------------------- 2 files changed, 10 insertions(+), 35 deletions(-) delete mode 100644 pkgs/development/libraries/tbb/patches/fix-cmake-threads-threads-target-for-static.patch diff --git a/pkgs/development/libraries/tbb/default.nix b/pkgs/development/libraries/tbb/default.nix index 738f3173c806..8ecaed4e7a4e 100644 --- a/pkgs/development/libraries/tbb/default.nix +++ b/pkgs/development/libraries/tbb/default.nix @@ -52,7 +52,16 @@ stdenv.mkDerivation rec { }) # Fix Threads::Threads target for static from https://github.com/oneapi-src/oneTBB/pull/1248 # This is a conflict-resolved cherry-pick of the above PR to due to formatting differences. - ./patches/fix-cmake-threads-threads-target-for-static.patch + (fetchpatch { + name = "fix-cmake-threads-threads-target-for-static.patch"; + url = "https://patch-diff.githubusercontent.com/raw/uxlfoundation/oneTBB/pull/1248.patch"; + hash = "sha256-3WKzxU93vxuy7NgW+ap+ocZz5Q5utZ/pK7+FQExzLLA="; + }) + ]; + + patchFlags = [ + "-p1" + "--ignore-whitespace" ]; # Fix build with modern gcc diff --git a/pkgs/development/libraries/tbb/patches/fix-cmake-threads-threads-target-for-static.patch b/pkgs/development/libraries/tbb/patches/fix-cmake-threads-threads-target-for-static.patch deleted file mode 100644 index 5fdf4434abd2..000000000000 --- a/pkgs/development/libraries/tbb/patches/fix-cmake-threads-threads-target-for-static.patch +++ /dev/null @@ -1,34 +0,0 @@ -From b42f074a724a41d2369a94283a2e94190d0cbb44 Mon Sep 17 00:00:00 2001 -From: Liam Keegan -Date: Fri, 10 Nov 2023 09:08:42 +0100 -Subject: [PATCH] Fix CMake "Threads::Threads target not found" issue for - static builds (#1248) - -- add `Threads` dependency to installed CMake config for static builds only -- based on #912 by @p12tic including reviewer comments from @ilya-lavrenov and @isaevil -- resolves #1145 - -Signed-off-by: Liam Keegan -(cherry picked from commit 12ceae12138af08845b3e8c369b24527346fe99e) ---- - CMakeLists.txt | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 16ee29ed..0bc39a52 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -265,6 +265,10 @@ else() - COMPONENT devel) - file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake - "include(\${CMAKE_CURRENT_LIST_DIR}/${PROJECT_NAME}Targets.cmake)\n") -+ if (NOT BUILD_SHARED_LIBS) -+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake -+ "include(CMakeFindDependencyMacro)\nfind_dependency(Threads)\n") -+ endif() - - write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" - COMPATIBILITY AnyNewerVersion) --- -2.49.0 -