blob: 55a65e6c0815e70daf473bf88f282b7a26f55c13 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001SUMMARY = "An asynchronous event notification library"
Andrew Geissler90fd73c2021-03-05 15:25:55 -06002DESCRIPTION = "A software library that provides asynchronous event \
3notification. The libevent API provides a mechanism to execute a callback \
4function when a specific event occurs on a file descriptor or after a \
5timeout has been reached. libevent also supports callbacks triggered \
6by signals and regular timeouts"
Brad Bishopd7bf8c12018-02-25 22:55:05 -05007HOMEPAGE = "http://libevent.org/"
8BUGTRACKER = "https://github.com/libevent/libevent/issues"
9SECTION = "libs"
10
Andrew Geissler5199d832021-09-24 16:47:35 -050011LICENSE = "BSD-3-Clause & MIT"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050012LIC_FILES_CHKSUM = "file://LICENSE;md5=17f20574c0b154d12236d5fbe964f549"
13
Andrew Geissler87f5cff2022-09-30 13:13:31 -050014SRC_URI = "${GITHUB_BASE_URI}/download/release-${PV}-stable/${BP}-stable.tar.gz \
Andrew Geissler82c905d2020-04-13 13:39:40 -050015 file://Makefile-missing-test-dir.patch \
16 file://run-ptest \
17 file://0001-test-regress_dns.c-patch-out-tests-that-require-a-wo.patch \
Andrew Geisslerc926e172021-05-07 16:11:35 -050018 file://0002-test-regress.h-Increase-default-timeval-tolerance-50.patch \
Patrick Williams93c203f2021-10-06 16:15:23 -050019 file://0003-test-mark-util-monotonic_prc_fallback-as-retriable.patch \
20 file://0004-test-retriable-tests-are-marked-failed-only-when-all-a.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050021 "
Brad Bishopd7bf8c12018-02-25 22:55:05 -050022
Andrew Geisslerb7d28612020-07-24 16:15:54 -050023SRC_URI[sha256sum] = "92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb"
Andrew Geissler87f5cff2022-09-30 13:13:31 -050024UPSTREAM_CHECK_REGEX = "releases/tag/release-(?P<pver>.+)-stable"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050025
26S = "${WORKDIR}/${BPN}-${PV}-stable"
27
28PACKAGECONFIG ??= ""
29PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
30
Andrew Geissler87f5cff2022-09-30 13:13:31 -050031inherit autotools github-releases
Brad Bishopd7bf8c12018-02-25 22:55:05 -050032
33# Needed for Debian packaging
34LEAD_SONAME = "libevent-2.1.so"
35
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080036inherit ptest multilib_header
Brad Bishopd7bf8c12018-02-25 22:55:05 -050037
38DEPENDS = "zlib"
39
Brad Bishop1d80a2e2019-11-15 16:35:03 -050040PACKAGES_DYNAMIC = "^${PN}-.*$"
41python split_libevent_libs () {
42 do_split_packages(d, '${libdir}', r'^libevent_([a-z]*)-.*\.so\..*', '${PN}-%s', '${SUMMARY} (%s)', prepend=True, allow_links=True)
43}
Patrick Williams213cb262021-08-07 19:21:33 -050044PACKAGESPLITFUNCS:prepend = "split_libevent_libs "
Brad Bishop1d80a2e2019-11-15 16:35:03 -050045
Brad Bishopd7bf8c12018-02-25 22:55:05 -050046BBCLASSEXTEND = "native nativesdk"
47
Patrick Williams213cb262021-08-07 19:21:33 -050048do_install:append() {
Brad Bishop1d80a2e2019-11-15 16:35:03 -050049 rm ${D}${bindir}/event_rpcgen.py
50 rmdir ${D}${bindir}
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080051 oe_multilib_header event2/event-config.h
52}
53
Brad Bishopd7bf8c12018-02-25 22:55:05 -050054do_install_ptest() {
55 install -d ${D}${PTEST_PATH}/test
56 for file in ${B}/test/.libs/regress ${B}/test/.libs/test*
57 do
58 install -m 0755 $file ${D}${PTEST_PATH}/test
59 done
Patrick Williams93c203f2021-10-06 16:15:23 -050060
Brad Bishop79641f22019-09-10 07:20:22 -040061 # handle multilib
62 sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
Brad Bishopd7bf8c12018-02-25 22:55:05 -050063}