From 3d7fb9cda84558cd7708279059aa270dda47ce3c806e1051fd8d067a23537168 Mon Sep 17 00:00:00 2001 From: Andreas Stieger Date: Mon, 8 Jan 2018 16:36:24 +0000 Subject: [PATCH] Accepting request 561866 from home:1Antoine1:branches:devel:libraries:c_c++ - Update to version 2.10.1: * Improve CMake generation of UWP binaries. * Fix regression in CMake versions supported. As listed in the main CMakeLists.txt, we intend to only require 3.0. * Mirror changes in the main PPL sources to Concurrency::details::do_while(), which yield a significant compiler throughput improvement on MSVC. * Fix issues under /permissive-, an on-by-default flag for new projects in VS2017 15.5. - Fix build with Boost 1.66: * Add cpprest-2.10.1-srand-boost-1.66.patch. * Add cpprest-2.10.1-threadpool-boost-1.66.patch. OBS-URL: https://build.opensuse.org/request/show/561866 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cpprest?expand=0&rev=28 --- cpprest-2.10.1-srand-boost-1.66.patch | 22 ++++++++++ cpprest-2.10.1-threadpool-boost-1.66.patch | 47 ++++++++++++++++++++++ cpprest.changes | 16 ++++++++ cpprest.spec | 10 ++++- cpprestsdk-2.10.0.tar.gz | 3 -- cpprestsdk-2.10.1.tar.gz | 3 ++ 6 files changed, 96 insertions(+), 5 deletions(-) create mode 100644 cpprest-2.10.1-srand-boost-1.66.patch create mode 100644 cpprest-2.10.1-threadpool-boost-1.66.patch delete mode 100644 cpprestsdk-2.10.0.tar.gz create mode 100644 cpprestsdk-2.10.1.tar.gz diff --git a/cpprest-2.10.1-srand-boost-1.66.patch b/cpprest-2.10.1-srand-boost-1.66.patch new file mode 100644 index 0000000..d80affa --- /dev/null +++ b/cpprest-2.10.1-srand-boost-1.66.patch @@ -0,0 +1,22 @@ +From 6b2e0480018530b616f61d5cdc786c92ba148bb7 Mon Sep 17 00:00:00 2001 +From: John Hruby +Date: Tue, 26 Dec 2017 16:52:13 +0100 +Subject: [PATCH] fixed strand + +--- + Release/libs/websocketpp/websocketpp/transport/asio/connection.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Release/libs/websocketpp/websocketpp/transport/asio/connection.hpp b/Release/libs/websocketpp/websocketpp/transport/asio/connection.hpp +index 0be40f6b..395632c3 100644 +--- a/Release/libs/websocketpp/websocketpp/transport/asio/connection.hpp ++++ b/Release/libs/websocketpp/websocketpp/transport/asio/connection.hpp +@@ -422,7 +422,7 @@ class connection : public config::socket_type::socket_con_type { + m_io_service = io_service; + + if (config::enable_multithreading) { +- m_strand = lib::make_shared( ++ m_strand = lib::make_shared( + lib::ref(*io_service)); + + m_async_read_handler = m_strand->wrap(lib::bind( diff --git a/cpprest-2.10.1-threadpool-boost-1.66.patch b/cpprest-2.10.1-threadpool-boost-1.66.patch new file mode 100644 index 0000000..ac22844 --- /dev/null +++ b/cpprest-2.10.1-threadpool-boost-1.66.patch @@ -0,0 +1,47 @@ +diff -up ./Release/include/pplx/threadpool.h.orig ./Release/include/pplx/threadpool.h +--- ./Release/include/pplx/threadpool.h.orig 2018-01-02 00:00:45.072599770 +0100 ++++ ./Release/include/pplx/threadpool.h 2018-01-02 00:01:04.504600576 +0100 +@@ -53,7 +53,7 @@ class threadpool + { + public: + static threadpool& shared_instance(); +- _ASYNCRTIMP static std::unique_ptr __cdecl construct(size_t num_threads); ++ _ASYNCRTIMP static std::unique_ptr __cdecl construct(int num_threads); + + virtual ~threadpool() = default; + +@@ -67,7 +67,7 @@ public: + boost::asio::io_service& service() { return m_service; } + + protected: +- threadpool(size_t num_threads) : m_service(num_threads) {} ++ threadpool(int num_threads) : m_service(num_threads) {} + + boost::asio::io_service m_service; + }; +diff -up ./Release/src/pplx/threadpool.cpp.orig ./Release/src/pplx/threadpool.cpp +--- ./Release/src/pplx/threadpool.cpp.orig 2018-01-01 23:45:35.424562058 +0100 ++++ ./Release/src/pplx/threadpool.cpp 2018-01-01 23:51:05.732575752 +0100 +@@ -31,11 +31,11 @@ namespace + + struct threadpool_impl final : crossplat::threadpool + { +- threadpool_impl(size_t n) ++ threadpool_impl(int n) + : crossplat::threadpool(n) + , m_work(m_service) + { +- for (size_t i = 0; i < n; i++) ++ for (int i = 0; i < n; i++) + add_thread(); + } + +@@ -152,7 +152,7 @@ void cpprest_init(JavaVM* vm) { + } + #endif + +-std::unique_ptr crossplat::threadpool::construct(size_t num_threads) ++std::unique_ptr crossplat::threadpool::construct(int num_threads) + { + return std::unique_ptr(new threadpool_impl(num_threads)); + } diff --git a/cpprest.changes b/cpprest.changes index fc3b3cb..8d451b1 100644 --- a/cpprest.changes +++ b/cpprest.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Mon Jan 1 22:10:37 UTC 2018 - antoine.belvire@opensuse.org + +- Update to version 2.10.1: + * Improve CMake generation of UWP binaries. + * Fix regression in CMake versions supported. As listed in the + main CMakeLists.txt, we intend to only require 3.0. + * Mirror changes in the main PPL sources to + Concurrency::details::do_while(), which yield a significant + compiler throughput improvement on MSVC. + * Fix issues under /permissive-, an on-by-default flag for new + projects in VS2017 15.5. +- Fix build with Boost 1.66: + * Add cpprest-2.10.1-srand-boost-1.66.patch. + * Add cpprest-2.10.1-threadpool-boost-1.66.patch. + ------------------------------------------------------------------- Tue Dec 5 11:49:40 UTC 2017 - i@marguerite.su diff --git a/cpprest.spec b/cpprest.spec index 798b441..561d073 100644 --- a/cpprest.spec +++ b/cpprest.spec @@ -1,7 +1,7 @@ # # spec file for package cpprest # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %define major 2 %define minor 10 Name: cpprest -Version: 2.10.0 +Version: 2.10.1 Release: 0 Summary: C++ REST library # main: MIT (license.txt) @@ -32,6 +32,10 @@ License: MIT AND BSD-3-Clause AND Zlib Group: Development/Libraries/C and C++ Url: https://github.com/Microsoft/cpprestsdk Source: https://github.com/Microsoft/cpprestsdk/archive/v%{version}.tar.gz#/cpprestsdk-%{version}.tar.gz +# PATCH-FIX-UPSTREAM cpprest-2.10.1-srand-boost-1.66.patch -- Fix build with boost 1.66 +Patch0: cpprest-2.10.1-srand-boost-1.66.patch +# PATCH-FIX-UPSTREAM cpprest-2.10.1-threadpool-boost-1.66.patch -- Fix build with boost 1.66 +Patch1: cpprest-2.10.1-threadpool-boost-1.66.patch BuildRequires: cmake >= 3.0 BuildRequires: gcc-c++ BuildRequires: openssl-devel >= 1.0 @@ -76,6 +80,8 @@ Development files. %prep %setup -q -n cpprestsdk-%{version} +%patch0 -p1 +%patch1 -p1 %build %cmake \ diff --git a/cpprestsdk-2.10.0.tar.gz b/cpprestsdk-2.10.0.tar.gz deleted file mode 100644 index 80f25a8..0000000 --- a/cpprestsdk-2.10.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:de333da67f1cb3d1b30be118860531092467f18d24ca6b4d36f6623fecab0de0 -size 2058343 diff --git a/cpprestsdk-2.10.1.tar.gz b/cpprestsdk-2.10.1.tar.gz new file mode 100644 index 0000000..b0065de --- /dev/null +++ b/cpprestsdk-2.10.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f38bc48e6fca969de794dcd65889df6563855cee5ff99742dafc6b2869976e71 +size 2057277