aboutsummaryrefslogtreecommitdiff
path: root/ports/grpc
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-02-17 01:18:32 -0800
committerRobert Schumacher <roschuma@microsoft.com>2017-02-17 01:18:32 -0800
commit1c3335ed66597e90a1f0b2c393522a28bff1f400 (patch)
tree1de776b990f55b043e3a9b3cf1602fdd56e8bb68 /ports/grpc
parent532c4f6a536ae0952844b39aceef7542204938a9 (diff)
downloadvcpkg-1c3335ed66597e90a1f0b2c393522a28bff1f400.tar.gz
vcpkg-1c3335ed66597e90a1f0b2c393522a28bff1f400.zip
[grpc+protobuf] Update to 1.1.2 and 3.2.0 respectively.
Diffstat (limited to 'ports/grpc')
-rw-r--r--ports/grpc/CONTROL2
-rw-r--r--ports/grpc/grpc-fix-cmake-build.patch13
-rw-r--r--ports/grpc/portfile.cmake45
3 files changed, 31 insertions, 29 deletions
diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL
index 3de78c477..3a248b448 100644
--- a/ports/grpc/CONTROL
+++ b/ports/grpc/CONTROL
@@ -1,4 +1,4 @@
Source: grpc
-Version: 1.1.0-dev-1674f65-2
+Version: 1.1.2-1
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
new file mode 100644
index 000000000..95e345036
--- /dev/null
+++ b/ports/grpc/grpc-fix-cmake-build.patch
@@ -0,0 +1,13 @@
+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 ba511a004..c6239d8c3 100644
--- a/ports/grpc/portfile.cmake
+++ b/ports/grpc/portfile.cmake
@@ -3,39 +3,28 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
endif()
include(vcpkg_common_functions)
-find_program(GIT git)
-set(GIT_URL "https://github.com/grpc/grpc.git")
-set(GIT_REV "1674f650ad9411448a35b7c19c5dbdaf0ebd8916")
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/grpc-1.1.2)
-if(NOT EXISTS "${DOWNLOADS}/grpc.git")
- message(STATUS "Cloning")
- vcpkg_execute_required_process(
- COMMAND ${GIT} clone --bare ${GIT_URL} ${DOWNLOADS}/grpc.git
- WORKING_DIRECTORY ${DOWNLOADS}
- LOGNAME clone
- )
+if(EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git")
+ file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src)
endif()
-message(STATUS "Cloning done")
-if(NOT EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git")
- message(STATUS "Adding worktree")
- vcpkg_execute_required_process(
- COMMAND ${GIT} worktree add -f --detach ${CURRENT_BUILDTREES_DIR}/src ${GIT_REV}
- WORKING_DIRECTORY ${DOWNLOADS}/grpc.git
- LOGNAME worktree
- )
- message(STATUS "Updating sumbodules")
- vcpkg_execute_required_process(
- COMMAND ${GIT} submodule update --init third_party/nanopb
- WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src
- LOGNAME submodule
- )
-endif()
-message(STATUS "Adding worktree and updating sumbodules done")
+vcpkg_download_distfile(ARCHIVE_FILE
+ URLS "https://github.com/grpc/grpc/archive/v1.1.2.zip"
+ FILENAME "grpc-v1.1.2.tar.gz"
+ SHA512 6e0666ecb72f0a78148fadf627e05b5ba0f1c893919f1e691775d09374e7c4b9b05ff1d276e716ac2a81eb2a3fb88c4a095928589286d2f083bd60539050f5d9
+)
+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
+)
vcpkg_configure_cmake(
- SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src
+ SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DgRPC_INSTALL=ON
-DgRPC_ZLIB_PROVIDER=package
@@ -66,7 +55,7 @@ string(REPLACE "\${_IMPORT_PREFIX}/bin/" "\${_IMPORT_PREFIX}/tools/" _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 ${CURRENT_BUILDTREES_DIR}/src/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/grpc RENAME copyright)
+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)