From 8dd8bc10df85c2f0e72e9bad3a9245cafd0b93fe Mon Sep 17 00:00:00 2001 From: Billy O'Neal Date: Fri, 30 Nov 2018 16:48:21 -0800 Subject: [PATCH] [cpprestsdk] Update to v2.10.8 and add brotli feature. (#4617) The brotli feature is on by default for Windows only. We think it'll probably work on other platforms but haven't tested that extensively. --- ports/cpprestsdk/CONTROL | 12 ++++++++++-- ports/cpprestsdk/portfile.cmake | 20 +++++++++----------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/ports/cpprestsdk/CONTROL b/ports/cpprestsdk/CONTROL index 800d54d4213..e5da66ef707 100644 --- a/ports/cpprestsdk/CONTROL +++ b/ports/cpprestsdk/CONTROL @@ -1,10 +1,18 @@ Source: cpprestsdk -Version: 2.10.6-3 +Version: 2.10.7 Build-Depends: zlib, openssl (!uwp&!windows), boost-system (!uwp&!windows), boost-date-time (!uwp&!windows), boost-regex (!uwp&!windows), boost-thread (!uwp&!windows), boost-filesystem (!uwp&!windows), boost-random (!uwp&!windows), boost-chrono (!uwp&!windows) Description: C++11 JSON, REST, and OAuth library The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services. -Default-Features: websockets +Default-Features: default-features + +Feature: default-features +Build-Depends: cpprestsdk[brotli] (windows), cpprestsdk[websockets] +Description: Features installed by default Feature: websockets Build-Depends: websocketpp (!uwp), openssl (!uwp), boost-system (!uwp), boost-date-time (!uwp), boost-regex (!uwp) Description: Websockets support + +Feature: brotli +Build-Depends: brotli +Description: Brotli compression support diff --git a/ports/cpprestsdk/portfile.cmake b/ports/cpprestsdk/portfile.cmake index c94b01b806b..d6390836cb7 100644 --- a/ports/cpprestsdk/portfile.cmake +++ b/ports/cpprestsdk/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/cpprestsdk - REF v2.10.6 - SHA512 f0848f329df80ced68132600914f0f4ba1ed42c7c16188e0f2bd41cf0c50173c27ca42c8db72ff239ca881bc8789fa4d1e3189c492832f6c22d36d504b7ce8dd + REF v2.10.8 + SHA512 d80a7db59cfe81d8e0c645acff7bcc2ed9ad04e2f3d14dc4ab2a624290d0ea43a2c7adebb54b52a166fd07375352cfd5f1fe244d7c062ce94ec60b977437b2df HEAD_REF master ) @@ -21,6 +21,11 @@ if("websockets" IN_LIST FEATURES) set(CPPREST_EXCLUDE_WEBSOCKETS OFF) endif() +set(CPPREST_EXCLUDE_BROTLI ON) +if ("brotli" IN_LIST FEATURES) + set(CPPREST_EXCLUDE_BROTLI OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/Release PREFER_NINJA @@ -37,18 +42,11 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -if (EXISTS "${CURRENT_PACKAGES_DIR}/lib/share") # transition - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/share/cpprestsdk) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/share ${CURRENT_PACKAGES_DIR}/lib/share) -else() - vcpkg_fixup_cmake_targets() # v2.10.6 and below -endif() - - +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/share/cpprestsdk) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/share ${CURRENT_PACKAGES_DIR}/lib/share) file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cpprestsdk RENAME copyright) vcpkg_copy_pdbs() -