aboutsummaryrefslogtreecommitdiff
path: root/ports/protobuf
diff options
context:
space:
mode:
authorCarlos O'Ryan <coryan@users.noreply.github.com>2021-09-22 13:09:55 -0700
committerGitHub <noreply@github.com>2021-09-22 13:09:55 -0700
commitb29f8ef37edb1cedd5c2e403dbcb355443b939f6 (patch)
tree4ccc9c0b3655d54b05c41e88f3e129125eac1800 /ports/protobuf
parent93885afd50ff1a1408e1785dceffb01ff648c7d9 (diff)
downloadvcpkg-b29f8ef37edb1cedd5c2e403dbcb355443b939f6.tar.gz
vcpkg-b29f8ef37edb1cedd5c2e403dbcb355443b939f6.zip
[protobuf] upgrade to latest release (v3.18.0) (#20208)
* [protobuf] upgrade to latest release (v3.18.0) This requires patching OpenCV as it uses a function removed in the latest version of protobuf (FWIW, upstream OpenCV has a similar patch). * The arcus port also needs a patch * The caffe2 port also needs a patch * The brpc port also needs a patch
Diffstat (limited to 'ports/protobuf')
-rw-r--r--ports/protobuf/fix-static-build.patch10
-rw-r--r--ports/protobuf/fix-uwp-build.patch13
-rw-r--r--ports/protobuf/port_def.patch14
-rw-r--r--ports/protobuf/portfile.cmake8
-rw-r--r--ports/protobuf/vcpkg.json3
5 files changed, 23 insertions, 25 deletions
diff --git a/ports/protobuf/fix-static-build.patch b/ports/protobuf/fix-static-build.patch
index 0ba4982fe..fec980a93 100644
--- a/ports/protobuf/fix-static-build.patch
+++ b/ports/protobuf/fix-static-build.patch
@@ -1,11 +1,11 @@
diff --git a/cmake/install.cmake b/cmake/install.cmake
-index 4091bc8..9850018 100644
+index ef5bb13..e2d4acb 100644
--- a/cmake/install.cmake
+++ b/cmake/install.cmake
-@@ -31,7 +31,7 @@ endforeach()
- if (protobuf_BUILD_PROTOC_BINARIES)
- install(TARGETS protoc EXPORT protobuf-targets
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc)
+@@ -33,7 +33,7 @@ if (protobuf_BUILD_PROTOC_BINARIES)
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR}
+ COMPONENT protoc)
- if (UNIX AND NOT APPLE)
+ if (UNIX AND NOT APPLE AND NOT protobuf_MSVC_STATIC_RUNTIME)
set_property(TARGET protoc
diff --git a/ports/protobuf/fix-uwp-build.patch b/ports/protobuf/fix-uwp-build.patch
new file mode 100644
index 000000000..ca806ebd1
--- /dev/null
+++ b/ports/protobuf/fix-uwp-build.patch
@@ -0,0 +1,13 @@
+diff --git a/src/google/protobuf/descriptor.cc b/src/google/protobuf/descriptor.cc
+index b6c31fd..8b77c3d 100644
+--- a/src/google/protobuf/descriptor.cc
++++ b/src/google/protobuf/descriptor.cc
+@@ -794,7 +794,7 @@ class TableArena {
+ size = RoundUp(size);
+
+ Block* to_relocate = nullptr;
+- Block* to_use;
++ Block* to_use = nullptr;
+
+ for (size_t i = 0; i < kSmallSizes.size(); ++i) {
+ if (small_size_blocks_[i] != nullptr && size <= kSmallSizes[i]) {
diff --git a/ports/protobuf/port_def.patch b/ports/protobuf/port_def.patch
deleted file mode 100644
index 31d71531d..000000000
--- a/ports/protobuf/port_def.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-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)
diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake
index a645866c9..8395eeae5 100644
--- a/ports/protobuf/portfile.cmake
+++ b/ports/protobuf/portfile.cmake
@@ -1,13 +1,13 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO protocolbuffers/protobuf
- REF 436bd7880e458532901c58f4d9d1ea23fa7edd52 #v3.15.8
- SHA512 88bb9a965bccfe11a07aee2c0c16eb9cc1845ea2d7500ef6def3e1c0a8155ac4eadd0ceef4b12552960dffe95a0fc82549d1abba71ca073ab86ec5de57d9cafb
+ REF v3.18.0
+ SHA512 2c8ff451b54120e4670f7ea8c92c0c7d70f4bb781979f74f59ddcb7c9cc74fe3e8910fc579d2686fb0e1aafa35fb9548ccab667accf2358c71cfd17ba38d7826
HEAD_REF master
PATCHES
fix-static-build.patch
fix-default-proto-file-path.patch
- port_def.patch
+ fix-uwp-build.patch
)
string(COMPARE EQUAL "${TARGET_TRIPLET}" "${HOST_TRIPLET}" protobuf_BUILD_PROTOC_BINARIES)
@@ -79,7 +79,7 @@ if(protobuf_BUILD_PROTOC_BINARIES)
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_copy_tools(TOOL_NAMES protoc AUTO_CLEAN)
else()
- vcpkg_copy_tools(TOOL_NAMES protoc protoc-3.15.8.0 AUTO_CLEAN)
+ vcpkg_copy_tools(TOOL_NAMES protoc protoc-3.18.0.0 AUTO_CLEAN)
endif()
else()
file(COPY ${CURRENT_HOST_INSTALLED_DIR}/tools/${PORT} DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
diff --git a/ports/protobuf/vcpkg.json b/ports/protobuf/vcpkg.json
index 40b557dd3..c75206275 100644
--- a/ports/protobuf/vcpkg.json
+++ b/ports/protobuf/vcpkg.json
@@ -1,7 +1,6 @@
{
"name": "protobuf",
- "version-semver": "3.15.8",
- "port-version": 4,
+ "version-semver": "3.18.0",
"description": "Protocol Buffers - Google's data interchange format",
"homepage": "https://github.com/protocolbuffers/protobuf",
"dependencies": [