Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[protobuf] Update to 3.21.2 #24400

Merged
merged 16 commits into from
Jul 7, 2022
39 changes: 13 additions & 26 deletions ports/protobuf/fix-static-build.patch
Original file line number Diff line number Diff line change
@@ -1,26 +1,13 @@
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 51e8478..64347c4 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -182,7 +182,7 @@ else (protobuf_BUILD_SHARED_LIBS)
# making programmatic control difficult. Prefer the functionality in newer
# CMake versions when available.
if(CMAKE_VERSION VERSION_GREATER 3.15 OR CMAKE_VERSION VERSION_EQUAL 3.15)
- set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded$<$<CONFIG:Debug>:Debug>)
+
else()
# In case we are building static libraries, link also the runtime library statically
# so that MSVCR*.DLL is not required at runtime.
diff --git a/cmake/install.cmake b/cmake/install.cmake
index 4e1c5de..d3aa865 100644
--- a/cmake/install.cmake
+++ b/cmake/install.cmake
@@ -32,7 +32,7 @@ if (protobuf_BUILD_PROTOC_BINARIES)
install(TARGETS protoc EXPORT protobuf-targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc
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
PROPERTY INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
elseif (APPLE)
diff --git a/cmake/install.cmake b/cmake/install.cmake
index 4e1c5de..d3aa865 100644
--- a/cmake/install.cmake
+++ b/cmake/install.cmake
@@ -32,7 +32,7 @@ if (protobuf_BUILD_PROTOC_BINARIES)
install(TARGETS protoc EXPORT protobuf-targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc
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
PROPERTY INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
elseif (APPLE)
8 changes: 4 additions & 4 deletions ports/protobuf/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO protocolbuffers/protobuf
REF v3.19.4
SHA512 2653b9852e5ac69f1de9b6ac02887c366aa0a9efd2b29e53135f61a9a10f5a1b5853a8c4cbb3658f519dfdbde9f32c547c39751ab417f123162b08be9e76c9e1
REF 21027a27c4c2ec1000859ccbcfff46d83b16e1ed #v3.20.1
SHA512 a8333697109beb7fec49f8c9998231937e1798cb7f7e026a79363d9ac432007ed56c76931cd2034fc0b119e09cfe2076ce0ca2c163114dc8938174c0010592b7
HEAD_REF master
PATCHES
fix-static-build.patch
Expand Down Expand Up @@ -31,7 +31,7 @@ if (VCPKG_DOWNLOAD_MODE)
endif()

vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}/cmake
SOURCE_PATH "${SOURCE_PATH}/cmake"
OPTIONS
-Dprotobuf_BUILD_SHARED_LIBS=${protobuf_BUILD_SHARED_LIBS}
-Dprotobuf_MSVC_STATIC_RUNTIME=${protobuf_MSVC_STATIC_RUNTIME}
Expand Down Expand Up @@ -77,7 +77,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.19.4.0 AUTO_CLEAN)
vcpkg_copy_tools(TOOL_NAMES protoc protoc-3.20.1.0 AUTO_CLEAN)
endif()
else()
file(COPY "${CURRENT_HOST_INSTALLED_DIR}/tools/${PORT}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools")
Expand Down
2 changes: 1 addition & 1 deletion ports/protobuf/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "protobuf",
"version-semver": "3.19.4",
"version-semver": "3.20.1",
"description": "Protocol Buffers - Google's data interchange format",
"homepage": "https://github.com/protocolbuffers/protobuf",
"license": "BSD-3-Clause",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5565,7 +5565,7 @@
"port-version": 0
},
"protobuf": {
"baseline": "3.19.4",
"baseline": "3.20.1",
"port-version": 0
},
"protobuf-c": {
Expand Down
5 changes: 5 additions & 0 deletions versions/p-/protobuf.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b72eec8791779a3c922d772b037c8a9ace40e04b",
"version-semver": "3.20.1",
"port-version": 0
},
{
"git-tree": "984039810172eb397ca0ec6d426d60764d6dfe46",
"version-semver": "3.19.4",
Expand Down