libcpprestsdk: new package
PATCH v8 1/1 libcpprestsdk: new package
From: Adam Duskett <[email protected]>
The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
This package is licensed under the MIT package and depends on BOOST and OpenSSL/LibreSSL.
---
Changes v1 -> v2:
- Add "depends on BR2_USE_WCHAR # boost" to boost.mk (Thomas)
- Remove "depends on BR2_USE_MMU" from boost.mk (Thomas)
- Add "!BR2_USE_WCHAR" to boost.mk (Thomas)
Changes v2 -> v3:
- Update to v2.10.0
- Remove check for libressl now that OpenSSL is a virtual package.
- Add 0001-remove-cast-align-error-flag.patch to prevent cross-compiling warning errors.
- Add 0002-fix-xlocale-header-check.patch to prevent uclibc/musl errors due to a missing header.
- Add 0003-fix-compilation-issues-with-musl.patch which adds sys/time.h to asyncrt_utils.h.
Changes v3 -> v4:
- Fixed 0003-fix-compilation-issues-with-musl.patch
Changes v4 -> v5
- Patches now formatted with -N.
- Dependencies now on a single line.
Changes v5 -> v6
- Removed 0001-remove-cast-align-error-flag.patch in favor of passing -DWERROR=OFF in libcpprestsdk.mk (Arnout)
- Renamed fix-compilation-issues-with-musl.patch to include-sys-time-for-struct-timeval.patch (Arnout)
- Fixed spacing issues in Config.in
- Fixed spacing issues in libcpprestsdk.hash (Arnout)
Changes v6 -> v7
- Bump to version v2.10.1
Changes v7 -> v8:
- Added dependency for BR2_TOOLCHAIN_HAS_GCC_BUG_64735 (Thomas)
- Added 0003-fix-strand.patch to fix compiling against boost 1.66
DEVELOPERS | 1 + package/Config.in | 1 + .../0001-fix-xlocale-header-check.patch | 55 ++++++++++++++++++++++ .../0002-include-sys-time-for-struct-timeval.patch | 28 +++++++++++ package/libcpprestsdk/0003-fix-strand.patch | 28 +++++++++++ package/libcpprestsdk/Config.in | 30 ++++++++++++ package/libcpprestsdk/libcpprestsdk.hash | 3 ++ package/libcpprestsdk/libcpprestsdk.mk | 15 ++++++ 8 files changed, 161 insertions(+) create mode 100644 package/libcpprestsdk/0001-fix-xlocale-header-check.patch create mode 100644 package/libcpprestsdk/0002-include-sys-time-for-struct-timeval.patch create mode 100644 package/libcpprestsdk/0003-fix-strand.patch create mode 100644 package/libcpprestsdk/Config.in create mode 100644 package/libcpprestsdk/libcpprestsdk.hash create mode 100644 package/libcpprestsdk/libcpprestsdk.mk
DEVELOPERS +1 -0
@@ -44,6 +44,7 @@ F: package/gstreamer1/gst1-vaapi/ F: package/imx-usb-loader/ F: package/janus-gateway/ F: package/json-for-modern-cpp/ +F: package/libcpprestsdk/ F: package/libressl/ F: package/libselinux/ F: package/libsemanage/
package/Config.in +1 -0
@@ -1361,6 +1361,7 @@ menu "Networking" source "package/libcgi/Config.in" source "package/libcgicc/Config.in" source "package/libcoap/Config.in" + source "package/libcpprestsdk/Config.in" source "package/libcurl/Config.in" source "package/libdnet/Config.in" source "package/libeXosip2/Config.in"
package/libcpprestsdk/0001-fix-xlocale-header-check.patch new file +55 -0
55 lines not on this page · raw message
package/libcpprestsdk/0002-include-sys-time-for-struct-timeval.patch new file +28 -0
@@ -0,0 +1,28 @@ +From 25453f9c186cf441881b06bc5503d979acb0ab75 Mon Sep 17 00:00:00 2001 +From: Adam Duskett <[email protected]> +Date: Mon, 23 Oct 2017 09:38:11 -0400 +Subject: [PATCH] Include sys/time.h for struct timeval + +This is needed with musl. + +Upstream-Status: Accepted +Signed-off-by: Adam Duskett <[email protected]> +--- + Release/include/cpprest/asyncrt_utils.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Release/include/cpprest/asyncrt_utils.h b/Release/include/cpprest/asyncrt_utils.h +index 8faa2dc..aab87a5 100644 +--- a/Release/include/cpprest/asyncrt_utils.h ++++ b/Release/include/cpprest/asyncrt_utils.h +@@ -28,6 +28,7 @@ + #endif + + #ifndef _WIN32 ++#include <sys/time.h> + #include <boost/algorithm/string.hpp> + #if !defined(ANDROID) && !defined(__ANDROID__) && defined(HAVE_XLOCALE_H) // CodePlex 269 + /* Systems using glibc: xlocale.h has been removed from glibc 2.26 +-- +2.13.6 +
package/libcpprestsdk/0003-fix-strand.patch new file +28 -0
@@ -0,0 +1,28 @@ +From e75d642726c4c78c368e74660ef4bc5503f3ec12 Mon Sep 17 00:00:00 2001 +From: Adam Duskett <[email protected]> +Date: Sun, 14 Jan 2018 14:44:02 -0500 +Subject: [PATCH] fix strand + +From upstream, fixes compiling against boost 1.66 strand. + +Commit IDs 6b2e0480018530b616f61d5cdc786c92ba148bb7 + +Signed-off-by: Adam Duskett <[email protected]> +--- + Release/include/pplx/threadpool.h | 2 +- + Release/libs/websocketpp/websocketpp/transport/asio/connection.hpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +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<boost::asio::strand>( ++ m_strand = lib::make_shared<boost::asio::io_service::strand>( + lib::ref(*io_service)); + + m_async_read_handler = m_strand->wrap(lib::bind(
package/libcpprestsdk/Config.in new file +30 -0
@@ -0,0 +1,30 @@ +config BR2_PACKAGE_LIBCPPRESTSDK + bool "libcpprestsdk" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS # boost + depends on BR2_USE_WCHAR # boost + depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # exception_ptr + select BR2_PACKAGE_BOOST + select BR2_PACKAGE_BOOST_ATOMIC + select BR2_PACKAGE_BOOST_CHRONO + select BR2_PACKAGE_BOOST_DATE_TIME + select BR2_PACKAGE_BOOST_FILESYSTEM + select BR2_PACKAGE_BOOST_RANDOM + select BR2_PACKAGE_BOOST_REGEX + select BR2_PACKAGE_BOOST_THREAD + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + help + The C++ REST SDK is a Microsoft project for cloud-based + client-server communication in native code using a modern + asynchronous C++ API design. This project aims to help C++ + developers connect to and interact with services. + + https://github.com/Microsoft/cpprestsdk + +comment "libcpprestsdk needs a toolchain w/ C++, wchar, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \ + || !BR2_USE_WCHAR + +comment "libcpprestsdk needs exception_ptr" + depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
package/libcpprestsdk/libcpprestsdk.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally calculated +sha256 f38bc48e6fca969de794dcd65889df6563855cee5ff99742dafc6b2869976e71 libcpprestsdk-v2.10.1.tar.gz +sha256 5c191789f502ac87df83b57008d2fc3e47fbf31315381b5bc4309f6602d0fe97 license.txt
package/libcpprestsdk/libcpprestsdk.mk new file +15 -0
@@ -0,0 +1,15 @@ +################################################################################ +# +# libcpprestsdk +# +################################################################################ + +LIBCPPRESTSDK_VERSION = v2.10.1 +LIBCPPRESTSDK_SITE = $(call github,Microsoft,cpprestsdk,$(LIBCPPRESTSDK_VERSION)) +LIBCPPRESTSDK_LICENSE = MIT +LIBCPPRESTSDK_LICENSE_FILES = license.txt +LIBCPPRESTSDK_SUBDIR = Release +LIBCPPRESTSDK_DEPENDENCIES += boost openssl zlib +LIBCPPRESTSDK_CONF_OPTS = -DWERROR=OFF + +$(eval $(cmake-package))
Signature · 1 line
2.14.3
Thomas Petazzoni
AppliedPATCH v8 1/1 libcpprestsdk: new package
Hello,
Quoted 10 lines · Adam Duskett
From: Adam Duskett <[email protected]>
The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
This package is licensed under the MIT package and depends on BOOST and OpenSSL/LibreSSL.
Quoted 6 lines
Signed-off-by Adam Duskett <[email protected]>---
Changes v1 -> v2:
- Add "depends onBR2_USE_WCHAR# boost" to boost.mk (Thomas)
- Remove "depends onBR2_USE_MMU" from boost.mk (Thomas)
- Add "!BR2_USE_WCHAR" to boost.mk (Thomas)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com