cpprest: update to new 2.10.3 release, simplify recipe now that it has a cmake file in the root location

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Gianfranco Costamagna 2018-08-06 10:29:17 +02:00 committed by Khem Raj
parent 19b47730e0
commit 47d2bfaff1
10 changed files with 23 additions and 70 deletions

View File

@ -1,32 +0,0 @@
From 212536f9d66400bef4400c55efd05dd01303c035 Mon Sep 17 00:00:00 2001
From: Andreas Stieger <astieger@suse.com>
Date: Sun, 17 Jun 2018 13:00:05 +0200
Subject: [PATCH] Fix gcc8 error/warning -Werror=format-truncation=
utilities::datetime::to_string(): datetime_str and buf were oversized
for fitting into output without possible trunctation
---
Release/src/utilities/asyncrt_utils.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Release/src/utilities/asyncrt_utils.cpp b/Release/src/utilities/asyncrt_utils.cpp
index 0e62bdee..be38907c 100644
--- a/Release/src/utilities/asyncrt_utils.cpp
+++ b/Release/src/utilities/asyncrt_utils.cpp
@@ -691,12 +691,13 @@ utility::string_t datetime::to_string(date_format format) const
{
// Append fractional second, which is a 7-digit value with no trailing zeros
// This way, '1200' becomes '00012'
- char buf[9] = { 0 };
+ const int max_frac_length = 8;
+ char buf[max_frac_length+1] = { 0 };
snprintf(buf, sizeof(buf), ".%07ld", (long int)frac_sec);
// trim trailing zeros
- for (int i = 7; buf[i] == '0'; i--) buf[i] = '\0';
+ for (int i = max_frac_length-1; buf[i] == '0'; i--) buf[i] = '\0';
// format the datetime into a separate buffer
- char datetime_str[max_dt_length+1] = {0};
+ char datetime_str[max_dt_length-max_frac_length-1+1] = {0};
strftime(datetime_str, sizeof(datetime_str), "%Y-%m-%dT%H:%M:%S", &datetime);
// now print this buffer into the output buffer
snprintf(output, sizeof(output), "%s%sZ", datetime_str, buf);

View File

@ -1,14 +0,0 @@
Origin: https://github.com/Microsoft/cpprestsdk/issues/813
Last-Update: 2018-07-23
--- cpprest-2.10.2.orig/Release/libs/websocketpp/websocketpp/transport/asio/security/tls.hpp
+++ cpprest-2.10.2/Release/libs/websocketpp/websocketpp/transport/asio/security/tls.hpp
@@ -312,7 +312,7 @@ protected:
return make_error_code(transport::error::tls_short_read);
#else
if (ERR_GET_REASON(ec.value()) == boost::asio::ssl::error::stream_truncated) {
- return make_error_code(boost::asio::ssl::error::stream_truncated);
+ return make_error_code(static_cast<std::errc>(boost::asio::ssl::error::stream_truncated));
#endif
} else {
// We know it is a TLS related error, but otherwise don't know

View File

@ -30,7 +30,7 @@ Index: cpprest/Release/src/CMakeLists.txt
===================================================================
--- cpprest.orig/Release/src/CMakeLists.txt
+++ cpprest/Release/src/CMakeLists.txt
@@ -250,21 +250,21 @@
@@ -253,21 +253,21 @@
install(
TARGETS ${CPPREST_TARGETS}
EXPORT cpprestsdk-targets

View File

@ -1,23 +0,0 @@
SUMMARY = "Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design."
SECTION = "libs/network"
HOMEPAGE = "https://github.com/Microsoft/cpprestsdk/"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${S}/../license.txt;md5=a2e15b954769218ff912468eecd6a02f"
DEPENDS = "openssl websocketpp zlib boost"
SRC_URI = "git://github.com/Microsoft/cpprestsdk.git;protocol=https;branch=master \
file://disable-outside-tests.patch;patchdir=.. \
file://disable-test-timeouts.patch;patchdir=.. \
file://disable-float-tests.patch;patchdir=.. \
file://fix-cmake-install.patch;patchdir=.. \
file://747.patch;patchdir=.. \
file://732.patch;patchdir=.. \
file://787.patch;patchdir=.. \
"
# tag 2.10.2
SRCREV= "fea848e2a77563cf2a6f28f8eab396fd6e787fbf"
S = "${WORKDIR}/git/Release"
inherit cmake

View File

@ -0,0 +1,22 @@
SUMMARY = "Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design."
SECTION = "libs/network"
HOMEPAGE = "https://github.com/Microsoft/cpprestsdk/"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${S}/license.txt;md5=a2e15b954769218ff912468eecd6a02f"
DEPENDS = "openssl websocketpp zlib boost"
SRC_URI = "git://github.com/Microsoft/cpprestsdk.git;protocol=https;branch=master \
file://disable-outside-tests.patch \
file://disable-test-timeouts.patch \
file://disable-float-tests.patch \
file://fix-cmake-install.patch \
file://747.patch \
file://732.patch \
"
# tag 2.10.3
SRCREV= "e388a2e523f4d0b6aee2bb923637d82d8b969556"
S = "${WORKDIR}/git"
inherit cmake