[grpc+protobuf] Update to 1.1.2 and 3.2.0 respectively.

This commit is contained in:
Robert Schumacher 2017-02-17 01:18:32 -08:00
parent 532c4f6a53
commit 1c3335ed66
5 changed files with 42 additions and 40 deletions

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -1,4 +1,4 @@
Source: protobuf
Version: 3.0.2
Version: 3.2.0
Build-Depends: zlib
Description: Protocol Buffers - Google's data interchange format

View File

@ -1,20 +1,20 @@
#tool
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE_FILE
URLS "https://github.com/google/protobuf/releases/download/v3.0.2/protobuf-cpp-3.0.2.tar.gz"
FILENAME "protobuf-cpp-3.0.2.tar.gz"
SHA512 5c99fa5d20815f9333a1e30d4da7621375e179abab6e4369ef0827b6ea6a679afbfec445dda21a72b4ab11e1bdd72c0f17a4e86b153ea8e2d3298dc3bcfcd643
URLS "https://github.com/google/protobuf/releases/download/v3.2.0/protobuf-cpp-3.2.0.tar.gz"
FILENAME "protobuf-cpp-3.2.0.tar.gz"
SHA512 dd005f5e862ff24bb233b9eaed1d7f44c42f1cc8c647c0839fe2ecc2d91178845195d79776cfa2e31d224c16eed11b05ad824b66b743e685334057d8180f17aa
)
vcpkg_download_distfile(TOOL_ARCHIVE_FILE
URLS "https://github.com/google/protobuf/releases/download/v3.0.2/protoc-3.0.2-win32.zip"
FILENAME "protoc-3.0.2-win32.zip"
SHA512 51c67bd8bdc35810da70786d873935814679c58b74e653923671bdf06b8b69a1c9a0793d090b17d25e91ddafff1726bcfcdd243373dd47c4aeb9ea83fbabaeb0
URLS "https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-win32.zip"
FILENAME "protoc-3.2.0-win32.zip"
SHA512 985c86a04cebacfba96f3985d1b3d6ef341470171b809c6f6362bc13a07a3df9c8962d912857bb764bf8634cf676c5f8453c43b4e0a6398f2ff314708975d1e4
)
vcpkg_extract_source_archive(${ARCHIVE_FILE})
vcpkg_extract_source_archive(${TOOL_ARCHIVE_FILE} ${CURRENT_BUILDTREES_DIR}/src/protobuf-3.0.2-win32)
vcpkg_extract_source_archive(${TOOL_ARCHIVE_FILE} ${CURRENT_BUILDTREES_DIR}/src/protobuf-3.2.0-win32)
vcpkg_configure_cmake(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-3.0.2/cmake
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-3.2.0/cmake
OPTIONS
-Dprotobuf_BUILD_SHARED_LIBS=OFF
-Dprotobuf_MSVC_STATIC_RUNTIME=OFF
@ -52,6 +52,6 @@ protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/share)
protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/bin)
protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin)
file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/protobuf-3.0.2/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/protobuf RENAME copyright)
file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/protobuf-3.0.2-win32/bin/protoc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/protobuf-3.2.0/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/protobuf RENAME copyright)
file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/protobuf-3.2.0-win32/bin/protoc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
vcpkg_copy_pdbs()