[meta-oe] libwebsockets: upgrade to 4.1.6

Submitted by Alexander Vickberg on Dec. 7, 2020, 5:06 p.m. | Patch ID: 178827

Details

Message ID 20201207170659.15580-1-wickbergster@gmail.com
State New
Headers show

Commit Message

Alexander Vickberg Dec. 7, 2020, 5:06 p.m.
Event lib support is now built into dynamically loaded plugins so
package them separately and include them in RDEPENDS if enabled.

Building minimal-examples with generated SDK failed due to cmake
configuration had static enabled but not included into SDK. Solve
this by adding static as PACKAGECONFIG option and adding
${PN}-staticdev to RDEPENDS_${PN}-dev if enabled.

Remove CFLAGS_append with -Wno-error for fixing building with Os.
This looks like it's fixed in upstream.

Signed-off-by: Alexander Vickberg <wickbergster@gmail.com>

---
 ...ckets_4.0.20.bb => libwebsockets_4.1.6.bb} | 20 +++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)
 rename meta-oe/recipes-connectivity/libwebsockets/{libwebsockets_4.0.20.bb => libwebsockets_4.1.6.bb} (51%)

-- 
2.25.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#145357): https://lists.openembedded.org/g/openembedded-core/message/145357
Mute This Topic: https://lists.openembedded.org/mt/78782918/1003190
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [mhalstead@linuxfoundation.org]
-=-=-=-=-=-=-=-=-=-=-=-

Patch hide | download patch | download mbox

diff --git a/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.0.20.bb b/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.1.6.bb
similarity index 51%
rename from meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.0.20.bb
rename to meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.1.6.bb
index 5427daac4..e922d681f 100644
--- a/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.0.20.bb
+++ b/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.1.6.bb
@@ -6,8 +6,8 @@  LIC_FILES_CHKSUM = "file://LICENSE;md5=8c47b078124308a4e1354e8d59f606b7"
 DEPENDS = "zlib"
 
 S = "${WORKDIR}/git"
-SRCREV = "ec9e8ab892f2dc569ae09336c80c2796fd14a6ff"
-SRC_URI = "git://github.com/warmcat/libwebsockets.git;protocol=https;branch=v4.0-stable"
+SRCREV = "736f0739ed8c75db0e29c7678b5a9194e957c347"
+SRC_URI = "git://github.com/warmcat/libwebsockets.git;protocol=https;branch=v4.1-stable"
 
 UPSTREAM_CHECK_URI = "https://github.com/warmcat/${BPN}/releases"
 UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
@@ -18,18 +18,26 @@  PACKAGECONFIG ?= "libuv client server http2 ssl"
 PACKAGECONFIG[client] = "-DLWS_WITHOUT_CLIENT=OFF,-DLWS_WITHOUT_CLIENT=ON,"
 PACKAGECONFIG[http2] = "-DLWS_WITH_HTTP2=ON,-DLWS_WITH_HTTP2=OFF,"
 PACKAGECONFIG[ipv6] = "-DLWS_IPV6=ON,-DLWS_IPV6=OFF,"
+PACKAGECONFIG[libevent] = "-DLWS_WITH_LIBEVENT=ON,-DLWS_WITH_LIBEVENT=OFF,libevent"
 PACKAGECONFIG[libev] = "-DLWS_WITH_LIBEV=ON,-DLWS_WITH_LIBEV=OFF,libev"
 PACKAGECONFIG[libuv] = "-DLWS_WITH_LIBUV=ON,-DLWS_WITH_LIBUV=OFF,libuv"
 PACKAGECONFIG[server] = "-DLWS_WITHOUT_SERVER=OFF,-DLWS_WITHOUT_SERVER=ON,"
 PACKAGECONFIG[ssl] = "-DLWS_WITH_SSL=ON,-DLWS_WITH_SSL=OFF,openssl"
-PACKAGECONFIG[testapps] = "-DLWS_WITHOUT_TESTAPPS=OFF,-DLWS_WITHOUT_TESTAPPS=ON,"
+PACKAGECONFIG[static] = "-DLWS_WITH_STATIC=ON,-DLWS_WITH_STATIC=OFF -DLWS_LINK_TESTAPPS_DYNAMIC=ON,"
 
 EXTRA_OECMAKE += " \
     -DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \
 "
 
-PACKAGES =+ "${PN}-testapps"
+PACKAGES =+ "${PN}-testapps ${PN}-evlib_event ${PN}-evlib_uv ${PN}-evlib_ev"
 
-FILES_${PN}-testapps += "${datadir}/libwebsockets-test-server/*"
+FILES_${PN}-testapps += "${datadir}/libwebsockets-test-server/* ${bindir}/libwebsockets-test-*"
+FILES_${PN}-evlib_event += "${libdir}/libwebsockets-evlib_event.so"
+FILES_${PN}-evlib_uv += "${libdir}/libwebsockets-evlib_uv.so"
+FILES_${PN}-evlib_ev += "${libdir}/libwebsockets-evlib_ev.so"
 
-CFLAGS_append = " -Wno-error"
+RDEPENDS_${PN} += " ${@bb.utils.contains('PACKAGECONFIG', 'libevent', '${PN}-evlib_event', '', d)}"
+RDEPENDS_${PN} += " ${@bb.utils.contains('PACKAGECONFIG', 'libuv', '${PN}-evlib_uv', '', d)}"
+RDEPENDS_${PN} += " ${@bb.utils.contains('PACKAGECONFIG', 'libev', '${PN}-evlib_ev', '', d)}"
+
+RDEPENDS_${PN}-dev += " ${@bb.utils.contains('PACKAGECONFIG', 'static', '${PN}-staticdev', '', d)}"