diff options
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 @@ | |||
1 | From cd93e2c538cecb3192fd24c0fbd6e834d0c47eec Mon Sep 17 00:00:00 2001 | ||
2 | From: Krzysztof Kozlowski <krzk@kernel.org> | ||
3 | Date: Wed, 18 Apr 2018 14:11:52 +0200 | ||
4 | Subject: [PATCH] Unittest: Fix missing librt and libm during native compilation | ||
5 | |||
6 | civetweb looks for librt and libm in weird places and for native build | ||
7 | this 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 | |||
13 | These are needed dependencies so try regular system linkage in such | ||
14 | case. | ||
15 | |||
16 | Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> | ||
17 | --- | ||
18 | unittest/CMakeLists.txt | 4 ++++ | ||
19 | 1 file changed, 4 insertions(+) | ||
20 | |||
21 | diff --git a/unittest/CMakeLists.txt b/unittest/CMakeLists.txt | ||
22 | index 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 | -- | ||
41 | 2.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 @@ | |||
1 | SUMMARY = "Civetweb embedded web server" | ||
2 | HOMEPAGE = "https://github.com/civetweb/civetweb" | ||
3 | |||
4 | LICENSE = "MIT" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=6f28fdcba0dda735eed62bac6a397562" | ||
6 | |||
7 | SRCREV = "b8148afe8fa44c64f75e69655c4fdc9095565568" | ||
8 | PV = "1.10+git${SRCPV}" | ||
9 | SRC_URI = "git://github.com/civetweb/civetweb.git" | ||
10 | SRC_URI_append_class-native = " \ | ||
11 | file://0001-Test-Fix-missing-librt-and-libm-during-native-compil.patch \ | ||
12 | " | ||
13 | S = "${WORKDIR}/git" | ||
14 | |||
15 | # civetweb supports building with make or cmake (although cmake lacks few features) | ||
16 | inherit 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. | ||
20 | EXTRA_OECMAKE = " \ | ||
21 | -DBUILD_SHARED_LIBS=ON \ | ||
22 | -DCIVETWEB_ENABLE_DUKTAPE=OFF \ | ||
23 | -DCIVETWEB_ENABLE_LUA=OFF \ | ||
24 | -DCIVETWEB_ENABLE_ASAN=OFF \ | ||
25 | " | ||
26 | EXTRA_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) | ||
35 | OECMAKE_GENERATOR = "Unix Makefiles" | ||
36 | |||
37 | PACKAGECONFIG ??= "caching ipv6 server ssl websockets" | ||
38 | PACKAGECONFIG[caching] = "-DCIVETWEB_DISABLE_CACHING=OFF,-DCIVETWEB_DISABLE_CACHING=ON," | ||
39 | PACKAGECONFIG[cgi] = "-DCIVETWEB_DISABLE_CGI=OFF,-DCIVETWEB_DISABLE_CGI=ON," | ||
40 | PACKAGECONFIG[cpp] = "-DCIVETWEB_ENABLE_CXX=ON,-DCIVETWEB_ENABLE_CXX=OFF," | ||
41 | PACKAGECONFIG[debug] = "-DCIVETWEB_ENABLE_MEMORY_DEBUGGING=ON,-DCIVETWEB_ENABLE_MEMORY_DEBUGGING=OFF," | ||
42 | PACKAGECONFIG[ipv6] = "-DCIVETWEB_ENABLE_IPV6=ON,-DCIVETWEB_ENABLE_IPV6=OFF," | ||
43 | PACKAGECONFIG[server] = "-DCIVETWEB_INSTALL_EXECUTABLE=ON,-DCIVETWEB_INSTALL_EXECUTABLE=OFF," | ||
44 | PACKAGECONFIG[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%)," | ||
45 | PACKAGECONFIG[websockets] = "-DCIVETWEB_ENABLE_WEBSOCKETS=ON,-DCIVETWEB_ENABLE_WEBSOCKETS=OFF," | ||
46 | |||
47 | BBCLASSEXTEND = "native" | ||