diff options
| -rw-r--r-- | ports/grpc/CONTROL | 2 | ||||
| -rw-r--r-- | ports/grpc/grpc-fix-cmake-build.patch | 13 | ||||
| -rw-r--r-- | ports/grpc/portfile.cmake | 36 | ||||
| -rw-r--r-- | ports/grpc/revert-c019e05.patch | 18 |
4 files changed, 31 insertions, 38 deletions
diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL index 3a248b448..a4b730172 100644 --- a/ports/grpc/CONTROL +++ b/ports/grpc/CONTROL @@ -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
\ No newline at end of file diff --git a/ports/grpc/grpc-fix-cmake-build.patch b/ports/grpc/grpc-fix-cmake-build.patch deleted file mode 100644 index 95e345036..000000000 --- a/ports/grpc/grpc-fix-cmake-build.patch +++ /dev/null @@ -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) diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index b52b55c12..b6767b4e4 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -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() diff --git a/ports/grpc/revert-c019e05.patch b/ports/grpc/revert-c019e05.patch new file mode 100644 index 000000000..77c501f77 --- /dev/null +++ b/ports/grpc/revert-c019e05.patch @@ -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 |
