From 6e2be6d4e7f567b98d259c6b5e98aee5eb076a83 Mon Sep 17 00:00:00 2001 From: Jesse Schalken Date: Wed, 27 May 2020 04:15:03 +1000 Subject: [PATCH 1/4] [threadpool] Add new port --- ports/threadpool/CONTROL | 5 +++++ ports/threadpool/portfile.cmake | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 ports/threadpool/CONTROL create mode 100644 ports/threadpool/portfile.cmake diff --git a/ports/threadpool/CONTROL b/ports/threadpool/CONTROL new file mode 100644 index 00000000000000..ee84c62b268a97 --- /dev/null +++ b/ports/threadpool/CONTROL @@ -0,0 +1,5 @@ +Source: threadpool +Version: 0.2.5 +Homepage: http://threadpool.sourceforge.net/ +Description: threadpool is a cross-platform C++ thread pool library. It provides a convenient way for dispatching asynchronous tasks and can be easily customized. threadpool is based on the high-quality Boost source libraries. +Build-Depends: boost-thread diff --git a/ports/threadpool/portfile.cmake b/ports/threadpool/portfile.cmake new file mode 100644 index 00000000000000..f6250e421bae76 --- /dev/null +++ b/ports/threadpool/portfile.cmake @@ -0,0 +1,19 @@ + +vcpkg_download_distfile(ARCHIVE + URLS "https://downloads.sourceforge.net/project/threadpool/threadpool/0.2.5%20%28Stable%29/threadpool-0_2_5-src.zip" + FILENAME "threadpool-0_2_5-src.zip" + SHA512 961576b619e5227098fa37a3c8d903128b3c2a9cf1e55c057c6f9126062bcccfa6fe2510b4e8ee5d1a0e3d0425f0077c50eccad2120a423f69e2705460780e7c +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(INSTALL ${SOURCE_PATH}/threadpool/boost + DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${SOURCE_PATH}/threadpool/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/threadpool + RENAME copyright) + From 0bae05e7be1ea63e83eea48ef4bf0807eed2ff74 Mon Sep 17 00:00:00 2001 From: Jesse Schalken Date: Mon, 1 Jun 2020 21:10:26 +1000 Subject: [PATCH 2/4] Use ${PORT} instead of hardcoded "theadpool" Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> --- ports/threadpool/portfile.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ports/threadpool/portfile.cmake b/ports/threadpool/portfile.cmake index f6250e421bae76..39827faa53196a 100644 --- a/ports/threadpool/portfile.cmake +++ b/ports/threadpool/portfile.cmake @@ -14,6 +14,5 @@ file(INSTALL ${SOURCE_PATH}/threadpool/boost DESTINATION ${CURRENT_PACKAGES_DIR}/include) file(INSTALL ${SOURCE_PATH}/threadpool/COPYING - DESTINATION ${CURRENT_PACKAGES_DIR}/share/threadpool + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) - From 041bb8e705e502036ff2ff62480df00918e93f05 Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Thu, 4 Jun 2020 15:28:16 +0800 Subject: [PATCH 3/4] Update ports/threadpool/portfile.cmake --- ports/threadpool/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/threadpool/portfile.cmake b/ports/threadpool/portfile.cmake index 39827faa53196a..8b2cd934b4f1e7 100644 --- a/ports/threadpool/portfile.cmake +++ b/ports/threadpool/portfile.cmake @@ -1,4 +1,4 @@ - +# header-only library vcpkg_download_distfile(ARCHIVE URLS "https://downloads.sourceforge.net/project/threadpool/threadpool/0.2.5%20%28Stable%29/threadpool-0_2_5-src.zip" FILENAME "threadpool-0_2_5-src.zip" From f19d378fb7d3cd465f4bc64ebe71bff6c670b00b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 7 Jul 2020 15:55:18 -0700 Subject: [PATCH 4/4] [threadpool] Use vcpkg_from_sourceforge --- ports/threadpool/CONTROL | 1 + ports/threadpool/portfile.cmake | 14 +++++--------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/ports/threadpool/CONTROL b/ports/threadpool/CONTROL index ee84c62b268a97..df98da83a48c73 100644 --- a/ports/threadpool/CONTROL +++ b/ports/threadpool/CONTROL @@ -1,5 +1,6 @@ Source: threadpool Version: 0.2.5 +Port-Version: 1 Homepage: http://threadpool.sourceforge.net/ Description: threadpool is a cross-platform C++ thread pool library. It provides a convenient way for dispatching asynchronous tasks and can be easily customized. threadpool is based on the high-quality Boost source libraries. Build-Depends: boost-thread diff --git a/ports/threadpool/portfile.cmake b/ports/threadpool/portfile.cmake index 8b2cd934b4f1e7..05d47be5213fb6 100644 --- a/ports/threadpool/portfile.cmake +++ b/ports/threadpool/portfile.cmake @@ -1,13 +1,9 @@ -# header-only library -vcpkg_download_distfile(ARCHIVE - URLS "https://downloads.sourceforge.net/project/threadpool/threadpool/0.2.5%20%28Stable%29/threadpool-0_2_5-src.zip" - FILENAME "threadpool-0_2_5-src.zip" - SHA512 961576b619e5227098fa37a3c8d903128b3c2a9cf1e55c057c6f9126062bcccfa6fe2510b4e8ee5d1a0e3d0425f0077c50eccad2120a423f69e2705460780e7c -) - -vcpkg_extract_source_archive_ex( +vcpkg_from_sourceforge( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} + REPO threadpool/threadpool + REF "0.2.5 (Stable)" + SHA512 961576b619e5227098fa37a3c8d903128b3c2a9cf1e55c057c6f9126062bcccfa6fe2510b4e8ee5d1a0e3d0425f0077c50eccad2120a423f69e2705460780e7c + FILENAME "threadpool-0_2_5-src.zip" ) file(INSTALL ${SOURCE_PATH}/threadpool/boost