summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzk@kernel.org>2018-05-25 10:24:32 +0200
committerKhem Raj <raj.khem@gmail.com>2018-05-29 12:56:19 -0700
commitba53d1341bcc193cdcf4f6f74699693f27aa19b7 (patch)
treea7caa1b8c2518cbff283b674ef990943109e3064
parentcd58494ee7103ddfd9f75b8ed4d91f7107fa97a6 (diff)
downloadmeta-openembedded-ba53d1341bcc193cdcf4f6f74699693f27aa19b7.tar.gz
civetweb: Add new recipe with git-based version
Add recipe for CivetWeb: easy to use, powerful, C/C++ embeddable web server with optional CGI, SSL and Lua support, under MIT license. CivetWeb provides C and C++ libraries and a standalone server binary. Choose specific post-v1.10 git revision b8148afe8fa4 which has a fixed SSL support (depending on OpenSSL v1.0.2). Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-networking/recipes-connectivity/civetweb/civetweb/0001-Test-Fix-missing-librt-and-libm-during-native-compil.patch42
-rw-r--r--meta-networking/recipes-connectivity/civetweb/civetweb_git.bb47
2 files changed, 89 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/civetweb/civetweb/0001-Test-Fix-missing-librt-and-libm-during-native-compil.patch b/meta-networking/recipes-connectivity/civetweb/civetweb/0001-Test-Fix-missing-librt-and-libm-during-native-compil.patch
new file mode 100644
index 0000000000..401cf39ad8
--- /dev/null
+++ b/meta-networking/recipes-connectivity/civetweb/civetweb/0001-Test-Fix-missing-librt-and-libm-during-native-compil.patch
@@ -0,0 +1,42 @@
1From cd93e2c538cecb3192fd24c0fbd6e834d0c47eec Mon Sep 17 00:00:00 2001
2From: Krzysztof Kozlowski <krzk@kernel.org>
3Date: Wed, 18 Apr 2018 14:11:52 +0200
4Subject: [PATCH] Unittest: Fix missing librt and libm during native compilation
5
6civetweb looks for librt and libm in weird places and for native build
7this fails:
8
9 | ../third_party/lib/libcheck.a(check.c.o): In function `tcase_create':
10 | build/tmp/work/x86_64-linux/civetweb-native/1.10-r0/build/third_party/src/check-unit-test-framework/src/check.c:145: undefined reference to `floor'
11 | build/tmp/work/x86_64-linux/civetweb-native/1.10-r0/build/third_party/src/check-unit-test-framework/src/check.c:148: undefined reference to `floor'
12
13These are needed dependencies so try regular system linkage in such
14case.
15
16Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
17---
18 unittest/CMakeLists.txt | 4 ++++
19 1 file changed, 4 insertions(+)
20
21diff --git a/unittest/CMakeLists.txt b/unittest/CMakeLists.txt
22index f34b2e0e4ce4..05d25702178c 100644
23--- a/unittest/CMakeLists.txt
24+++ b/unittest/CMakeLists.txt
25@@ -60,10 +60,14 @@ endif()
26 find_package(LibM)
27 if (LIBM_FOUND)
28 set(CHECK_LIBRARIES "${CHECK_LIBRARIES};LIBM::LIBM")
29+else()
30+ set(CHECK_LIBRARIES "${CHECK_LIBRARIES};-lm")
31 endif()
32 find_package(LibRt)
33 if (LIBRT_FOUND)
34 set(CHECK_LIBRARIES "${CHECK_LIBRARIES};LIBRT::LIBRT")
35+else()
36+ set(CHECK_LIBRARIES "${CHECK_LIBRARIES};-lrt")
37 endif()
38
39 # Build the C unit tests
40--
412.7.4
42
diff --git a/meta-networking/recipes-connectivity/civetweb/civetweb_git.bb b/meta-networking/recipes-connectivity/civetweb/civetweb_git.bb
new file mode 100644
index 0000000000..45d6ec8864
--- /dev/null
+++ b/meta-networking/recipes-connectivity/civetweb/civetweb_git.bb
@@ -0,0 +1,47 @@
1SUMMARY = "Civetweb embedded web server"
2HOMEPAGE = "https://github.com/civetweb/civetweb"
3
4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://LICENSE.md;md5=6f28fdcba0dda735eed62bac6a397562"
6
7SRCREV = "b8148afe8fa44c64f75e69655c4fdc9095565568"
8PV = "1.10+git${SRCPV}"
9SRC_URI = "git://github.com/civetweb/civetweb.git"
10SRC_URI_append_class-native = " \
11 file://0001-Test-Fix-missing-librt-and-libm-during-native-compil.patch \
12"
13S = "${WORKDIR}/git"
14
15# civetweb supports building with make or cmake (although cmake lacks few features)
16inherit cmake
17
18# Disable Lua and Duktape because they do not compile from CMake (as of v1.8, v1.9 and v1.10).
19# Disable ASAN as it is included only in Debug build.
20EXTRA_OECMAKE = " \
21 -DBUILD_SHARED_LIBS=ON \
22 -DCIVETWEB_ENABLE_DUKTAPE=OFF \
23 -DCIVETWEB_ENABLE_LUA=OFF \
24 -DCIVETWEB_ENABLE_ASAN=OFF \
25"
26EXTRA_OECMAKE_class-native = " \
27 -DBUILD_SHARED_LIBS=ON \
28 -DCIVETWEB_ENABLE_DUKTAPE=OFF \
29 -DCIVETWEB_ENABLE_LUA=OFF \
30 -DCIVETWEB_ENABLE_ASAN=OFF \
31"
32
33# Building with ninja fails on missing third_party/lib/libcheck.a (which
34# should come from external CMake project)
35OECMAKE_GENERATOR = "Unix Makefiles"
36
37PACKAGECONFIG ??= "caching ipv6 server ssl websockets"
38PACKAGECONFIG[caching] = "-DCIVETWEB_DISABLE_CACHING=OFF,-DCIVETWEB_DISABLE_CACHING=ON,"
39PACKAGECONFIG[cgi] = "-DCIVETWEB_DISABLE_CGI=OFF,-DCIVETWEB_DISABLE_CGI=ON,"
40PACKAGECONFIG[cpp] = "-DCIVETWEB_ENABLE_CXX=ON,-DCIVETWEB_ENABLE_CXX=OFF,"
41PACKAGECONFIG[debug] = "-DCIVETWEB_ENABLE_MEMORY_DEBUGGING=ON,-DCIVETWEB_ENABLE_MEMORY_DEBUGGING=OFF,"
42PACKAGECONFIG[ipv6] = "-DCIVETWEB_ENABLE_IPV6=ON,-DCIVETWEB_ENABLE_IPV6=OFF,"
43PACKAGECONFIG[server] = "-DCIVETWEB_INSTALL_EXECUTABLE=ON,-DCIVETWEB_INSTALL_EXECUTABLE=OFF,"
44PACKAGECONFIG[ssl] = "-DCIVETWEB_ENABLE_SSL=ON -DCIVETWEB_SSL_OPENSSL_API_1_1=OFF -DCIVETWEB_ENABLE_SSL_DYNAMIC_LOADING=OFF,-DCIVETWEB_ENABLE_SSL=OFF,openssl (=1.0.2%),"
45PACKAGECONFIG[websockets] = "-DCIVETWEB_ENABLE_WEBSOCKETS=ON,-DCIVETWEB_ENABLE_WEBSOCKETS=OFF,"
46
47BBCLASSEXTEND = "native"