Andrew Geissler | 8fc454f | 2020-12-11 16:27:59 -0600 | [diff] [blame] | 1 | SUMMARY = "Canonical libwebsockets.org websocket library" |
| 2 | HOMEPAGE = "https://libwebsockets.org/" |
| 3 | LICENSE = "MIT & Zlib & BSD-3-Clause" |
| 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=8c47b078124308a4e1354e8d59f606b7" |
| 5 | |
| 6 | DEPENDS = "zlib" |
| 7 | |
| 8 | S = "${WORKDIR}/git" |
Andrew Geissler | f103a7f | 2021-05-07 16:09:40 -0500 | [diff] [blame^] | 9 | SRCREV = "1367c11e1ee44d9e19daa50e1d015365bae17354" |
| 10 | SRC_URI = "git://github.com/warmcat/libwebsockets.git;protocol=https;branch=v4.2-stable" |
Andrew Geissler | 8fc454f | 2020-12-11 16:27:59 -0600 | [diff] [blame] | 11 | |
| 12 | UPSTREAM_CHECK_URI = "https://github.com/warmcat/${BPN}/releases" |
| 13 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" |
| 14 | |
| 15 | inherit cmake pkgconfig |
| 16 | |
| 17 | PACKAGECONFIG ?= "libuv client server http2 ssl" |
| 18 | PACKAGECONFIG[client] = "-DLWS_WITHOUT_CLIENT=OFF,-DLWS_WITHOUT_CLIENT=ON," |
| 19 | PACKAGECONFIG[http2] = "-DLWS_WITH_HTTP2=ON,-DLWS_WITH_HTTP2=OFF," |
| 20 | PACKAGECONFIG[ipv6] = "-DLWS_IPV6=ON,-DLWS_IPV6=OFF," |
| 21 | PACKAGECONFIG[libevent] = "-DLWS_WITH_LIBEVENT=ON,-DLWS_WITH_LIBEVENT=OFF,libevent" |
| 22 | PACKAGECONFIG[libev] = "-DLWS_WITH_LIBEV=ON,-DLWS_WITH_LIBEV=OFF,libev" |
| 23 | PACKAGECONFIG[libuv] = "-DLWS_WITH_LIBUV=ON,-DLWS_WITH_LIBUV=OFF,libuv" |
| 24 | PACKAGECONFIG[server] = "-DLWS_WITHOUT_SERVER=OFF,-DLWS_WITHOUT_SERVER=ON," |
| 25 | PACKAGECONFIG[ssl] = "-DLWS_WITH_SSL=ON,-DLWS_WITH_SSL=OFF,openssl" |
| 26 | PACKAGECONFIG[static] = "-DLWS_WITH_STATIC=ON,-DLWS_WITH_STATIC=OFF -DLWS_LINK_TESTAPPS_DYNAMIC=ON," |
| 27 | |
| 28 | EXTRA_OECMAKE += " \ |
| 29 | -DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \ |
| 30 | " |
| 31 | |
| 32 | PACKAGES =+ "${PN}-testapps ${PN}-evlib-event ${PN}-evlib-uv ${PN}-evlib-ev" |
| 33 | |
| 34 | FILES_${PN}-testapps += "${datadir}/libwebsockets-test-server/* ${bindir}/libwebsockets-test-*" |
| 35 | FILES_${PN}-evlib-event += "${libdir}/libwebsockets-evlib_event.so" |
| 36 | FILES_${PN}-evlib-uv += "${libdir}/libwebsockets-evlib_uv.so" |
| 37 | FILES_${PN}-evlib-ev += "${libdir}/libwebsockets-evlib_ev.so" |
| 38 | |
| 39 | RDEPENDS_${PN} += " ${@bb.utils.contains('PACKAGECONFIG', 'libevent', '${PN}-evlib-event', '', d)}" |
| 40 | RDEPENDS_${PN} += " ${@bb.utils.contains('PACKAGECONFIG', 'libuv', '${PN}-evlib-uv', '', d)}" |
| 41 | RDEPENDS_${PN} += " ${@bb.utils.contains('PACKAGECONFIG', 'libev', '${PN}-evlib-ev', '', d)}" |
| 42 | |
| 43 | RDEPENDS_${PN}-dev += " ${@bb.utils.contains('PACKAGECONFIG', 'static', '${PN}-staticdev', '', d)}" |