aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvin <idealvin@qq.com>2021-10-14 05:41:13 +0800
committerGitHub <noreply@github.com>2021-10-13 14:41:13 -0700
commitf1e18c43d7d341872467b7bc718dcba5d894fafb (patch)
treeeacb38c25f59d45d31f1b05b005864c32d491797
parentb312224c7b0a4ce1acade1ac9d03f16a8aee6a44 (diff)
downloadvcpkg-f1e18c43d7d341872467b7bc718dcba5d894fafb.tar.gz
vcpkg-f1e18c43d7d341872467b7bc718dcba5d894fafb.zip
Add a patch for co v2.0.2 (#20657)
* add a patch for co v2.0.2 * update port version * update version * version Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
-rw-r--r--ports/co/fix-event-destruct.patch13
-rw-r--r--ports/co/portfile.cmake1
-rw-r--r--ports/co/vcpkg.json1
-rw-r--r--versions/baseline.json2
-rw-r--r--versions/c-/co.json5
5 files changed, 21 insertions, 1 deletions
diff --git a/ports/co/fix-event-destruct.patch b/ports/co/fix-event-destruct.patch
new file mode 100644
index 000000000..b5abc57e7
--- /dev/null
+++ b/ports/co/fix-event-destruct.patch
@@ -0,0 +1,13 @@
+diff --git a/src/co/co.cc b/src/co/co.cc
+index 8921296..838ac16 100644
+--- a/src/co/co.cc
++++ b/src/co/co.cc
+@@ -8,7 +8,7 @@ namespace co {
+ class EventImpl {
+ public:
+ EventImpl() : _counter(0), _signaled(false), _has_cond(false) {}
+- ~EventImpl() { co::xx::cond_destroy(&_cond); }
++ ~EventImpl() { if (_has_cond) co::xx::cond_destroy(&_cond); }
+
+ bool wait(uint32 ms);
+
diff --git a/ports/co/portfile.cmake b/ports/co/portfile.cmake
index 08ed5d4a3..9e7dd7e19 100644
--- a/ports/co/portfile.cmake
+++ b/ports/co/portfile.cmake
@@ -10,6 +10,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
install-dll.patch
+ fix-event-destruct.patch
)
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_CRT)
diff --git a/ports/co/vcpkg.json b/ports/co/vcpkg.json
index 1fcc2b0dc..e9f94ed5f 100644
--- a/ports/co/vcpkg.json
+++ b/ports/co/vcpkg.json
@@ -1,6 +1,7 @@
{
"name": "co",
"version-semver": "2.0.2",
+ "port-version": 1,
"description": "A go-style coroutine library in C++11 and more",
"homepage": "https://github.com/idealvin/co",
"supports": "!uwp & !(arm & windows)",
diff --git a/versions/baseline.json b/versions/baseline.json
index 3666faf8b..6197f1366 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -1422,7 +1422,7 @@
},
"co": {
"baseline": "2.0.2",
- "port-version": 0
+ "port-version": 1
},
"coin": {
"baseline": "4.0.0",
diff --git a/versions/c-/co.json b/versions/c-/co.json
index 889b6bb11..b11d5ac76 100644
--- a/versions/c-/co.json
+++ b/versions/c-/co.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "b2b668ad241e0a4453f7a4f0a7c0b35e8c922e3b",
+ "version-semver": "2.0.2",
+ "port-version": 1
+ },
+ {
"git-tree": "2b21d0aa5397dedda9219671af687afacab91a6c",
"version-semver": "2.0.2",
"port-version": 0