From 5b8dd1a39961fc1f7b3ebfce966154f19ef9b0e7 Mon Sep 17 00:00:00 2001 From: Max Golovanov Date: Wed, 2 Jun 2021 16:20:08 -0700 Subject: [PATCH 1/4] Create port_def.patch Patch to turn off constinit with Visual Studio 2019 Update 16.10 --- ports/protobuf/port_def.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 ports/protobuf/port_def.patch diff --git a/ports/protobuf/port_def.patch b/ports/protobuf/port_def.patch new file mode 100644 index 00000000000000..31d71531d0aeaa --- /dev/null +++ b/ports/protobuf/port_def.patch @@ -0,0 +1,14 @@ +diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc +index f7b64a080..3493d9082 100644 +--- a/src/google/protobuf/port_def.inc ++++ b/src/google/protobuf/port_def.inc +@@ -564,7 +564,8 @@ + + // Our use of constinit does not yet work with GCC: + // https://github.com/protocolbuffers/protobuf/issues/8310 +-#if defined(__cpp_constinit) && !defined(__GNUC__) ++// Does not work yet with Visual Studio 2019 Update 16.10 ++#if defined(__cpp_constinit) && !defined(__GNUC__) && !defined(_MSC_VER) + #define PROTOBUF_CONSTINIT constinit + #elif defined(__has_cpp_attribute) + #if __has_cpp_attribute(clang::require_constant_initialization) From 248a38adfce8951ef8043ab9235acf043a7e3829 Mon Sep 17 00:00:00 2001 From: Max Golovanov Date: Wed, 2 Jun 2021 16:20:57 -0700 Subject: [PATCH 2/4] Update portfile.cmake Apply port_def.patch --- ports/protobuf/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 939e37096bfa91..8f7c3b119de57b 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -7,6 +7,7 @@ vcpkg_from_github( PATCHES fix-static-build.patch fix-default-proto-file-path.patch + port_def.patch ) string(COMPARE EQUAL "${TARGET_TRIPLET}" "${HOST_TRIPLET}" protobuf_BUILD_PROTOC_BINARIES) From 7305eed74d899fba2e920a6ea84e31215e98f4a2 Mon Sep 17 00:00:00 2001 From: Max Golovanov Date: Wed, 2 Jun 2021 16:22:34 -0700 Subject: [PATCH 3/4] Update vcpkg.json Increment port-version --- ports/protobuf/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/protobuf/vcpkg.json b/ports/protobuf/vcpkg.json index 5808add9103081..5f1926a088ef4d 100644 --- a/ports/protobuf/vcpkg.json +++ b/ports/protobuf/vcpkg.json @@ -1,7 +1,7 @@ { "name": "protobuf", "version-semver": "3.15.8", - "port-version": 1, + "port-version": 2, "description": "Protocol Buffers - Google's data interchange format", "homepage": "https://github.com/protocolbuffers/protobuf", "dependencies": [ From 8f125430db452e54db71331f2dba741d9057c4d1 Mon Sep 17 00:00:00 2001 From: Max Golovanov Date: Thu, 3 Jun 2021 16:00:35 -0700 Subject: [PATCH 4/4] Add version --- versions/baseline.json | 2 +- versions/p-/protobuf.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index 9786fcb36dcd76..9354b2a3155139 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4954,7 +4954,7 @@ }, "protobuf": { "baseline": "3.15.8", - "port-version": 1 + "port-version": 2 }, "protobuf-c": { "baseline": "1.3.2-2", diff --git a/versions/p-/protobuf.json b/versions/p-/protobuf.json index 188f13360e2c5c..7ce8bc35fdf464 100644 --- a/versions/p-/protobuf.json +++ b/versions/p-/protobuf.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "1c52c3eb43c2dfd9603673eb5c173ec69c21ea73", + "version-semver": "3.15.8", + "port-version": 2 + }, { "git-tree": "04dc7ffb4ebb123e734652cdb359ff18dca83ffc", "version-semver": "3.15.8",