mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-23 02:57:09 +01:00
[grpc] Update to 1.2.3
This commit is contained in:
parent
5fbc9c4563
commit
75cdbd398b
@ -1,4 +1,4 @@
|
||||
Source: grpc
|
||||
Version: 1.1.2-1
|
||||
Version: 1.2.3
|
||||
Build-Depends: zlib, openssl, protobuf
|
||||
Description: An RPC library and framework
|
@ -1,13 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index d52e199..30ed816 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -2072,6 +2072,8 @@ foreach(_hdr
|
||||
include/grpc/impl/codegen/sync_generic.h
|
||||
include/grpc/impl/codegen/sync_posix.h
|
||||
include/grpc/impl/codegen/sync_windows.h
|
||||
+ include/grpc++/impl/codegen/proto_utils.h
|
||||
+ include/grpc++/impl/codegen/config_protobuf.h
|
||||
)
|
||||
string(REPLACE "include/" "" _path ${_hdr})
|
||||
get_filename_component(_path ${_path} PATH)
|
@ -4,7 +4,7 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
endif()
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
set(GRPC_VERSION 1.1.2)
|
||||
set(GRPC_VERSION 1.2.3)
|
||||
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/grpc-${GRPC_VERSION})
|
||||
|
||||
@ -15,63 +15,51 @@ endif()
|
||||
vcpkg_download_distfile(ARCHIVE_FILE
|
||||
URLS "https://github.com/grpc/grpc/archive/v${GRPC_VERSION}.zip"
|
||||
FILENAME "grpc-v${GRPC_VERSION}.tar.gz"
|
||||
SHA512 6e0666ecb72f0a78148fadf627e05b5ba0f1c893919f1e691775d09374e7c4b9b05ff1d276e716ac2a81eb2a3fb88c4a095928589286d2f083bd60539050f5d9
|
||||
SHA512 1468ace60ce9affb563b8145d43793778786626bfd568c79ba9c9792bf05adb86e99dfd13ff21c4b723909fbddae583148201be1a694bc0960fbe10200f52544
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE_FILE})
|
||||
|
||||
# patch is from https://github.com/grpc/grpc/commit/a5fac1f8a00b0ba6ca784baa4783ab947579693b
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES ${CMAKE_CURRENT_LIST_DIR}/grpc-fix-cmake-build.patch
|
||||
PATCHES ${CMAKE_CURRENT_LIST_DIR}/revert-c019e05.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DgRPC_INSTALL=ON
|
||||
-DgRPC_ZLIB_PROVIDER=package
|
||||
-DgRPC_SSL_PROVIDER=package
|
||||
-DgRPC_PROTOBUF_PROVIDER=package
|
||||
-DCMAKE_INSTALL_CMAKEDIR=share/grpc
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/grpc)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/gRPC/gRPCConfig.cmake ${CURRENT_PACKAGES_DIR}/share/grpc/gRPCConfig.cmake)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/gRPC/gRPCConfigVersion.cmake ${CURRENT_PACKAGES_DIR}/share/grpc/gRPCConfigVersion.cmake)
|
||||
|
||||
# Update import target prefix in gRPCTargets.cmake
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/lib/cmake/gRPC/gRPCTargets.cmake _contents)
|
||||
set(pattern "get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\n")
|
||||
string(REPLACE "${pattern}${pattern}" "${pattern}" _contents "${_contents}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/share/grpc/gRPCTargets.cmake "${_contents}")
|
||||
|
||||
# Update paths in gRPCTargets-release.cmake
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/lib/cmake/gRPC/gRPCTargets-release.cmake _contents)
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/share/grpc/gRPCTargets-release.cmake _contents)
|
||||
string(REPLACE "\${_IMPORT_PREFIX}/bin/" "\${_IMPORT_PREFIX}/tools/" _contents "${_contents}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/share/grpc/gRPCTargets-release.cmake "${_contents}")
|
||||
|
||||
# Update paths in gRPCTargets-debug.cmake
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/gRPC/gRPCTargets-debug.cmake _contents)
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/debug/share/grpc/gRPCTargets-debug.cmake _contents)
|
||||
string(REPLACE "\${_IMPORT_PREFIX}/bin/" "\${_IMPORT_PREFIX}/tools/" _contents "${_contents}")
|
||||
string(REPLACE "\${_IMPORT_PREFIX}/lib/" "\${_IMPORT_PREFIX}/debug/lib/" _contents "${_contents}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/share/grpc/gRPCTargets-debug.cmake "${_contents}")
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/grpc RENAME copyright)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools)
|
||||
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/grpc_cpp_plugin.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
|
||||
|
||||
# Install tools and plugins
|
||||
file(
|
||||
INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/tools
|
||||
FILES_MATCHING PATTERN "*.exe"
|
||||
)
|
||||
file(GLOB TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.exe")
|
||||
if(TOOLS)
|
||||
file(COPY ${TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
18
ports/grpc/revert-c019e05.patch
Normal file
18
ports/grpc/revert-c019e05.patch
Normal file
@ -0,0 +1,18 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index e09f729..c85a20a 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -11847,7 +11847,12 @@ endif (gRPC_BUILD_TESTS)
|
||||
|
||||
|
||||
|
||||
-
|
||||
+if (gRPC_INSTALL)
|
||||
+ install(EXPORT gRPCTargets
|
||||
+ DESTINATION ${CMAKE_INSTALL_CMAKEDIR}
|
||||
+ NAMESPACE gRPC::
|
||||
+ )
|
||||
+endif()
|
||||
|
||||
foreach(_config gRPCConfig gRPCConfigVersion)
|
||||
configure_file(tools/cmake/${_config}.cmake.in
|
Loading…
x
Reference in New Issue
Block a user