Skip to contentSkip to conversation

http-parser: add recipe

PATCH In review Stefan Wiehler 2 participants 3 messages May 17, 2021

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 http-parser: add recipe

HTTP request/response parser for C.

---
 .../http-parser/http-parser_2.9.4.bb          | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 meta-networking/recipes-support/http-parser/http-parser_2.9.4.bb
meta-networking/recipes-support/http-parser/http-parser_2.9.4.bb new file +30 -0
new file mode 100644
index 000000000..2d04ded34
@@ -0,0 +1,30 @@
+SUMMARY = "HTTP request/response parser for C"
+DESCRIPTION = "This is a parser for HTTP messages written in C. It parses \
+              both requests and responses. The parser is designed to be used \
+              in performance HTTP applications. It does not make any \
+              syscalls nor allocations, it does not buffer data, it can be \
+              interrupted at anytime. Depending on your architecture, it \
+              only requires about 40 bytes of data per message stream (in a \
+              web server that is per connection)."
+AUTHOR = "Stefan Wiehler <[email protected]>"
+HOMEPAGE = "https://github.com/nodejs/http-parser"
+SECTION = "libs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE-MIT;md5=9bfa835d048c194ab30487af8d7b3778"
+
+SRC_URI = "git://github.com/nodejs/http-parser.git"
+SRCREV = "2343fd6b5214b2ded2cdcf76de2bf60903bb90cd"
+
+S = "${WORKDIR}/git"
+
+do_configure[noexec] = "1"
+
+do_compile() {
+    oe_runmake library package
+}
+
+do_install() {
+    oe_runmake install DESTDIR=${D} PREFIX=${prefix}
+}
+
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.29.2
#1 lore raw

PATCH v2 2/2 restinio: add recipe

Header-only C++14 library that gives you an embedded HTTP server.

---
 .../restinio/restinio_0.6.13.bb               | 31 +++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 meta-networking/recipes-connectivity/restinio/restinio_0.6.13.bb
meta-networking/recipes-connectivity/restinio/restinio_0.6.13.bb new file +31 -0
new file mode 100644
index 000000000..e3567961a
@@ -0,0 +1,31 @@
+SUMMARY = "Header-only C++14 library that gives you an embedded HTTP server"
+DESCRIPTION = "Cross-platform, efficient, customizable, and robust \
+               asynchronous HTTP/WebSocket server C++14 library with the \
+               right balance between performance and ease of use"
+AUTHOR = "Stefan Wiehler <[email protected]>"
+HOMEPAGE = "https://stiffstream.com/en/products/restinio.html"
+SECTION = "libs"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://../LICENSE;md5=f399b62ce0a152525d1589a5a40c0ff6"
+DEPENDS = "asio fmt http-parser"
+
+SRC_URI = "https://github.com/Stiffstream/restinio/releases/download/v.${PV}/restinio-${PV}.tar.bz2"
+SRC_URI[md5sum] = "37a4310e98912030a74bdd4ed789f33c"
+SRC_URI[sha256sum] = "b35d696e6fafd4563ca708fcecf9d0cf6705c846d417b5000f5252e0188848e7"
+
+S = "${WORKDIR}/${PN}-${PV}/dev"
+
+inherit cmake
+
+EXTRA_OECMAKE += "\
+                  -DRESTINIO_TEST=OFF \
+                  -DRESTINIO_SAMPLE=OFF \
+                  -DRESTINIO_BENCH=OFF \
+                  -DRESTINIO_FIND_DEPS=ON \
+                  -DRESTINIO_ALLOW_SOBJECTIZER=OFF \
+                  -DRESTINIO_USE_EXTERNAL_HTTP_PARSER=ON \
+                  "
+
+# Header-only library
+RDEPENDS_${PN}-dev = ""
+RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
Signature · 1 line
2.29.2
#2 lore raw
In reply to Stefan Wiehler

Hello Stefan

I accepted the V1, so if there is delta on top of that then rebase these patches on top of master or master-next and resend please

Quoted 49 lines · Stefan Wiehler

HTTP request/response parser for C.

---
  .../http-parser/http-parser_2.9.4.bb          | 30 +++++++++++++++++++
  1 file changed, 30 insertions(+)

create mode 100644 meta-networking/recipes-support/http-parser/http-parser_2.9.4.bb

meta-networking/recipes-support/http-parser/http-parser_2.9.4.bb new file +30 -0
new file mode 100644
index 000000000..2d04ded34
@@ -0,0 +1,30 @@
+SUMMARY = "HTTP request/response parser for C"
+DESCRIPTION = "This is a parser for HTTP messages written in C. It parses \
+              both requests and responses. The parser is designed to be used \
+              in performance HTTP applications. It does not make any \
+              syscalls nor allocations, it does not buffer data, it can be \
+              interrupted at anytime. Depending on your architecture, it \
+              only requires about 40 bytes of data per message stream (in a \
+              web server that is per connection)."
+AUTHOR = "Stefan Wiehler <[email protected]>"
+HOMEPAGE = "https://github.com/nodejs/http-parser"
+SECTION = "libs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE-MIT;md5=9bfa835d048c194ab30487af8d7b3778"
+
+SRC_URI = "git://github.com/nodejs/http-parser.git"
+SRCREV = "2343fd6b5214b2ded2cdcf76de2bf60903bb90cd"
+
+S = "${WORKDIR}/git"
+
+do_configure[noexec] = "1"
+
+do_compile() {
+    oe_runmake library package
+}
+
+do_install() {
+    oe_runmake install DESTDIR=${D} PREFIX=${prefix}
+}
+
+BBCLASSEXTEND = "native nativesdk"