[protobuf] Update to version 3.3.0

This commit is contained in:
Arkadiy Shapkin 2017-05-10 22:29:10 +03:00
parent c25faaa7e9
commit 6721b5337d
2 changed files with 40 additions and 16 deletions

View File

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

View File

@ -1,23 +1,41 @@
#tool
include(vcpkg_common_functions)
set(PROTOBUF_VERSION 3.3.0)
vcpkg_download_distfile(ARCHIVE_FILE
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
URLS "https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protobuf-cpp-${PROTOBUF_VERSION}.tar.gz"
FILENAME "protobuf-cpp-${PROTOBUF_VERSION}.tar.gz"
SHA512 ef01300bdda4a1a33a6056aea1d55e9d66ab1ca644aa2d9d5633cfc0bccfe4c24fdfa1015889b2c1c568e89ad053c701de1aca45196a6439130b7bb8f461595f
)
vcpkg_download_distfile(TOOL_ARCHIVE_FILE
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
URLS "https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protoc-${PROTOBUF_VERSION}-win32.zip"
FILENAME "protoc-${PROTOBUF_VERSION}-win32.zip"
SHA512 9b4902b3187fb978a8153aaf050314a3ca9ca161b0712a3672ccdfabb7f5a57035e71c2dfde9a0b99f9417e159dcbdedaf9a2b1917d712dc3d9d554bba0d4ee8
)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION})
set(TOOL_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION}-win32)
vcpkg_extract_source_archive(${ARCHIVE_FILE})
vcpkg_extract_source_archive(${TOOL_ARCHIVE_FILE} ${CURRENT_BUILDTREES_DIR}/src/protobuf-3.2.0-win32)
vcpkg_extract_source_archive(${TOOL_ARCHIVE_FILE} ${TOOL_PATH})
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
set(protobuf_BUILD_SHARED_LIBS ON)
else()
set(protobuf_BUILD_SHARED_LIBS OFF)
endif()
if(VCPKG_CRT_LINKAGE STREQUAL static)
set(protobuf_MSVC_STATIC_RUNTIME ON)
else()
set(protobuf_MSVC_STATIC_RUNTIME OFF)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-3.2.0/cmake
SOURCE_PATH ${SOURCE_PATH}/cmake
OPTIONS
-Dprotobuf_BUILD_SHARED_LIBS=OFF
-Dprotobuf_MSVC_STATIC_RUNTIME=OFF
-Dprotobuf_BUILD_SHARED_LIBS=${protobuf_BUILD_SHARED_LIBS}
-Dprotobuf_MSVC_STATIC_RUNTIME=${protobuf_MSVC_STATIC_RUNTIME}
-Dprotobuf_WITH_ZLIB=ON
-Dprotobuf_BUILD_TESTS=OFF
-DCMAKE_INSTALL_CMAKEDIR=share/protobuf
@ -49,9 +67,15 @@ string(REPLACE "\${_IMPORT_PREFIX}/debug/bin/protoc.exe" "\${_IMPORT_PREFIX}/too
file(WRITE ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-debug.cmake "${DEBUG_MODULE}")
protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/share)
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/bin)
protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin)
else()
protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/bin/protoc.exe)
protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin/protoc.exe)
endif()
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)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/protobuf RENAME copyright)
file(INSTALL ${TOOL_PATH}/bin/protoc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
vcpkg_copy_pdbs()