aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authormyd7349 <myd7349@gmail.com>2019-08-07 01:36:35 +0800
committerCurtis J Bezault <curtbezault@gmail.com>2019-08-06 13:36:35 -0400
commit0d5e42ff762e09a28df8087eef5e9f757cdba9cc (patch)
treecfb449b0eb9035becf4811d2a73431c6996f8e5d /ports
parent99b00d84760859e55978f1eed4e7db08cb663ee6 (diff)
downloadvcpkg-0d5e42ff762e09a28df8087eef5e9f757cdba9cc.tar.gz
vcpkg-0d5e42ff762e09a28df8087eef5e9f757cdba9cc.zip
[tinycthread] Add new port (#7565)
Diffstat (limited to 'ports')
-rw-r--r--ports/tinycthread/CONTROL4
-rw-r--r--ports/tinycthread/portfile.cmake29
2 files changed, 33 insertions, 0 deletions
diff --git a/ports/tinycthread/CONTROL b/ports/tinycthread/CONTROL
new file mode 100644
index 000000000..da87db141
--- /dev/null
+++ b/ports/tinycthread/CONTROL
@@ -0,0 +1,4 @@
+Source: tinycthread
+Version: 2019-08-06
+Description: Small, portable implementation of the C11 threads API
+Homepage: https://tinycthread.github.io/
diff --git a/ports/tinycthread/portfile.cmake b/ports/tinycthread/portfile.cmake
new file mode 100644
index 000000000..e521ffb00
--- /dev/null
+++ b/ports/tinycthread/portfile.cmake
@@ -0,0 +1,29 @@
+include(vcpkg_common_functions)
+
+vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO tinycthread/tinycthread
+ REF 6957fc8383d6c7db25b60b8c849b29caab1caaee
+ SHA512 d8b1ad73676f90b236bef06464cfd34996e7b6676ef28cf011cfff86d63e9d6322f7b00ca15290b3f87ed40e704d5325f676440d0223a7f8716d3392a5d1345d
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DTINYCTHREAD_DISABLE_TESTS=OFF
+ -DTINYCTHREAD_INSTALL=ON
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# Handle copyright
+file(STRINGS ${SOURCE_PATH}/README.txt SOURCE_LINES)
+list(SUBLIST SOURCE_LINES 70 120 SOURCE_LINES)
+list(JOIN SOURCE_LINES "\n" _contents)
+file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "${_contents}")