Skip to contentSkip to conversation

package/pistache: new package

PATCH Superseded Thomas Ruschival 3 participants 7 messages Apr 26, 2020 – May 1, 2020

lore
Share & tools
lore
#0 lore raw

cover package/pistache: new package

Pistache is a C++ REST server framework.

The upstream project https://pistache.io/ does not provide release tarballs at https://github.com/oktal/pistache/. I have been using the commit 73f248acd6db4c53 successfully for some time now for a buildroot project. I looked up the latest HEAD today and it seems to fail the CI tests.

The use of dependencies of BR2_PACKAGE_OPENSSL. I am not sure if rather BR2_PACKAGE_HAS_OPENSSL should be used.

The use of BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 is for C++14 compiler support. While the website states it is C++11 the github repository mentions C++14.

Thomas Ruschival (1):
package/pistache: new package

 package/Config.in              |  1 +
 package/pistache/Config.in     | 22 ++++++++++++++++++++++
 package/pistache/pistache.hash |  5 +++++
 package/pistache/pistache.mk   | 23 +++++++++++++++++++++++
 4 files changed, 51 insertions(+)
 create mode 100644 package/pistache/Config.in
 create mode 100644 package/pistache/pistache.hash
 create mode 100644 package/pistache/pistache.mk
Signature · 1 line
2.26.2
#1 lore raw

PATCH 1/1 package/pistache: new package

Add a new package for pistache https://pistache.io/
Pistache is a C++ REST client/server library.

---
 package/Config.in              |  1 +
 package/pistache/Config.in     | 22 ++++++++++++++++++++++
 package/pistache/pistache.hash |  5 +++++
 package/pistache/pistache.mk   | 23 +++++++++++++++++++++++
 4 files changed, 51 insertions(+)
 create mode 100644 package/pistache/Config.in
 create mode 100644 package/pistache/pistache.hash
 create mode 100644 package/pistache/pistache.mk
package/Config.in +1 -0
index 6c55c5bc42..631aec69a1 100644
@@ -1753,6 +1753,7 @@ menu "Networking"
 	source "package/ortp/Config.in"
 	source "package/paho-mqtt-c/Config.in"
 	source "package/paho-mqtt-cpp/Config.in"
+	source "package/pistache/Config.in"
 	source "package/qdecoder/Config.in"
 	source "package/qpid-proton/Config.in"
 	source "package/rabbitmq-c/Config.in"
package/pistache/Config.in new file +22 -0
new file mode 100644
index 0000000000..5b81c9c1b7
@@ -0,0 +1,22 @@
+config BR2_PACKAGE_PISTACHE
+	bool "pistache"
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++14
+	depends on BR2_USE_WCHAR
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	help
+	  Pistache is a C++ REST framework written by Mathieu Stefani
+	  at Datacratic. It is written in pure C++14 with no external
+	  dependency and provides a low-level HTTP abstraction. It
+	  provides both an HTTP client and server that can be used
+	  to create and query complex web and REST APIs.
+
+	  https://pistache.io/
+
+
+config BR2_PACKAGE_PISTACHE_ENABLE_SSL
+	bool "pistache SSL support"
+	depends on BR2_PACKAGE_PISTACHE
+	depends on BR2_PACKAGE_OPENSSL
+	help
+	  Configure pistache with -DPISTACHE_USE_SSL=On to support HTTPS
+
package/pistache/pistache.hash new file +5 -0
new file mode 100644
index 0000000000..fb4ada8b24
@@ -0,0 +1,5 @@
+# Nov 22
+sha256 6b02ee423047992c5298d9c81a81231f71d62a549242a63913a050836b863e64  pistache-394b17c01f928bb.tar.gz
+
+# Apr 13
+sha256 bcc7640eb4ae4b178e504f18ebf29dd0a6f8189710cdc0fa4703fa27728145e4  73f248acd6db4c53.tar.gz
package/pistache/pistache.mk new file +23 -0
new file mode 100644
index 0000000000..da9e61b10e
@@ -0,0 +1,23 @@
+################################################################################
+#
+# Pistache
+#
+################################################################################
+
+PISTACHE_VERSION = 73f248acd6db4c53
+PISTACHE_SOURCE = $(PISTACHE_VERSION).tar.gz
+PISTACHE_SITE = https://github.com/oktal/pistache/archive
+PISTACHE_SITE_METHOD = wget
+
+PISTACHE_INSTALL_STAGING = YES
+PISTACHE_INSTALL_TARGET = YES
+PISTACHE_LICENSE = Apache-2.0
+PISTACHE_LICENSE_FILE = LICENSE
+
+PISTACHE_CONF_OPTS += -DCMAKE_BUILD_TYPE=Release
+
+ifeq (y, $(BR2_PACKAGE_PISTACHE_ENABLE_SSL))
+	PISTACHE_CONF_OPTS += -DPISTACHE_USE_SSL=On
+endif
+
+$(eval $(cmake-package))
Signature · 1 line
2.26.2
#2 lore raw

