Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[3rd-party] added vcpkg and grpc update
Browse files Browse the repository at this point in the history
georgeliao committed Oct 4, 2024
1 parent 183583d commit 1766a7b
Showing 16 changed files with 332 additions and 1,561 deletions.
2 changes: 1 addition & 1 deletion 3rd-party/vcpkg
Submodule vcpkg updated 7042 files
73 changes: 73 additions & 0 deletions 3rd-party/vcpkg-ports/grpc/00001-fix-uwp.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ec370e9..4f7d770 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -237,6 +237,9 @@ if(UNIX)
endif()
if(WIN32)
set(_gRPC_PLATFORM_WINDOWS ON)
+ if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ set(_gRPC_PLATFORM_UWP ON)
+ endif()
endif()

if (APPLE AND NOT DEFINED CMAKE_CXX_STANDARD)
@@ -267,6 +270,9 @@ if(MSVC)
set(_gRPC_C_CXX_FLAGS "${_gRPC_C_CXX_FLAGS} /wd4267")
# TODO(jtattermusch): needed to build boringssl with VS2017, revisit later
set(_gRPC_C_CXX_FLAGS "${_gRPC_C_CXX_FLAGS} /wd4987 /wd4774 /wd4819 /wd4996 /wd4619")
+ if(_gRPC_PLATFORM_UWP)
+ add_definitions(-DGRPC_ARES=0)
+ endif()
# Silences thousands of trucation warnings
set(_gRPC_C_CXX_FLAGS "${_gRPC_C_CXX_FLAGS} /wd4503")
# Tell MSVC to build grpc using utf-8
@@ -439,6 +445,10 @@ file(MAKE_DIRECTORY ${_gRPC_PROTO_GENS_DIR})
# ``.proto`` files
#
function(protobuf_generate_grpc_cpp)
+ if(_gRPC_PLATFORM_UWP)
+ return()
+ endif()
+
if(NOT ARGN)
message(SEND_ERROR "Error: PROTOBUF_GENERATE_GRPC_CPP() called without any proto files")
return()
@@ -561,6 +571,7 @@ if (gRPC_BUILD_GRPC_RUBY_PLUGIN)
list(APPEND _gRPC_PLUGIN_LIST grpc_ruby_plugin)
endif ()

+if(NOT _gRPC_PLATFORM_UWP)
add_custom_target(plugins
DEPENDS ${_gRPC_PLUGIN_LIST}
)
@@ -575,6 +586,7 @@ add_custom_target(tools_cxx

add_custom_target(tools
DEPENDS tools_c tools_cxx)
+endif()

protobuf_generate_grpc_cpp_with_import_path_correction(
src/proto/grpc/channelz/channelz.proto src/proto/grpc/channelz/channelz.proto
diff --git a/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc b/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc
index b034cca..5dbdfe3 100644
--- a/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc
+++ b/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc
@@ -40,6 +40,7 @@ bool check_bios_data(const char*) { return false; }
bool check_windows_registry_product_name(HKEY root_key,
const char* reg_key_path,
const char* reg_key_name) {
+ #if !defined(WINAPI_FAMILY) || WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP
const size_t kProductNameBufferSize = 256;
char const expected_substr[] = "Google";

@@ -72,6 +73,9 @@ bool check_windows_registry_product_name(HKEY root_key,
}

return strstr(buffer, expected_substr) != nullptr;
+#else
+ return false;
+#endif
}

} // namespace internal
10 changes: 5 additions & 5 deletions 3rd-party/vcpkg-ports/grpc/00004-link-gdi32-on-windows.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 25990a5d8a..8a632d2289 100644
index fce68b9..220f251 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -404,7 +404,7 @@ if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/xds)
@@ -432,7 +432,7 @@ if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/xds)
endif()

if(WIN32)
- set(_gRPC_BASELIB_LIBRARIES ws2_32 crypt32)
+ set(_gRPC_BASELIB_LIBRARIES wsock32 ws2_32 crypt32 gdi32)
- 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()

# Create directory for proto source files
12 changes: 6 additions & 6 deletions 3rd-party/vcpkg-ports/grpc/00005-fix-uwp-error.patch
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.cc b/src/core/ext/transport/chttp2/transport/hpack_parser.cc
index b0d3a6465b..5c48f1aa30 100644
index 31bf464..d1007e4 100644
--- a/src/core/ext/transport/chttp2/transport/hpack_parser.cc
+++ b/src/core/ext/transport/chttp2/transport/hpack_parser.cc
@@ -1037,7 +1037,7 @@ class HPackParser::Parser {
@@ -689,7 +689,7 @@ class HPackParser::Parser {
}

private:
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 898a62823c..6b31cdc082 100644
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<char> p,
@@ -33,10 +33,10 @@ index 898a62823c..6b31cdc082 100644
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 141b16e345..89d9d6dafd 100644
index 3dda49d..202caa5 100644
--- a/src/core/lib/surface/server.cc
+++ b/src/core/lib/surface/server.cc
@@ -902,7 +902,7 @@ grpc_call_error Server::QueueRequestedCall(size_t cq_idx, RequestedCall* rc) {
@@ -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;
}
1,497 changes: 0 additions & 1,497 deletions 3rd-party/vcpkg-ports/grpc/00006-remove-unused-libraries.patch

This file was deleted.

143 changes: 143 additions & 0 deletions 3rd-party/vcpkg-ports/grpc/00009-use-system-upb.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a3b39a1..8d7c1f6 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
- 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/reader.c
${gRPC_ADDITIONAL_DLL_SRC}
)

