* [Buildroot] [PATCH 1/2] websocketpp: new package @ 2016-09-02 13:42 Pieter De Gendt 2016-09-02 13:42 ` [Buildroot] [PATCH 2/2] cpprestsdk: " Pieter De Gendt ` (2 more replies) 0 siblings, 3 replies; 7+ messages in thread From: Pieter De Gendt @ 2016-09-02 13:42 UTC (permalink / raw) To: buildroot Signed-off-by: Pieter De Gendt <pieter.degendt@gmail.com> --- package/Config.in | 1 + .../websocketpp/0001-Fix-cmake-cross-compile.patch | 42 ++++++++++++++++++++++ package/websocketpp/Config.in | 14 ++++++++ package/websocketpp/websocketpp.hash | 1 + package/websocketpp/websocketpp.mk | 15 ++++++++ 5 files changed, 73 insertions(+) create mode 100644 package/websocketpp/0001-Fix-cmake-cross-compile.patch create mode 100644 package/websocketpp/Config.in create mode 100644 package/websocketpp/websocketpp.hash create mode 100644 package/websocketpp/websocketpp.mk diff --git a/package/Config.in b/package/Config.in index 1e51a45..3fe55b4 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1242,6 +1242,7 @@ menu "Networking" source "package/sofia-sip/Config.in" source "package/thrift/Config.in" source "package/usbredir/Config.in" + source "package/websocketpp/Config.in" source "package/wvstreams/Config.in" source "package/zeromq/Config.in" source "package/zmqpp/Config.in" diff --git a/package/websocketpp/0001-Fix-cmake-cross-compile.patch b/package/websocketpp/0001-Fix-cmake-cross-compile.patch new file mode 100644 index 0000000..cbaa9e9 --- /dev/null +++ b/package/websocketpp/0001-Fix-cmake-cross-compile.patch @@ -0,0 +1,42 @@ +From 1be867f214cf86d48be13603511dafe75afe8d8e Mon Sep 17 00:00:00 2001 +From: "Yann E. MORIN" <yann.morin.1998@free.fr> +Date: Fri, 2 Sep 2016 14:44:55 +0200 +Subject: [PATCH] cmake: install correct .cmake files + +Currently, we install a .cmake file (so that other packages can find us) +that sets the include path to /usr/include. + +This does not work in cross-compilation, as it points to the build +machine headers, so is not correct for cross-compilation, for two +reasons: + - websocketpp might not be installed on the build machine, + - it might be installed as a different version. + +Thus, we need to let cmake find the correct include path. + +We do so by searching the include directory that contains a specific +file of our own; we choose websocketpp/version.h as the file to look +for. + +This then properly sets the include path, which is even often uneeded +as it will be the standard search path (either /usr/include for native +builds, or .../sysroot/usr/include for cross builds). + +Thanks to Samuel for hinting me at find_path(). :-) + +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> +Cc: Samuel Martin <s.martin49@gmail.com> +--- + websocketpp-config.cmake.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/websocketpp-config.cmake.in b/websocketpp-config.cmake.in +index 6afe569..4c4ed5f 100644 +--- a/websocketpp-config.cmake.in ++++ b/websocketpp-config.cmake.in +@@ -4,4 +4,4 @@ + # WEBSOCKETPP_INCLUDE_DIR - include directories + + set(WEBSOCKETPP_FOUND TRUE) +-set(WEBSOCKETPP_INCLUDE_DIR "@INSTALL_INCLUDE_DIR@") ++find_path(WEBSOCKETPP_INCLUDE_DIR "websocketpp/version.hpp") diff --git a/package/websocketpp/Config.in b/package/websocketpp/Config.in new file mode 100644 index 0000000..97df9fd --- /dev/null +++ b/package/websocketpp/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_WEBSOCKETPP + bool "websocketpp" + select BR2_PACKAGE_ZLIB + depends on BR2_PACKAGE_BOOST + depends on BR2_PACKAGE_BOOST_SYSTEM + depends on BR2_PACKAGE_BOOST_RANDOM + help + WebSocket++ is a header only C++ library that implements + RFC6455 The WebSocket Protocol. It allows integrating + WebSocket client and server functionality into C++ programs. + It uses interchangeable network transport modules including + one based on C++ iostreams and one based on Boost Asio. + + http://www.zaphoyd.com/websocketpp diff --git a/package/websocketpp/websocketpp.hash b/package/websocketpp/websocketpp.hash new file mode 100644 index 0000000..49496ca --- /dev/null +++ b/package/websocketpp/websocketpp.hash @@ -0,0 +1 @@ +sha256 07b3364ad30cda022d91759d4b83ff902e1ebadb796969e58b59caa535a03923 websocketpp-0.7.0.tar.gz diff --git a/package/websocketpp/websocketpp.mk b/package/websocketpp/websocketpp.mk new file mode 100644 index 0000000..e4f729b --- /dev/null +++ b/package/websocketpp/websocketpp.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# websocketpp +# +################################################################################ + +WEBSOCKETPP_VERSION = 0.7.0 +WEBSOCKETPP_SITE = $(call github,zaphoyd,websocketpp,$(WEBSOCKETPP_VERSION)) +WEBSOCKETPP_LICENSE = BSD +WEBSOCKETPP_LICENSE_FILES = COPYING +WEBSOCKETPP_DEPENDENCIES = zlib +WEBSOCKETPP_INSTALL_STAGING = YES +WEBSOCKETPP_DEPENDENCIES = host-pkgconf boost + +$(eval $(cmake-package)) -- 2.9.3 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 2/2] cpprestsdk: new package 2016-09-02 13:42 [Buildroot] [PATCH 1/2] websocketpp: new package Pieter De Gendt @ 2016-09-02 13:42 ` Pieter De Gendt 2016-09-03 18:00 ` Romain Naour 2016-09-04 22:04 ` Yann E. MORIN 2016-09-03 17:43 ` [Buildroot] [PATCH 1/2] websocketpp: " Romain Naour 2016-09-17 14:31 ` Thomas Petazzoni 2 siblings, 2 replies; 7+ messages in thread From: Pieter De Gendt @ 2016-09-02 13:42 UTC (permalink / raw) To: buildroot Signed-off-by: Pieter De Gendt <pieter.degendt@gmail.com> --- package/Config.in | 1 + package/cpprestsdk/Config.in | 27 +++++++++++++++++++++++++++ package/cpprestsdk/cpprestsdk.hash | 1 + package/cpprestsdk/cpprestsdk.mk | 25 +++++++++++++++++++++++++ 4 files changed, 54 insertions(+) create mode 100644 package/cpprestsdk/Config.in create mode 100644 package/cpprestsdk/cpprestsdk.hash create mode 100644 package/cpprestsdk/cpprestsdk.mk diff --git a/package/Config.in b/package/Config.in index 3fe55b4..f0f8401 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1156,6 +1156,7 @@ menu "Networking" source "package/c-ares/Config.in" source "package/canfestival/Config.in" source "package/cgic/Config.in" + source "package/cpprestsdk/Config.in" source "package/cppzmq/Config.in" source "package/czmq/Config.in" source "package/filemq/Config.in" diff --git a/package/cpprestsdk/Config.in b/package/cpprestsdk/Config.in new file mode 100644 index 0000000..7b95d31 --- /dev/null +++ b/package/cpprestsdk/Config.in @@ -0,0 +1,27 @@ +config BR2_PACKAGE_CPPRESTSDK + bool "cpprestsdk" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_BOOST + select BR2_PACKAGE_BOOST_CHRONO + select BR2_PACKAGE_BOOST_FILESYSTEM + select BR2_PACKAGE_BOOST_RANDOM + select BR2_PACKAGE_BOOST_REGEX + select BR2_PACKAGE_BOOST_SYSTEM + select BR2_PACKAGE_BOOST_THREAD + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_PKGCONF + 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 "clogics needs a toolchain w/ C++, wchar, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR + diff --git a/package/cpprestsdk/cpprestsdk.hash b/package/cpprestsdk/cpprestsdk.hash new file mode 100644 index 0000000..200f05a --- /dev/null +++ b/package/cpprestsdk/cpprestsdk.hash @@ -0,0 +1 @@ +sha256 3d1c38aa7ef34b3d3e9a6e84d3866554fe48c3d9d9977896d18a7cfb80d5a4ea cpprestsdk-v2.8.0.tar.gz diff --git a/package/cpprestsdk/cpprestsdk.mk b/package/cpprestsdk/cpprestsdk.mk new file mode 100644 index 0000000..d7509f8 --- /dev/null +++ b/package/cpprestsdk/cpprestsdk.mk @@ -0,0 +1,25 @@ +################################################################################ +# +## cpprestsdk +# +################################################################################# + +CPPRESTSDK_VERSION = v2.8.0 +CPPRESTSDK_SITE = $(call github,Microsoft,cpprestsdk,$(CPPRESTSDK_VERSION)) +CPPRESTSDK_INSTALL_STAGING = YES + +CPPRESTSDK_DEPENDENCIES = boost openssl zlib + +ifeq ($(BR2_PACKAGE_WEBSOCKETPP),y) + CPPRESTSDK_DEPENDENCIES += websocketpp +else + CPPRESTSDK_CONF_OPTS = -DCPPREST_EXCLUDE_WEBSOCKETS=ON +endif + + +CPPRESTSDK_SUBDIR = Release + +CPPRESTSDK_CONF_OPTS += -DBUILD_SAMPLES=OFF + +$(eval $(cmake-package)) + -- 2.9.3 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 2/2] cpprestsdk: new package 2016-09-02 13:42 ` [Buildroot] [PATCH 2/2] cpprestsdk: " Pieter De Gendt @ 2016-09-03 18:00 ` Romain Naour 2016-09-04 22:04 ` Yann E. MORIN 1 sibling, 0 replies; 7+ messages in thread From: Romain Naour @ 2016-09-03 18:00 UTC (permalink / raw) To: buildroot Le 02/09/2016 ? 15:42, Pieter De Gendt a ?crit : > Signed-off-by: Pieter De Gendt <pieter.degendt@gmail.com> > --- > package/Config.in | 1 + > package/cpprestsdk/Config.in | 27 +++++++++++++++++++++++++++ > package/cpprestsdk/cpprestsdk.hash | 1 + > package/cpprestsdk/cpprestsdk.mk | 25 +++++++++++++++++++++++++ > 4 files changed, 54 insertions(+) > create mode 100644 package/cpprestsdk/Config.in > create mode 100644 package/cpprestsdk/cpprestsdk.hash > create mode 100644 package/cpprestsdk/cpprestsdk.mk > > diff --git a/package/Config.in b/package/Config.in > index 3fe55b4..f0f8401 100644 > --- a/package/Config.in > +++ b/package/Config.in > @@ -1156,6 +1156,7 @@ menu "Networking" > source "package/c-ares/Config.in" > source "package/canfestival/Config.in" > source "package/cgic/Config.in" > + source "package/cpprestsdk/Config.in" indent issue > source "package/cppzmq/Config.in" > source "package/czmq/Config.in" > source "package/filemq/Config.in" > diff --git a/package/cpprestsdk/Config.in b/package/cpprestsdk/Config.in > new file mode 100644 > index 0000000..7b95d31 > --- /dev/null > +++ b/package/cpprestsdk/Config.in > @@ -0,0 +1,27 @@ > +config BR2_PACKAGE_CPPRESTSDK > + bool "cpprestsdk" > + depends on BR2_INSTALL_LIBSTDCPP > + depends on BR2_USE_WCHAR > + depends on BR2_TOOLCHAIN_HAS_THREADS > + select BR2_PACKAGE_BOOST > + select BR2_PACKAGE_BOOST_CHRONO > + select BR2_PACKAGE_BOOST_FILESYSTEM > + select BR2_PACKAGE_BOOST_RANDOM > + select BR2_PACKAGE_BOOST_REGEX > + select BR2_PACKAGE_BOOST_SYSTEM > + select BR2_PACKAGE_BOOST_THREAD > + select BR2_PACKAGE_OPENSSL > + select BR2_PACKAGE_PKGCONF > + 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 "clogics needs a toolchain w/ C++, wchar, threads" > + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR > + > diff --git a/package/cpprestsdk/cpprestsdk.hash b/package/cpprestsdk/cpprestsdk.hash > new file mode 100644 > index 0000000..200f05a > --- /dev/null > +++ b/package/cpprestsdk/cpprestsdk.hash > @@ -0,0 +1 @@ > +sha256 3d1c38aa7ef34b3d3e9a6e84d3866554fe48c3d9d9977896d18a7cfb80d5a4ea cpprestsdk-v2.8.0.tar.gz > diff --git a/package/cpprestsdk/cpprestsdk.mk b/package/cpprestsdk/cpprestsdk.mk > new file mode 100644 > index 0000000..d7509f8 > --- /dev/null > +++ b/package/cpprestsdk/cpprestsdk.mk > @@ -0,0 +1,25 @@ > +################################################################################ > +# > +## cpprestsdk > +# > +################################################################################# > + > +CPPRESTSDK_VERSION = v2.8.0 > +CPPRESTSDK_SITE = $(call github,Microsoft,cpprestsdk,$(CPPRESTSDK_VERSION)) > +CPPRESTSDK_INSTALL_STAGING = YES > + > +CPPRESTSDK_DEPENDENCIES = boost openssl zlib > + > +ifeq ($(BR2_PACKAGE_WEBSOCKETPP),y) > + CPPRESTSDK_DEPENDENCIES += websocketpp no need to indent Add CPPRESTSDK_CONF_OPTS = -DCPPREST_EXCLUDE_WEBSOCKETS=OFF > +else > + CPPRESTSDK_CONF_OPTS = -DCPPREST_EXCLUDE_WEBSOCKETS=ON > +endif cpprestsdk doesn't build with musl due to missing xlocale.h. Care to take a look ? Best regards, Romain > + > + > +CPPRESTSDK_SUBDIR = Release > + > +CPPRESTSDK_CONF_OPTS += -DBUILD_SAMPLES=OFF > + > +$(eval $(cmake-package)) > + > ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 2/2] cpprestsdk: new package 2016-09-02 13:42 ` [Buildroot] [PATCH 2/2] cpprestsdk: " Pieter De Gendt 2016-09-03 18:00 ` Romain Naour @ 2016-09-04 22:04 ` Yann E. MORIN 1 sibling, 0 replies; 7+ messages in thread From: Yann E. MORIN @ 2016-09-04 22:04 UTC (permalink / raw) To: buildroot Pieter, All, Besides comments by Romain, here are mines: On 2016-09-02 15:42 +0200, Pieter De Gendt spake thusly: > Signed-off-by: Pieter De Gendt <pieter.degendt@gmail.com> [--SNIP--] > diff --git a/package/cpprestsdk/Config.in b/package/cpprestsdk/Config.in > new file mode 100644 > index 0000000..7b95d31 > --- /dev/null > +++ b/package/cpprestsdk/Config.in > @@ -0,0 +1,27 @@ > +config BR2_PACKAGE_CPPRESTSDK > + bool "cpprestsdk" > + depends on BR2_INSTALL_LIBSTDCPP > + depends on BR2_USE_WCHAR > + depends on BR2_TOOLCHAIN_HAS_THREADS Are those three dependencies needed for cpprestsdk itself, or are they inherited from the boost dependencies? Is the latter, then you need to say so: depends on BR2_INSTALL_LIBSTDCPP # boost depends on BR2_USE_WCHAR # boost depends on BR2_TOOLCHAIN_HAS_THREADS # boost If not, then that's OK the way you did. > + select BR2_PACKAGE_BOOST > + select BR2_PACKAGE_BOOST_CHRONO > + select BR2_PACKAGE_BOOST_FILESYSTEM > + select BR2_PACKAGE_BOOST_RANDOM > + select BR2_PACKAGE_BOOST_REGEX > + select BR2_PACKAGE_BOOST_SYSTEM > + select BR2_PACKAGE_BOOST_THREAD > + select BR2_PACKAGE_OPENSSL > + select BR2_PACKAGE_PKGCONF Do you mean that pkgconf is needed on the target at runtime? I doubt it is. What is needed is only the host variant, no? > + 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 Incorrect indentation: it should one leading TAB for all keywords (bool, depends on, select, help) and a TAB plus two spaces for the help text itself. > +comment "clogics needs a toolchain w/ C++, wchar, threads" > + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR Ditto, indentation. > diff --git a/package/cpprestsdk/cpprestsdk.hash b/package/cpprestsdk/cpprestsdk.hash > new file mode 100644 > index 0000000..200f05a > --- /dev/null > +++ b/package/cpprestsdk/cpprestsdk.hash > @@ -0,0 +1 @@ > +sha256 3d1c38aa7ef34b3d3e9a6e84d3866554fe48c3d9d9977896d18a7cfb80d5a4ea cpprestsdk-v2.8.0.tar.gz > diff --git a/package/cpprestsdk/cpprestsdk.mk b/package/cpprestsdk/cpprestsdk.mk > new file mode 100644 > index 0000000..d7509f8 > --- /dev/null > +++ b/package/cpprestsdk/cpprestsdk.mk > @@ -0,0 +1,25 @@ > +################################################################################ > +# > +## cpprestsdk > +# > +################################################################################# > + > +CPPRESTSDK_VERSION = v2.8.0 > +CPPRESTSDK_SITE = $(call github,Microsoft,cpprestsdk,$(CPPRESTSDK_VERSION)) > +CPPRESTSDK_INSTALL_STAGING = YES License and licen files? Again, it does not look like it is easy: CPPRESTSDK_LICENSE = Apache 2.0, OpenSSL License, BSD-3c, Boost Software License 1.0 CPPRESTSDK_LICENSE_FILES = license.txt ThirdPartyNotices.txt > +CPPRESTSDK_DEPENDENCIES = boost openssl zlib You also need to depend on host-pkgconf, since it is used to find websocketpp. > +ifeq ($(BR2_PACKAGE_WEBSOCKETPP),y) > + CPPRESTSDK_DEPENDENCIES += websocketpp > +else > + CPPRESTSDK_CONF_OPTS = -DCPPREST_EXCLUDE_WEBSOCKETS=ON > +endif > +CPPRESTSDK_SUBDIR = Release > + > +CPPRESTSDK_CONF_OPTS += -DBUILD_SAMPLES=OFF Usually, we try to have the non-conditional options go first, then the conditional ones: CPPRESTSDK_CONF_OPTS = -DBUILD_SAMPLES=OFF ifeq ($(BR2_PACKAGE_WEBSOCKETPP),y) CPPRESTSDK_DEPENDENCIES += websocketpp else CPPRESTSDK_CONF_OPTS += -DCPPREST_EXCLUDE_WEBSOCKETS=ON endif Regards, Yann E. MORIN. > +$(eval $(cmake-package)) > + > -- > 2.9.3 > > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/2] websocketpp: new package 2016-09-02 13:42 [Buildroot] [PATCH 1/2] websocketpp: new package Pieter De Gendt 2016-09-02 13:42 ` [Buildroot] [PATCH 2/2] cpprestsdk: " Pieter De Gendt @ 2016-09-03 17:43 ` Romain Naour 2016-09-04 21:51 ` Yann E. MORIN 2016-09-17 14:31 ` Thomas Petazzoni 2 siblings, 1 reply; 7+ messages in thread From: Romain Naour @ 2016-09-03 17:43 UTC (permalink / raw) To: buildroot Hi Pieter, Le 02/09/2016 ? 15:42, Pieter De Gendt a ?crit : > Signed-off-by: Pieter De Gendt <pieter.degendt@gmail.com> > --- > package/Config.in | 1 + > .../websocketpp/0001-Fix-cmake-cross-compile.patch | 42 ++++++++++++++++++++++ > package/websocketpp/Config.in | 14 ++++++++ > package/websocketpp/websocketpp.hash | 1 + > package/websocketpp/websocketpp.mk | 15 ++++++++ > 5 files changed, 73 insertions(+) > create mode 100644 package/websocketpp/0001-Fix-cmake-cross-compile.patch > create mode 100644 package/websocketpp/Config.in > create mode 100644 package/websocketpp/websocketpp.hash > create mode 100644 package/websocketpp/websocketpp.mk > > diff --git a/package/Config.in b/package/Config.in > index 1e51a45..3fe55b4 100644 > --- a/package/Config.in > +++ b/package/Config.in > @@ -1242,6 +1242,7 @@ menu "Networking" > source "package/sofia-sip/Config.in" > source "package/thrift/Config.in" > source "package/usbredir/Config.in" > + source "package/websocketpp/Config.in" > source "package/wvstreams/Config.in" > source "package/zeromq/Config.in" > source "package/zmqpp/Config.in" > diff --git a/package/websocketpp/0001-Fix-cmake-cross-compile.patch b/package/websocketpp/0001-Fix-cmake-cross-compile.patch > new file mode 100644 > index 0000000..cbaa9e9 > --- /dev/null > +++ b/package/websocketpp/0001-Fix-cmake-cross-compile.patch > @@ -0,0 +1,42 @@ > +From 1be867f214cf86d48be13603511dafe75afe8d8e Mon Sep 17 00:00:00 2001 > +From: "Yann E. MORIN" <yann.morin.1998@free.fr> > +Date: Fri, 2 Sep 2016 14:44:55 +0200 > +Subject: [PATCH] cmake: install correct .cmake files > + > +Currently, we install a .cmake file (so that other packages can find us) > +that sets the include path to /usr/include. > + > +This does not work in cross-compilation, as it points to the build > +machine headers, so is not correct for cross-compilation, for two > +reasons: > + - websocketpp might not be installed on the build machine, > + - it might be installed as a different version. > + > +Thus, we need to let cmake find the correct include path. > + > +We do so by searching the include directory that contains a specific > +file of our own; we choose websocketpp/version.h as the file to look > +for. > + > +This then properly sets the include path, which is even often uneeded > +as it will be the standard search path (either /usr/include for native > +builds, or .../sysroot/usr/include for cross builds). > + > +Thanks to Samuel for hinting me at find_path(). :-) > + > +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> > +Cc: Samuel Martin <s.martin49@gmail.com> > +--- > + websocketpp-config.cmake.in | 2 +- > + 1 file changed, 1 insertion(+), 1 deletion(-) > + > +diff --git a/websocketpp-config.cmake.in b/websocketpp-config.cmake.in > +index 6afe569..4c4ed5f 100644 > +--- a/websocketpp-config.cmake.in > ++++ b/websocketpp-config.cmake.in > +@@ -4,4 +4,4 @@ > + # WEBSOCKETPP_INCLUDE_DIR - include directories > + > + set(WEBSOCKETPP_FOUND TRUE) > +-set(WEBSOCKETPP_INCLUDE_DIR "@INSTALL_INCLUDE_DIR@") > ++find_path(WEBSOCKETPP_INCLUDE_DIR "websocketpp/version.hpp") > diff --git a/package/websocketpp/Config.in b/package/websocketpp/Config.in > new file mode 100644 > index 0000000..97df9fd > --- /dev/null > +++ b/package/websocketpp/Config.in > @@ -0,0 +1,14 @@ > +config BR2_PACKAGE_WEBSOCKETPP > + bool "websocketpp" > + select BR2_PACKAGE_ZLIB > + depends on BR2_PACKAGE_BOOST > + depends on BR2_PACKAGE_BOOST_SYSTEM > + depends on BR2_PACKAGE_BOOST_RANDOM Like gnuradio package, you can use "select" instead of "depends on" for boost package dependecy. Add select BR2_BOOST_THREAD maybe ? websocketpp/common/thread.hpp: #include <boost/thread.hpp> Add select BR2_BOOST_CHRONO maybe ? websocketpp/common/chrono.hpp: #include <boost/chrono.hpp> But it seems these dependency are required only if the toolchains doesn't have C++11 support. Otherwise the C++11 chrono/thread header is preferred over the boost one. // If we've determined that we're in full C++11 mode and the user hasn't // explicitly disabled the use of C++11 functional header, then prefer it to // boost. #if defined _WEBSOCKETPP_CPP11_INTERNAL_ && !defined _WEBSOCKETPP_NO_CPP11_CHRONO_ #ifndef _WEBSOCKETPP_CPP11_CHRONO_ #define _WEBSOCKETPP_CPP11_CHRONO_ #endif #endif [...] #ifdef _WEBSOCKETPP_CPP11_CHRONO_ #include <chrono> #else #include <boost/chrono.hpp> #endif So, websocket package should take into account BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 or BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 for C++11 dependencies. > + help > + WebSocket++ is a header only C++ library that implements > + RFC6455 The WebSocket Protocol. It allows integrating > + WebSocket client and server functionality into C++ programs. > + It uses interchangeable network transport modules including > + one based on C++ iostreams and one based on Boost Asio. > + > + http://www.zaphoyd.com/websocketpp > diff --git a/package/websocketpp/websocketpp.hash b/package/websocketpp/websocketpp.hash > new file mode 100644 > index 0000000..49496ca > --- /dev/null > +++ b/package/websocketpp/websocketpp.hash > @@ -0,0 +1 @@ > +sha256 07b3364ad30cda022d91759d4b83ff902e1ebadb796969e58b59caa535a03923 websocketpp-0.7.0.tar.gz > diff --git a/package/websocketpp/websocketpp.mk b/package/websocketpp/websocketpp.mk > new file mode 100644 > index 0000000..e4f729b > --- /dev/null > +++ b/package/websocketpp/websocketpp.mk > @@ -0,0 +1,15 @@ > +################################################################################ > +# > +# websocketpp > +# > +################################################################################ > + > +WEBSOCKETPP_VERSION = 0.7.0 > +WEBSOCKETPP_SITE = $(call github,zaphoyd,websocketpp,$(WEBSOCKETPP_VERSION)) > +WEBSOCKETPP_LICENSE = BSD websocketpp use several license like MIT as noticed by Manuel Gro? in http://patchwork.ozlabs.org/patch/659477 > +WEBSOCKETPP_LICENSE_FILES = COPYING > +WEBSOCKETPP_DEPENDENCIES = zlib websocketpp doesn't build anything (header only package), there is no need to add zlib as build dependency. > +WEBSOCKETPP_INSTALL_STAGING = YES > +WEBSOCKETPP_DEPENDENCIES = host-pkgconf boost ^^ Use += here otherwise zlib dependency is dropped. I don't see where pkg-config is used in the Buildsystem, I think it's not needed. Like for zlib, I beleve that boost build dependency can be removed here. Boost and zlib should be added to the package using websocketpp headers. Best regards, Romain > + > +$(eval $(cmake-package)) > ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/2] websocketpp: new package 2016-09-03 17:43 ` [Buildroot] [PATCH 1/2] websocketpp: " Romain Naour @ 2016-09-04 21:51 ` Yann E. MORIN 0 siblings, 0 replies; 7+ messages in thread From: Yann E. MORIN @ 2016-09-04 21:51 UTC (permalink / raw) To: buildroot Romain, Pieter, All, On 2016-09-03 19:43 +0200, Romain Naour spake thusly: > Le 02/09/2016 ? 15:42, Pieter De Gendt a ?crit : > > Signed-off-by: Pieter De Gendt <pieter.degendt@gmail.com> [--SNIP--] > > diff --git a/package/websocketpp/0001-Fix-cmake-cross-compile.patch b/package/websocketpp/0001-Fix-cmake-cross-compile.patch > > new file mode 100644 > > index 0000000..cbaa9e9 > > --- /dev/null > > +++ b/package/websocketpp/0001-Fix-cmake-cross-compile.patch > > @@ -0,0 +1,42 @@ > > +From 1be867f214cf86d48be13603511dafe75afe8d8e Mon Sep 17 00:00:00 2001 > > +From: "Yann E. MORIN" <yann.morin.1998@free.fr> > > +Date: Fri, 2 Sep 2016 14:44:55 +0200 > > +Subject: [PATCH] cmake: install correct .cmake files > > + > > +Currently, we install a .cmake file (so that other packages can find us) > > +that sets the include path to /usr/include. > > + > > +This does not work in cross-compilation, as it points to the build > > +machine headers, so is not correct for cross-compilation, for two > > +reasons: > > + - websocketpp might not be installed on the build machine, > > + - it might be installed as a different version. > > + > > +Thus, we need to let cmake find the correct include path. > > + > > +We do so by searching the include directory that contains a specific > > +file of our own; we choose websocketpp/version.h as the file to look > > +for. > > + > > +This then properly sets the include path, which is even often uneeded > > +as it will be the standard search path (either /usr/include for native > > +builds, or .../sysroot/usr/include for cross builds). > > + > > +Thanks to Samuel for hinting me at find_path(). :-) > > + > > +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> > > +Cc: Samuel Martin <s.martin49@gmail.com> > > +--- Here, you should add a pointer to the upstream merge-request on github, for reference. > > diff --git a/package/websocketpp/Config.in b/package/websocketpp/Config.in > > new file mode 100644 > > index 0000000..97df9fd > > --- /dev/null > > +++ b/package/websocketpp/Config.in > > @@ -0,0 +1,14 @@ > > +config BR2_PACKAGE_WEBSOCKETPP > > + bool "websocketpp" > > + select BR2_PACKAGE_ZLIB > > + depends on BR2_PACKAGE_BOOST > > + depends on BR2_PACKAGE_BOOST_SYSTEM Why do you absolutely need BR2_PACKAGE_BOOST_SYSTEM? > > + depends on BR2_PACKAGE_BOOST_RANDOM > > Like gnuradio package, you can use "select" instead of "depends on" for boost > package dependecy. Unfortunately, if the "system" layout is required, you can not select Boost and depend on the system option, or you'd get a circular dependency. So what Pieter did (assuming the "system" layout is mandatory) is correct. > Add select BR2_BOOST_THREAD maybe ? > websocketpp/common/thread.hpp: #include <boost/thread.hpp> > Add select BR2_BOOST_CHRONO maybe ? > websocketpp/common/chrono.hpp: #include <boost/chrono.hpp> > > But it seems these dependency are required only if the toolchains doesn't have > C++11 support. Otherwise the C++11 chrono/thread header is preferred over the > boost one. Even so, it is better to just require these two dependencies. Boost is a (almost) headers-only stuff, so adding more would not enlarge the rootfs (at least not by much, if at all). > // If we've determined that we're in full C++11 mode and the user hasn't > // explicitly disabled the use of C++11 functional header, then prefer it to > // boost. > #if defined _WEBSOCKETPP_CPP11_INTERNAL_ && !defined _WEBSOCKETPP_NO_CPP11_CHRONO_ > #ifndef _WEBSOCKETPP_CPP11_CHRONO_ > #define _WEBSOCKETPP_CPP11_CHRONO_ > #endif > #endif > > [...] > > #ifdef _WEBSOCKETPP_CPP11_CHRONO_ > #include <chrono> > #else > #include <boost/chrono.hpp> > #endif > > So, websocket package should take into account BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 or > BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 for C++11 dependencies. Or maybe not: if gcc is recent enough, websocketpp will use C++11 stuff, and fallback to Boost if C++11 is not available. No? [--SNIP--] > > diff --git a/package/websocketpp/websocketpp.mk b/package/websocketpp/websocketpp.mk > > new file mode 100644 > > index 0000000..e4f729b > > --- /dev/null > > +++ b/package/websocketpp/websocketpp.mk > > @@ -0,0 +1,15 @@ > > +################################################################################ > > +# > > +# websocketpp > > +# > > +################################################################################ > > + > > +WEBSOCKETPP_VERSION = 0.7.0 > > +WEBSOCKETPP_SITE = $(call github,zaphoyd,websocketpp,$(WEBSOCKETPP_VERSION)) > > +WEBSOCKETPP_LICENSE = BSD > > websocketpp use several license like MIT as noticed by Manuel Gro? in > http://patchwork.ozlabs.org/patch/659477 So, this is more than that, as seen in the COPYING file: WEBSOCKETPP_LICENSE = BSD-3c, MIT, zlib license > > +WEBSOCKETPP_LICENSE_FILES = COPYING > > +WEBSOCKETPP_DEPENDENCIES = zlib > > websocketpp doesn't build anything (header only package), there is no need to > add zlib as build dependency. Not sure, see below... > > +WEBSOCKETPP_INSTALL_STAGING = YES Since it only installs headers: # Only installs headers WEBSOCKETPP_INSTALL_TARGET = NO > > +WEBSOCKETPP_DEPENDENCIES = host-pkgconf boost > ^^ > Use += here otherwise zlib dependency is dropped. And there should be only one dependency line, as there's nothing conditional here: WEBSOCKETPP_DEPENDENCIES = host-pkgconf boost zlib However, I would say that, if a package needs websocketpp but does not need zilb, that package should not need to add a dependency on zlib. Yet, zlib must be built before that pacakge. So I would say that the depednency on zlib and boost is correct. They are not needed at build =time (there's actually no build), but that's irrelevant: they need to be available in staging as soon as websocketpp is. > I don't see where pkg-config is used in the Buildsystem, I think it's not needed. Line 205 in CMakeList.txt: 205 find_package (Boost 1.39.0 COMPONENTS "${WEBSOCKETPP_BOOST_LIBS}") (find_package() is the pkg-config stuff in cmake, right?) > Like for zlib, I beleve that boost build dependency can be removed here. > Boost and zlib should be added to the package using websocketpp headers. I don't think so; see above. Regards, Yann E. MORIN. -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/2] websocketpp: new package 2016-09-02 13:42 [Buildroot] [PATCH 1/2] websocketpp: new package Pieter De Gendt 2016-09-02 13:42 ` [Buildroot] [PATCH 2/2] cpprestsdk: " Pieter De Gendt 2016-09-03 17:43 ` [Buildroot] [PATCH 1/2] websocketpp: " Romain Naour @ 2016-09-17 14:31 ` Thomas Petazzoni 2 siblings, 0 replies; 7+ messages in thread From: Thomas Petazzoni @ 2016-09-17 14:31 UTC (permalink / raw) To: buildroot Hello Pieter, On Fri, 2 Sep 2016 15:42:55 +0200, Pieter De Gendt wrote: > Signed-off-by: Pieter De Gendt <pieter.degendt@gmail.com> You received lots of review and comments on your two patches, adding websocketpp and cpprestsdk. Consequently, I've marked them as "Changes Requested" in our patch tracking system, which means we will no longer see them in our TODO list of patches to apply. Therefore, it would be great if you could submit an updated version of those patches with the changes suggested by the reviewers. Thanks! Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-09-17 14:31 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-09-02 13:42 [Buildroot] [PATCH 1/2] websocketpp: new package Pieter De Gendt 2016-09-02 13:42 ` [Buildroot] [PATCH 2/2] cpprestsdk: " Pieter De Gendt 2016-09-03 18:00 ` Romain Naour 2016-09-04 22:04 ` Yann E. MORIN 2016-09-03 17:43 ` [Buildroot] [PATCH 1/2] websocketpp: " Romain Naour 2016-09-04 21:51 ` Yann E. MORIN 2016-09-17 14:31 ` 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.