blob: 8c7c49e7ddd733945fb1cea1fda0538df9d4b03b [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001SUMMARY = "An asynchronous event notification library"
2HOMEPAGE = "http://libevent.org/"
3BUGTRACKER = "https://github.com/libevent/libevent/issues"
4SECTION = "libs"
5
6LICENSE = "BSD & MIT"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=17f20574c0b154d12236d5fbe964f549"
8
9SRC_URI = " \
10 https://github.com/libevent/libevent/releases/download/release-${PV}-stable/${BP}-stable.tar.gz \
11 file://Makefile-missing-test-dir.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050012 file://run-ptest \
13"
14
Brad Bishop08902b02019-08-20 09:16:51 -040015SRC_URI[md5sum] = "7f35cfe69b82d879111ec0d7b7b1c531"
16SRC_URI[sha256sum] = "a65bac6202ea8c5609fd5c7e480e6d25de467ea1917c08290c521752f147283d"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050017
18UPSTREAM_CHECK_URI = "http://libevent.org/"
19
20S = "${WORKDIR}/${BPN}-${PV}-stable"
21
22PACKAGECONFIG ??= ""
23PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
24
25inherit autotools
26
27# Needed for Debian packaging
28LEAD_SONAME = "libevent-2.1.so"
29
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080030inherit ptest multilib_header
Brad Bishopd7bf8c12018-02-25 22:55:05 -050031
32DEPENDS = "zlib"
33
Brad Bishop1d80a2e2019-11-15 16:35:03 -050034PACKAGES_DYNAMIC = "^${PN}-.*$"
35python split_libevent_libs () {
36 do_split_packages(d, '${libdir}', r'^libevent_([a-z]*)-.*\.so\..*', '${PN}-%s', '${SUMMARY} (%s)', prepend=True, allow_links=True)
37}
38PACKAGESPLITFUNCS_prepend = "split_libevent_libs "
39
Brad Bishopd7bf8c12018-02-25 22:55:05 -050040BBCLASSEXTEND = "native nativesdk"
41
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080042do_install_append() {
Brad Bishop1d80a2e2019-11-15 16:35:03 -050043 rm ${D}${bindir}/event_rpcgen.py
44 rmdir ${D}${bindir}
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080045 oe_multilib_header event2/event-config.h
46}
47
Brad Bishopd7bf8c12018-02-25 22:55:05 -050048do_install_ptest() {
49 install -d ${D}${PTEST_PATH}/test
50 for file in ${B}/test/.libs/regress ${B}/test/.libs/test*
51 do
52 install -m 0755 $file ${D}${PTEST_PATH}/test
53 done
Brad Bishop79641f22019-09-10 07:20:22 -040054
55 # handle multilib
56 sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
Brad Bishopd7bf8c12018-02-25 22:55:05 -050057}