All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/1] libcpprestsdk: new package
@ 2017-10-17 20:53 Adam Duskett
  2017-10-17 21:06 ` Thomas Petazzoni
  2017-10-21 20:19 ` Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Adam Duskett @ 2017-10-17 20:53 UTC (permalink / raw)
  To: buildroot

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 (although it is compatible with LibreSSL.)

Signed-off-by: Adam Duskett <Adamduskett@outlook.com>
---
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)

 DEVELOPERS                               |  1 +
 package/Config.in                        |  1 +
 package/libcpprestsdk/Config.in          | 23 +++++++++++++++++++++++
 package/libcpprestsdk/libcpprestsdk.hash |  3 +++
 package/libcpprestsdk/libcpprestsdk.mk   | 20 ++++++++++++++++++++
 5 files changed, 48 insertions(+)
 create mode 100644 package/libcpprestsdk/Config.in
 create mode 100644 package/libcpprestsdk/libcpprestsdk.hash
 create mode 100644 package/libcpprestsdk/libcpprestsdk.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index dd19a0a4d0..207f9dd69d 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -32,6 +32,7 @@ F:	package/gstreamer1/gst1-rtsp-server/
 N:	Adam Duskett <aduskett@gmail.com>
 F:	package/audit/
 F:	package/checkpolicy/
+F:	package/cpprestsdk/
 F:	package/gstreamer1/gst1-vaapi/
 F:	package/janus-gateway/
 F:	package/libressl/
diff --git a/package/Config.in b/package/Config.in
index d4cf62708a..8171d40042 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1337,6 +1337,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"
diff --git a/package/libcpprestsdk/Config.in b/package/libcpprestsdk/Config.in
new file mode 100644
index 0000000000..91ef1648c8
--- /dev/null
+++ b/package/libcpprestsdk/Config.in
@@ -0,0 +1,23 @@
+config BR2_PACKAGE_LIBCPPRESTSDK
+	bool "libcpprestsdk"
+	depends on BR2_INSTALL_LIBSTDCPP # boost
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_USE_WCHAR # boost
+	select BR2_PACKAGE_BOOST
+	select BR2_PACKAGE_BOOST_RANDOM
+	select BR2_PACKAGE_BOOST_CHRONO
+	select BR2_PACKAGE_BOOST_THREAD
+	select BR2_PACKAGE_BOOST_REGEX
+	select BR2_PACKAGE_BOOST_FILESYSTEM
+	select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_LIBRESSL
+	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
diff --git a/package/libcpprestsdk/libcpprestsdk.hash b/package/libcpprestsdk/libcpprestsdk.hash
new file mode 100644
index 0000000000..131ed3b51a
--- /dev/null
+++ b/package/libcpprestsdk/libcpprestsdk.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 bef46381a036625d12d575d69ce9f3dd78b4317e41d1196b928dff83cc5a9c05 libcpprestsdk-v2.9.0.tar.gz
+sha256 5c191789f502ac87df83b57008d2fc3e47fbf31315381b5bc4309f6602d0fe97	license.txt
diff --git a/package/libcpprestsdk/libcpprestsdk.mk b/package/libcpprestsdk/libcpprestsdk.mk
new file mode 100644
index 0000000000..9b9b594016
--- /dev/null
+++ b/package/libcpprestsdk/libcpprestsdk.mk
@@ -0,0 +1,20 @@
+################################################################################
+#
+# libcpprestsdk
+#
+################################################################################
+
+LIBCPPRESTSDK_VERSION = v2.9.0
+LIBCPPRESTSDK_SITE = $(call github,Microsoft,cpprestsdk,$(LIBCPPRESTSDK_VERSION))
+LIBCPPRESTSDK_DEPENDENCIES = boost
+LIBCPPRESTSDK_LICENSE = MIT
+LIBCPPRESTSDK_LICENSE_FILES = license.txt
+LIBCPPRESTSDK_SUBDIR = Release
+
+ifeq ($(BR2_PACKAGE_LIBRESSL),y)
+LIBCPPRESTSDK_DEPENDENCIES += libressl
+else
+LIBCPPRESTSDK_DEPENDENCIES += openssl
+endif
+
+$(eval $(cmake-package))
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH v2 1/1] libcpprestsdk: new package
  2017-10-17 20:53 [Buildroot] [PATCH v2 1/1] libcpprestsdk: new package Adam Duskett
@ 2017-10-17 21:06 ` Thomas Petazzoni
  2017-10-19 13:39   ` Arnout Vandecappelle
  2017-10-21 20:19 ` Thomas Petazzoni
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2017-10-17 21:06 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 17 Oct 2017 16:53:08 -0400, Adam Duskett wrote:

> +	select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_LIBRESSL

Meh:

package/openssl/Config.in:1:	symbol BR2_PACKAGE_OPENSSL is selected by BR2_PACKAGE_LIBRESSL
package/libressl/Config.in:1:	symbol BR2_PACKAGE_LIBRESSL depends on BR2_PACKAGE_OPENSSL
package/openssl/Config.in:1:error: recursive dependency detected!
package/openssl/Config.in:1:	symbol BR2_PACKAGE_OPENSSL is selected by BR2_PACKAGE_LIBRESSL
package/libressl/Config.in:1:	symbol BR2_PACKAGE_LIBRESSL depends on BR2_PACKAGE_OPENSSL

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH v2 1/1] libcpprestsdk: new package
  2017-10-17 21:06 ` Thomas Petazzoni
