diff options
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-connectivity/civetweb')
3 files changed, 109 insertions, 0 deletions
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb/0001-Unittest-Link-librt-and-libm-using-l-option.patch b/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb/0001-Unittest-Link-librt-and-libm-using-l-option.patch new file mode 100644 index 0000000000..eecbc14682 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb/0001-Unittest-Link-librt-and-libm-using-l-option.patch @@ -0,0 +1,40 @@ +From 21e9a4bb214648ffd43c66b535fbf096bfcc9f4f Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 24 Jun 2018 00:04:37 -0700 +Subject: [PATCH] Unittest: Link librt and libm using -l option + +cmake'ry forces full path to .so files when found using +find_package and since we have proper sysrooted toolchain +-lm and -lrt is all we need + +Upstream-Status: Inappropriate [Cross compile specific] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + unittest/CMakeLists.txt | 10 ++-------- + 1 file changed, 2 insertions(+), 8 deletions(-) + +diff --git a/unittest/CMakeLists.txt b/unittest/CMakeLists.txt +index c4cdf229..e1b63caf 100644 +--- a/unittest/CMakeLists.txt ++++ b/unittest/CMakeLists.txt +@@ -57,14 +57,8 @@ elseif (WIN32) + else() + set(CHECK_LIBRARIES "${CHECK_INSTALL_DIR}/lib/libcheck.a") + endif() +-find_package(LibM) +-if (LIBM_FOUND) +- set(CHECK_LIBRARIES "${CHECK_LIBRARIES};LIBM::LIBM") +-endif() +-find_package(LibRt) +-if (LIBRT_FOUND) +- set(CHECK_LIBRARIES "${CHECK_LIBRARIES};LIBRT::LIBRT") +-endif() ++set(CHECK_LIBRARIES "${CHECK_LIBRARIES};-lm") ++set(CHECK_LIBRARIES "${CHECK_LIBRARIES};-lrt") + + # Build the C unit tests + add_library(shared-c-unit-tests STATIC shared.c) +-- +2.18.0 + diff --git a/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb/0001-undefine-macro-before-redefining.patch b/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb/0001-undefine-macro-before-redefining.patch new file mode 100644 index 0000000000..8653302130 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb/0001-undefine-macro-before-redefining.patch @@ -0,0 +1,26 @@ +From 59f65235a7a690f50d1686e9977908c053697d8c Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 28 Aug 2018 22:59:13 -0700 +Subject: [PATCH] undefine macro before redefining + +Fixes +src/main.c:89:9: error: 'printf' macro redefined [-Werror,-Wmacro-redefined] + +Upstream-Stats: Submitted [https://github.com/civetweb/civetweb/pull/649] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/main.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/main.c b/src/main.c +index bbcb0aec..01191a3c 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -86,6 +86,7 @@ + + #include "civetweb.h" + ++#undef printf + #define printf \ + DO_NOT_USE_THIS_FUNCTION__USE_fprintf /* Required for unit testing */ + diff --git a/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb_git.bb b/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb_git.bb new file mode 100644 index 0000000000..d681f7f30c --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb_git.bb @@ -0,0 +1,43 @@ +SUMMARY = "Civetweb embedded web server" +HOMEPAGE = "https://github.com/civetweb/civetweb" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=6f28fdcba0dda735eed62bac6a397562" + +SRCREV = "19f31ba8dd8443e86c7028a4b4c37f4b299aa68c" +PV = "1.10+git${SRCPV}" +SRC_URI = "git://github.com/civetweb/civetweb.git \ + file://0001-Unittest-Link-librt-and-libm-using-l-option.patch \ + file://0001-undefine-macro-before-redefining.patch \ + " + +S = "${WORKDIR}/git" + +# civetweb supports building with make or cmake (although cmake lacks few features) +inherit cmake + +# Disable Lua and Duktape because they do not compile from CMake (as of v1.8, v1.9 and v1.10). +# Disable ASAN as it is included only in Debug build. +EXTRA_OECMAKE = " \ + -DBUILD_SHARED_LIBS=ON \ + -DCIVETWEB_ENABLE_DUKTAPE=OFF \ + -DCIVETWEB_ENABLE_LUA=OFF \ + -DCIVETWEB_ENABLE_ASAN=OFF \ + -DCIVETWEB_BUILD_TESTING=OFF \ +" + +# Building with ninja fails on missing third_party/lib/libcheck.a (which +# should come from external CMake project) +OECMAKE_GENERATOR = "Unix Makefiles" + +PACKAGECONFIG ??= "caching ipv6 server ssl websockets" +PACKAGECONFIG[caching] = "-DCIVETWEB_DISABLE_CACHING=OFF,-DCIVETWEB_DISABLE_CACHING=ON," +PACKAGECONFIG[cgi] = "-DCIVETWEB_DISABLE_CGI=OFF,-DCIVETWEB_DISABLE_CGI=ON," +PACKAGECONFIG[cpp] = "-DCIVETWEB_ENABLE_CXX=ON,-DCIVETWEB_ENABLE_CXX=OFF," +PACKAGECONFIG[debug] = "-DCIVETWEB_ENABLE_MEMORY_DEBUGGING=ON,-DCIVETWEB_ENABLE_MEMORY_DEBUGGING=OFF," +PACKAGECONFIG[ipv6] = "-DCIVETWEB_ENABLE_IPV6=ON,-DCIVETWEB_ENABLE_IPV6=OFF," +PACKAGECONFIG[server] = "-DCIVETWEB_INSTALL_EXECUTABLE=ON,-DCIVETWEB_INSTALL_EXECUTABLE=OFF," +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%)," +PACKAGECONFIG[websockets] = "-DCIVETWEB_ENABLE_WEBSOCKETS=ON,-DCIVETWEB_ENABLE_WEBSOCKETS=OFF," + +BBCLASSEXTEND = "native" |