blob: 2a562fe2e9633840cc10a44183894d994f978272 [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 \
Andrew Geisslerc926e172021-05-07 16:11:35 -050018 file://0002-test-regress.h-Increase-default-timeval-tolerance-50.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050019 "
Brad Bishopd7bf8c12018-02-25 22:55:05 -050020
Andrew Geisslerb7d28612020-07-24 16:15:54 -050021SRC_URI[sha256sum] = "92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050022
23UPSTREAM_CHECK_URI = "http://libevent.org/"
24
25S = "${WORKDIR}/${BPN}-${PV}-stable"
26
27PACKAGECONFIG ??= ""
28PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
29
30inherit autotools
31
32# Needed for Debian packaging
33LEAD_SONAME = "libevent-2.1.so"
34
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080035inherit ptest multilib_header
Brad Bishopd7bf8c12018-02-25 22:55:05 -050036
37DEPENDS = "zlib"
38
Brad Bishop1d80a2e2019-11-15 16:35:03 -050039PACKAGES_DYNAMIC = "^${PN}-.*$"
40python split_libevent_libs () {
41 do_split_packages(d, '${libdir}', r'^libevent_([a-z]*)-.*\.so\..*', '${PN}-%s', '${SUMMARY} (%s)', prepend=True, allow_links=True)
42}
Patrick Williams213cb262021-08-07 19:21:33 -050043PACKAGESPLITFUNCS:prepend = "split_libevent_libs "
Brad Bishop1d80a2e2019-11-15 16:35:03 -050044
Brad Bishopd7bf8c12018-02-25 22:55:05 -050045BBCLASSEXTEND = "native nativesdk"
46
Patrick Williams213cb262021-08-07 19:21:33 -050047do_install:append() {
Brad Bishop1d80a2e2019-11-15 16:35:03 -050048 rm ${D}${bindir}/event_rpcgen.py
49 rmdir ${D}${bindir}
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080050 oe_multilib_header event2/event-config.h
51}
52
Brad Bishopd7bf8c12018-02-25 22:55:05 -050053do_install_ptest() {
54 install -d ${D}${PTEST_PATH}/test
55 for file in ${B}/test/.libs/regress ${B}/test/.libs/test*
56 do
57 install -m 0755 $file ${D}${PTEST_PATH}/test
58 done
Brad Bishop79641f22019-09-10 07:20:22 -040059
60 # handle multilib
61 sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
Brad Bishopd7bf8c12018-02-25 22:55:05 -050062}