@@ -3456,6 +3445,7 @@ target_link_libraries(gtest
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)
ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
)
endif()
+endif() # vcpkg upb

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
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
- 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/reader.c
)

target_compile_features(grpc_authorization_provider PUBLIC cxx_std_14)
@@ -30412,9 +30384,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"
- "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"
"grpc.pc")

# grpc_unsecure .pc file
@@ -30423,9 +30395,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"
- "libcares zlib"
+ "libcares zlib utf8_range"
"-lgrpc_unsecure"
- "-laddress_sorting -lutf8_range_lib -lupb -lupb_collections_lib"
+ "-laddress_sorting -lupb"
"grpc_unsecure.pc")

# grpc++ .pc file
@@ -30434,9 +30406,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"
- "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"
"grpc++.pc")

# grpc++_unsecure .pc file
@@ -30445,7 +30417,7 @@ 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"
- "libcares zlib"
+ "libcares zlib utf8_range"
"-lgrpc++_unsecure"
- "-laddress_sorting -lutf8_range_lib -lupb -lupb_collections_lib"
+ "-laddress_sorting -lupb"
"grpc++_unsecure.pc")
diff --git a/cmake/gRPCConfig.cmake.in b/cmake/gRPCConfig.cmake.in
index 98d8c6d..7cad2ab 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@
@_gRPC_FIND_ABSL@
@_gRPC_FIND_RE2@
+@_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
--- a/cmake/upb.cmake
+++ b/cmake/upb.cmake
@@ -14,7 +14,15 @@

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 "")
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)
+
+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(utf8_range_lib ALIAS utf8_range::utf8_range)
13 changes: 0 additions & 13 deletions 3rd-party/vcpkg-ports/grpc/00014-pkgconfig-upbdefs.patch

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/cmake/download_archive.cmake b/cmake/download_archive.cmake
index 820aafafb7..a59b785c7e 100644
index 820aafa..a59b785 100644
--- a/cmake/download_archive.cmake
+++ b/cmake/download_archive.cmake
@@ -19,6 +19,7 @@ file(MAKE_DIRECTORY ${_download_archive_TEMPORARY_DIR})
12 changes: 12 additions & 0 deletions 3rd-party/vcpkg-ports/grpc/00016-fix-plugin-targets.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/cmake/gRPCConfig.cmake.in b/cmake/gRPCConfig.cmake.in
index 7cad2abca1..c287f3b413 100644
--- a/cmake/gRPCConfig.cmake.in
+++ b/cmake/gRPCConfig.cmake.in
@@ -12,6 +12,6 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/modules)

# Targets
include(${CMAKE_CURRENT_LIST_DIR}/gRPCTargets.cmake)
-if(NOT CMAKE_CROSSCOMPILING)
+if(@gRPC_BUILD_CODEGEN@)
include(${CMAKE_CURRENT_LIST_DIR}/gRPCPluginTargets.cmake)
endif()
36 changes: 36 additions & 0 deletions 3rd-party/vcpkg-ports/grpc/00017-abseil.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
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 <grpc/impl/channel_arg_names.h>
#include <grpc/support/alloc.h>
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 <grpc/support/log.h>

10 changes: 10 additions & 0 deletions 3rd-party/vcpkg-ports/grpc/gRPCTargets-vcpkg-tools.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
file(GLOB GRPC_PLUGINS "${_IMPORT_PREFIX}/../@HOST_TRIPLET@/tools/grpc/grpc_*_plugin*")

