blob: e26e8a9b57255ea7f349319b67e13c246fcf5820 [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 Geissler82c905d2020-04-13 13:39:40 -050014SRC_URI = "https://github.com/libevent/libevent/releases/download/release-${PV}-stable/${BP}-stable.tar.gz \
15 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"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050024
25UPSTREAM_CHECK_URI = "http://libevent.org/"
26
27S = "${WORKDIR}/${BPN}-${PV}-stable"
28
29PACKAGECONFIG ??= ""
30PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
31
32inherit autotools
33
34# Needed for Debian packaging
35LEAD_SONAME = "libevent-2.1.so"
36
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080037inherit ptest multilib_header
Brad Bishopd7bf8c12018-02-25 22:55:05 -050038
39DEPENDS = "zlib"
40
Brad Bishop1d80a2e2019-11-15 16:35:03 -050041PACKAGES_DYNAMIC = "^${PN}-.*$"
42python split_libevent_libs () {
43 do_split_packages(d, '${libdir}', r'^libevent_([a-z]*)-.*\.so\..*', '${PN}-%s', '${SUMMARY} (%s)', prepend=True, allow_links=True)
44}
Patrick Williams213cb262021-08-07 19:21:33 -050045PACKAGESPLITFUNCS:prepend = "split_libevent_libs "
Brad Bishop1d80a2e2019-11-15 16:35:03 -050046
Brad Bishopd7bf8c12018-02-25 22:55:05 -050047BBCLASSEXTEND = "native nativesdk"
48
Patrick Williams213cb262021-08-07 19:21:33 -050049do_install:append() {
Brad Bishop1d80a2e2019-11-15 16:35:03 -050050 rm ${D}${bindir}/event_rpcgen.py
51 rmdir ${D}${bindir}
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080052 oe_multilib_header event2/event-config.h
53}
54
Brad Bishopd7bf8c12018-02-25 22:55:05 -050055do_install_ptest() {
56 install -d ${D}${PTEST_PATH}/test
57 for file in ${B}/test/.libs/regress ${B}/test/.libs/test*
58 do
59 install -m 0755 $file ${D}${PTEST_PATH}/test
60 done
Patrick Williams93c203f2021-10-06 16:15:23 -050061
Brad Bishop79641f22019-09-10 07:20:22 -040062 # handle multilib
63 sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
Brad Bishopd7bf8c12018-02-25 22:55:05 -050064}