diff --git a/ports/arcus/0001-fix-protobuf-deprecated.patch b/ports/arcus/0001-fix-protobuf-deprecated.patch index a40da846dc..81980a454e 100644 --- a/ports/arcus/0001-fix-protobuf-deprecated.patch +++ b/ports/arcus/0001-fix-protobuf-deprecated.patch @@ -1,3 +1,16 @@ +diff --git a/src/MessageTypeStore.cpp b/src/MessageTypeStore.cpp +index 382a138..5f09122 100644 +--- a/src/MessageTypeStore.cpp ++++ b/src/MessageTypeStore.cpp +@@ -52,7 +52,7 @@ class ErrorCollector : public google::protobuf::compiler::MultiFileErrorCollecto + public: + ErrorCollector() : _error_count(0) { } + +- void AddError(const std::string& filename, int line, int column, const std::string& message) override ++ void RecordError(absl::string_view filename, int line, int column, absl::string_view message) override + { + _stream << "[" << filename << " (" << line << "," << column << ")] " << message << std::endl; + _error_count++; diff --git a/src/Socket_p.h b/src/Socket_p.h index 9c3c084..9ccabda 100644 --- a/src/Socket_p.h diff --git a/ports/arcus/vcpkg.json b/ports/arcus/vcpkg.json index 91080aeb69..61a48d4a83 100644 --- a/ports/arcus/vcpkg.json +++ b/ports/arcus/vcpkg.json @@ -1,7 +1,7 @@ { "name": "arcus", "version-semver": "4.10.0", - "port-version": 3, + "port-version": 4, "description": "This library contains C++ bindings for creating a socket in a thread and using this socket to send and receive messages based on the Protocol Buffers library.", "homepage": "https://github.com/Ultimaker/libArcus", "supports": "!uwp", diff --git a/ports/brpc/fix-compilation-error.patch b/ports/brpc/fix-compilation-error.patch deleted file mode 100644 index 32091601e8..0000000000 --- a/ports/brpc/fix-compilation-error.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/src/brpc/serialized_response.h b/src/brpc/serialized_response.h -index 4e7d86e..3b33cb2 100644 ---- a/src/brpc/serialized_response.h -+++ b/src/brpc/serialized_response.h -@@ -53,7 +53,7 @@ public: - void Clear() override; - bool IsInitialized() const override; - int ByteSize() const; -- int GetCachedSize() const override { return (int)_serialized.size(); } -+ int GetCachedSize() const PB_422_OVERRIDE { return (int)_serialized.size(); } - butil::IOBuf& serialized_data() { return _serialized; } - const butil::IOBuf& serialized_data() const { return _serialized; } - -@@ -71,7 +71,7 @@ private: - void MergeFrom(const SerializedResponse& from); - void SharedCtor(); - void SharedDtor(); -- void SetCachedSize(int size) const override; -+ void SetCachedSize(int size) const PB_422_OVERRIDE; - - private: - butil::IOBuf _serialized; diff --git a/ports/brpc/portfile.cmake b/ports/brpc/portfile.cmake index c7131bbffa..ee474515da 100644 --- a/ports/brpc/portfile.cmake +++ b/ports/brpc/portfile.cmake @@ -1,14 +1,20 @@ +vcpkg_download_distfile( + PROTOBUF_V5_PATCH + URLS https://github.com/apache/brpc/commit/282776acaf2c894791d2b5d4c294a28cfa2d4138.patch?full_index=1 + SHA512 2e62617ed56047a037f0e673a7dcc43e02c9bff46b6c9d1ae0098e4c73630f1a9a67c113e770bf1cc12d86d273f88f504f83af1ed69ee771f35cccac1a472990 + FILENAME 282776acaf2c894791d2b5d4c294a28cfa2d4138.patch +) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/brpc REF "${VERSION}" - SHA512 cc1a373d94752c43376a731b4f08dc559bffcd67bdad7e22268a2a20a1034b40d658d591d946d4c1aa94287060146eb041626e0354188ee7dc41554512d72490 + SHA512 eb2f9528f055a31db5b2bbf57d302b17d2229d387c3bc6afd7dec5f3d21d1f882275d43d49c04cb5190442c2daa746ac2a174b3741d943e531ebbbd82526d510 HEAD_REF master PATCHES fix-build.patch fix-warnings.patch - protobuf.patch - fix-compilation-error.patch + ${PROTOBUF_V5_PATCH} ) vcpkg_cmake_configure( diff --git a/ports/brpc/protobuf.patch b/ports/brpc/protobuf.patch deleted file mode 100644 index f8069bbd71..0000000000 --- a/ports/brpc/protobuf.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/src/brpc/thrift_message.cpp b/src/brpc/thrift_message.cpp -index ed3d7557..7b9d210a 100644 ---- a/src/brpc/thrift_message.cpp -+++ b/src/brpc/thrift_message.cpp -@@ -22,7 +22,6 @@ - #include - #include "butil/logging.h" - --#include - #include - #include - #include -diff --git a/src/brpc/thrift_message.h b/src/brpc/thrift_message.h -index 53041c85..471bafb5 100644 ---- a/src/brpc/thrift_message.h -+++ b/src/brpc/thrift_message.h -@@ -101,7 +101,7 @@ public: - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const PB_310_OVERRIDE; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const PB_310_OVERRIDE; -- int GetCachedSize() const override { return ByteSize(); } -+ int GetCachedSize() const { return ByteSize(); } - - protected: - ::google::protobuf::Metadata GetMetadata() const override; diff --git a/ports/brpc/vcpkg.json b/ports/brpc/vcpkg.json index ae2372a16b..34badb8fdd 100644 --- a/ports/brpc/vcpkg.json +++ b/ports/brpc/vcpkg.json @@ -1,6 +1,6 @@ { "name": "brpc", - "version": "1.10.0", + "version": "1.11.0", "description": "Industrial-grade RPC framework used throughout Baidu, with 1,000,000+ instances and thousands kinds of services, called \"baidu-rpc\" inside Baidu.", "homepage": "https://github.com/apache/brpc", "license": "Apache-2.0", diff --git a/ports/grpc/00003-undef-base64-macro.patch b/ports/grpc/00003-undef-base64-macro.patch deleted file mode 100644 index be182659d4..0000000000 --- a/ports/grpc/00003-undef-base64-macro.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/core/lib/transport/transport.cc b/src/core/lib/transport/transport.cc -index 5d74ec2..89494b5 100644 ---- a/src/core/lib/transport/transport.cc -+++ b/src/core/lib/transport/transport.cc -@@ -77,6 +77,8 @@ void grpc_stream_ref_init(grpc_stream_refcount* refcount, int /*initial_refs*/, - : nullptr); - } - -+#undef move64 -+ - static void move64bits(uint64_t* from, uint64_t* to) { - *to += *from; - *from = 0; diff --git a/ports/grpc/00004-link-gdi32-on-windows.patch b/ports/grpc/00004-link-gdi32-on-windows.patch index a3af55facc..cb4ebad2a4 100644 --- a/ports/grpc/00004-link-gdi32-on-windows.patch +++ b/ports/grpc/00004-link-gdi32-on-windows.patch @@ -1,13 +1,13 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index fce68b9..220f251 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -432,7 +432,7 @@ if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/xds) - endif() - - if(WIN32) -- set(_gRPC_ALLTARGETS_LIBRARIES ${_gRPC_ALLTARGETS_LIBRARIES} ws2_32 crypt32) -+ set(_gRPC_ALLTARGETS_LIBRARIES ${_gRPC_ALLTARGETS_LIBRARIES} wsock32 ws2_32 crypt32 gdi32) - set(_gRPC_STATIC_WIN32 STATIC) - endif() - +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2f633092ae..43fa8f6d97 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -481,7 +481,7 @@ if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/xds AND gRPC_DOWNLOAD_ARC + endif() + + if(WIN32) +- set(_gRPC_ALLTARGETS_LIBRARIES ${_gRPC_ALLTARGETS_LIBRARIES} ws2_32 crypt32) ++ set(_gRPC_ALLTARGETS_LIBRARIES ${_gRPC_ALLTARGETS_LIBRARIES} wsock32 ws2_32 crypt32 gdi32) + set(_gRPC_STATIC_WIN32 STATIC) + endif() + diff --git a/ports/grpc/00005-fix-uwp-error.patch b/ports/grpc/00005-fix-uwp-error.patch index 69a3e7d646..2070760803 100644 --- a/ports/grpc/00005-fix-uwp-error.patch +++ b/ports/grpc/00005-fix-uwp-error.patch @@ -1,47 +1,47 @@ -diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.cc b/src/core/ext/transport/chttp2/transport/hpack_parser.cc -index 31bf464..d1007e4 100644 ---- a/src/core/ext/transport/chttp2/transport/hpack_parser.cc -+++ b/src/core/ext/transport/chttp2/transport/hpack_parser.cc -@@ -689,7 +689,7 @@ class HPackParser::Parser { - } - - void GPR_ATTRIBUTE_NOINLINE LogHeader(const HPackTable::Memento& memento) { -- const char* type; -+ const char* type = nullptr; - switch (log_info_.type) { - case LogInfo::kHeaders: - type = "HDR"; -diff --git a/src/core/lib/slice/slice.cc b/src/core/lib/slice/slice.cc -index 6180ef1..a8e8110 100644 ---- a/src/core/lib/slice/slice.cc -+++ b/src/core/lib/slice/slice.cc -@@ -188,6 +188,7 @@ grpc_slice grpc_slice_from_moved_buffer(grpc_core::UniquePtr p, - size_t len) { - uint8_t* ptr = reinterpret_cast(p.get()); - grpc_slice slice; -+ memset(&slice, 0, sizeof(grpc_slice)); - if (len <= sizeof(slice.data.inlined.bytes)) { - slice.refcount = nullptr; - slice.data.inlined.length = len; -@@ -206,7 +207,7 @@ grpc_slice grpc_slice_from_moved_string(grpc_core::UniquePtr p) { - } - - grpc_slice grpc_slice_from_cpp_string(std::string str) { -- grpc_slice slice; -+ grpc_slice slice = { 0 }; - if (str.size() <= sizeof(slice.data.inlined.bytes)) { - slice.refcount = nullptr; - slice.data.inlined.length = str.size(); -diff --git a/src/core/lib/surface/server.cc b/src/core/lib/surface/server.cc -index 3dda49d..202caa5 100644 ---- a/src/core/lib/surface/server.cc -+++ b/src/core/lib/surface/server.cc -@@ -1057,7 +1057,7 @@ grpc_call_error Server::QueueRequestedCall(size_t cq_idx, RequestedCall* rc) { - FailCall(cq_idx, rc, GRPC_ERROR_CREATE("Server Shutdown")); - return GRPC_CALL_OK; - } -- RequestMatcherInterface* rm; -+ RequestMatcherInterface* rm = nullptr; - switch (rc->type) { - case RequestedCall::Type::BATCH_CALL: - rm = unregistered_request_matcher_.get(); +diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.cc b/src/core/ext/transport/chttp2/transport/hpack_parser.cc +index 84b4e86279..4921002887 100644 +--- a/src/core/ext/transport/chttp2/transport/hpack_parser.cc ++++ b/src/core/ext/transport/chttp2/transport/hpack_parser.cc +@@ -688,7 +688,7 @@ class HPackParser::Parser { + } + + void GPR_ATTRIBUTE_NOINLINE LogHeader(const HPackTable::Memento& memento) { +- const char* type; ++ const char* type = nullptr; + switch (log_info_.type) { + case LogInfo::kHeaders: + type = "HDR"; +diff --git a/src/core/lib/slice/slice.cc b/src/core/lib/slice/slice.cc +index f2d49e0bf4..c86a75f1a3 100644 +--- a/src/core/lib/slice/slice.cc ++++ b/src/core/lib/slice/slice.cc +@@ -189,6 +189,7 @@ grpc_slice grpc_slice_from_moved_buffer(grpc_core::UniquePtr p, + size_t len) { + uint8_t* ptr = reinterpret_cast(p.get()); + grpc_slice slice; ++ memset(&slice, 0, sizeof(grpc_slice)); + if (len <= sizeof(slice.data.inlined.bytes)) { + slice.refcount = nullptr; + slice.data.inlined.length = len; +@@ -207,7 +208,7 @@ grpc_slice grpc_slice_from_moved_string(grpc_core::UniquePtr p) { + } + + grpc_slice grpc_slice_from_cpp_string(std::string str) { +- grpc_slice slice; ++ grpc_slice slice = { 0 }; + if (str.size() <= sizeof(slice.data.inlined.bytes)) { + slice.refcount = nullptr; + slice.data.inlined.length = str.size(); +diff --git a/src/core/server/server.cc b/src/core/server/server.cc +index c4796d6ae9..6a0289d180 100644 +--- a/src/core/server/server.cc ++++ b/src/core/server/server.cc +@@ -1284,7 +1284,7 @@ grpc_call_error Server::QueueRequestedCall(size_t cq_idx, RequestedCall* rc) { + FailCall(cq_idx, rc, GRPC_ERROR_CREATE("Server Shutdown")); + return GRPC_CALL_OK; + } +- RequestMatcherInterface* rm; ++ RequestMatcherInterface* rm = nullptr; + switch (rc->type) { + case RequestedCall::Type::BATCH_CALL: + rm = unregistered_request_matcher_.get(); diff --git a/ports/grpc/00006-utf8-range.patch b/ports/grpc/00006-utf8-range.patch new file mode 100644 index 0000000000..0f69b423a2 --- /dev/null +++ b/ports/grpc/00006-utf8-range.patch @@ -0,0 +1,110 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2008859625..73462d8285 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3931,7 +3931,7 @@ if(gRPC_INSTALL) + ) + endif() + +- ++if(0) + add_library(utf8_range_lib + third_party/utf8_range/utf8_range.c + ) +@@ -3981,6 +3981,7 @@ if(gRPC_INSTALL) + ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} + ) + endif() ++endif() + + if(gRPC_BUILD_TESTS) + +@@ -37649,9 +37650,9 @@ generate_pkgconfig( + "high performance general RPC framework" + "${gRPC_CORE_VERSION}" + "absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_check absl_cleanup absl_config absl_cord absl_core_headers absl_flags absl_flags_marshalling absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_log absl_log_globals absl_log_severity absl_memory absl_no_destructor absl_optional absl_random_bit_gen_ref absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant gpr" +- "libcares openssl re2 zlib" ++ "libcares openssl re2 zlib utf8_range" + "-lgrpc" +- "-laddress_sorting -lupb_textformat_lib -lupb_json_lib -lupb_message_lib -lupb_mem_lib -lupb_base_lib -lutf8_range_lib" ++ "-laddress_sorting -lupb_textformat_lib -lupb_json_lib -lupb_message_lib -lupb_mem_lib -lupb_base_lib" + "grpc.pc") + + # grpc_unsecure .pc file +@@ -37660,9 +37661,9 @@ generate_pkgconfig( + "high performance general RPC framework without SSL" + "${gRPC_CORE_VERSION}" + "absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_check absl_cleanup absl_config absl_cord absl_core_headers absl_flags absl_flags_marshalling absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_log absl_log_globals absl_log_severity absl_memory absl_no_destructor absl_optional absl_random_bit_gen_ref absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant gpr" +- "libcares zlib" ++ "libcares zlib utf8_range" + "-lgrpc_unsecure" +- "-laddress_sorting -lupb_message_lib -lupb_mem_lib -lupb_base_lib -lutf8_range_lib" ++ "-laddress_sorting -lupb_message_lib -lupb_mem_lib -lupb_base_lib" + "grpc_unsecure.pc") + + # grpc++ .pc file +@@ -37671,9 +37672,9 @@ generate_pkgconfig( + "C++ wrapper for gRPC" + "${gRPC_CPP_VERSION}" + "absl_absl_check absl_absl_log absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_check absl_cleanup absl_config absl_cord absl_core_headers absl_flags absl_flags_marshalling absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_log absl_log_globals absl_log_severity absl_memory absl_no_destructor absl_optional absl_random_bit_gen_ref absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant gpr grpc" +- "libcares openssl re2 zlib" ++ "libcares openssl re2 zlib utf8_range" + "-lgrpc++" +- "-laddress_sorting -lupb_textformat_lib -lupb_json_lib -lupb_message_lib -lupb_mem_lib -lupb_base_lib -lutf8_range_lib" ++ "-laddress_sorting -lupb_textformat_lib -lupb_json_lib -lupb_message_lib -lupb_mem_lib -lupb_base_lib" + "grpc++.pc") + + # grpc++_unsecure .pc file +@@ -37682,18 +37683,20 @@ generate_pkgconfig( + "C++ wrapper for gRPC without SSL" + "${gRPC_CPP_VERSION}" + "absl_absl_check absl_absl_log absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_check absl_cleanup absl_config absl_cord absl_core_headers absl_flags absl_flags_marshalling absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_log absl_log_globals absl_log_severity absl_memory absl_no_destructor absl_optional absl_random_bit_gen_ref absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant gpr grpc_unsecure" +- "libcares zlib" ++ "libcares zlib utf8_range" + "-lgrpc++_unsecure" +- "-laddress_sorting -lupb_message_lib -lupb_mem_lib -lupb_base_lib -lutf8_range_lib" ++ "-laddress_sorting -lupb_message_lib -lupb_mem_lib -lupb_base_lib" + "grpc++_unsecure.pc") + ++if(gRPC_BUILD_GRPCPP_OTEL_PLUGIN) + # grpcpp_otel_plugin .pc file + generate_pkgconfig( + "gRPC++ OpenTelemetry Plugin" + "OpenTelemetry Plugin for gRPC C++" + "${gRPC_CPP_VERSION}" + "absl_absl_check absl_absl_log absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_check absl_cleanup absl_config absl_cord absl_core_headers absl_flags absl_flags_marshalling absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_log absl_log_globals absl_log_severity absl_memory absl_no_destructor absl_optional absl_random_bit_gen_ref absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant gpr grpc grpc++ opentelemetry_api" +- "libcares openssl re2 zlib" ++ "libcares openssl re2 zlib utf8_range" + "-lgrpcpp_otel_plugin" +- "-laddress_sorting -lupb_textformat_lib -lupb_json_lib -lupb_message_lib -lupb_mem_lib -lupb_base_lib -lutf8_range_lib" ++ "-laddress_sorting -lupb_textformat_lib -lupb_json_lib -lupb_message_lib -lupb_mem_lib -lupb_base_lib" + "grpcpp_otel_plugin.pc") ++endif() +diff --git a/cmake/gRPCConfig.cmake.in b/cmake/gRPCConfig.cmake.in +index d552e0bb4e..5751f503ba 100644 +--- a/cmake/gRPCConfig.cmake.in ++++ b/cmake/gRPCConfig.cmake.in +@@ -9,6 +9,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/modules) + @_gRPC_FIND_ABSL@ + @_gRPC_FIND_RE2@ + @_gRPC_FIND_OPENTELEMETRY@ ++@_gRPC_FIND_UTF8_RANGE@ + + # Targets + include(${CMAKE_CURRENT_LIST_DIR}/gRPCTargets.cmake) +diff --git a/cmake/upb.cmake b/cmake/upb.cmake +index 9156e5f48f..5323b5f10d 100644 +--- a/cmake/upb.cmake ++++ b/cmake/upb.cmake +@@ -14,7 +14,9 @@ + + set(UPB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/upb) + +-set(_gRPC_UPB_INCLUDE_DIR "${UPB_ROOT_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/third_party/utf8_range") ++set(_gRPC_UPB_INCLUDE_DIR "${UPB_ROOT_DIR}") + set(_gRPC_UPB_GRPC_GENERATED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-gen" "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upbdefs-gen") + + set(_gRPC_UPB_LIBRARIES upb) ++set(_gRPC_FIND_UTF8_RANGE "find_dependency(utf8_range CONFIG)") ++add_library(utf8_range_lib ALIAS utf8_range::utf8_range) +\ No newline at end of file diff --git a/ports/grpc/00009-use-system-upb.patch b/ports/grpc/00009-use-system-upb.patch index 8419504571..d74b414121 100644 --- a/ports/grpc/00009-use-system-upb.patch +++ b/ports/grpc/00009-use-system-upb.patch @@ -1,130 +1,139 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index a3b39a1..8d7c1f6 100644 +index 43fa8f6d97..8c28c3fc32 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -3213,17 +3213,6 @@ add_library(grpc_unsecure - src/core/tsi/local_transport_security.cc - src/core/tsi/transport_security.cc - src/core/tsi/transport_security_grpc.cc -- third_party/upb/upb/message/accessors.c +@@ -3345,16 +3345,6 @@ add_library(grpc_unsecure + src/core/util/json/json_object_loader.cc + src/core/util/json/json_reader.cc + src/core/util/json/json_writer.cc - third_party/upb/upb/mini_descriptor/build_enum.c - third_party/upb/upb/mini_descriptor/decode.c - third_party/upb/upb/mini_descriptor/internal/base92.c - third_party/upb/upb/mini_descriptor/internal/encode.c - third_party/upb/upb/mini_descriptor/link.c - third_party/upb/upb/wire/decode.c -- third_party/upb/upb/wire/decode_fast.c - third_party/upb/upb/wire/encode.c - third_party/upb/upb/wire/eps_copy_input_stream.c +- third_party/upb/upb/wire/internal/decode_fast.c - third_party/upb/upb/wire/reader.c ${gRPC_ADDITIONAL_DLL_SRC} ) -@@ -3456,6 +3445,7 @@ target_link_libraries(gtest +@@ -3593,7 +3583,7 @@ target_link_libraries(gtest + + + endif() +- ++if(0) + add_library(upb_base_lib + third_party/upb/upb/base/status.c + ) +@@ -3644,7 +3634,6 @@ if(gRPC_INSTALL) + ) endif() - -+if(0) # vcpkg upb - add_library(upb ${_gRPC_STATIC_WIN32} - third_party/upb/upb/base/status.c - third_party/upb/upb/mem/alloc.c -@@ -3818,6 +3808,7 @@ if(gRPC_INSTALL) +- + add_library(upb_json_lib ${_gRPC_STATIC_WIN32} + third_party/upb/upb/json/decode.c + third_party/upb/upb/json/encode.c +@@ -3981,6 +3970,7 @@ if(gRPC_INSTALL) ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} ) endif() -+endif() # vcpkg upb ++endif() if(gRPC_BUILD_TESTS) -@@ -5190,25 +5181,6 @@ add_library(grpc_authorization_provider - src/core/tsi/alts/handshaker/transport_security_common_api.cc - src/core/tsi/transport_security.cc +@@ -5416,16 +5406,6 @@ add_library(grpc_authorization_provider src/core/tsi/transport_security_grpc.cc -- third_party/upb/upb/hash/common.c -- third_party/upb/upb/message/accessors.c -- third_party/upb/upb/message/array.c -- third_party/upb/upb/message/map.c -- third_party/upb/upb/message/map_sorter.c -- third_party/upb/upb/message/message.c + src/core/util/json/json_reader.cc + src/core/util/json/json_writer.cc - third_party/upb/upb/mini_descriptor/build_enum.c - third_party/upb/upb/mini_descriptor/decode.c - third_party/upb/upb/mini_descriptor/internal/base92.c - third_party/upb/upb/mini_descriptor/internal/encode.c - third_party/upb/upb/mini_descriptor/link.c -- third_party/upb/upb/mini_table/extension_registry.c -- third_party/upb/upb/mini_table/internal/message.c -- third_party/upb/upb/mini_table/message.c - third_party/upb/upb/wire/decode.c -- third_party/upb/upb/wire/decode_fast.c - third_party/upb/upb/wire/encode.c - third_party/upb/upb/wire/eps_copy_input_stream.c +- third_party/upb/upb/wire/internal/decode_fast.c - third_party/upb/upb/wire/reader.c ) target_compile_features(grpc_authorization_provider PUBLIC cxx_std_14) -@@ -30412,9 +30384,9 @@ generate_pkgconfig( +@@ -37649,9 +37629,9 @@ generate_pkgconfig( "high performance general RPC framework" "${gRPC_CORE_VERSION}" - "absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_cleanup absl_cord absl_core_headers absl_flags absl_flags_marshalling absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_memory absl_optional absl_random_bit_gen_ref absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant gpr" + "absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_check absl_cleanup absl_config absl_cord absl_core_headers absl_flags absl_flags_marshalling absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_log absl_log_globals absl_log_severity absl_memory absl_no_destructor absl_optional absl_random_bit_gen_ref absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant gpr" - "libcares openssl re2 zlib" + "libcares openssl re2 zlib utf8_range" "-lgrpc" -- "-laddress_sorting -lupb -lupb_textformat_lib -lupb_json_lib -lutf8_range_lib -lupb_collections_lib" +- "-laddress_sorting -lupb_textformat_lib -lupb_json_lib -lupb_message_lib -lupb_mem_lib -lupb_base_lib -lutf8_range_lib" + "-laddress_sorting -lupb" "grpc.pc") # grpc_unsecure .pc file -@@ -30423,9 +30395,9 @@ generate_pkgconfig( +@@ -37660,9 +37640,9 @@ generate_pkgconfig( "high performance general RPC framework without SSL" "${gRPC_CORE_VERSION}" - "absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_cleanup absl_cord absl_core_headers absl_flags absl_flags_marshalling absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_memory absl_optional absl_random_bit_gen_ref absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant gpr" + "absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_check absl_cleanup absl_config absl_cord absl_core_headers absl_flags absl_flags_marshalling absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_log absl_log_globals absl_log_severity absl_memory absl_no_destructor absl_optional absl_random_bit_gen_ref absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant gpr" - "libcares zlib" + "libcares zlib utf8_range" "-lgrpc_unsecure" -- "-laddress_sorting -lutf8_range_lib -lupb -lupb_collections_lib" +- "-laddress_sorting -lupb_message_lib -lupb_mem_lib -lupb_base_lib -lutf8_range_lib" + "-laddress_sorting -lupb" "grpc_unsecure.pc") # grpc++ .pc file -@@ -30434,9 +30406,9 @@ generate_pkgconfig( +@@ -37671,9 +37651,9 @@ generate_pkgconfig( "C++ wrapper for gRPC" "${gRPC_CPP_VERSION}" - "absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_cleanup absl_cord absl_core_headers absl_flags absl_flags_marshalling absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_memory absl_optional absl_random_bit_gen_ref absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant gpr grpc" + "absl_absl_check absl_absl_log absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_check absl_cleanup absl_config absl_cord absl_core_headers absl_flags absl_flags_marshalling absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_log absl_log_globals absl_log_severity absl_memory absl_no_destructor absl_optional absl_random_bit_gen_ref absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant gpr grpc" - "libcares openssl re2 zlib" + "libcares openssl re2 zlib utf8_range" "-lgrpc++" -- "-laddress_sorting -lupb -lupb_textformat_lib -lupb_json_lib -lutf8_range_lib -lupb_collections_lib" +- "-laddress_sorting -lupb_textformat_lib -lupb_json_lib -lupb_message_lib -lupb_mem_lib -lupb_base_lib -lutf8_range_lib" + "-laddress_sorting -lupb" "grpc++.pc") # grpc++_unsecure .pc file -@@ -30445,7 +30417,7 @@ generate_pkgconfig( +@@ -37682,11 +37662,12 @@ generate_pkgconfig( "C++ wrapper for gRPC without SSL" "${gRPC_CPP_VERSION}" - "absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_cleanup absl_cord absl_core_headers absl_flags absl_flags_marshalling absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_memory absl_optional absl_random_bit_gen_ref absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant gpr grpc_unsecure" + "absl_absl_check absl_absl_log absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_check absl_cleanup absl_config absl_cord absl_core_headers absl_flags absl_flags_marshalling absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_log absl_log_globals absl_log_severity absl_memory absl_no_destructor absl_optional absl_random_bit_gen_ref absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant gpr grpc_unsecure" - "libcares zlib" + "libcares zlib utf8_range" "-lgrpc++_unsecure" -- "-laddress_sorting -lutf8_range_lib -lupb -lupb_collections_lib" +- "-laddress_sorting -lupb_message_lib -lupb_mem_lib -lupb_base_lib -lutf8_range_lib" + "-laddress_sorting -lupb" "grpc++_unsecure.pc") + ++if(gRPC_BUILD_GRPCPP_OTEL_PLUGIN) + # grpcpp_otel_plugin .pc file + generate_pkgconfig( + "gRPC++ OpenTelemetry Plugin" +@@ -37697,3 +37678,4 @@ generate_pkgconfig( + "-lgrpcpp_otel_plugin" + "-laddress_sorting -lupb_textformat_lib -lupb_json_lib -lupb_message_lib -lupb_mem_lib -lupb_base_lib -lutf8_range_lib" + "grpcpp_otel_plugin.pc") ++endif() diff --git a/cmake/gRPCConfig.cmake.in b/cmake/gRPCConfig.cmake.in -index 98d8c6d..7cad2ab 100644 +index d552e0bb4e..d40c07ce7a 100644 --- a/cmake/gRPCConfig.cmake.in +++ b/cmake/gRPCConfig.cmake.in -@@ -8,6 +8,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/modules) - @_gRPC_FIND_CARES@ +@@ -9,6 +9,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/modules) @_gRPC_FIND_ABSL@ @_gRPC_FIND_RE2@ + @_gRPC_FIND_OPENTELEMETRY@ +@_gRPC_FIND_UPB@ # Targets include(${CMAKE_CURRENT_LIST_DIR}/gRPCTargets.cmake) diff --git a/cmake/upb.cmake b/cmake/upb.cmake -index 9156e5f..31324fa 100644 +index 9156e5f48f..3cc7ad4005 100644 --- a/cmake/upb.cmake +++ b/cmake/upb.cmake -@@ -14,7 +14,15 @@ +@@ -14,7 +14,14 @@ set(UPB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/upb) @@ -136,8 +145,7 @@ index 9156e5f..31324fa 100644 + +find_package(upb CONFIG REQUIRED) +set(_gRPC_FIND_UPB "find_dependency(upb CONFIG)") -+add_library(upb_collections_lib ALIAS upb::upb) +add_library(upb_json_lib ALIAS upb::upb) +add_library(upb_textformat_lib ALIAS upb::upb) -+add_library(upb ALIAS upb::upb) ++add_library(upb_message_lib ALIAS upb::upb) +add_library(utf8_range_lib ALIAS utf8_range::utf8_range) diff --git a/ports/grpc/00017-abseil.patch b/ports/grpc/00017-abseil.patch deleted file mode 100644 index 4fd424cd91..0000000000 --- a/ports/grpc/00017-abseil.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc -index dde7570ede..43e06d7a69 100644 ---- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc -+++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc -@@ -32,6 +32,7 @@ - #include "absl/strings/string_view.h" - #include "absl/strings/strip.h" - #include "absl/types/optional.h" -+#include "absl/strings/str_cat.h" - - #include - #include -diff --git a/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc b/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc -index 74f7392af9..656cdc427b 100644 ---- a/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc -+++ b/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc -@@ -21,6 +21,7 @@ - #include "src/core/lib/event_engine/cf_engine/cfstream_endpoint.h" - #include "src/core/lib/event_engine/trace.h" - #include "src/core/lib/gprpp/strerror.h" -+#include "absl/strings/str_cat.h" - - namespace grpc_event_engine { - namespace experimental { -diff --git a/src/core/lib/gprpp/windows/directory_reader.cc b/src/core/lib/gprpp/windows/directory_reader.cc -index 790e213e78..103d68a5a3 100644 ---- a/src/core/lib/gprpp/windows/directory_reader.cc -+++ b/src/core/lib/gprpp/windows/directory_reader.cc -@@ -28,6 +28,7 @@ - - #include "absl/status/statusor.h" - #include "absl/strings/string_view.h" -+#include "absl/strings/str_cat.h" - - #include - diff --git a/ports/grpc/00017-fix-NAN-on-Win11.patch b/ports/grpc/00017-fix-NAN-on-Win11.patch new file mode 100644 index 0000000000..2501507369 --- /dev/null +++ b/ports/grpc/00017-fix-NAN-on-Win11.patch @@ -0,0 +1,17 @@ +diff --git a/third_party/upb/upb/message/internal/message.c b/third_party/upb/upb/message/internal/message.c +index 76f4e3fe5a..09aafb47d9 100644 +--- a/third_party/upb/upb/message/internal/message.c ++++ b/third_party/upb/upb/message/internal/message.c +@@ -17,9 +17,9 @@ + // Must be last. + #include "upb/port/def.inc" + +-const float kUpb_FltInfinity = INFINITY; +-const double kUpb_Infinity = INFINITY; +-const double kUpb_NaN = NAN; ++const float kUpb_FltInfinity = (float)(1.0 / 0.0); ++const double kUpb_Infinity = 1.0 / 0.0; ++const double kUpb_NaN = 0.0 / 0.0; + + bool UPB_PRIVATE(_upb_Message_Realloc)(struct upb_Message* msg, size_t need, + upb_Arena* a) { diff --git a/ports/grpc/00018-fix-windows-event-engine.patch b/ports/grpc/00018-fix-windows-event-engine.patch new file mode 100644 index 0000000000..dc0cffb117 --- /dev/null +++ b/ports/grpc/00018-fix-windows-event-engine.patch @@ -0,0 +1,13 @@ +diff --git a/src/core/lib/event_engine/windows/grpc_polled_fd_windows.cc b/src/core/lib/event_engine/windows/grpc_polled_fd_windows.cc +index 37a8f85cc5..b319f17aaf 100644 +--- a/src/core/lib/event_engine/windows/grpc_polled_fd_windows.cc ++++ b/src/core/lib/event_engine/windows/grpc_polled_fd_windows.cc +@@ -224,7 +224,7 @@ class GrpcPolledFdWindows : public GrpcPolledFd { + // c-ares overloads this recv_from virtual socket function to receive + // data on both UDP and TCP sockets, and from is nullptr for TCP. + if (from != nullptr) { +- CHECK(*from_len <= recv_from_source_addr_len_); ++ CHECK(*from_len >= recv_from_source_addr_len_); + memcpy(from, &recv_from_source_addr_, recv_from_source_addr_len_); + *from_len = recv_from_source_addr_len_; + } diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index 61447bc78b..7e7b1ca8e8 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -6,18 +6,18 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO grpc/grpc REF "v${VERSION}" - SHA512 91c2406ed4198509ac0d5360b3da6898fa4f40f459eb6fff541faa44cc238eed98fd7489e7ef7a80a6f4a318bc5b9130eaa0ba1beaa358d1c074fc82825648ff + SHA512 a930bd9d8d0308f62fdda7ca215321b69a0cca8d8e0ce654b6938cd71dfd568fe63b5dd6ab0ee537e67751211e240b19cc23e07f5927dac318cf9be778d9fec2 HEAD_REF master PATCHES 00001-fix-uwp.patch 00002-static-linking-in-linux.patch - 00003-undef-base64-macro.patch 00004-link-gdi32-on-windows.patch 00005-fix-uwp-error.patch - 00009-use-system-upb.patch + 00006-utf8-range.patch 00015-disable-download-archive.patch 00016-fix-plugin-targets.patch - 00017-abseil.patch + 00017-fix-NAN-on-Win11.patch + 00018-fix-windows-event-engine.patch ) # Ensure de-vendoring file(REMOVE_RECURSE @@ -25,7 +25,6 @@ file(REMOVE_RECURSE "${SOURCE_PATH}/third_party/cares" "${SOURCE_PATH}/third_party/protobuf" "${SOURCE_PATH}/third_party/re2" - "${SOURCE_PATH}/third_party/upb" "${SOURCE_PATH}/third_party/utf8_range" "${SOURCE_PATH}/third_party/zlib" ) @@ -69,6 +68,7 @@ vcpkg_cmake_configure( -DgRPC_INSTALL_CMAKEDIR:STRING=share/grpc "-D_gRPC_PROTOBUF_PROTOC_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/protobuf/protoc${VCPKG_HOST_EXECUTABLE_SUFFIX}" "-DProtobuf_PROTOC_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/protobuf/protoc${VCPKG_HOST_EXECUTABLE_SUFFIX}" + -DgRPC_BUILD_GRPCPP_OTEL_PLUGIN=OFF MAYBE_UNUSED_VARIABLES gRPC_MSVC_STATIC_RUNTIME ) diff --git a/ports/grpc/vcpkg.json b/ports/grpc/vcpkg.json index 16184bded5..82474a3b03 100644 --- a/ports/grpc/vcpkg.json +++ b/ports/grpc/vcpkg.json @@ -1,7 +1,6 @@ { "name": "grpc", - "version-semver": "1.60.0", - "port-version": 1, + "version-semver": "1.65.5", "description": "gRPC is a modern, open source, high-performance remote procedure call (RPC) framework that can run anywhere. gRPC enables client and server applications to communicate transparently, and simplifies the building of connected systems.", "homepage": "https://github.com/grpc/grpc", "license": "Apache-2.0", @@ -25,7 +24,7 @@ "host": true }, "re2", - "upb", + "utf8-range", { "name": "vcpkg-cmake", "host": true diff --git a/ports/openvino/003-protobuf.patch b/ports/openvino/003-protobuf.patch new file mode 100644 index 0000000000..949595a15f --- /dev/null +++ b/ports/openvino/003-protobuf.patch @@ -0,0 +1,13 @@ +diff --git a/thirdparty/dependencies.cmake b/thirdparty/dependencies.cmake +index 9d7b16aeb8..af47fb99ee 100644 +--- a/thirdparty/dependencies.cmake ++++ b/thirdparty/dependencies.cmake +@@ -325,7 +325,7 @@ if(ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_TF_FRONTEND + # try to find newer version first (major is changed) + # see https://protobuf.dev/support/version-support/ and + # https://github.com/protocolbuffers/protobuf/commit/d61f75ff6db36b4f9c0765f131f8edc2f86310fa +- find_package(Protobuf 4.22.0 QUIET CONFIG) ++ find_package(Protobuf REQUIRED CONFIG) + if(Protobuf_FOUND) + # protobuf was found via CONFIG mode, let's save it for later usage in OpenVINOConfig.cmake static build + set(protobuf_config CONFIG) diff --git a/ports/openvino/portfile.cmake b/ports/openvino/portfile.cmake index 80a73f1baf..5d2c1b3dc9 100644 --- a/ports/openvino/portfile.cmake +++ b/ports/openvino/portfile.cmake @@ -8,6 +8,7 @@ vcpkg_from_github( # vcpkg specific patch, because OV creates a file in source tree, which is prohibited 001-disable-tools.patch 002-fix-onnx.patch + 003-protobuf.patch ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS diff --git a/ports/openvino/vcpkg.json b/ports/openvino/vcpkg.json index 0d3a437ec7..cecc27d3ba 100644 --- a/ports/openvino/vcpkg.json +++ b/ports/openvino/vcpkg.json @@ -2,7 +2,7 @@ "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", "name": "openvino", "version": "2024.4.0", - "port-version": 2, + "port-version": 3, "maintainers": "OpenVINO Developers ", "summary": "This is a port for Open Visual Inference And Optimization toolkit for AI inference", "description": [ diff --git a/ports/protobuf/fix-arm64-msvc.patch b/ports/protobuf/fix-arm64-msvc.patch index 2a13f1b77f..2cff2c3a96 100644 --- a/ports/protobuf/fix-arm64-msvc.patch +++ b/ports/protobuf/fix-arm64-msvc.patch @@ -1,22 +1,22 @@ -diff --git a/src/google/protobuf/parse_context.h b/src/google/protobuf/parse_context.h -index df12ee1ab..3eb2e56c7 100644 ---- a/src/google/protobuf/parse_context.h -+++ b/src/google/protobuf/parse_context.h -@@ -653,7 +653,7 @@ inline const char* VarintParseSlow(const char* p, uint32_t res, uint64_t* out) { - return tmp.first; - } - --#ifdef __aarch64__ -+#if defined(__aarch64__) && !defined(_MSC_VER) - // Generally, speaking, the ARM-optimized Varint decode algorithm is to extract - // and concatenate all potentially valid data bits, compute the actual length - // of the Varint, and mask off the data bits which are not actually part of the -@@ -883,7 +883,7 @@ static const char* VarintParseSlowArm(const char* p, uint64_t* out, - - template - PROTOBUF_NODISCARD const char* VarintParse(const char* p, T* out) { --#if defined(__aarch64__) && defined(PROTOBUF_LITTLE_ENDIAN) -+#if defined(__aarch64__) && defined(PROTOBUF_LITTLE_ENDIAN) && !defined(_MSC_VER) - // This optimization is not supported in big endian mode - uint64_t first8; - std::memcpy(&first8, p, sizeof(first8)); +diff --git a/src/google/protobuf/parse_context.h b/src/google/protobuf/parse_context.h +index 9292d517f..a1fa35066 100644 +--- a/src/google/protobuf/parse_context.h ++++ b/src/google/protobuf/parse_context.h +@@ -619,7 +619,7 @@ inline const char* VarintParseSlow(const char* p, uint32_t res, uint64_t* out) { + return tmp.first; + } + +-#ifdef __aarch64__ ++#if defined(__aarch64__) && !defined(_MSC_VER) + // Generally, speaking, the ARM-optimized Varint decode algorithm is to extract + // and concatenate all potentially valid data bits, compute the actual length + // of the Varint, and mask off the data bits which are not actually part of the +@@ -850,7 +850,7 @@ static const char* VarintParseSlowArm(const char* p, uint64_t* out, + // The caller must ensure that p points to at least 10 valid bytes. + template + PROTOBUF_NODISCARD const char* VarintParse(const char* p, T* out) { +-#if defined(__aarch64__) && defined(ABSL_IS_LITTLE_ENDIAN) ++#if defined(__aarch64__) && defined(ABSL_IS_LITTLE_ENDIAN) && !defined(_MSC_VER) + // This optimization is not supported in big endian mode + uint64_t first8; + std::memcpy(&first8, p, sizeof(first8)); diff --git a/ports/protobuf/fix-static-build.patch b/ports/protobuf/fix-static-build.patch index e0ea7fd095..47c44c32f2 100644 --- a/ports/protobuf/fix-static-build.patch +++ b/ports/protobuf/fix-static-build.patch @@ -1,21 +1,21 @@ -diff --git a/cmake/install.cmake b/cmake/install.cmake -index 998c2e31a..233f9e400 100644 ---- a/cmake/install.cmake -+++ b/cmake/install.cmake -@@ -49,7 +49,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) -@@ -68,7 +68,6 @@ set(protobuf_HEADERS - ${cpp_features_proto_proto_srcs} - ${descriptor_proto_proto_srcs} - ${plugin_proto_proto_srcs} -- ${java_features_proto_proto_srcs} - ) - foreach(_header ${protobuf_HEADERS}) - string(FIND ${_header} "${protobuf_SOURCE_DIR}/src" _find_src) +diff --git a/cmake/install.cmake b/cmake/install.cmake +index 52914a8ea..e7c22ddb6 100644 +--- a/cmake/install.cmake ++++ b/cmake/install.cmake +@@ -49,7 +49,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) +@@ -68,7 +68,6 @@ set(protobuf_HEADERS + ${cpp_features_proto_proto_srcs} + ${descriptor_proto_proto_srcs} + ${plugin_proto_proto_srcs} +- ${java_features_proto_proto_srcs} + ) + foreach(_header ${protobuf_HEADERS}) + string(FIND ${_header} "${protobuf_SOURCE_DIR}/src" _find_src) diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index a469c6e885..9c2d9ee561 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -2,7 +2,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO protocolbuffers/protobuf REF "v${VERSION}" - SHA512 ce81add9d978a6b63d4205715eac5084e81a6753da1f6c6bad6493e60253215901bffc4a60d704a873333f2b9f94fd86cb7eb5b293035f2268c12692bd808bac + SHA512 ce3eeb6d12c42157787bf97d265f34ac8e8af31070a2717b4c783e9158b6d7fbb5f239585fc38128a658315842cf7b6802cb9a80f4f391505bf806952e009da5 HEAD_REF master PATCHES fix-static-build.patch diff --git a/ports/protobuf/vcpkg.json b/ports/protobuf/vcpkg.json index c29111cc43..2b4bfcf4a2 100644 --- a/ports/protobuf/vcpkg.json +++ b/ports/protobuf/vcpkg.json @@ -1,7 +1,6 @@ { "name": "protobuf", - "version": "4.25.1", - "port-version": 1, + "version": "5.26.1", "description": "Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data.", "homepage": "https://github.com/protocolbuffers/protobuf", "license": "BSD-3-Clause", diff --git a/ports/srpc/portfile.cmake b/ports/srpc/portfile.cmake index d6b29890be..98b5142ba0 100644 --- a/ports/srpc/portfile.cmake +++ b/ports/srpc/portfile.cmake @@ -1,3 +1,10 @@ +vcpkg_download_distfile( + PROTOBUF_V5_PATCH + URLS https://github.com/sogou/srpc/commit/bb882f98820bff7fa91aa83b29640fa753e11772.patch?full_index=1 + SHA512 dbb665626073860ee22ccaf6369c54635d4c689e0bfcd5f86a60a1738b4c9eb9fb8eaa393b3551c7e9860f54e9a0f8463df66b9fb736394172f3f46dc2681016 + FILENAME bb882f98820bff7fa91aa83b29640fa753e11772.patch +) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO sogou/srpc @@ -6,6 +13,7 @@ vcpkg_from_github( HEAD_REF master PATCHES protobuf.patch + ${PROTOBUF_V5_PATCH} ) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" SRPC_BUILD_STATIC_RUNTIME) diff --git a/ports/srpc/vcpkg.json b/ports/srpc/vcpkg.json index 12c0a322b8..10183cc2e8 100644 --- a/ports/srpc/vcpkg.json +++ b/ports/srpc/vcpkg.json @@ -1,6 +1,7 @@ { "name": "srpc", "version-semver": "0.10.3", + "port-version": 1, "description": "RPC based on Sogou C++ Workflow", "homepage": "https://github.com/sogou/srpc", "dependencies": [ diff --git a/ports/upb/fix-NAN-on-Win11.patch b/ports/upb/fix-NAN-on-Win11.patch deleted file mode 100644 index 7f91c23f9e..0000000000 --- a/ports/upb/fix-NAN-on-Win11.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/upb/message/message.c b/upb/message/message.c -index 265d30d..afc6e51 100644 ---- a/upb/message/message.c -+++ b/upb/message/message.c -@@ -15,9 +15,9 @@ - // Must be last. - #include "upb/port/def.inc" - --const float kUpb_FltInfinity = INFINITY; --const double kUpb_Infinity = INFINITY; --const double kUpb_NaN = NAN; -+const float kUpb_FltInfinity = (float)(1.0 / 0.0); -+const double kUpb_Infinity = 1.0 / 0.0; -+const double kUpb_NaN = 0.0 / 0.0; - - static const size_t overhead = sizeof(upb_Message_InternalData); - diff --git a/ports/upb/fix-cmake.patch b/ports/upb/fix-cmake.patch deleted file mode 100644 index 45c145555f..0000000000 --- a/ports/upb/fix-cmake.patch +++ /dev/null @@ -1,151 +0,0 @@ -diff --git a/upb/cmake/CMakeLists.txt b/upb/cmake/CMakeLists.txt -index 3ebe25780..67a70cf81 100644 ---- a/upb/cmake/CMakeLists.txt -+++ b/upb/cmake/CMakeLists.txt -@@ -4,6 +4,7 @@ cmake_minimum_required(VERSION 3.10...3.24) - - project(upb) - set(CMAKE_C_STANDARD 99) -+set(CMAKE_CXX_STANDARD 11) - - # Prevent CMake from setting -rdynamic on Linux (!!). - SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") -@@ -39,7 +40,8 @@ if(UPB_ENABLE_UBSAN) - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=address") - endif() - --if(NOT TARGET utf8_range) -+find_package(utf8_range REQUIRED CONFIG) -+if(0) - if(EXISTS ../../external/utf8_range) - # utf8_range is already installed - include_directories(../external/utf8_range) -@@ -60,6 +62,11 @@ if(NOT TARGET utf8_range) - endif() - endif() - -+if (VCPKG_UPB_BUILD_CODEGEN) -+ find_package(absl CONFIG REQUIRED) -+ find_package(protobuf CONFIG REQUIRED) -+endif() -+ - if(APPLE) - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -undefined dynamic_lookup -flat_namespace") - elseif(UNIX) -@@ -69,17 +76,14 @@ endif() - enable_testing() - - --add_library(upb INTERFACE -+add_library(upb - - ) --target_include_directories(upb INTERFACE -- $ -- $ -- $ -+target_include_directories(upb PUBLIC -+ $ - ) - target_link_libraries(upb INTERFACE -- base -- mem) -+ ) - - add_library(generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me INTERFACE - -@@ -123,4 +127,94 @@ target_link_libraries(generated_reflection_support__only_for_generated_code_do_n - mini_descriptor - reflection_internal) - -+file(GLOB_RECURSE source_files RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/../" "${CMAKE_CURRENT_SOURCE_DIR}/../*.c") -+list(FILTER source_files EXCLUDE REGEX ".*(_test|upb_so|util|cmake|conformance).*") -+list(TRANSFORM source_files PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/../") -+target_sources(upb PRIVATE ${source_files}) -+ -+target_include_directories(upb PUBLIC $) -+target_link_libraries(upb PRIVATE utf8_range::utf8_range) -+ -+if (VCPKG_UPB_BUILD_CODEGEN) -+ add_library(common OBJECT -+ ../util/def_to_proto.c -+ ../../upb_generator/common.cc -+ ../../upb_generator/file_layout.cc -+ ../../upb_generator/names.cc -+ ../../upb_generator/stage0/google/protobuf/compiler/plugin.upb.c -+ ) -+ target_link_libraries(common PUBLIC -+ upb -+ absl::flat_hash_map -+ ) -+ target_include_directories(common PUBLIC $) -+ -+ add_executable(protoc-gen-upbdefs -+ ../../upb_generator/protoc-gen-upbdefs.cc -+ ) -+ target_link_libraries(protoc-gen-upbdefs PRIVATE -+ common -+ absl::absl_log -+ absl::strings -+ protobuf::libprotobuf -+ protobuf::libprotoc -+ ) -+ -+ add_executable(protoc-gen-upb -+ ../../upb_generator/protoc-gen-upb.cc -+ ) -+ target_link_libraries(protoc-gen-upb PRIVATE -+ common -+ absl::absl_log -+ absl::strings -+ protobuf::libprotobuf -+ protobuf::libprotoc -+ ) -+ -+ add_executable(protoc-gen-upb_minitable -+ ../../upb_generator/protoc-gen-upb_minitable.cc -+ ) -+ target_link_libraries(protoc-gen-upb_minitable PRIVATE -+ common -+ absl::absl_log -+ absl::strings -+ protobuf::libprotobuf -+ protobuf::libprotoc -+ ) -+ -+ list(APPEND _upb_codegen_targets protoc-gen-upbdefs protoc-gen-upb protoc-gen-upb_minitable) -+endif() - -+include(GNUInstallDirs) -+ -+target_include_directories(upb PUBLIC $) -+ -+install(EXPORT ${PROJECT_NAME}-targets -+ DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}" -+ NAMESPACE ${PROJECT_NAME}:: -+) -+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" -+ "include(CMakeFindDependencyMacro)\nfind_dependency(utf8_range)\ninclude(\"\${CMAKE_CURRENT_LIST_DIR}/${PROJECT_NAME}-targets.cmake\")") -+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}") -+ -+install(TARGETS upb ${_upb_codegen_targets} EXPORT ${PROJECT_NAME}-targets -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} -+) -+ -+install(FILES -+ ../upb.hpp -+ ../generated_code_support.h -+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}" -+) -+foreach(_dir base collections hash io json lex mem message mini_descriptor mini_table port reflection text wire) -+ install(DIRECTORY "../${_dir}" -+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}" -+ FILES_MATCHING -+ PATTERN "*.hpp" -+ PATTERN "*.h" -+ PATTERN "*.inc" -+ ) -+endforeach() diff --git a/ports/upb/portfile.cmake b/ports/upb/portfile.cmake deleted file mode 100644 index 9dea497df1..0000000000 --- a/ports/upb/portfile.cmake +++ /dev/null @@ -1,48 +0,0 @@ -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO protocolbuffers/protobuf - REF "v${VERSION}" - SHA512 ce81add9d978a6b63d4205715eac5084e81a6753da1f6c6bad6493e60253215901bffc4a60d704a873333f2b9f94fd86cb7eb5b293035f2268c12692bd808bac - HEAD_REF main - PATCHES - fix-cmake.patch - fix-NAN-on-Win11.patch -) - -vcpkg_check_features( - OUT_FEATURE_OPTIONS FEATURE_OPTIONS - FEATURES - codegen VCPKG_UPB_BUILD_CODEGEN -) - -if(NOT VCPKG_UPB_BUILD_CODEGEN) - vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/protobuf" "${CURRENT_HOST_INSTALLED_DIR}/tools/upb") -endif() - -vcpkg_cmake_configure( - SOURCE_PATH "${SOURCE_PATH}/upb/cmake" - OPTIONS ${FEATURE_OPTIONS} -) - -vcpkg_cmake_install(ADD_BIN_TO_PATH) -vcpkg_cmake_config_fixup() - -if (VCPKG_UPB_BUILD_CODEGEN) - vcpkg_copy_tools( - AUTO_CLEAN - TOOL_NAMES - protoc-gen-upbdefs - protoc-gen-upb - protoc-gen-upb_minitable - ) -else() - configure_file("${CMAKE_CURRENT_LIST_DIR}/upb-config-vcpkg-tools.cmake" "${CURRENT_PACKAGES_DIR}/share/upb/upb-config-vcpkg-tools.cmake" @ONLY) -endif() - -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/debug/include") - -vcpkg_copy_pdbs() - -vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/upb/upb-config-vcpkg-tools.cmake b/ports/upb/upb-config-vcpkg-tools.cmake deleted file mode 100644 index cd5f21ff61..0000000000 --- a/ports/upb/upb-config-vcpkg-tools.cmake +++ /dev/null @@ -1,10 +0,0 @@ -file(GLOB UPB_PLUGINS "${_IMPORT_PREFIX}/../@HOST_TRIPLET@/tools/upb/protoc-gen-upb*") - -foreach(PLUGIN ${UPB_PLUGINS}) - get_filename_component(PLUGIN_NAME "${PLUGIN}" NAME_WE) - add_executable(upb::${PLUGIN_NAME} IMPORTED) - set_property(TARGET upb::${PLUGIN_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) - set_target_properties(upb::${PLUGIN_NAME} PROPERTIES - IMPORTED_LOCATION_RELEASE "${PLUGIN}" - ) -endforeach() diff --git a/ports/upb/vcpkg.json b/ports/upb/vcpkg.json deleted file mode 100644 index bd95e24079..0000000000 --- a/ports/upb/vcpkg.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "upb", - "version": "4.25.1", - "port-version": 1, - "description": "μpb (often written 'upb') is a small protobuf implementation written in C.", - "homepage": "https://github.com/protocolbuffers/protobuf", - "license": "BSD-2-Clause", - "dependencies": [ - "utf8-range", - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - } - ], - "features": { - "codegen": { - "description": "Build code generator machinery", - "supports": "!uwp", - "dependencies": [ - "abseil", - "protobuf" - ] - } - } -} diff --git a/ports/utf8-range/portfile.cmake b/ports/utf8-range/portfile.cmake index 11665cdcb4..3bf651c288 100644 --- a/ports/utf8-range/portfile.cmake +++ b/ports/utf8-range/portfile.cmake @@ -4,7 +4,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO protocolbuffers/protobuf REF "v${VERSION}" - SHA512 ce81add9d978a6b63d4205715eac5084e81a6753da1f6c6bad6493e60253215901bffc4a60d704a873333f2b9f94fd86cb7eb5b293035f2268c12692bd808bac + SHA512 ce3eeb6d12c42157787bf97d265f34ac8e8af31070a2717b4c783e9158b6d7fbb5f239585fc38128a658315842cf7b6802cb9a80f4f391505bf806952e009da5 HEAD_REF main PATCHES fix-cmake.patch diff --git a/ports/utf8-range/vcpkg.json b/ports/utf8-range/vcpkg.json index 92d5d73eb7..63aa07f1e8 100644 --- a/ports/utf8-range/vcpkg.json +++ b/ports/utf8-range/vcpkg.json @@ -1,6 +1,6 @@ { "name": "utf8-range", - "version": "4.25.1", + "version": "5.26.1", "description": "Fast UTF-8 validation with Range algorithm (NEON+SSE4+AVX2)", "homepage": "https://github.com/protocolbuffers/protobuf", "license": "MIT", diff --git a/versions/a-/arcus.json b/versions/a-/arcus.json index 708bef66a7..517b7f8f80 100644 --- a/versions/a-/arcus.json +++ b/versions/a-/arcus.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "2b141efb5eac8763acdbb6e486c018a2393b4486", + "version-semver": "4.10.0", + "port-version": 4 + }, { "git-tree": "cbf79963e156283eae951185abaafc86d2679262", "version-semver": "4.10.0", diff --git a/versions/b-/brpc.json b/versions/b-/brpc.json index d6efbf1f2b..6b74f9adf9 100644 --- a/versions/b-/brpc.json +++ b/versions/b-/brpc.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "8473c99ec8eaf2d3fba5b34501f26cdd8b37d438", + "version": "1.11.0", + "port-version": 0 + }, { "git-tree": "0da3bb20bb9b3dd1b8ef66a4f812f16496be422c", "version": "1.10.0", diff --git a/versions/baseline.json b/versions/baseline.json index 17a1fb06ab..4d80f6c3ea 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -190,7 +190,7 @@ }, "arcus": { "baseline": "4.10.0", - "port-version": 3 + "port-version": 4 }, "arg-router": { "baseline": "1.4.0", @@ -1401,7 +1401,7 @@ "port-version": 1 }, "brpc": { - "baseline": "1.10.0", + "baseline": "1.11.0", "port-version": 0 }, "brunocodutra-metal": { @@ -3277,8 +3277,8 @@ "port-version": 0 }, "grpc": { - "baseline": "1.60.0", - "port-version": 1 + "baseline": "1.65.5", + "port-version": 0 }, "grppi": { "baseline": "0.4.0", @@ -6766,7 +6766,7 @@ }, "openvino": { "baseline": "2024.4.0", - "port-version": 2 + "port-version": 3 }, "openvpn3": { "baseline": "3.10", @@ -7209,8 +7209,8 @@ "port-version": 0 }, "protobuf": { - "baseline": "4.25.1", - "port-version": 1 + "baseline": "5.26.1", + "port-version": 0 }, "protobuf-c": { "baseline": "1.5.0", @@ -8670,7 +8670,7 @@ }, "srpc": { "baseline": "0.10.3", - "port-version": 0 + "port-version": 1 }, "sse2neon": { "baseline": "1.7.0", @@ -9224,10 +9224,6 @@ "baseline": "1.0.1", "port-version": 0 }, - "upb": { - "baseline": "4.25.1", - "port-version": 1 - }, "urdfdom": { "baseline": "3.1.1", "port-version": 0 @@ -9261,7 +9257,7 @@ "port-version": 4 }, "utf8-range": { - "baseline": "4.25.1", + "baseline": "5.26.1", "port-version": 0 }, "utf8h": { diff --git a/versions/g-/grpc.json b/versions/g-/grpc.json index 6a7643dac6..eb3dbb3cfd 100644 --- a/versions/g-/grpc.json +++ b/versions/g-/grpc.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "10af44d76c4c33d8229d128ca41520bd69420d34", + "version-semver": "1.65.5", + "port-version": 0 + }, { "git-tree": "a0e82a8a701c3b0397dae373e16c527d1cafaae5", "version-semver": "1.60.0", diff --git a/versions/o-/openvino.json b/versions/o-/openvino.json index 48e1bd3e91..6477a9bcf7 100644 --- a/versions/o-/openvino.json +++ b/versions/o-/openvino.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "bc53df5155c98997642b3213a096fb8c664be49c", + "version": "2024.4.0", + "port-version": 3 + }, { "git-tree": "fb92b66ef3fe4339f2708bc985437c422d1202c1", "version": "2024.4.0", diff --git a/versions/p-/protobuf.json b/versions/p-/protobuf.json index a81f3866e6..736eb7885f 100644 --- a/versions/p-/protobuf.json +++ b/versions/p-/protobuf.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "f518549cd75b0c7c421b855f73f425fa13ba606a", + "version": "5.26.1", + "port-version": 0 + }, { "git-tree": "5479e9c75e5ed6401d10163a0fa8f281dcf33f0f", "version": "4.25.1", diff --git a/versions/s-/srpc.json b/versions/s-/srpc.json index 74e3bef194..a0e4b853a2 100644 --- a/versions/s-/srpc.json +++ b/versions/s-/srpc.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "038425c919e84543a4b67af3e450614affe3bd7b", + "version-semver": "0.10.3", + "port-version": 1 + }, { "git-tree": "73c36edb18eee3aaf83b3fb489efdca9c93368fd", "version-semver": "0.10.3", diff --git a/versions/u-/utf8-range.json b/versions/u-/utf8-range.json index 967f7ee2a8..9be82173b7 100644 --- a/versions/u-/utf8-range.json +++ b/versions/u-/utf8-range.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "8f1c516c43009f8aff54f87b0d9784f65bcb0012", + "version": "5.26.1", + "port-version": 0 + }, { "git-tree": "b4f93db62704293a100326ad0561ab1c5aa2d856", "version": "4.25.1",