1################################################################################
2#
3# libevent
4#
5################################################################################
6
7LIBEVENT_VERSION = 2.1.12
8LIBEVENT_SITE = https://github.com/libevent/libevent/releases/download/release-$(LIBEVENT_VERSION)-stable
9LIBEVENT_SOURCE = libevent-$(LIBEVENT_VERSION)-stable.tar.gz
10LIBEVENT_INSTALL_STAGING = YES
11LIBEVENT_LICENSE = BSD-3-Clause, OpenBSD
12LIBEVENT_LICENSE_FILES = LICENSE
13LIBEVENT_CPE_ID_VALID = YES
14LIBEVENT_CONF_OPTS = \
15	--disable-libevent-regress \
16	--disable-samples
17HOST_LIBEVENT_CONF_OPTS = \
18	--disable-libevent-regress \
19	--disable-samples \
20	--disable-openssl
21
22define LIBEVENT_REMOVE_PYSCRIPT
23	rm $(TARGET_DIR)/usr/bin/event_rpcgen.py
24endef
25
26# libevent installs a python script to target - get rid of it if we
27# don't have python support enabled
28ifneq ($(BR2_PACKAGE_PYTHON3),y)
29LIBEVENT_POST_INSTALL_TARGET_HOOKS += LIBEVENT_REMOVE_PYSCRIPT
30endif
31
32ifeq ($(BR2_PACKAGE_OPENSSL),y)
33LIBEVENT_DEPENDENCIES += host-pkgconf openssl
34LIBEVENT_CONF_OPTS += --enable-openssl
35else
36LIBEVENT_CONF_OPTS += --disable-openssl
37endif
38
39$(eval $(autotools-package))
40$(eval $(host-autotools-package))
41