PATCH 1/1 package/pistache: new package

Thomas, All,

Thanks for your patch. Please see my review below...

On 2020-04-26 15:58 +0200, Thomas Ruschival spake thusly:

Quoted 2 lines

Add a new package for pistache https://pistache.io/
Pistache is a C++ REST client/server library.

Note: all you wrote in your cover letter should have been in the commit log.

Quoted 29 lines
---
 package/Config.in              |  1 +
 package/pistache/Config.in     | 22 ++++++++++++++++++++++
 package/pistache/pistache.hash |  5 +++++
 package/pistache/pistache.mk   | 23 +++++++++++++++++++++++
 4 files changed, 51 insertions(+)
 create mode 100644 package/pistache/Config.in
 create mode 100644 package/pistache/pistache.hash
 create mode 100644 package/pistache/pistache.mk
package/Config.in +1 -0
index 6c55c5bc42..631aec69a1 100644
@@ -1753,6 +1753,7 @@ menu "Networking"
 	source "package/ortp/Config.in"
 	source "package/paho-mqtt-c/Config.in"
 	source "package/paho-mqtt-cpp/Config.in"
+	source "package/pistache/Config.in"
 	source "package/qdecoder/Config.in"
 	source "package/qpid-proton/Config.in"
 	source "package/rabbitmq-c/Config.in"
package/pistache/Config.in new file +0 -0
new file mode 100644
index 0000000000..5b81c9c1b7

package/pistache/Config.in line 5

Quoted 5 lines
package/pistache/Config.in new file +5 -0
@@ -0,0 +1,22 @@
+config BR2_PACKAGE_PISTACHE
+	bool "pistache"
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++14
+	depends on BR2_USE_WCHAR
+	depends on BR2_TOOLCHAIN_HAS_THREADS

Since it is C++, it also needs:

depends on BR2_INSTALL_LIBSTDCPP

package/pistache/Config.in line 13

Quoted 8 lines
package/pistache/Config.in new file +8 -0
+	help
+	  Pistache is a C++ REST framework written by Mathieu Stefani
+	  at Datacratic. It is written in pure C++14 with no external
+	  dependency and provides a low-level HTTP abstraction. It
+	  provides both an HTTP client and server that can be used
+	  to create and query complex web and REST APIs.
+
+	  https://pistache.io/

https://pistache.io/ uses an invalid certificate, while http://pistache.io/
works. However, I'd prefer we directly point to the github repository, since this seems to be kept more up-to-date than the website (as you noticed, at least about C++11 vs C++14).