@ 2017-10-19 13:39   ` Arnout Vandecappelle
  0 siblings, 0 replies; 4+ messages in thread
From: Arnout Vandecappelle @ 2017-10-19 13:39 UTC (permalink / raw)
  To: buildroot



On 17-10-17 23:06, Thomas Petazzoni wrote:
> Hello,
> 
> On Tue, 17 Oct 2017 16:53:08 -0400, Adam Duskett wrote:
> 
>> +	select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_LIBRESSL
> 
> Meh:
> 
> package/openssl/Config.in:1:	symbol BR2_PACKAGE_OPENSSL is selected by BR2_PACKAGE_LIBRESSL
> package/libressl/Config.in:1:	symbol BR2_PACKAGE_LIBRESSL depends on BR2_PACKAGE_OPENSSL
> package/openssl/Config.in:1:error: recursive dependency detected!
> package/openssl/Config.in:1:	symbol BR2_PACKAGE_OPENSSL is selected by BR2_PACKAGE_LIBRESSL
> package/libressl/Config.in:1:	symbol BR2_PACKAGE_LIBRESSL depends on BR2_PACKAGE_OPENSSL

 Solved by inverting the select:

	select BR2_PACKAGE_LIBRESSL if !BR2_PACKAGE_OPENSSL

 But since we probably want to use openssl by default, not libressl, we should
perhaps instead invert the condition in the openssl/libressl packages. I.e.,
remove the depends from libressl, and add 'depends on !libressl' to openssl.

 Or, of course, introduce the virtual package. So I've added that as a topic for
the developer meeting.

 Regards,
 Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH v2 1/1] libcpprestsdk: new package
  2017-10-17 20:53 [Buildroot] [PATCH v2 1/1] libcpprestsdk: new package Adam Duskett
  2017-10-17 21:06 ` Thomas Petazzoni
@ 2017-10-21 20:19 ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2017-10-21 20:19 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 17 Oct 2017 16:53:08 -0400, Adam Duskett wrote:
> 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 (although it is compatible with LibreSSL.)
> 
> Signed-off-by: Adam Duskett <Adamduskett@outlook.com>

It fails to build here, with:

/home/thomas/projets/buildroot/output/build/libcpprestsdk-v2.9.0/Release/include/cpprest/astreambuf.h: In member function ?pplx::task<_InternalReturnType> Concurrency::streams::details::streambuf_state_manager<_CharType>::create_exception_checked_value_task(const _CharType1&) const [with _CharType1 = int; _CharType = unsigned char]?:
/home/thomas/projets/buildroot/output/build/libcpprestsdk-v2.9.0/Release/include/cpprest/astreambuf.h:748:9: error: control reaches end of non-void function [-Werror=return-type]
         }
         ^
/home/thomas/projets/buildroot/output/build/libcpprestsdk-v2.9.0/Release/include/cpprest/astreambuf.h: In member function ?pplx::task<_InternalReturnType> Concurrency::streams::details::streambuf_state_manager<_CharType>::create_exception_checked_value_task(const _CharType1&) const [with _CharType1 = unsigned int; _CharType = char]?:
/home/thomas/projets/buildroot/output/build/libcpprestsdk-v2.9.0/Release/include/cpprest/astreambuf.h:748:9: error: control reaches end of non-void function [-Werror=return-type]
         }
         ^

[... many more instances of that ...]

Using this defconfig:

BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2017.05-1078-g95b1dae.tar.bz2"
BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_LIBRESSL=y
BR2_PACKAGE_LIBCPPRESTSDK=y
# BR2_TARGET_ROOTFS_TAR is not set

You can catch such issues by using ./utils/test-pkg.

Note that I slightly adjusted your patch to accommodate the recent
openssl changes. Here is the diff that I have:

diff --git a/package/libcpprestsdk/Config.in b/package/libcpprestsdk/Config.in
index 91ef1648c8..e4cafe4063 100644
--- a/package/libcpprestsdk/Config.in
+++ b/package/libcpprestsdk/Config.in
@@ -9,7 +9,7 @@ config BR2_PACKAGE_LIBCPPRESTSDK
        select BR2_PACKAGE_BOOST_THREAD
        select BR2_PACKAGE_BOOST_REGEX
        select BR2_PACKAGE_BOOST_FILESYSTEM
-       select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_LIBRESSL
+       select BR2_PACKAGE_OPENSSL
        help
          The C++ REST SDK is a Microsoft project for cloud-based
          client-server communication in native code using a modern
@@ -19,5 +19,5 @@ config BR2_PACKAGE_LIBCPPRESTSDK
          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
+       depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
+               !BR2_USE_WCHAR
diff --git a/package/libcpprestsdk/libcpprestsdk.mk b/package/libcpprestsdk/libcpprestsdk.mk
index 9b9b594016..d8b79710d4 100644
--- a/package/libcpprestsdk/libcpprestsdk.mk
+++ b/package/libcpprestsdk/libcpprestsdk.mk
@@ -11,9 +11,7 @@ LIBCPPRESTSDK_LICENSE = MIT
 LIBCPPRESTSDK_LICENSE_FILES = license.txt
 LIBCPPRESTSDK_SUBDIR = Release
 
-ifeq ($(BR2_PACKAGE_LIBRESSL),y)
-LIBCPPRESTSDK_DEPENDENCIES += libressl
-else
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
 LIBCPPRESTSDK_DEPENDENCIES += openssl
 endif

Could you include it in your next submission ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-21 20:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-17 20:53 [Buildroot] [PATCH v2 1/1] libcpprestsdk: new package Adam Duskett
2017-10-17 21:06 ` Thomas Petazzoni
2017-10-19 13:39   ` Arnout Vandecappelle
2017-10-21 20:19 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.