summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/cpprest/cpprest-2.10.3
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-support/cpprest/cpprest-2.10.3')
-rw-r--r--meta-oe/recipes-support/cpprest/cpprest-2.10.3/732.patch25
-rw-r--r--meta-oe/recipes-support/cpprest/cpprest-2.10.3/747.patch12
-rw-r--r--meta-oe/recipes-support/cpprest/cpprest-2.10.3/disable-float-tests.patch25
-rw-r--r--meta-oe/recipes-support/cpprest/cpprest-2.10.3/disable-outside-tests.patch142
-rw-r--r--meta-oe/recipes-support/cpprest/cpprest-2.10.3/disable-test-timeouts.patch103
-rw-r--r--meta-oe/recipes-support/cpprest/cpprest-2.10.3/fix-cmake-install.patch59
6 files changed, 366 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/cpprest/cpprest-2.10.3/732.patch b/meta-oe/recipes-support/cpprest/cpprest-2.10.3/732.patch
new file mode 100644
index 0000000000..9fcffbfed2
--- /dev/null
+++ b/meta-oe/recipes-support/cpprest/cpprest-2.10.3/732.patch
@@ -0,0 +1,25 @@
1From 3d8caad3f459d8b2136c5bc9be7fdec53e5d777d Mon Sep 17 00:00:00 2001
2From: Wu Yongwei <wuyongwei@gmail.com>
3Date: Tue, 10 Apr 2018 11:29:12 +0800
4Subject: [PATCH] Fix a build problem on Clang.
5
6AND_CAPTURE_MEMBER_FUNCTION_POINTERS workaround had a check for GCC,
7but did not exclude Clang. Clang has a fake GCC version of 4.2, thus
8caused problems.
9---
10 Release/src/http/client/http_client_asio.cpp | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/Release/src/http/client/http_client_asio.cpp b/Release/src/http/client/http_client_asio.cpp
14index 4ba3e085..fca4bb5b 100644
15--- a/Release/src/http/client/http_client_asio.cpp
16+++ b/Release/src/http/client/http_client_asio.cpp
17@@ -47,7 +47,7 @@
18 #include <unordered_set>
19 #include <memory>
20
21-#if defined(__GNUC__)
22+#if defined(__GNUC__) && !defined(__clang__)
23
24 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
25 #define AND_CAPTURE_MEMBER_FUNCTION_POINTERS
diff --git a/meta-oe/recipes-support/cpprest/cpprest-2.10.3/747.patch b/meta-oe/recipes-support/cpprest/cpprest-2.10.3/747.patch
new file mode 100644
index 0000000000..94bb005989
--- /dev/null
+++ b/meta-oe/recipes-support/cpprest/cpprest-2.10.3/747.patch
@@ -0,0 +1,12 @@
1Description: fix for upstream issue 747, clang 6 build error
2From: rozhuk-im
3--- a/Release/include/pplx/pplxlinux.h 2018-04-29 16:22:39.927675000 +0300
4+++ b/Release/include/pplx/pplxlinux.h 2018-04-29 16:22:57.809537000 +0300
5@@ -240,6 +240,7 @@
6 {
7 public:
8 _PPLXIMP virtual void schedule( TaskProc_t proc, _In_ void* param);
9+ virtual ~linux_scheduler() {}
10 };
11
12 } // namespace details
diff --git a/meta-oe/recipes-support/cpprest/cpprest-2.10.3/disable-float-tests.patch b/meta-oe/recipes-support/cpprest/cpprest-2.10.3/disable-float-tests.patch
new file mode 100644
index 0000000000..75f74ec658
--- /dev/null
+++ b/meta-oe/recipes-support/cpprest/cpprest-2.10.3/disable-float-tests.patch
@@ -0,0 +1,25 @@
1Description: new toolchain might have increased the float precision
2Author: Gianfranco Costamagna <locutusofborg@debian.org>
3Last-Update: 2017-10-28
4Forwarded: https://github.com/Microsoft/cpprestsdk/issues/576
5
6--- casablanca-2.10.0.orig/Release/tests/functional/streams/istream_tests.cpp
7+++ casablanca-2.10.0/Release/tests/functional/streams/istream_tests.cpp
8@@ -1302,7 +1302,7 @@ void compare_float(float expected, float
9 {
10 compare_floating(expected, actual, FLT_EPSILON);
11 }
12-
13+/*
14 TEST(extract_floating_point)
15 {
16 std::string test_string;
17@@ -1349,7 +1349,7 @@ TEST(extract_floating_point)
18 VERIFY_ARE_EQUAL(1 / expected, 1 / actual);
19 } while (!std_istream.eof());
20 }
21-
22+*/
23 TEST(extract_floating_point_with_exceptions)
24 {
25 std::vector<std::pair<std::string, std::string>> tests;
diff --git a/meta-oe/recipes-support/cpprest/cpprest-2.10.3/disable-outside-tests.patch b/meta-oe/recipes-support/cpprest/cpprest-2.10.3/disable-outside-tests.patch
new file mode 100644
index 0000000000..b9b3591c3a
--- /dev/null
+++ b/meta-oe/recipes-support/cpprest/cpprest-2.10.3/disable-outside-tests.patch
@@ -0,0 +1,142 @@
1Description: Debian forbids calls to external websites.
2
3Author: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
4Origin: Debian
5Forwarded: not-needed
6Reviewed-By: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
7Last-Update: 2015-11-25
8
9Index: casablanca/Release/tests/functional/http/client/CMakeLists.txt
10===================================================================
11--- casablanca.orig/Release/tests/functional/http/client/CMakeLists.txt
12+++ casablanca/Release/tests/functional/http/client/CMakeLists.txt
13@@ -9,7 +9,6 @@
14 multiple_requests.cpp
15 oauth1_tests.cpp
16 oauth2_tests.cpp
17- outside_tests.cpp
18 pipeline_stage_tests.cpp
19 progress_handler_tests.cpp
20 proxy_tests.cpp
21Index: casablanca/Release/tests/functional/http/client/authentication_tests.cpp
22===================================================================
23--- casablanca.orig/Release/tests/functional/http/client/authentication_tests.cpp
24+++ casablanca/Release/tests/functional/http/client/authentication_tests.cpp
25@@ -663,15 +663,19 @@
26 VERIFY_ARE_EQUAL(return_code, response.status_code());
27 }
28
29+/*
30 TEST(auth_no_data)
31 {
32 auth_test_impl(false);
33 }
34+*/
35
36+/*
37 TEST(unsuccessful_auth_with_basic_cred)
38 {
39 auth_test_impl(true);
40 }
41+*/
42
43 TEST_FIXTURE(uri_address, set_user_options_asio_http)
44 {
45@@ -692,7 +696,7 @@
46 auto response = client.request(methods::GET).get();
47 VERIFY_ARE_EQUAL(200, response.status_code());
48 }
49-
50+/*
51 TEST_FIXTURE(uri_address, set_user_options_asio_https)
52 {
53 handle_timeout([]
54@@ -714,7 +718,7 @@
55 VERIFY_IS_FALSE(v.empty());
56 });
57 }
58-
59+*/
60 #endif
61
62 } // SUITE(authentication_tests)
63Index: casablanca/Release/tests/functional/websockets/client/authentication_tests.cpp
64===================================================================
65--- casablanca.orig/Release/tests/functional/websockets/client/authentication_tests.cpp
66+++ casablanca/Release/tests/functional/websockets/client/authentication_tests.cpp
67@@ -86,7 +86,7 @@
68 }
69 return false;
70 }
71-
72+/*
73 TEST(ssl_test)
74 {
75 websocket_client client;
76@@ -122,7 +122,7 @@
77 throw;
78 }
79 }
80-
81+*/
82 // These tests are specific to our websocketpp based implementation.
83 #if !defined(__cplusplus_winrt)
84
85@@ -153,14 +153,15 @@
86 throw;
87 }
88 }
89-
90+/*
91 // Test specifically for server SignalR team hit interesting cases with.
92 TEST(sni_with_older_server_test)
93 {
94 websocket_client client;
95 sni_test_impl(client);
96 }
97-
98+*/
99+/*
100 // WinRT doesn't expose option for disabling.
101 // No stable server is available to reliably test this.
102 // The configuration below relies on a timeout in the success case.
103@@ -188,7 +189,8 @@
104 throw;
105 }
106 }
107-
108+*/
109+/*
110 // Winrt doesn't allow explicitly setting server host for SNI.
111 TEST(sni_explicit_hostname)
112 {
113@@ -199,7 +201,7 @@
114 websocket_client client(config);
115 sni_test_impl(client);
116 }
117-
118+*/
119 void handshake_error_test_impl(const ::utility::string_t &host)
120 {
121 websocket_client client;
122Index: casablanca/Release/tests/functional/http/client/connections_and_errors.cpp
123===================================================================
124--- casablanca.orig/Release/tests/functional/http/client/connections_and_errors.cpp
125+++ casablanca/Release/tests/functional/http/client/connections_and_errors.cpp
126@@ -415,6 +415,7 @@
127 }
128 #endif
129
130+/*
131 // Try to connect to a server on a closed port and cancel the operation.
132 TEST_FIXTURE(uri_address, cancel_bad_port)
133 {
134@@ -446,7 +447,7 @@
135
136 VERIFY_THROWS_HTTP_ERROR_CODE(t.get(), std::errc::operation_canceled);
137 }
138-
139+*/
140 } // SUITE(connections_and_errors)
141
142 }}}}
diff --git a/meta-oe/recipes-support/cpprest/cpprest-2.10.3/disable-test-timeouts.patch b/meta-oe/recipes-support/cpprest/cpprest-2.10.3/disable-test-timeouts.patch
new file mode 100644
index 0000000000..93c3e8a269
--- /dev/null
+++ b/meta-oe/recipes-support/cpprest/cpprest-2.10.3/disable-test-timeouts.patch
@@ -0,0 +1,103 @@
1Description: Some tests takes too long on slow architectures and timeouts
2 We can safely disable them.
3 e.g.
4 Release/tests/functional/http/client/connections_and_errors.cpp:142: error: Failure in request_timeout_microsecond: Test case timed out and is hung. Aborting all remaining test cases. Expected under 180000ms. FAILED
5
6Index: casablanca/Release/tests/functional/http/client/connections_and_errors.cpp
7===================================================================
8--- casablanca.orig/Release/tests/functional/http/client/connections_and_errors.cpp
9+++ casablanca/Release/tests/functional/http/client/connections_and_errors.cpp
10@@ -127,7 +127,7 @@
11 // Try sending another request.
12 VERIFY_THROWS(client.request(methods::GET).wait(), web::http::http_exception);
13 }
14-
15+/*
16 TEST_FIXTURE(uri_address, request_timeout)
17 {
18 test_http_server::scoped_server scoped(m_uri);
19@@ -146,7 +146,8 @@
20 #endif
21 t.get();
22 }
23-
24+*/
25+/*
26 TEST_FIXTURE(uri_address, request_timeout_microsecond)
27 {
28 pplx::task<test_request*> t;
29@@ -168,7 +169,7 @@
30 try { t.get(); }
31 catch (...) {}
32 }
33-
34+*/
35 TEST_FIXTURE(uri_address, invalid_method)
36 {
37 web::http::uri uri(U("http://www.bing.com/"));
38Index: casablanca/Release/tests/functional/http/listener/requests_tests.cpp
39===================================================================
40--- casablanca.orig/Release/tests/functional/http/listener/requests_tests.cpp
41+++ casablanca/Release/tests/functional/http/listener/requests_tests.cpp
42@@ -173,7 +173,7 @@
43
44 listener.close().wait();
45 }
46-
47+/*
48 TEST_FIXTURE(uri_address, response_order)
49 {
50 http_listener listener(m_uri);
51@@ -217,7 +217,7 @@
52
53 listener.close().wait();
54 }
55-
56+*/
57 TEST_FIXTURE(uri_address, uri_encoding, "Ignore", "Codeplex 201")
58 {
59 http_listener listener(m_uri);
60Index: casablanca/Release/tests/functional/websockets/client/authentication_tests.cpp
61===================================================================
62--- casablanca.orig/Release/tests/functional/websockets/client/authentication_tests.cpp
63+++ casablanca/Release/tests/functional/websockets/client/authentication_tests.cpp
64@@ -221,7 +221,7 @@
65 VERIFY_ARE_EQUAL("TLS handshake failed", e.error_code().message());
66 }
67 }
68-
69+/*
70 TEST(self_signed_cert)
71 {
72 handshake_error_test_impl(U("wss://self-signed.badssl.com/"));
73@@ -236,7 +236,7 @@
74 {
75 handshake_error_test_impl(U("wss://expired.badssl.com/"));
76 }
77-
78+*/
79 #endif
80
81 } // SUITE(authentication_tests)
82Index: casablanca/Release/tests/functional/websockets/client/client_construction.cpp
83===================================================================
84--- casablanca.orig/Release/tests/functional/websockets/client/client_construction.cpp
85+++ casablanca/Release/tests/functional/websockets/client/client_construction.cpp
86@@ -81,7 +81,7 @@
87 VERIFY_ARE_EQUAL(config2.credentials().username(), cred.username());
88 }
89
90-
91+/*
92 // Verify that we can get the baseuri from websocket_client connect.
93 TEST_FIXTURE(uri_address, uri_test)
94 {
95@@ -101,7 +101,7 @@
96 VERIFY_ARE_EQUAL(client2.uri(), m_uri);
97 client2.close().wait();
98 }
99-
100+*/
101 TEST_FIXTURE(uri_address, move_operations)
102 {
103 std::string body("hello");
diff --git a/meta-oe/recipes-support/cpprest/cpprest-2.10.3/fix-cmake-install.patch b/meta-oe/recipes-support/cpprest/cpprest-2.10.3/fix-cmake-install.patch
new file mode 100644
index 0000000000..4d03e6d282
--- /dev/null
+++ b/meta-oe/recipes-support/cpprest/cpprest-2.10.3/fix-cmake-install.patch
@@ -0,0 +1,59 @@
1Description: install cmake files into /usr/lib/cmake/cpprestsdk
2Author: Gianfranco Costamagna <locutusofborg@debian.org>
3Upstream-Status: https://github.com/Microsoft/cpprestsdk/pull/737
4Forwarded: https://github.com/Microsoft/cpprestsdk/pull/737
5Last-Update: 2018-04-19
6
7Index: cpprest/Release/CMakeLists.txt
8===================================================================
9--- cpprest.orig/Release/CMakeLists.txt
10+++ cpprest/Release/CMakeLists.txt
11@@ -18,7 +18,6 @@
12 set(WERROR ON CACHE BOOL "Treat Warnings as Errors.")
13 set(CPPREST_EXCLUDE_WEBSOCKETS OFF CACHE BOOL "Exclude websockets functionality.")
14 set(CPPREST_EXCLUDE_COMPRESSION OFF CACHE BOOL "Exclude compression functionality.")
15-set(CPPREST_EXPORT_DIR lib/cpprestsdk CACHE STRING "Directory to install CMake config files.")
16 set(CPPREST_INSTALL_HEADERS ON CACHE BOOL "Install header files.")
17 set(CPPREST_INSTALL ON CACHE BOOL "Add install commands.")
18
19@@ -63,6 +62,9 @@
20 include(cmake/cpprest_find_openssl.cmake)
21 include(cmake/cpprest_find_websocketpp.cmake)
22 include(CheckIncludeFiles)
23+if(UNIX)
24+include(GNUInstallDirs)
25+endif(UNIX)
26
27 find_package(Threads REQUIRED)
28 if(THREADS_HAVE_PTHREAD_ARG)
29Index: cpprest/Release/src/CMakeLists.txt
30===================================================================
31--- cpprest.orig/Release/src/CMakeLists.txt
32+++ cpprest/Release/src/CMakeLists.txt
33@@ -253,21 +253,21 @@
34 install(
35 TARGETS ${CPPREST_TARGETS}
36 EXPORT cpprestsdk-targets
37- RUNTIME DESTINATION bin
38- LIBRARY DESTINATION lib
39- ARCHIVE DESTINATION lib
40+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
41+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
42+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
43 )
44
45 configure_file(../cmake/cpprestsdk-config.in.cmake "${CMAKE_CURRENT_BINARY_DIR}/cpprestsdk-config.cmake" @ONLY)
46
47 install(
48 FILES "${CMAKE_CURRENT_BINARY_DIR}/cpprestsdk-config.cmake"
49- DESTINATION ${CPPREST_EXPORT_DIR}
50+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake
51 )
52 install(
53 EXPORT cpprestsdk-targets
54 FILE cpprestsdk-targets.cmake
55 NAMESPACE cpprestsdk::
56- DESTINATION ${CPPREST_EXPORT_DIR}
57+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake
58 )
59 endif()