diff options
Diffstat (limited to 'ports/grpc')
| -rw-r--r-- | ports/grpc/CONTROL | 2 | ||||
| -rw-r--r-- | ports/grpc/disable-csharp-ext.patch | 22 | ||||
| -rw-r--r-- | ports/grpc/fix-uwp.patch | 129 | ||||
| -rw-r--r-- | ports/grpc/portfile.cmake | 34 |
4 files changed, 77 insertions, 110 deletions
diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL index 71ccb3a86..e52f83504 100644 --- a/ports/grpc/CONTROL +++ b/ports/grpc/CONTROL @@ -1,4 +1,4 @@ Source: grpc -Version: 1.10.1-3 +Version: 1.12.0-2 Build-Depends: zlib, openssl, protobuf, c-ares (!uwp) Description: An RPC library and framework diff --git a/ports/grpc/disable-csharp-ext.patch b/ports/grpc/disable-csharp-ext.patch deleted file mode 100644 index 5f3a78691..000000000 --- a/ports/grpc/disable-csharp-ext.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8c285e7..cffd93f 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -5058,6 +5058,9 @@ endif (gRPC_BUILD_CODEGEN) - - endif (gRPC_BUILD_TESTS) - -+option(gRPC_INSTALL_CSHARP_EXT "" ON) -+ -+if (gRPC_INSTALL_CSHARP_EXT) - add_library(grpc_csharp_ext SHARED - src/csharp/ext/grpc_csharp_ext.c - ) -@@ -5101,6 +5104,7 @@ if (gRPC_INSTALL) - ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} - ) - endif() -+endif (gRPC_INSTALL_CSHARP_EXT) - - if (gRPC_BUILD_TESTS) - diff --git a/ports/grpc/fix-uwp.patch b/ports/grpc/fix-uwp.patch index 85ee80eec..a3fb3ef89 100644 --- a/ports/grpc/fix-uwp.patch +++ b/ports/grpc/fix-uwp.patch @@ -1,18 +1,18 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 51f6e17..d33b147 100644
+index f58ee19..dda72e9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -84,6 +84,9 @@ if(UNIX)
+@@ -87,6 +87,9 @@ if(UNIX)
endif()
if(WIN32)
set(_gRPC_PLATFORM_WINDOWS ON)
-+ if(${CMAKE_SYSTEM_NAME} MATCHES "WindowsStore")
++ if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ set(_gRPC_PLATFORM_UWP ON)
+ endif()
endif()
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
-@@ -144,6 +147,10 @@ file(MAKE_DIRECTORY ${_gRPC_PROTO_GENS_DIR})
+@@ -152,6 +155,10 @@ file(MAKE_DIRECTORY ${_gRPC_PROTO_GENS_DIR})
# ``.proto`` files
#
function(protobuf_generate_grpc_cpp)
@@ -23,7 +23,7 @@ index 51f6e17..d33b147 100644 if(NOT ARGN)
message(SEND_ERROR "Error: PROTOBUF_GENERATE_GRPC_CPP() called without any proto files")
return()
-@@ -178,6 +185,7 @@ function(protobuf_generate_grpc_cpp)
+@@ -186,6 +193,7 @@ function(protobuf_generate_grpc_cpp)
endforeach()
endfunction()
@@ -31,94 +31,79 @@ index 51f6e17..d33b147 100644 add_custom_target(plugins
DEPENDS
grpc_cpp_plugin
-@@ -199,6 +207,7 @@ add_custom_target(tools_c
- gen_legal_metadata_characters
- gen_percent_encoding_tables
- )
-+endif()
-
- add_custom_target(tools_cxx
- DEPENDS
-@@ -3223,7 +3232,7 @@ if (gRPC_INSTALL)
- )
- endif()
+@@ -215,6 +223,8 @@ add_custom_target(tools_cxx
+ add_custom_target(tools
+ DEPENDS tools_c tools_cxx)
--
-+if(NOT _gRPC_PLATFORM_UWP)
- add_library(grpc++_error_details
- ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/status/status.pb.cc
- ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/status/status.grpc.pb.cc
-@@ -3285,6 +3294,7 @@ if (gRPC_INSTALL)
- ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
- )
- endif()
+endif()
-
++
if (gRPC_BUILD_TESTS)
+ add_custom_target(buildtests_c)
+ add_dependencies(buildtests_c algorithm_test)
+@@ -3595,7 +3605,6 @@ foreach(_hdr
+ DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
+ )
+ endforeach()
+-endif (gRPC_BUILD_CODEGEN)
-@@ -3347,6 +3357,7 @@ endforeach()
-
- endif (gRPC_BUILD_TESTS)
-+if(NOT _gRPC_PLATFORM_UWP)
- add_library(grpc++_reflection
- src/cpp/ext/proto_server_reflection.cc
- src/cpp/ext/proto_server_reflection_plugin.cc
-@@ -3409,6 +3420,7 @@ if (gRPC_INSTALL)
+ if (gRPC_INSTALL)
+@@ -3605,6 +3614,7 @@ if (gRPC_INSTALL)
ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
)
endif()
-+endif()
++endif (gRPC_BUILD_CODEGEN)
if (gRPC_BUILD_TESTS)
-@@ -4197,6 +4209,7 @@ endforeach()
-
- endif (gRPC_BUILD_TESTS)
-
-+if(NOT _gRPC_PLATFORM_UWP)
- add_library(grpc_plugin_support
- src/compiler/cpp_generator.cc
- src/compiler/csharp_generator.cc
-@@ -4236,6 +4249,8 @@ target_link_libraries(grpc_plugin_support
- ${_gRPC_PROTOBUF_LIBRARIES}
- ${_gRPC_ALLTARGETS_LIBRARIES}
- )
-+endif()
-+
-
- foreach(_hdr
- include/grpc++/impl/codegen/config_protobuf.h
-@@ -4248,7 +4263,7 @@ foreach(_hdr
+@@ -3725,7 +3735,7 @@ foreach(_hdr
+ DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
)
endforeach()
+-endif (gRPC_BUILD_CODEGEN)
++
+
--
-+if(NOT _gRPC_PLATFORM_UWP)
if (gRPC_INSTALL)
- install(TARGETS grpc_plugin_support EXPORT gRPCTargets
- RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
-@@ -4256,6 +4271,7 @@ if (gRPC_INSTALL)
+@@ -3735,6 +3745,7 @@ if (gRPC_INSTALL)
ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
)
endif()
-+endif()
++endif (gRPC_BUILD_CODEGEN)
if (gRPC_BUILD_TESTS)
-@@ -10252,6 +10268,7 @@ target_link_libraries(grpc_cli
+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 55efe0e..f538f26 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
+@@ -60,6 +60,8 @@ bool check_bios_data(const char* bios_data_file) {
- endif (gRPC_BUILD_TESTS)
+ static void init_mu(void) { gpr_mu_init(&g_mu); }
-+if(NOT _gRPC_PLATFORM_UWP)
- add_executable(grpc_cpp_plugin
- src/compiler/cpp_plugin.cc
- )
-@@ -10488,6 +10505,7 @@ if (gRPC_INSTALL)
- ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
- )
- endif()
-+endif()
-
- if (gRPC_BUILD_TESTS)
++#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP
++
+ static bool run_powershell() {
+ SECURITY_ATTRIBUTES sa;
+ sa.nLength = sizeof(sa);
+@@ -97,8 +99,12 @@ static bool run_powershell() {
+ CloseHandle(h);
+ return true;
+ }
++#endif
+
+ bool grpc_alts_is_running_on_gcp() {
++#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
++ g_is_on_compute_engine = false;
++#else
+ gpr_once_init(&g_once, init_mu);
+ gpr_mu_lock(&g_mu);
+ if (!g_compute_engine_detection_done) {
+@@ -108,6 +114,7 @@ bool grpc_alts_is_running_on_gcp() {
+ g_compute_engine_detection_done = true;
+ }
+ gpr_mu_unlock(&g_mu);
++#endif
+ return g_is_on_compute_engine;
+ }
diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index 375128a0a..5dfa17e6f 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -12,28 +12,31 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO grpc/grpc - REF v1.10.1 - SHA512 2221d902c60eada6dd1547a63d26bd3b30cb6710247b5e48523bacde498a3691cc177f1dbe9db8a007b8ae341a5b0c8ec999539e26a9bcff480a8d0b02140997 + REF v1.12.0 + SHA512 68a8c261ea570790974769d6c0ca8138cf4242b79e9ff74a11b10d35a27f98ff24c03f3d05932ac46811c0ba7d1a094388ae8dbeb495fc8e723ad74695994d49 HEAD_REF master PATCHES - ${CMAKE_CURRENT_LIST_DIR}/disable-csharp-ext.patch ${CMAKE_CURRENT_LIST_DIR}/fix-uwp.patch ) -if(VCPKG_CRT_LINKAGE STREQUAL static) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(gRPC_BUILD_CODEGEN OFF) +else() + set(gRPC_BUILD_CODEGEN ON) +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL "static") set(gRPC_MSVC_STATIC_RUNTIME ON) else() set(gRPC_MSVC_STATIC_RUNTIME OFF) endif() - if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") set(cares_CARES_PROVIDER OFF) else() set(cares_CARES_PROVIDER "package") endif() - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -44,6 +47,7 @@ vcpkg_configure_cmake( -DgRPC_ZLIB_PROVIDER=package -DgRPC_SSL_PROVIDER=package -DgRPC_PROTOBUF_PROVIDER=package + -DgRPC_PROTOBUF_PACKAGE_TYPE=CONFIG -DgRPC_CARES_PROVIDER=${cares_CARES_PROVIDER} -DgRPC_GFLAGS_PROVIDER=none -DgRPC_BENCHMARK_PROVIDER=none @@ -52,17 +56,16 @@ vcpkg_configure_cmake( -DgRPC_INSTALL_LIBDIR:STRING=lib -DgRPC_INSTALL_INCLUDEDIR:STRING=include -DgRPC_INSTALL_CMAKEDIR:STRING=share/grpc + -DgRPC_BUILD_CODEGEN=${gRPC_BUILD_CODEGEN} ) -# gRPC runs built executables during the build, so they need access to the installed DLLs. -set(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin") +vcpkg_install_cmake(ADD_BIN_TO_PATH) -vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH "share/grpc") file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/grpc RENAME copyright) -# Install tools and plugins +# Install tools file(GLOB TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.exe") if(TOOLS) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/grpc) @@ -70,12 +73,13 @@ if(TOOLS) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/grpc) endif() -if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) -else() - SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) # Leave the executable files in bin/ and debug/bin +file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe" "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") +if(EXES) + file(REMOVE ${EXES}) endif() + +# Ignore the C# extension DLL in bin/ +SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_copy_pdbs() |
