blob: 21297f2c4e8cd3743263172299ed2eebaf732582 [file] [log] [blame]
Andrew Geissler8fc454f2020-12-11 16:27:59 -06001SUMMARY = "Canonical libwebsockets.org websocket library"
2HOMEPAGE = "https://libwebsockets.org/"
Andrew Geissler69721092021-07-23 12:57:00 -04003LICENSE = "MIT & Zlib & BSD-3-Clause & Apache-2.0"
Patrick Williamsdb4c27e2022-08-05 08:10:29 -05004LIC_FILES_CHKSUM = "file://LICENSE;md5=382bfdf329e774859fd401eaf850d29b"
Andrew Geissler8fc454f2020-12-11 16:27:59 -06005
6DEPENDS = "zlib"
7
8S = "${WORKDIR}/git"
Patrick Williamsdb4c27e2022-08-05 08:10:29 -05009SRCREV = "b0a749c8e7a8294b68581ce4feac0e55045eb00b"
10SRC_URI = "git://github.com/warmcat/libwebsockets.git;protocol=https;branch=v4.3-stable"
Andrew Geissler8fc454f2020-12-11 16:27:59 -060011
12UPSTREAM_CHECK_URI = "https://github.com/warmcat/${BPN}/releases"
13UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
14
15inherit cmake pkgconfig
16
17PACKAGECONFIG ?= "libuv client server http2 ssl"
18PACKAGECONFIG[client] = "-DLWS_WITHOUT_CLIENT=OFF,-DLWS_WITHOUT_CLIENT=ON,"
19PACKAGECONFIG[http2] = "-DLWS_WITH_HTTP2=ON,-DLWS_WITH_HTTP2=OFF,"
20PACKAGECONFIG[ipv6] = "-DLWS_IPV6=ON,-DLWS_IPV6=OFF,"
21PACKAGECONFIG[libevent] = "-DLWS_WITH_LIBEVENT=ON,-DLWS_WITH_LIBEVENT=OFF,libevent"
22PACKAGECONFIG[libev] = "-DLWS_WITH_LIBEV=ON,-DLWS_WITH_LIBEV=OFF,libev"
23PACKAGECONFIG[libuv] = "-DLWS_WITH_LIBUV=ON,-DLWS_WITH_LIBUV=OFF,libuv"
24PACKAGECONFIG[server] = "-DLWS_WITHOUT_SERVER=OFF,-DLWS_WITHOUT_SERVER=ON,"
25PACKAGECONFIG[ssl] = "-DLWS_WITH_SSL=ON,-DLWS_WITH_SSL=OFF,openssl"
26PACKAGECONFIG[static] = "-DLWS_WITH_STATIC=ON,-DLWS_WITH_STATIC=OFF -DLWS_LINK_TESTAPPS_DYNAMIC=ON,"
27
28EXTRA_OECMAKE += " \
29 -DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \
30"
31
32PACKAGES =+ "${PN}-testapps ${PN}-evlib-event ${PN}-evlib-uv ${PN}-evlib-ev"
33
Patrick Williams213cb262021-08-07 19:21:33 -050034FILES:${PN}-testapps += "${datadir}/libwebsockets-test-server/* ${bindir}/libwebsockets-test-*"
35FILES:${PN}-evlib-event += "${libdir}/libwebsockets-evlib_event.so"
36FILES:${PN}-evlib-uv += "${libdir}/libwebsockets-evlib_uv.so"
37FILES:${PN}-evlib-ev += "${libdir}/libwebsockets-evlib_ev.so"
Andrew Geissler8fc454f2020-12-11 16:27:59 -060038
Patrick Williams213cb262021-08-07 19:21:33 -050039RDEPENDS:${PN} += " ${@bb.utils.contains('PACKAGECONFIG', 'libevent', '${PN}-evlib-event', '', d)}"
40RDEPENDS:${PN} += " ${@bb.utils.contains('PACKAGECONFIG', 'libuv', '${PN}-evlib-uv', '', d)}"
41RDEPENDS:${PN} += " ${@bb.utils.contains('PACKAGECONFIG', 'libev', '${PN}-evlib-ev', '', d)}"
Andrew Geissler8fc454f2020-12-11 16:27:59 -060042
Patrick Williams213cb262021-08-07 19:21:33 -050043RDEPENDS:${PN}-dev += " ${@bb.utils.contains('PACKAGECONFIG', 'static', '${PN}-staticdev', '', d)}"
Andrew Geisslerd5838332022-05-27 11:33:10 -050044
45# Avoid absolute paths to end up in the sysroot.
46SSTATE_SCAN_FILES += "*.cmake"