blob: 6a3eb917f02fb0575e54bd418fc16d3c45ce00ba [file] [log] [blame]
Andrew Geissler8fc454f2020-12-11 16:27:59 -06001SUMMARY = "Canonical libwebsockets.org websocket library"
2HOMEPAGE = "https://libwebsockets.org/"
3LICENSE = "MIT & Zlib & BSD-3-Clause"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=8c47b078124308a4e1354e8d59f606b7"
5
6DEPENDS = "zlib"
7
8S = "${WORKDIR}/git"
9SRCREV = "736f0739ed8c75db0e29c7678b5a9194e957c347"
10SRC_URI = "git://github.com/warmcat/libwebsockets.git;protocol=https;branch=v4.1-stable"
11
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
34FILES_${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"
38
39RDEPENDS_${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)}"
42
43RDEPENDS_${PN}-dev += " ${@bb.utils.contains('PACKAGECONFIG', 'static', '${PN}-staticdev', '', d)}"