aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/pthreadpool/fix-cmakelists.patch23
-rw-r--r--ports/pthreadpool/fix-uwp.patch13
-rw-r--r--ports/pthreadpool/portfile.cmake6
-rw-r--r--ports/pthreadpool/vcpkg.json5
-rw-r--r--versions/baseline.json2
-rw-r--r--versions/p-/pthreadpool.json5
6 files changed, 45 insertions, 9 deletions
diff --git a/ports/pthreadpool/fix-cmakelists.patch b/ports/pthreadpool/fix-cmakelists.patch
index 2f56f6b9b..e46f679d1 100644
--- a/ports/pthreadpool/fix-cmakelists.patch
+++ b/ports/pthreadpool/fix-cmakelists.patch
@@ -1,4 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 09d57b2..57d3a2c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,8 +4,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.5 FATAL_ERROR)
@@ -29,7 +30,14 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
MESSAGE(STATUS "Downloading FXdiv to ${CMAKE_BINARY_DIR}/FXdiv-source (define FXDIV_SOURCE_DIR to avoid it)")
CONFIGURE_FILE(cmake/DownloadFXdiv.cmake "${CMAKE_BINARY_DIR}/FXdiv-download/CMakeLists.txt")
EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
-@@ -93,15 +92,7 @@ IF(NOT PTHREADPOOL_ALLOW_DEPRECATED_API)
+@@ -87,21 +86,13 @@ ELSE()
+ ENDIF()
+
+ ADD_LIBRARY(pthreadpool_interface INTERFACE)
+-TARGET_INCLUDE_DIRECTORIES(pthreadpool_interface INTERFACE include)
++TARGET_INCLUDE_DIRECTORIES(pthreadpool_interface INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
+ IF(NOT PTHREADPOOL_ALLOW_DEPRECATED_API)
+ TARGET_COMPILE_DEFINITIONS(pthreadpool_interface INTERFACE PTHREADPOOL_NO_DEPRECATED_API=1)
ENDIF()
INSTALL(FILES include/pthreadpool.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
@@ -46,7 +54,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
IF(PTHREADPOOL_SYNC_PRIMITIVE STREQUAL "condvar")
TARGET_COMPILE_DEFINITIONS(pthreadpool PRIVATE PTHREADPOOL_USE_FUTEX=0)
-@@ -150,14 +141,14 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+@@ -150,18 +141,22 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
ENDIF()
# ---[ Configure FXdiv
@@ -61,5 +69,14 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
-TARGET_LINK_LIBRARIES(pthreadpool PRIVATE fxdiv)
+TARGET_INCLUDE_DIRECTORIES(pthreadpool PRIVATE ${FXDIV_INCLUDE_DIRS})
- INSTALL(TARGETS pthreadpool
+-INSTALL(TARGETS pthreadpool
++INSTALL(TARGETS pthreadpool pthreadpool_interface
++ EXPORT unofficial-pthreadpool-config
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
++install(EXPORT unofficial-pthreadpool-config NAMESPACE unofficial::
++ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/unofficial-${PROJECT_NAME}) # share/unofficial-pthreadpool
+
+ IF(PTHREADPOOL_BUILD_TESTS)
+ # ---[ Build google test
diff --git a/ports/pthreadpool/fix-uwp.patch b/ports/pthreadpool/fix-uwp.patch
new file mode 100644
index 000000000..6ad039d21
--- /dev/null
+++ b/ports/pthreadpool/fix-uwp.patch
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a07945c..6df83d1 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -75,7 +75,7 @@ ELSE()
+ LIST(APPEND PTHREADPOOL_SRCS src/portable-api.c src/memory.c)
+ IF(APPLE AND (PTHREADPOOL_SYNC_PRIMITIVE STREQUAL "default" OR PTHREADPOOL_SYNC_PRIMITIVE STREQUAL "gcd"))
+ LIST(APPEND PTHREADPOOL_SRCS src/gcd.c)
+- ELSEIF(CMAKE_SYSTEM_NAME MATCHES "^(Windows|CYGWIN|MSYS)$" AND (PTHREADPOOL_SYNC_PRIMITIVE STREQUAL "default" OR PTHREADPOOL_SYNC_PRIMITIVE STREQUAL "event"))
++ ELSEIF(CMAKE_SYSTEM_NAME MATCHES "^(Windows|WindowsStore|CYGWIN|MSYS)$" AND (PTHREADPOOL_SYNC_PRIMITIVE STREQUAL "default" OR PTHREADPOOL_SYNC_PRIMITIVE STREQUAL "event"))
+ LIST(APPEND PTHREADPOOL_SRCS src/windows.c)
+ ELSE()
+ LIST(APPEND PTHREADPOOL_SRCS src/pthreads.c)
diff --git a/ports/pthreadpool/portfile.cmake b/ports/pthreadpool/portfile.cmake
index f3be91092..dbae48f47 100644
--- a/ports/pthreadpool/portfile.cmake
+++ b/ports/pthreadpool/portfile.cmake
@@ -5,10 +5,11 @@ endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Maratyszcza/pthreadpool
- REF b4589998be9a0f794236cf46f1b5b232b2b15ca3 # there is a too much gap from the last release...
- SHA512 8459e489a41c38f4dbe6c4401ebe624c7dc4685181b0852c2284f0e413a192ae9fd1ffd9b43fd97b7fd95dbda4970bc71d8c1eba8e33afa9efea74440f00803d
+ REF 052e441b70091656199e2283fb1c16a7db6f0f85 # there is a too much gap from the last release...
+ SHA512 33be676e65719ae8510ec4e8254809033528802681870f8c91b083ce4006e5f630b80207a7e675464b406a785cb45bc74628996ea4817c02816b7b58ddf3a2bc
PATCHES
fix-cmakelists.patch
+ fix-uwp.patch
)
vcpkg_configure_cmake(
@@ -20,6 +21,7 @@ vcpkg_configure_cmake(
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
+vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT})
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
diff --git a/ports/pthreadpool/vcpkg.json b/ports/pthreadpool/vcpkg.json
index e3924a698..8bd25e1f5 100644
--- a/ports/pthreadpool/vcpkg.json
+++ b/ports/pthreadpool/vcpkg.json
@@ -1,14 +1,13 @@
{
"name": "pthreadpool",
- "version-date": "2020-02-21",
+ "version-date": "2020-04-10",
"description": "Portable (POSIX/Windows/Emscripten) thread pool for C/C++",
"homepage": "https://github.com/Maratyszcza/pthreadpool",
- "supports": "!uwp",
"dependencies": [
"fxdiv",
{
"name": "pthreads",
- "platform": "uwp"
+ "platform": "windows & uwp"
}
]
}
diff --git a/versions/baseline.json b/versions/baseline.json
index e6ccdc8de..6987b3bd0 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -4949,7 +4949,7 @@
"port-version": 0
},
"pthreadpool": {
- "baseline": "2020-02-21",
+ "baseline": "2020-04-10",
"port-version": 0
},
"pthreads": {
diff --git a/versions/p-/pthreadpool.json b/versions/p-/pthreadpool.json
index 09c0ab015..7f8931905 100644
--- a/versions/p-/pthreadpool.json
+++ b/versions/p-/pthreadpool.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "da641f8e198df6999638e7a2f0a95e3f143cb595",
+ "version-date": "2020-04-10",
+ "port-version": 0
+ },
+ {
"git-tree": "9c1519f2cc1eb186ccd706a4f634350877da6dba",
"version-date": "2020-02-21",
"port-version": 0