Also, the description, although the one from the webasite, is a bit too verbose, especially since Datacratic (http://datacratic.com/) does not exist anymore it seems.

I'd rather we just use the shorter description from the github repo:

Pistache is a modern and elegant HTTP and REST framework for C++. It is entirely written in pure-C++14 and provides a clear and pleasant API.

https://github.com/oktal/pistache

package/pistache/Config.in line 15

Quoted 2 lines
package/pistache/Config.in new file +2 -0
+
+

Single empty line, as noticed by 'make check-package'.

package/pistache/Config.in line 21

Quoted 6 lines
package/pistache/Config.in new file +6 -0
+config BR2_PACKAGE_PISTACHE_ENABLE_SSL
+	bool "pistache SSL support"
+	depends on BR2_PACKAGE_PISTACHE
+	depends on BR2_PACKAGE_OPENSSL
+	help
+	  Configure pistache with -DPISTACHE_USE_SSL=On to support HTTPS

I don't think an option is needed. Usually, such optional dependencies are treated directly in the .mk, see below...

package/pistache/pistache.hash line 5

Quoted 12 lines
package/pistache/Config.in new file +1 -0
+
package/pistache/pistache.hash new file +5 -0
new file mode 100644
index 0000000000..fb4ada8b24
@@ -0,0 +1,5 @@
+# Nov 22
+sha256 6b02ee423047992c5298d9c81a81231f71d62a549242a63913a050836b863e64  pistache-394b17c01f928bb.tar.gz
+
+# Apr 13
+sha256 bcc7640eb4ae4b178e504f18ebf29dd0a6f8189710cdc0fa4703fa27728145e4  73f248acd6db4c53.tar.gz

Please only provide just the one hash that is needed. The dates are meaningless, too. Instead, comment the hash with 'locally computed' (as it comes from a github -generated tarball).

Quoted 6 lines
package/pistache/pistache.mk new file +0 -0
new file mode 100644
index 0000000000..da9e61b10e

package/pistache/pistache.mk line 10

Quoted 10 lines
package/pistache/pistache.mk new file +10 -0
@@ -0,0 +1,23 @@
+################################################################################
+#
+# Pistache
+#
+################################################################################
+
+PISTACHE_VERSION = 73f248acd6db4c53
+PISTACHE_SOURCE = $(PISTACHE_VERSION).tar.gz
+PISTACHE_SITE = https://github.com/oktal/pistache/archive
+PISTACHE_SITE_METHOD = wget

Use the full-length hash, ie. 73f248acd6db4c53e6604577b7e13fd5e756f96f Don't override the _SOURCE, use the github helper for _SITE, and don't force the _SITE_METHOD:

    PISTACHE_VERSION = 73f248acd6db4c53
    PISTACHE_SITE = $(call github,oktal,pistache,$(PISTACHE_VERSION))

package/pistache/pistache.mk line 13

Quoted 3 lines
package/pistache/pistache.mk new file +3 -0
+
+PISTACHE_INSTALL_STAGING = YES
+PISTACHE_INSTALL_TARGET = YES

_INSTALL_TARGET is the default, no need to specify it.

package/pistache/pistache.mk line 15

Quoted 2 lines
package/pistache/pistache.mk new file +2 -0
+PISTACHE_LICENSE = Apache-2.0
+PISTACHE_LICENSE_FILE = LICENSE

Put the licensing info before INSTALL_STAGING, but after the download info.

package/pistache/pistache.mk line 17

Quoted 1 line
package/pistache/pistache.mk new file +1 -0
+PISTACHE_CONF_OPTS += -DCMAKE_BUILD_TYPE=Release

Not needed, this is set by the cmake-package infra.

Also, you should probably set additionaly options:

    PISTACHE_CONF_OPTS = \
       -DPISTACHE_BUILD_EXAMPLES=OFF \
       -DPISTACHE_BUILD_TESTS=OFF \
       -DPISTACHE_BUILD_DOCS=OFF

package/pistache/pistache.mk line 21

Quoted 3 lines
package/pistache/pistache.mk new file +3 -0
+ifeq (y, $(BR2_PACKAGE_PISTACHE_ENABLE_SSL))
+	PISTACHE_CONF_OPTS += -DPISTACHE_USE_SSL=On
+endif

That's were we would handle the optional dependency to openssl:

    ifeq ($(BR2_PACKAGE_OPENSSL),y)
    PISTACHE_DEPENDENCIES += openssl
    PISTACHE_CONF_OPTS += -DPISTACHE_USE_SSL=ON
    else
    PISTACHE_CONF_OPTS += -DPISTACHE_USE_SSL=OFF
    endif

I was about to do all those changes locally, but there are too many build failures anyway:

    $ echo 'BR2_PACKAGE_PISTACHE=y' >pistache.cfg
    $ ./utils/test-pkg -d $(pwd)/br-test -c pistache.cfg
                             br-arm-full [1/6]: FAILED
                  br-arm-cortex-a9-glibc [2/6]: OK
                   br-arm-cortex-m4-full [3/6]: FAILED
                          br-x86-64-musl [4/6]: OK
                      br-arm-full-static [5/6]: FAILED
                            sourcery-arm [6/6]: SKIPPED
    6 builds, 1 skipped, 3 build failed, 0 legal-info failed

The build logs will be located in br-test/*/logfile

Care to address these issues, and look into the build failures?

Regards,
Yann E. MORIN.

Quoted 8 lines
package/pistache/pistache.mk new file +1 -0
+$(eval $(cmake-package))
Signature · 6 lines
2.26.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 1/1 package/pistache: new package

Hi Yann, dear list,
thanks for the effort of the extensive review and sorry for not having read about 'make check-package'.
I agree with your suggestions and will look into the build errors on other platforms.

Quoted 53 lines · Yann E. MORIN

Thomas, All,

Thanks for your patch. Please see my review below...

On 2020-04-26 15:58 +0200, Thomas Ruschival spake thusly:

Quoted 2 lines

Add a new package for pistache https://pistache.io/
Pistache is a C++ REST client/server library.

Note: all you wrote in your cover letter should have been in the commit log.

Quoted 34 lines

---

 package/Config.in              |  1 +
 package/pistache/Config.in     | 22 ++++++++++++++++++++++
 package/pistache/pistache.hash |  5 +++++
 package/pistache/pistache.mk   | 23 +++++++++++++++++++++++
 4 files changed, 51 insertions(+)
 create mode 100644 package/pistache/Config.in
 create mode 100644 package/pistache/pistache.hash
 create mode 100644 package/pistache/pistache.mk
package/Config.in +1 -0
index 6c55c5bc42..631aec69a1 100644
@@ -1753,6 +1753,7 @@ menu "Networking"
 
 	source "package/ortp/Config.in"
 	source "package/paho-mqtt-c/Config.in"
 	source "package/paho-mqtt-cpp/Config.in"
 
+	source "package/pistache/Config.in"
 
package/Config.in +0 -0
 	source "package/qdecoder/Config.in"
 	source "package/qpid-proton/Config.in"
 	source "package/rabbitmq-c/Config.in"
package/pistache/Config.in new file +0 -0
new file mode 100644
index 0000000000..5b81c9c1b7

package/pistache/Config.in line 5

Quoted 5 lines
package/pistache/Config.in new file +5 -0
@@ -0,0 +1,22 @@
+config BR2_PACKAGE_PISTACHE
+	bool "pistache"
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++14
+	depends on BR2_USE_WCHAR
+	depends on BR2_TOOLCHAIN_HAS_THREADS

Since it is C++, it also needs:

Quoted 1 line

depends on BR2_INSTALL_LIBSTDCPP

Right.

Quoted 18 lines

package/pistache/Config.in line 13

Quoted 8 lines
package/pistache/Config.in new file +8 -0
+	help
+	  Pistache is a C++ REST framework written by Mathieu Stefani
+	  at Datacratic. It is written in pure C++14 with no external
+	  dependency and provides a low-level HTTP abstraction. It
+	  provides both an HTTP client and server that can be used
+	  to create and query complex web and REST APIs.
+
+	  https://pistache.io/

https://pistache.io/ uses an invalid certificate, while http://pistache.io/
works. However, I'd prefer we directly point to the github repository, since this seems to be kept more up-to-date than the website (as you noticed, at least about C++11 vs C++14).

Also, the description, although the one from the webasite, is a bit too verbose, especially since Datacratic (http://datacratic.com/) does not exist anymore it seems.

Quoted 8 lines

I'd rather we just use the shorter description from the github repo:

Pistache is a modern and elegant HTTP and REST framework for C++. It is entirely written in pure-C++14 and provides a clear and pleasant API.

https://github.com/oktal/pistache

Agreed, will fix that.

Quoted 2 lines

Single empty line, as noticed by 'make check-package'.

Sorry for that, should have read all docs. Especially since there are tools to lint patches.

Quoted 63 lines

package/pistache/Config.in line 21

Quoted 6 lines
package/pistache/Config.in new file +6 -0
+config BR2_PACKAGE_PISTACHE_ENABLE_SSL
+	bool "pistache SSL support"
+	depends on BR2_PACKAGE_PISTACHE
+	depends on BR2_PACKAGE_OPENSSL
+	help
+	  Configure pistache with -DPISTACHE_USE_SSL=On to support HTTPS

I don't think an option is needed. Usually, such optional dependencies are treated directly in the .mk, see below...

Quoted 12 lines
package/pistache/Config.in new file +1 -0
+
(quoted diff) +0 -0

b/package/pistache/pistache.hash new file mode 100644 index 0000000000..fb4ada8b24

package/pistache/pistache.hash new file +2 -0
@@ -0,0 +1,5 @@
+# Nov 22
+sha256 6b02ee423047992c5298d9c81a81231f71d62a549242a63913a050836b863e64 

pistache-394b17c01f928bb.tar.gz +

package/pistache/pistache.hash new file +2 -0
+# Apr 13
+sha256 bcc7640eb4ae4b178e504f18ebf29dd0a6f8189710cdc0fa4703fa27728145e4 
Quoted 1 line

73f248acd6db4c53.tar.gz

Please only provide just the one hash that is needed. The dates are meaningless, too. Instead, comment the hash with 'locally computed' (as it comes from a github -generated tarball).

Quoted 12 lines
package/pistache/pistache.mk new file +1 -0
new file mode 100644
index 0000000000..da9e61b10e
@@ -0,0 +1,23 @@
+#########################################################################

####### +#

package/pistache/pistache.mk new file +3 -0
+# Pistache
+#
+#########################################################################

####### +

package/pistache/pistache.mk line 10

Quoted 4 lines
package/pistache/pistache.mk new file +4 -0
+PISTACHE_VERSION = 73f248acd6db4c53
+PISTACHE_SOURCE = $(PISTACHE_VERSION).tar.gz
+PISTACHE_SITE = https://github.com/oktal/pistache/archive
+PISTACHE_SITE_METHOD = wget

Use the full-length hash, ie. 73f248acd6db4c53e6604577b7e13fd5e756f96f Don't override the _SOURCE, use the github helper for _SITE, and don't force the _SITE_METHOD:

    PISTACHE_VERSION = 73f248acd6db4c53
    PISTACHE_SITE = $(call github,oktal,pistache,$(PISTACHE_VERSION))

package/pistache/pistache.mk line 13

Quoted 3 lines
package/pistache/pistache.mk new file +3 -0
+
+PISTACHE_INSTALL_STAGING = YES
+PISTACHE_INSTALL_TARGET = YES

_INSTALL_TARGET is the default, no need to specify it.

package/pistache/pistache.mk line 15

Quoted 2 lines
package/pistache/pistache.mk new file +2 -0
+PISTACHE_LICENSE = Apache-2.0
+PISTACHE_LICENSE_FILE = LICENSE

Put the licensing info before INSTALL_STAGING, but after the download info.

Quoted 3 lines
Quoted 1 line

+PISTACHE_CONF_OPTS += -DCMAKE_BUILD_TYPE=Release

Not needed, this is set by the cmake-package infra.

True, bad habit. Will remove.

Quoted 13 lines

Also, you should probably set additionaly options:

    PISTACHE_CONF_OPTS = \
       -DPISTACHE_BUILD_EXAMPLES=OFF \
       -DPISTACHE_BUILD_TESTS=OFF \
       -DPISTACHE_BUILD_DOCS=OFF

package/pistache/pistache.mk line 21

Quoted 3 lines
package/pistache/pistache.mk new file +3 -0
+ifeq (y, $(BR2_PACKAGE_PISTACHE_ENABLE_SSL))
+	PISTACHE_CONF_OPTS += -DPISTACHE_USE_SSL=On
+endif

That's were we would handle the optional dependency to openssl:

Quoted 6 lines
    ifeq ($(BR2_PACKAGE_OPENSSL),y)
    PISTACHE_DEPENDENCIES += openssl
    PISTACHE_CONF_OPTS += -DPISTACHE_USE_SSL=ON
    else
    PISTACHE_CONF_OPTS += -DPISTACHE_USE_SSL=OFF
    endif

Makes sense, I fully agree.

Quoted 13 lines

I was about to do all those changes locally, but there are too many build failures anyway:

    $ echo 'BR2_PACKAGE_PISTACHE=y' >pistache.cfg
    $ ./utils/test-pkg -d $(pwd)/br-test -c pistache.cfg
                             br-arm-full [1/6]: FAILED
                  br-arm-cortex-a9-glibc [2/6]: OK
                   br-arm-cortex-m4-full [3/6]: FAILED
                          br-x86-64-musl [4/6]: OK
                      br-arm-full-static [5/6]: FAILED
                            sourcery-arm [6/6]: SKIPPED
    6 builds, 1 skipped, 3 build failed, 0 legal-info failed
Quoted 3 lines

The build logs will be located in br-test/*/logfile

Care to address these issues, and look into the build failures?

Sure, I will look into the build errors and provide an updated patch later this week.

Quoted 2 lines

Regards,
Yann E. MORIN.

Best regards,
Thomas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20200427/61c88f4f/attachment.asc>

#4 lore raw

PATCH 1/1 package/pistache: new package

In reply to Thomas Ruschival

Hello Thomas,

Thanks for your contribution!

package/pistache/Config.in line 3

Quoted 9 lines · On Sun, 26 Apr 2020 15:58:42 +0200 Thomas Ruschival <[email protected]> wrote:
package/pistache/Config.in new file +3 -0
new file mode 100644
index 0000000000..5b81c9c1b7
@@ -0,0 +1,22 @@
+config BR2_PACKAGE_PISTACHE
+	bool "pistache"
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++14

Are you sure C++14 support was complete in gcc 4.9 ?

Did you test building with gcc 4.9 ?

Also, you need to add:

depends on BR2_INSTALL_LIBSTDCPP

since you have a C++ dependency.

Quoted 8 lines
package/pistache/Config.in new file +8 -0
+	depends on BR2_USE_WCHAR
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	help
+	  Pistache is a C++ REST framework written by Mathieu Stefani
+	  at Datacratic. It is written in pure C++14 with no external
+	  dependency and provides a low-level HTTP abstraction. It
+	  provides both an HTTP client and server that can be used
+	  to create and query complex web and REST APIs.

package/pistache/Config.in line 21

Quoted 10 lines
package/pistache/Config.in new file +10 -0
+
+	  https://pistache.io/
+
+
+config BR2_PACKAGE_PISTACHE_ENABLE_SSL
+	bool "pistache SSL support"
+	depends on BR2_PACKAGE_PISTACHE
+	depends on BR2_PACKAGE_OPENSSL
+	help
+	  Configure pistache with -DPISTACHE_USE_SSL=On to support HTTPS

This option is not needed, I'll explain how to handle this in the .mk file.

However, you also need to add a Config.in comment:

comment "pistache needs a toolchain w/ C++, gcc >= 4.9, threads, wchar"

	depends on !BR2_INSTALL_LIBSTDCPP || \
		!BR2_TOOLCHAIN_HAS_GCC_AT_LEAST_4_9 || \
		!BR2_TOOLCHAIN_HAS_THREADS || \
		!BR2_USE_WCHAR

package/pistache/pistache.hash line 5

Quoted 11 lines
package/pistache/pistache.hash new file +5 -0
new file mode 100644
index 0000000000..fb4ada8b24
@@ -0,0 +1,5 @@
+# Nov 22
+sha256 6b02ee423047992c5298d9c81a81231f71d62a549242a63913a050836b863e64  pistache-394b17c01f928bb.tar.gz
+
+# Apr 13
+sha256 bcc7640eb4ae4b178e504f18ebf29dd0a6f8189710cdc0fa4703fa27728145e4  73f248acd6db4c53.tar.gz

Why two hashes? Why dates in comments? This does not make much sense.

package/pistache/pistache.mk line 3

Quoted 9 lines
package/pistache/pistache.mk new file +3 -0
new file mode 100644
index 0000000000..da9e61b10e
@@ -0,0 +1,23 @@
+################################################################################
+#
+# Pistache

Lower case please.

package/pistache/pistache.mk line 10

Quoted 7 lines
package/pistache/pistache.mk new file +7 -0
+#
+################################################################################
+
+PISTACHE_VERSION = 73f248acd6db4c53
+PISTACHE_SOURCE = $(PISTACHE_VERSION).tar.gz
+PISTACHE_SITE = https://github.com/oktal/pistache/archive
+PISTACHE_SITE_METHOD = wget

Use the $(call github...) helper macro. Grep for other packages that use it.

package/pistache/pistache.mk line 13

Quoted 3 lines
package/pistache/pistache.mk new file +3 -0
+
+PISTACHE_INSTALL_STAGING = YES
+PISTACHE_INSTALL_TARGET = YES

Line not needed. Please run "make check-package" to verify the coding style of your package.

package/pistache/pistache.mk line 17

Quoted 4 lines
package/pistache/pistache.mk new file +4 -0
+PISTACHE_LICENSE = Apache-2.0
+PISTACHE_LICENSE_FILE = LICENSE
+
+PISTACHE_CONF_OPTS += -DCMAKE_BUILD_TYPE=Release

Not needed, this is passed by the cmake package infrastructure.

package/pistache/pistache.mk line 21

Quoted 3 lines
package/pistache/pistache.mk new file +3 -0
+ifeq (y, $(BR2_PACKAGE_PISTACHE_ENABLE_SSL))
+	PISTACHE_CONF_OPTS += -DPISTACHE_USE_SSL=On
+endif

You forgot the dependency on openssl. This should be:

ifeq ($(BR2_PACKAGE_OPENSSL),y)
PISTACHE_DEPENDENCIES += openssl
PISTACHE_CONF_OPTS += -DPISTACHE_USE_SSL=ON
else
PISTACHE_CONF_OPTS += -DPISTACHE_USE_SSL=OFF
endif

Also, could you test this package with our ./utils/test-pkg utility ? This will allow to detect the most common build issue with this package (if any).

Thanks a lot!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#5 lore raw

PATCH v2 1/1 package/pistache: new package

In reply to Thomas Ruschival

The upstream project http://pistache.io/ does not provide release tarballs at https://github.com/oktal/pistache/. I have been using the commit 73f248acd6db4c53 successfully for some time now for a buildroot project.

The use of BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 is for C++14 support. Tested it with gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabi and buildroot's ./utils/test-pkg

Pistache does not build with uClibc, the macro RUSAGE_THREAD for getrusage() is not properly declared. This is an upstream issue:
https://github.com/oktal/pistache/issues/175
Hence the dependecy !BR2_TOOLCHAIN_USES_UCLIBC

---
 package/Config.in              |  1 +
 package/pistache/Config.in     | 20 ++++++++++++++++++++
 package/pistache/pistache.hash |  2 ++
 package/pistache/pistache.mk   | 21 +++++++++++++++++++++
 4 files changed, 44 insertions(+)
 create mode 100644 package/pistache/Config.in
 create mode 100644 package/pistache/pistache.hash
 create mode 100644 package/pistache/pistache.mk
package/Config.in +1 -0
index 53c8ce0e29..c12676d859 100644
@@ -1754,6 +1754,7 @@ menu "Networking"
 	source "package/ortp/Config.in"
 	source "package/paho-mqtt-c/Config.in"
 	source "package/paho-mqtt-cpp/Config.in"
+	source "package/pistache/Config.in"
 	source "package/qdecoder/Config.in"
 	source "package/qpid-proton/Config.in"
 	source "package/rabbitmq-c/Config.in"
package/pistache/Config.in new file +20 -0
new file mode 100644
index 0000000000..64d6340827
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_PISTACHE
+	bool "pistache"
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++14
+	depends on BR2_USE_WCHAR
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on !BR2_TOOLCHAIN_USES_UCLIBC
+	help
+	  Pistache is a modern and elegant HTTP and REST framework
+	  for C++. It is entirely written in pure C++14 and provides
+	  a clear and pleasant API.
+
+	  https://github.com/oktal/pistache
+
+comment "pistache needs a glibc toolchain w/ C++, gcc >= 4.9, threads, wchar"
+	depends on !BR2_INSTALL_LIBSTDCPP || \
+	BR2_TOOLCHAIN_USES_UCLIBC || \
+	!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \
+	!BR2_TOOLCHAIN_HAS_THREADS || \
+	!BR2_USE_WCHAR
package/pistache/pistache.hash new file +2 -0
new file mode 100644
index 0000000000..f81ee8a5b2
@@ -0,0 +1,2 @@
+#locally computed
+sha256 bcc7640eb4ae4b178e504f18ebf29dd0a6f8189710cdc0fa4703fa27728145e4  pistache-73f248acd6db4c53e6604577b7e13fd5e756f96f.tar.gz
package/pistache/pistache.mk new file +21 -0
new file mode 100644
index 0000000000..7b30621b74
@@ -0,0 +1,21 @@
+################################################################################
+#
+# pistache
+#
+################################################################################
+
+PISTACHE_VERSION = 73f248acd6db4c53e6604577b7e13fd5e756f96f
+PISTACHE_SITE = $(call github,oktal,pistache,$(PISTACHE_VERSION))
+PISTACHE_LICENSE = Apache-2.0
+PISTACHE_LICENSE_FILE = LICENSE
+
+PISTACHE_INSTALL_STAGING = YES
+
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+PISTACHE_DEPENDENCIES += openssl
+PISTACHE_CONF_OPTS += -DPISTACHE_USE_SSL=ON
+else
+PISTACHE_CONF_OPTS += -DPISTACHE_USE_SSL=OFF
+endif
+
+$(eval $(cmake-package))
Signature · 1 line
2.26.2
#6 lore raw

PATCH v2 1/1 package/pistache: new package

Thomas, All,

On 2020-05-01 11:22 +0200, Thomas Ruschival spake thusly:

Quoted 9 lines

The upstream project http://pistache.io/ does not provide release tarballs at https://github.com/oktal/pistache/. I have been using the commit 73f248acd6db4c53 successfully for some time now for a buildroot project.

The use of BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 is for C++14 support. Tested it with gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabi and buildroot's ./utils/test-pkg

Quoted 6 lines

Pistache does not build with uClibc, the macro RUSAGE_THREAD for getrusage() is not properly declared. This is an upstream issue:
https://github.com/oktal/pistache/issues/175
Hence the dependecy !BR2_TOOLCHAIN_USES_UCLIBC

Applied to master, with the following changes:

- fix PISTACHE_LICENSE_FILES (missing trailing 'S')
- add hash for license file
- two spaces in license file
- tweaks in commit log

Thanks!

Regards,
Yann E. MORIN.

Quoted 90 lines
---
 package/Config.in              |  1 +
 package/pistache/Config.in     | 20 ++++++++++++++++++++
 package/pistache/pistache.hash |  2 ++
 package/pistache/pistache.mk   | 21 +++++++++++++++++++++
 4 files changed, 44 insertions(+)
 create mode 100644 package/pistache/Config.in
 create mode 100644 package/pistache/pistache.hash
 create mode 100644 package/pistache/pistache.mk
package/Config.in +1 -0
index 53c8ce0e29..c12676d859 100644
@@ -1754,6 +1754,7 @@ menu "Networking"
 	source "package/ortp/Config.in"
 	source "package/paho-mqtt-c/Config.in"
 	source "package/paho-mqtt-cpp/Config.in"
+	source "package/pistache/Config.in"
 	source "package/qdecoder/Config.in"
 	source "package/qpid-proton/Config.in"
 	source "package/rabbitmq-c/Config.in"
package/pistache/Config.in new file +20 -0
new file mode 100644
index 0000000000..64d6340827
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_PISTACHE
+	bool "pistache"
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++14
+	depends on BR2_USE_WCHAR
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on !BR2_TOOLCHAIN_USES_UCLIBC
+	help
+	  Pistache is a modern and elegant HTTP and REST framework
+	  for C++. It is entirely written in pure C++14 and provides
+	  a clear and pleasant API.
+
+	  https://github.com/oktal/pistache
+
+comment "pistache needs a glibc toolchain w/ C++, gcc >= 4.9, threads, wchar"
+	depends on !BR2_INSTALL_LIBSTDCPP || \
+	BR2_TOOLCHAIN_USES_UCLIBC || \
+	!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \
+	!BR2_TOOLCHAIN_HAS_THREADS || \
+	!BR2_USE_WCHAR
package/pistache/pistache.hash new file +2 -0
new file mode 100644
index 0000000000..f81ee8a5b2
@@ -0,0 +1,2 @@
+#locally computed
+sha256 bcc7640eb4ae4b178e504f18ebf29dd0a6f8189710cdc0fa4703fa27728145e4  pistache-73f248acd6db4c53e6604577b7e13fd5e756f96f.tar.gz
package/pistache/pistache.mk new file +21 -0
new file mode 100644
index 0000000000..7b30621b74
@@ -0,0 +1,21 @@
+################################################################################
+#
+# pistache
+#
+################################################################################
+
+PISTACHE_VERSION = 73f248acd6db4c53e6604577b7e13fd5e756f96f
+PISTACHE_SITE = $(call github,oktal,pistache,$(PISTACHE_VERSION))
+PISTACHE_LICENSE = Apache-2.0
+PISTACHE_LICENSE_FILE = LICENSE
+
+PISTACHE_INSTALL_STAGING = YES
+
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+PISTACHE_DEPENDENCIES += openssl
+PISTACHE_CONF_OPTS += -DPISTACHE_USE_SSL=ON
+else
+PISTACHE_CONF_OPTS += -DPISTACHE_USE_SSL=OFF
+endif
+
+$(eval $(cmake-package))
Signature · 6 lines
2.26.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'