[protobuf] Update to 3.21.2 (#24400)

* [protobuf] Update to 3.20.1

* x-add-version

* [protobuf] Fix Linux build error

* x-add-version

* update protobuf to 3.21.2 and fix build error

* x-add-version

* Update protobuf.json

* add version

* x-add-version

* fix gazebo build error

* x-add-version

* update gazebo version

* update versions db

Co-authored-by: Lily Wang <v-lilywang@microsoft.com>
Co-authored-by: Victor Romero <viromer@microsoft.com>
This commit is contained in:
LilyWangLL 2022-07-07 10:21:54 -07:00 committed by GitHub
parent cf287a6af9
commit 087ef910dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 162 additions and 49 deletions

View File

@ -1,3 +1,9 @@
vcpkg_download_distfile(gazebo3211
URLS "https://patch-diff.githubusercontent.com/raw/osrf/gazebo/pull/3211.diff"
FILENAME "gazebo3211.diff"
SHA512 761e254866d4705acc0b81479285f979c436b3b611739a207a575031d8a8daba48de4fc0c8de5edb9a9f89725586c5caeef9e6e1e3d63a2d961ca09df974f7de
)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO osrf/gazebo
@ -6,6 +12,7 @@ vcpkg_from_github(
HEAD_REF gazebo11
PATCHES
0001-Fix-deps.patch
${gazebo3211}
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS

View File

@ -1,7 +1,7 @@
{
"name": "gazebo",
"version-date": "2022-01-20",
"port-version": 2,
"port-version": 3,
"description": "Open source robotics simulator.",
"homepage": "http://gazebosim.org",
"license": "Apache-2.0",

View File

@ -0,0 +1,29 @@
diff --git a/include/ignition/msgs/Generator.hh b/include/ignition/msgs/Generator.hh
index 62d77c6..5785e51 100644
--- a/include/ignition/msgs/Generator.hh
+++ b/include/ignition/msgs/Generator.hh
@@ -43,9 +43,9 @@ class Generator : public CodeGenerator
/// \param[in] _generatorContext Output directory.
/// \param[in] _error Unused string value
public: virtual bool Generate(const FileDescriptor *_file,
- const string &_parameter,
+ const std::string &_parameter,
OutputDirectory *_generatorContext,
- string *_error) const;
+ std::string *_error) const;
// private: GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Generator);
};
diff --git a/src/Generator.cc b/src/Generator.cc
index f703fb8..922d637 100644
--- a/src/Generator.cc
+++ b/src/Generator.cc
@@ -67,7 +67,7 @@ Generator::~Generator()
/////////////////////////////////////////////////
bool Generator::Generate(const FileDescriptor *_file,
- const string &/*_parameter*/,
+ const std::string &/*_parameter*/,
OutputDirectory *_generatorContext,
std::string * /*_error*/) const
{

View File

@ -18,4 +18,6 @@ ignition_modular_library(NAME msgs
REF ignition-msgs_1.0.0
SHA512 18475cc76cc3b58e451faf7a57a0145a9b419cf3e4312627202d96982b066df48cbabcc9991b79a176c5180b90f019dc30114286ad5562c483759052cf63d945
# Fix linking order of protobuf libraries (backport of https://bitbucket.org/ignitionrobotics/ign-msgs/pull-requests/151)
PATCHES fix-protobuf-static-link-order.patch)
PATCHES
fix-protobuf-static-link-order.patch
fix-Add_std_string.patch)

View File

@ -1,9 +1,9 @@
{
"name": "ignition-msgs1",
"version": "1.0.0",
"port-version": 5,
"port-version": 6,
"description": "Middleware protobuf messages for robotics",
"license": null,
"license": "Apache-2.0",
"dependencies": [
"ignition-cmake0",
"ignition-math4",

View File

@ -0,0 +1,29 @@
diff --git a/src/Generator.cc b/src/Generator.cc
index 3729ad4..099a46b 100644
--- a/src/Generator.cc
+++ b/src/Generator.cc
@@ -67,7 +67,7 @@ Generator::~Generator()
/////////////////////////////////////////////////
bool Generator::Generate(const FileDescriptor *_file,
- const string &/*_parameter*/,
+ const std::string &/*_parameter*/,
OutputDirectory *_generatorContext,
std::string * /*_error*/) const
{
diff --git a/src/Generator.hh b/src/Generator.hh
index c0f2336..6132274 100644
--- a/src/Generator.hh
+++ b/src/Generator.hh
@@ -44,9 +44,9 @@ class Generator : public CodeGenerator
/// \param[in] _generatorContext Output directory.
/// \param[in] _error Unused string value
public: virtual bool Generate(const FileDescriptor *_file,
- const string &_parameter,
+ const std::string &_parameter,
OutputDirectory *_generatorContext,
- string *_error) const;
+ std::string *_error) const;
// private: GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Generator);
};

View File

@ -5,4 +5,5 @@ ignition_modular_library(NAME msgs
VERSION "5.3.0"
SHA512 645ae5317fb4c3c1b452e98c3581363fc939b5b963dae8a2097bcee97584819bd80357397d88728c5917142dd4ac9beecc335862df44fc06a46d8aa62c54e389
PATCHES
"01-protobuf.patch")
"01-protobuf.patch"
"02-Add_std_string.patch")

View File

@ -1,9 +1,9 @@
{
"name": "ignition-msgs5",
"version": "5.3.0",
"port-version": 5,
"port-version": 6,
"description": "Middleware protobuf messages for robotics",
"license": null,
"license": "Apache-2.0",
"supports": "!(arm | uwp)",
"dependencies": [
"ignition-cmake2",

View File

@ -0,0 +1,29 @@
diff --git a/src/Generator.cc b/src/Generator.cc
index d490b5a..4265845 100644
--- a/src/Generator.cc
+++ b/src/Generator.cc
@@ -67,7 +67,7 @@ Generator::~Generator()
/////////////////////////////////////////////////
bool Generator::Generate(const FileDescriptor *_file,
- const string &/*_parameter*/,
+ const std::string &/*_parameter*/,
OutputDirectory *_generatorContext,
std::string * /*_error*/) const
{
diff --git a/src/Generator.hh b/src/Generator.hh
index c0f2336..6132274 100644
--- a/src/Generator.hh
+++ b/src/Generator.hh
@@ -44,9 +44,9 @@ class Generator : public CodeGenerator
/// \param[in] _generatorContext Output directory.
/// \param[in] _error Unused string value
public: virtual bool Generate(const FileDescriptor *_file,
- const string &_parameter,
+ const std::string &_parameter,
OutputDirectory *_generatorContext,
- string *_error) const;
+ std::string *_error) const;
// private: GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Generator);
};

View File

@ -3,4 +3,5 @@
ignition_modular_library(NAME msgs
VERSION "6.0.0"
SHA512 d7b76b61d37bc4bb2fd1319e2e2d8313fbcc52f51253b7c487bcdb7dabffcf50653fc5c709eb356d8b6ae20500c1fd32ffabc1fcfb28dd14346a10030fb6cd46)
SHA512 d7b76b61d37bc4bb2fd1319e2e2d8313fbcc52f51253b7c487bcdb7dabffcf50653fc5c709eb356d8b6ae20500c1fd32ffabc1fcfb28dd14346a10030fb6cd46
PATCHES 01-Add_std_string.patch)

View File

@ -1,9 +1,9 @@
{
"name": "ignition-msgs6",
"version": "6.0.0",
"port-version": 4,
"port-version": 5,
"description": "Middleware protobuf messages for robotics",
"license": null,
"license": "Apache-2.0",
"supports": "!(arm | uwp)",
"dependencies": [
"ignition-cmake2",

View File

@ -1,11 +1,12 @@
diff --git a/src/google/protobuf/compiler/command_line_interface.cc b/src/google/protobuf/compiler/command_line_interface.cc
index f192ae6..22900ed 100644
index 5e9a2c4..8eaa6e0 100644
--- a/src/google/protobuf/compiler/command_line_interface.cc
+++ b/src/google/protobuf/compiler/command_line_interface.cc
@@ -260,11 +260,15 @@ void AddDefaultProtoPaths(
@@ -261,12 +261,15 @@ void AddDefaultProtoPaths(
std::pair<std::string, std::string>("", path + "/include"));
return;
}
// Check if the upper level directory has an "include" subdirectory.
- // Check if the upper level directory has an "include" subdirectory.
+ // change "'$/bin' is next to 'include'" assumption to "'$/bin/tools' is next to 'include'"
+ for (int i = 0; i < 2; i++)
+ {

View File

@ -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 825cb25..4f453d6 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)

View File

@ -1,8 +1,10 @@
set(version 3.21.2)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO protocolbuffers/protobuf
REF v3.19.4
SHA512 2653b9852e5ac69f1de9b6ac02887c366aa0a9efd2b29e53135f61a9a10f5a1b5853a8c4cbb3658f519dfdbde9f32c547c39751ab417f123162b08be9e76c9e1
REF 839b18b1ba42639fedecfd751102afcc5736b5d4 #v3.21.2
SHA512 41503e70094ea6a8355c3ef16cfd998b38edb99f3d98e27be197583d42933a6805566e3efc7311af7453bb3d40d51eb589c67324676a31ec86b3ce80000bcb98
HEAD_REF master
PATCHES
fix-static-build.patch
@ -31,7 +33,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}
@ -77,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.19.4.0 AUTO_CLEAN)
vcpkg_copy_tools(TOOL_NAMES protoc protoc-${version}.0 AUTO_CLEAN)
endif()
else()
file(COPY "${CURRENT_HOST_INSTALLED_DIR}/tools/${PORT}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools")

View File

@ -1,6 +1,6 @@
{
"name": "protobuf",
"version-semver": "3.19.4",
"version-semver": "3.21.2",
"description": "Protocol Buffers - Google's data interchange format",
"homepage": "https://github.com/protocolbuffers/protobuf",
"license": "BSD-3-Clause",

View File

@ -2458,7 +2458,7 @@
},
"gazebo": {
"baseline": "2022-01-20",
"port-version": 2
"port-version": 3
},
"gcem": {
"baseline": "1.14.1",
@ -2914,15 +2914,15 @@
},
"ignition-msgs1": {
"baseline": "1.0.0",
"port-version": 5
"port-version": 6
},
"ignition-msgs5": {
"baseline": "5.3.0",
"port-version": 5
"port-version": 6
},
"ignition-msgs6": {
"baseline": "6.0.0",
"port-version": 4
"port-version": 5
},
"ignition-plugin1": {
"baseline": "1.1.0",
@ -5637,7 +5637,7 @@
"port-version": 0
},
"protobuf": {
"baseline": "3.19.4",
"baseline": "3.21.2",
"port-version": 0
},
"protobuf-c": {

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "094ba2b47c08f30d45b33081f8b2b3790b2ec070",
"version-date": "2022-01-20",
"port-version": 3
},
{
"git-tree": "324403bb31aad7705e0f444e9c49f2b11417b9b0",
"version-date": "2022-01-20",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "61644519b91178792399cda9a6f03cb8d7651eaf",
"version": "1.0.0",
"port-version": 6
},
{
"git-tree": "b906441e45012934421ddd0ad823bb7324939dd8",
"version": "1.0.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "a7de105c1d93f5c86e6ee624d65fe1bd8d9a2beb",
"version": "5.3.0",
"port-version": 6
},
{
"git-tree": "ca89a878842c0d94483430295c59f9c24eb607bb",
"version": "5.3.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "809e114122aec8103638b9c376b883f59376b1a1",
"version": "6.0.0",
"port-version": 5
},
{
"git-tree": "a15e3cd08c8481cb639dc9b741ea55df597f6cf8",
"version": "6.0.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "8ae2a5d57f7d3bf934e4d773406cd0a323600031",
"version-semver": "3.21.2",
"port-version": 0
},
{
"git-tree": "984039810172eb397ca0ec6d426d60764d6dfe46",
"version-semver": "3.19.4",