blob: a5fcb8d72dc223f0d40cfc4b0e394b96aad3e216 [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"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=c8bea43a2eb5d713c338819a0be07797"
Andrew Geissler8fc454f2020-12-11 16:27:59 -06005
6DEPENDS = "zlib"
7
8S = "${WORKDIR}/git"
William A. Kennington III49e95662021-09-15 16:19:36 -07009SRCREV = "8d605f0649ed1ab6d27a443c7688598ea21fdb75"
Andrew Geisslerf103a7f2021-05-07 16:09:40 -050010SRC_URI = "git://github.com/warmcat/libwebsockets.git;protocol=https;branch=v4.2-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)}"