blob: dd4533cce5f9e83dc843e3a5419ec053bf7a1f74 [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
11LICENSE = "BSD & MIT"
12LIC_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 \
18 "
Brad Bishopd7bf8c12018-02-25 22:55:05 -050019
Andrew Geisslerb7d28612020-07-24 16:15:54 -050020SRC_URI[sha256sum] = "92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050021
22UPSTREAM_CHECK_URI = "http://libevent.org/"
23
24S = "${WORKDIR}/${BPN}-${PV}-stable"
25
26PACKAGECONFIG ??= ""
27PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
28
29inherit autotools
30
31# Needed for Debian packaging
32LEAD_SONAME = "libevent-2.1.so"
33
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080034inherit ptest multilib_header
Brad Bishopd7bf8c12018-02-25 22:55:05 -050035
36DEPENDS = "zlib"
37
Brad Bishop1d80a2e2019-11-15 16:35:03 -050038PACKAGES_DYNAMIC = "^${PN}-.*$"
39python split_libevent_libs () {
40 do_split_packages(d, '${libdir}', r'^libevent_([a-z]*)-.*\.so\..*', '${PN}-%s', '${SUMMARY} (%s)', prepend=True, allow_links=True)
41}
42PACKAGESPLITFUNCS_prepend = "split_libevent_libs "
43
Brad Bishopd7bf8c12018-02-25 22:55:05 -050044BBCLASSEXTEND = "native nativesdk"
45
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080046do_install_append() {
Brad Bishop1d80a2e2019-11-15 16:35:03 -050047 rm ${D}${bindir}/event_rpcgen.py
48 rmdir ${D}${bindir}
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080049 oe_multilib_header event2/event-config.h
50}
51
Brad Bishopd7bf8c12018-02-25 22:55:05 -050052do_install_ptest() {
53 install -d ${D}${PTEST_PATH}/test
54 for file in ${B}/test/.libs/regress ${B}/test/.libs/test*
55 do
56 install -m 0755 $file ${D}${PTEST_PATH}/test
57 done
Brad Bishop79641f22019-09-10 07:20:22 -040058
59 # handle multilib
60 sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
Brad Bishopd7bf8c12018-02-25 22:55:05 -050061}