diff --git a/patches/libdispatch-own-blocksruntime.patch b/patches/libdispatch-own-blocksruntime.patch index 89312d1..8a7c3bd 100644 --- a/patches/libdispatch-own-blocksruntime.patch +++ b/patches/libdispatch-own-blocksruntime.patch @@ -1,44 +1,20 @@ -From f49931127fe7673931c6550194c593923b2fbfd7 Mon Sep 17 00:00:00 2001 -From: Niels Grewe -Date: Sun, 24 Nov 2019 08:24:56 +0100 -Subject: [PATCH 1/2] build: search for system-supplied libBlocksRuntime - -This allows the user to provide a version of libBlocksRuntime on -systems other than Darwin. - https://github.com/apple/swift-corelibs-libdispatch/pull/534 ---- - CMakeLists.txt | 2 ++ - cmake/modules/FindBlocksRuntime.cmake | 2 ++ - src/CMakeLists.txt | 3 +-- - 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 36da011..3b615d0 100644 +index eff610b..21a30b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -117,6 +117,8 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL Android) +@@ -187,6 +187,8 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL Android) find_package(LibRT) endif() +find_package(BlocksRuntime QUIET) + check_function_exists(_pthread_workqueue_init HAVE__PTHREAD_WORKQUEUE_INIT) + check_function_exists(aligned_alloc HAVE_ALIGNED_ALLOC) check_function_exists(getprogname HAVE_GETPROGNAME) - check_function_exists(mach_absolute_time HAVE_MACH_ABSOLUTE_TIME) -diff --git a/cmake/modules/FindBlocksRuntime.cmake b/cmake/modules/FindBlocksRuntime.cmake -index 111a5d634..eb3f539e9 100644 ---- a/cmake/modules/FindBlocksRuntime.cmake -+++ b/cmake/modules/FindBlocksRuntime.cmake -@@ -45,4 +45,6 @@ if(BlocksRuntime_FOUND) - INTERFACE_INCLUDE_DIRECTORIES - ${BlocksRuntime_INCLUDE_DIR}) - endif() -+else() -+ set(BlocksRuntime_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/src/BlocksRuntime") - endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index c88b430de..e2da3aaa8 100644 +index 570c919..6d45899 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,5 +1,4 @@ @@ -48,30 +24,8 @@ index c88b430de..e2da3aaa8 100644 add_subdirectory(BlocksRuntime) endif() - -From 18ef62595830ce69ccfc9353457e5efd1b64f54e Mon Sep 17 00:00:00 2001 -From: Niels Grewe -Date: Sun, 24 Nov 2019 21:54:36 +0100 -Subject: [PATCH 2/2] build: Remove a superfluous include path - ---- - cmake/modules/FindBlocksRuntime.cmake | 2 -- - tests/CMakeLists.txt | 3 --- - 2 files changed, 5 deletions(-) - -diff --git a/cmake/modules/FindBlocksRuntime.cmake b/cmake/modules/FindBlocksRuntime.cmake -index eb3f539e9..111a5d634 100644 ---- a/cmake/modules/FindBlocksRuntime.cmake -+++ b/cmake/modules/FindBlocksRuntime.cmake -@@ -45,6 +45,4 @@ if(BlocksRuntime_FOUND) - INTERFACE_INCLUDE_DIRECTORIES - ${BlocksRuntime_INCLUDE_DIR}) - endif() --else() -- set(BlocksRuntime_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/src/BlocksRuntime") - endif() diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt -index a27603559..0af5aac87 100644 +index 0176a06..523ae06 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -78,9 +78,6 @@ function(add_unit_test name)