summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGianfranco Costamagna <costamagna.gianfranco@gmail.com>2018-11-05 16:16:53 +0100
committerArmin Kuster <akuster808@gmail.com>2018-11-15 13:18:51 -0800
commita4e589147636ce78a0806a96d96102dae5e61319 (patch)
tree4a4a94320a1c23d3841b5125cee98c5439692a4b
parent0ded4a44ac2bbc186e4f3df8c60eade85e8e94eb (diff)
downloadmeta-openembedded-a4e589147636ce78a0806a96d96102dae5e61319.tar.gz
cpprest: upgrade to version 2.10.7 and add support for brotli library
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-oe/recipes-support/cpprest/cpprest/845.patch42
-rw-r--r--meta-oe/recipes-support/cpprest/cpprest/950-fix.patch26
-rw-r--r--meta-oe/recipes-support/cpprest/cpprest/disable-outside-tests.patch6
-rw-r--r--meta-oe/recipes-support/cpprest/cpprest/system-brotli.patch38
-rw-r--r--meta-oe/recipes-support/cpprest/cpprest_2.10.7.bb (renamed from meta-oe/recipes-support/cpprest/cpprest_2.10.6.bb)11
5 files changed, 74 insertions, 49 deletions
diff --git a/meta-oe/recipes-support/cpprest/cpprest/845.patch b/meta-oe/recipes-support/cpprest/cpprest/845.patch
deleted file mode 100644
index 8a349aef7..000000000
--- a/meta-oe/recipes-support/cpprest/cpprest/845.patch
+++ /dev/null
@@ -1,42 +0,0 @@
1From c4a09f3d29a57022e03e2849f04c111a57a6a388 Mon Sep 17 00:00:00 2001
2From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
3Date: Sat, 18 Aug 2018 14:59:38 +0200
4Subject: [PATCH] Fix default installation path
5
6---
7 Release/CMakeLists.txt | 2 +-
8 Release/src/CMakeLists.txt | 4 ++--
9 2 files changed, 3 insertions(+), 3 deletions(-)
10
11diff --git a/Release/CMakeLists.txt b/Release/CMakeLists.txt
12index c93d3cc49..d20b4b070 100644
13--- a/Release/CMakeLists.txt
14+++ b/Release/CMakeLists.txt
15@@ -18,7 +18,7 @@ enable_testing()
16 set(WERROR ON CACHE BOOL "Treat Warnings as Errors.")
17 set(CPPREST_EXCLUDE_WEBSOCKETS OFF CACHE BOOL "Exclude websockets functionality.")
18 set(CPPREST_EXCLUDE_COMPRESSION OFF CACHE BOOL "Exclude compression functionality.")
19-set(CPPREST_EXPORT_DIR lib/cpprestsdk CACHE STRING "Directory to install CMake config files.")
20+set(CPPREST_EXPORT_DIR cmake CACHE STRING "Directory to install CMake config files.")
21 set(CPPREST_INSTALL_HEADERS ON CACHE BOOL "Install header files.")
22 set(CPPREST_INSTALL ON CACHE BOOL "Add install commands.")
23
24diff --git a/Release/src/CMakeLists.txt b/Release/src/CMakeLists.txt
25index a34605bda..050ff71fc 100644
26--- a/Release/src/CMakeLists.txt
27+++ b/Release/src/CMakeLists.txt
28@@ -262,12 +262,12 @@ if(CPPREST_INSTALL)
29
30 install(
31 FILES "${CMAKE_CURRENT_BINARY_DIR}/cpprestsdk-config.cmake"
32- DESTINATION ${CPPREST_EXPORT_DIR}
33+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/${CPPREST_EXPORT_DIR}
34 )
35 install(
36 EXPORT cpprestsdk-targets
37 FILE cpprestsdk-targets.cmake
38 NAMESPACE cpprestsdk::
39- DESTINATION ${CPPREST_EXPORT_DIR}
40+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/${CPPREST_EXPORT_DIR}
41 )
42 endif()
diff --git a/meta-oe/recipes-support/cpprest/cpprest/950-fix.patch b/meta-oe/recipes-support/cpprest/cpprest/950-fix.patch
new file mode 100644
index 000000000..3ae46a115
--- /dev/null
+++ b/meta-oe/recipes-support/cpprest/cpprest/950-fix.patch
@@ -0,0 +1,26 @@
1Origin: upstream
2Bug: https://github.com/Microsoft/cpprestsdk/issues/950
3Last-Update: 2018-11-04
4
5Index: cpprest/Release/src/utilities/asyncrt_utils.cpp
6===================================================================
7--- cpprest.orig/Release/src/utilities/asyncrt_utils.cpp
8+++ cpprest/Release/src/utilities/asyncrt_utils.cpp
9@@ -356,7 +356,7 @@
10 inline size_t count_utf8_to_utf16(const std::string& s)
11 {
12 const size_t sSize = s.size();
13- auto sData = reinterpret_cast<const UtilCharInternal_t* const>(s.data());
14+ auto const sData = reinterpret_cast<const UtilCharInternal_t*>(s.data());
15 size_t result{ sSize };
16
17 for (size_t index = 0; index < sSize;)
18@@ -441,7 +441,7 @@
19 {
20 // Save repeated heap allocations, use the length of resulting sequence.
21 const size_t srcSize = s.size();
22- auto srcData = reinterpret_cast<const UtilCharInternal_t* const>(s.data());
23+ auto const srcData = reinterpret_cast<const UtilCharInternal_t*>(s.data());
24 utf16string dest(count_utf8_to_utf16(s), L'\0');
25 utf16string::value_type* const destData = &dest[0];
26 size_t destIndex = 0;
diff --git a/meta-oe/recipes-support/cpprest/cpprest/disable-outside-tests.patch b/meta-oe/recipes-support/cpprest/cpprest/disable-outside-tests.patch
index b9b3591c3..2dff0d97c 100644
--- a/meta-oe/recipes-support/cpprest/cpprest/disable-outside-tests.patch
+++ b/meta-oe/recipes-support/cpprest/cpprest/disable-outside-tests.patch
@@ -1,16 +1,16 @@
1Description: Debian forbids calls to external websites. 1Description: Debian forbids calls to external websites.
2 2
3Author: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> 3Author: Gianfranco Costamagna <locutus@debian.org>
4Origin: Debian 4Origin: Debian
5Forwarded: not-needed 5Forwarded: not-needed
6Reviewed-By: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> 6Reviewed-By: Gianfranco Costamagna <locutusofborg@debian.org>
7Last-Update: 2015-11-25 7Last-Update: 2015-11-25
8 8
9Index: casablanca/Release/tests/functional/http/client/CMakeLists.txt 9Index: casablanca/Release/tests/functional/http/client/CMakeLists.txt
10=================================================================== 10===================================================================
11--- casablanca.orig/Release/tests/functional/http/client/CMakeLists.txt 11--- casablanca.orig/Release/tests/functional/http/client/CMakeLists.txt
12+++ casablanca/Release/tests/functional/http/client/CMakeLists.txt 12+++ casablanca/Release/tests/functional/http/client/CMakeLists.txt
13@@ -9,7 +9,6 @@ 13@@ -12,7 +12,6 @@
14 multiple_requests.cpp 14 multiple_requests.cpp
15 oauth1_tests.cpp 15 oauth1_tests.cpp
16 oauth2_tests.cpp 16 oauth2_tests.cpp
diff --git a/meta-oe/recipes-support/cpprest/cpprest/system-brotli.patch b/meta-oe/recipes-support/cpprest/cpprest/system-brotli.patch
new file mode 100644
index 000000000..e6f64772d
--- /dev/null
+++ b/meta-oe/recipes-support/cpprest/cpprest/system-brotli.patch
@@ -0,0 +1,38 @@
1Description: Find system brotli
2Author: Gianfranco Costamagna <locutusofborg@debian.org>
3Forwarded: https://github.com/Microsoft/cpprestsdk/pull/952
4Last-Update: 2018-11-05
5
6--- cpprest-2.10.7.orig/Release/cmake/cpprest_find_brotli.cmake
7+++ cpprest-2.10.7/Release/cmake/cpprest_find_brotli.cmake
8@@ -3,8 +3,17 @@ function(cpprest_find_brotli)
9 return()
10 endif()
11
12- find_package(unofficial-brotli REQUIRED)
13
14- add_library(cpprestsdk_brotli_internal INTERFACE)
15- target_link_libraries(cpprestsdk_brotli_internal INTERFACE unofficial::brotli::brotlienc unofficial::brotli::brotlidec unofficial::brotli::brotlicommon)
16+ find_package(PkgConfig)
17+ pkg_check_modules(BROTLIENC libbrotlienc)
18+ pkg_check_modules(BROTLIDEC libbrotlidec)
19+ if(BROTLIDEC_FOUND AND BROTLIENC_FOUND)
20+ target_link_libraries(cpprest PRIVATE ${BROTLIDEC_LDFLAGS} ${BROTLIENC_LDFLAGS})
21+ else(BROTLIDEC_FOUND AND BROTLIENC_FOUND)
22+ find_package(unofficial-brotli REQUIRED)
23+ add_library(cpprestsdk_brotli_internal INTERFACE)
24+ target_link_libraries(cpprestsdk_brotli_internal INTERFACE unofficial::brotli::brotlienc unofficial::brotli::brotlidec unofficial::brotli::brotlicommon)
25+ target_link_libraries(cpprest PRIVATE cpprestsdk_brotli_internal)
26+ endif(BROTLIDEC_FOUND AND BROTLIENC_FOUND)
27+
28 endfunction()
29--- cpprest-2.10.7.orig/Release/src/CMakeLists.txt
30+++ cpprest-2.10.7/Release/src/CMakeLists.txt
31@@ -84,7 +84,6 @@ else()
32 target_compile_definitions(cpprest PRIVATE -DCPPREST_EXCLUDE_BROTLI=1)
33 else()
34 cpprest_find_brotli()
35- target_link_libraries(cpprest PRIVATE cpprestsdk_brotli_internal)
36 endif()
37 endif()
38
diff --git a/meta-oe/recipes-support/cpprest/cpprest_2.10.6.bb b/meta-oe/recipes-support/cpprest/cpprest_2.10.7.bb
index a3162bb43..5cc6385df 100644
--- a/meta-oe/recipes-support/cpprest/cpprest_2.10.6.bb
+++ b/meta-oe/recipes-support/cpprest/cpprest_2.10.7.bb
@@ -3,17 +3,20 @@ SECTION = "libs/network"
3HOMEPAGE = "https://github.com/Microsoft/cpprestsdk/" 3HOMEPAGE = "https://github.com/Microsoft/cpprestsdk/"
4LICENSE = "MIT" 4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://${S}/license.txt;md5=a2e15b954769218ff912468eecd6a02f" 5LIC_FILES_CHKSUM = "file://${S}/license.txt;md5=a2e15b954769218ff912468eecd6a02f"
6DEPENDS = "openssl websocketpp zlib boost" 6DEPENDS = "openssl websocketpp zlib boost brotli"
7
8EXTRA_OECMAKE = "-DCPPREST_EXPORT_DIR=cmake -DCPPREST_EXCLUDE_BROTLI=OFF"
7 9
8SRC_URI = "git://github.com/Microsoft/cpprestsdk.git;protocol=https;branch=master \ 10SRC_URI = "git://github.com/Microsoft/cpprestsdk.git;protocol=https;branch=master \
9 file://disable-outside-tests.patch \ 11 file://disable-outside-tests.patch \
10 file://disable-test-timeouts.patch \ 12 file://disable-test-timeouts.patch \
11 file://disable-float-tests.patch \ 13 file://disable-float-tests.patch \
12 file://845.patch \ 14 file://950-fix.patch \
15 file://system-brotli.patch \
13 " 16 "
14 17
15# tag 2.10.6 18# tag 2.10.7
16SRCREV= "66e50f02dde92f802bbd3a8d79c6352954665b9b" 19SRCREV= "c4cef129e880a3f9c23a480e8c983793963173bb"
17 20
18S = "${WORKDIR}/git" 21S = "${WORKDIR}/git"
19 22