[oe-commits] [meta-openembedded] 37/73: cpprest: upgrade to version 2.10.7 and add support for brotli library

git at git.openembedded.org git at git.openembedded.org
Sun Nov 25 20:55:48 UTC 2018


This is an automated email from the git hooks/post-receive script.

armin_kuster pushed a commit to branch thud-next
in repository meta-openembedded.

commit a4e589147636ce78a0806a96d96102dae5e61319
Author: Gianfranco Costamagna <costamagna.gianfranco at gmail.com>
AuthorDate: Mon Nov 5 16:16:53 2018 +0100

    cpprest: upgrade to version 2.10.7 and add support for brotli library
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 meta-oe/recipes-support/cpprest/cpprest/845.patch  | 42 ----------------------
 .../recipes-support/cpprest/cpprest/950-fix.patch  | 26 ++++++++++++++
 .../cpprest/cpprest/disable-outside-tests.patch    |  6 ++--
 .../cpprest/cpprest/system-brotli.patch            | 38 ++++++++++++++++++++
 .../{cpprest_2.10.6.bb => cpprest_2.10.7.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 8a349ae..0000000
--- a/meta-oe/recipes-support/cpprest/cpprest/845.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From c4a09f3d29a57022e03e2849f04c111a57a6a388 Mon Sep 17 00:00:00 2001
-From: Gianfranco Costamagna <costamagnagianfranco at yahoo.it>
-Date: Sat, 18 Aug 2018 14:59:38 +0200
-Subject: [PATCH] Fix default installation path
-
----
- Release/CMakeLists.txt     | 2 +-
- Release/src/CMakeLists.txt | 4 ++--
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/Release/CMakeLists.txt b/Release/CMakeLists.txt
-index c93d3cc49..d20b4b070 100644
---- a/Release/CMakeLists.txt
-+++ b/Release/CMakeLists.txt
-@@ -18,7 +18,7 @@ enable_testing()
- set(WERROR ON CACHE BOOL "Treat Warnings as Errors.")
- set(CPPREST_EXCLUDE_WEBSOCKETS OFF CACHE BOOL "Exclude websockets functionality.")
- set(CPPREST_EXCLUDE_COMPRESSION OFF CACHE BOOL "Exclude compression functionality.")
--set(CPPREST_EXPORT_DIR lib/cpprestsdk CACHE STRING "Directory to install CMake config files.")
-+set(CPPREST_EXPORT_DIR cmake CACHE STRING "Directory to install CMake config files.")
- set(CPPREST_INSTALL_HEADERS ON CACHE BOOL "Install header files.")
- set(CPPREST_INSTALL ON CACHE BOOL "Add install commands.")
- 
-diff --git a/Release/src/CMakeLists.txt b/Release/src/CMakeLists.txt
-index a34605bda..050ff71fc 100644
---- a/Release/src/CMakeLists.txt
-+++ b/Release/src/CMakeLists.txt
-@@ -262,12 +262,12 @@ if(CPPREST_INSTALL)
- 
-   install(
-     FILES "${CMAKE_CURRENT_BINARY_DIR}/cpprestsdk-config.cmake"
--    DESTINATION ${CPPREST_EXPORT_DIR}
-+    DESTINATION ${CMAKE_INSTALL_LIBDIR}/${CPPREST_EXPORT_DIR}
-   )
-   install(
-     EXPORT cpprestsdk-targets
-     FILE cpprestsdk-targets.cmake
-     NAMESPACE cpprestsdk::
--    DESTINATION ${CPPREST_EXPORT_DIR}
-+    DESTINATION ${CMAKE_INSTALL_LIBDIR}/${CPPREST_EXPORT_DIR}
-   )
- 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 0000000..3ae46a1
--- /dev/null
+++ b/meta-oe/recipes-support/cpprest/cpprest/950-fix.patch
@@ -0,0 +1,26 @@
+Origin: upstream
+Bug: https://github.com/Microsoft/cpprestsdk/issues/950
+Last-Update: 2018-11-04
+
+Index: cpprest/Release/src/utilities/asyncrt_utils.cpp
+===================================================================
+--- cpprest.orig/Release/src/utilities/asyncrt_utils.cpp
++++ cpprest/Release/src/utilities/asyncrt_utils.cpp
+@@ -356,7 +356,7 @@
+ inline size_t count_utf8_to_utf16(const std::string& s)
+ {
+     const size_t sSize = s.size();
+-    auto sData = reinterpret_cast<const UtilCharInternal_t* const>(s.data());
++    auto const sData = reinterpret_cast<const UtilCharInternal_t*>(s.data());
+     size_t result{ sSize };
+ 
+     for (size_t index = 0; index < sSize;)
+@@ -441,7 +441,7 @@
+ {
+     // Save repeated heap allocations, use the length of resulting sequence.
+     const size_t srcSize = s.size();
+-    auto srcData = reinterpret_cast<const UtilCharInternal_t* const>(s.data());
++    auto const srcData = reinterpret_cast<const UtilCharInternal_t*>(s.data());
+     utf16string dest(count_utf8_to_utf16(s), L'\0');
+     utf16string::value_type* const destData = &dest[0];
+     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 b9b3591..2dff0d9 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 @@
 Description: Debian forbids calls to external websites.
 
-Author: Gianfranco Costamagna <costamagnagianfranco at yahoo.it>
+Author: Gianfranco Costamagna <locutus at debian.org>
 Origin: Debian
 Forwarded: not-needed
-Reviewed-By: Gianfranco Costamagna <costamagnagianfranco at yahoo.it>
+Reviewed-By: Gianfranco Costamagna <locutusofborg at debian.org>
 Last-Update: 2015-11-25
 
 Index: casablanca/Release/tests/functional/http/client/CMakeLists.txt
 ===================================================================
 --- casablanca.orig/Release/tests/functional/http/client/CMakeLists.txt
 +++ casablanca/Release/tests/functional/http/client/CMakeLists.txt
-@@ -9,7 +9,6 @@
+@@ -12,7 +12,6 @@
    multiple_requests.cpp
    oauth1_tests.cpp
    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 0000000..e6f6477
--- /dev/null
+++ b/meta-oe/recipes-support/cpprest/cpprest/system-brotli.patch
@@ -0,0 +1,38 @@
+Description: Find system brotli
+Author: Gianfranco Costamagna <locutusofborg at debian.org>
+Forwarded: https://github.com/Microsoft/cpprestsdk/pull/952
+Last-Update: 2018-11-05
+
+--- cpprest-2.10.7.orig/Release/cmake/cpprest_find_brotli.cmake
++++ cpprest-2.10.7/Release/cmake/cpprest_find_brotli.cmake
+@@ -3,8 +3,17 @@ function(cpprest_find_brotli)
+     return()
+   endif()
+ 
+-  find_package(unofficial-brotli REQUIRED)
+ 
+-  add_library(cpprestsdk_brotli_internal INTERFACE)
+-  target_link_libraries(cpprestsdk_brotli_internal INTERFACE unofficial::brotli::brotlienc unofficial::brotli::brotlidec unofficial::brotli::brotlicommon)
++  find_package(PkgConfig)
++  pkg_check_modules(BROTLIENC libbrotlienc)
++  pkg_check_modules(BROTLIDEC libbrotlidec)
++  if(BROTLIDEC_FOUND AND BROTLIENC_FOUND)
++	  target_link_libraries(cpprest PRIVATE ${BROTLIDEC_LDFLAGS} ${BROTLIENC_LDFLAGS})
++  else(BROTLIDEC_FOUND AND BROTLIENC_FOUND)
++    find_package(unofficial-brotli REQUIRED)
++    add_library(cpprestsdk_brotli_internal INTERFACE)
++    target_link_libraries(cpprestsdk_brotli_internal INTERFACE unofficial::brotli::brotlienc unofficial::brotli::brotlidec unofficial::brotli::brotlicommon)
++    target_link_libraries(cpprest PRIVATE cpprestsdk_brotli_internal)
++  endif(BROTLIDEC_FOUND AND BROTLIENC_FOUND)
++
+ endfunction()
+--- cpprest-2.10.7.orig/Release/src/CMakeLists.txt
++++ cpprest-2.10.7/Release/src/CMakeLists.txt
+@@ -84,7 +84,6 @@ else()
+     target_compile_definitions(cpprest PRIVATE -DCPPREST_EXCLUDE_BROTLI=1)
+   else()
+     cpprest_find_brotli()
+-    target_link_libraries(cpprest PRIVATE cpprestsdk_brotli_internal)
+   endif()
+ endif()
+ 
diff --git a/meta-oe/recipes-support/cpprest/cpprest_2.10.6.bb b/meta-oe/recipes-support/cpprest/cpprest_2.10.7.bb
similarity index 69%
rename from meta-oe/recipes-support/cpprest/cpprest_2.10.6.bb
rename to meta-oe/recipes-support/cpprest/cpprest_2.10.7.bb
index a3162bb..5cc6385 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"
 HOMEPAGE = "https://github.com/Microsoft/cpprestsdk/"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${S}/license.txt;md5=a2e15b954769218ff912468eecd6a02f"
-DEPENDS = "openssl websocketpp zlib boost"
+DEPENDS = "openssl websocketpp zlib boost brotli"
+
+EXTRA_OECMAKE = "-DCPPREST_EXPORT_DIR=cmake -DCPPREST_EXCLUDE_BROTLI=OFF"
 
 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://845.patch \
+           file://950-fix.patch \
+           file://system-brotli.patch \
            "
 
-# tag 2.10.6
-SRCREV= "66e50f02dde92f802bbd3a8d79c6352954665b9b"
+# tag 2.10.7
+SRCREV= "c4cef129e880a3f9c23a480e8c983793963173bb"
 
 S = "${WORKDIR}/git"
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list