foreach(PLUGIN ${GRPC_PLUGINS})
get_filename_component(PLUGIN_NAME "${PLUGIN}" NAME_WE)
add_executable(gRPC::${PLUGIN_NAME} IMPORTED)
set_property(TARGET gRPC::${PLUGIN_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(gRPC::${PLUGIN_NAME} PROPERTIES
IMPORTED_LOCATION_RELEASE "${PLUGIN}"
)
endforeach()
54 changes: 35 additions & 19 deletions 3rd-party/vcpkg-ports/grpc/portfile.cmake
Original file line number Diff line number Diff line change
@@ -5,20 +5,33 @@ endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO canonical/grpc
REF e3acf245a91630fe4d464091ba5446f6a638d82f
SHA512 18574197f4a5070de07c39c096ead2175c150a2b790adbb3d9639b0637641015fb91f5cffa916b50863d6ee62203ad2a6964ce87566b6ae7b41716594c445c06
REF bfcc6af27db9de9dc0a5edb3bc8ab46731956ba1
SHA512 e84e0ec81981ec33adc191fd06ece6e8ebac02c1a0dc612e689809015a171aab276330be952f7b052ad8b213820c0a29f03b5d2f25c2d236b311d0e420efeff8
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
00006-remove-unused-libraries.patch
snprintf.patch
00009-use-system-upb.patch
00015-disable-download-archive.patch
00016-fix-plugin-targets.patch
00017-abseil.patch
)

if(NOT TARGET_TRIPLET STREQUAL HOST_TRIPLET)
# Ensure de-vendoring
file(REMOVE_RECURSE
"${SOURCE_PATH}/third_party/abseil-cpp"
"${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"
)

if(VCPKG_CROSSCOMPILING)
vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/grpc")
endif()

@@ -49,19 +62,12 @@ vcpkg_cmake_configure(
-DgRPC_PROTOBUF_PROVIDER=package
-DgRPC_ABSL_PROVIDER=package
-DgRPC_RE2_PROVIDER=package
-DgRPC_PROTOBUF_PACKAGE_TYPE=CONFIG
-DgRPC_CARES_PROVIDER=${cares_CARES_PROVIDER}
-DgRPC_BENCHMARK_PROVIDER=none
-DgRPC_INSTALL_BINDIR:STRING=bin
-DgRPC_INSTALL_LIBDIR:STRING=lib
-DgRPC_INSTALL_INCLUDEDIR:STRING=include
-DgRPC_INSTALL_CMAKEDIR:STRING=share/grpc
-DgRPC_BUILD_GRPC_CSHARP_PLUGIN=OFF
-DgRPC_BUILD_GRPC_NODE_PLUGIN=OFF
-DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN=OFF
-DgRPC_BUILD_GRPC_PHP_PLUGIN=OFF
-DgRPC_BUILD_GRPC_PYTHON_PLUGIN=OFF
-DgRPC_BUILD_GRPC_RUBY_PLUGIN=OFF
"-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}"
MAYBE_UNUSED_VARIABLES
@@ -72,19 +78,29 @@ vcpkg_cmake_install(ADD_BIN_TO_PATH)

vcpkg_cmake_config_fixup()

vcpkg_copy_tools(
AUTO_CLEAN
TOOL_NAMES
grpc_cpp_plugin
)
if (gRPC_BUILD_CODEGEN)
vcpkg_copy_tools(
AUTO_CLEAN
TOOL_NAMES
grpc_php_plugin
grpc_python_plugin
grpc_node_plugin
grpc_objective_c_plugin
grpc_csharp_plugin
grpc_cpp_plugin
grpc_ruby_plugin
)
else()
configure_file("${CMAKE_CURRENT_LIST_DIR}/gRPCTargets-vcpkg-tools.cmake" "${CURRENT_PACKAGES_DIR}/share/grpc/gRPCTargets-vcpkg-tools.cmake" @ONLY)
endif()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/debug/include")

vcpkg_copy_pdbs()
if (VCPKG_TARGET_IS_WINDOWS)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")
else()
vcpkg_fixup_pkgconfig(SKIP_CHECK)
vcpkg_fixup_pkgconfig()
endif()

file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
12 changes: 0 additions & 12 deletions 3rd-party/vcpkg-ports/grpc/snprintf.patch

This file was deleted.

2 changes: 2 additions & 0 deletions 3rd-party/vcpkg-ports/grpc/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
list(REMOVE_AT ARGS 0)
_find_package(gRPC ${ARGS}) # Shouldn't this be fixed downstream instead of using a Wrapper?
13 changes: 7 additions & 6 deletions 3rd-party/vcpkg-ports/grpc/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "grpc",
"version-semver": "1.52.1",
"description": "An RPC library and framework",
"version-semver": "1.60.0",
"port-version": 1,
"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",
"dependencies": [
@@ -17,12 +18,14 @@
"codegen"
]
},
"openssl",
"protobuf",
{
"name": "protobuf",
"host": true
},
"re2",
"upb",
{
"name": "vcpkg-cmake",
"host": true
@@ -34,11 +37,9 @@
"zlib"
],
"features": {
"absl-sync": {
"description": "Deprecated."
},
"codegen": {
"description": "Build code generator machinery"
"description": "Build code generator machinery",
"supports": "!uwp"
}
}
}
2 changes: 1 addition & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"builtin-baseline": "ca7b1b15f548c25c766360593a2c732d56ed0133",
"builtin-baseline": "c82f74667287d3dc386bce81e44964370c91a289",
"dependencies": [
"poco",
"grpc"

0 comments on commit 1766a7b

Please sign in to comment.