include $(TOPDIR)/rules.mk
PKG_NAME:=libevent2
-PKG_VERSION:=2.1.8
-PKG_RELEASE:=3
+PKG_VERSION:=2.1.9-beta
+PKG_RELEASE:=1
-PKG_SOURCE:=libevent-$(PKG_VERSION)-stable.tar.gz
-PKG_SOURCE_URL:=https://github.com/libevent/libevent/releases/download/release-$(PKG_VERSION)-stable
-PKG_HASH:=965cc5a8bb46ce4199a47e9b2c9e1cae3b137e8356ffdad6d94d3b9069b71dc2
-PKG_BUILD_DIR:=$(BUILD_DIR)/libevent-$(PKG_VERSION)-stable
+PKG_SOURCE:=libevent-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/libevent/libevent/releases/download/release-$(PKG_VERSION)
+PKG_HASH:=eeb4c6eb2c4021e22d6278cdcd02815470243ed81077be0cbd0f233fa6fc07e8
+PKG_BUILD_DIR:=$(BUILD_DIR)/libevent-$(PKG_VERSION)
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_LICENSE:=BSD-3-Clause
PKG_CPE_ID:=cpe:/a:libevent_project:libevent
-PKG_FIXUP:=autoreconf
-PKG_INSTALL:=1
-PKG_BUILD_PARALLEL:=1
-
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
define Package/libevent2/Default
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Event notification
URL:=http://libevent.org
- ABI_VERSION:=6
+ ABI_VERSION:=7
endef
define Package/libevent2/Default/description
define Package/libevent2-extra
$(call Package/libevent2/Default)
TITLE+= extra library (version 2.1)
+ DEPENDS+=+libevent2-core
endef
define Package/libevent2-extra/description
define Package/libevent2-openssl
$(call Package/libevent2/Default)
TITLE+= OpenSSL library (version 2.1)
- DEPENDS+=+libopenssl
+ DEPENDS+=+libopenssl +libevent2-core
endef
define Package/libevent2-openssl/description
define Package/libevent2-pthreads
$(call Package/libevent2/Default)
TITLE+= Pthreads library (version 2.1)
- DEPENDS+=+libpthread
+ DEPENDS+=+libpthread +libevent2-core
endef
define Package/libevent2-pthreads/description
threading & locking.
endef
-TARGET_CFLAGS += $(FPIC)
-
-CONFIGURE_ARGS += \
- --enable-shared \
- --enable-static \
- --disable-debug-mode
+TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed -flto
-MAKE_FLAGS += \
- CFLAGS="$(TARGET_CFLAGS)"
+CMAKE_OPTIONS += \
+ -DEVENT__DISABLE_BENCHMARK:BOOL=ON \
+ -DEVENT__DISABLE_DEBUG_MODE:BOOL=ON \
+ -DEVENT__DISABLE_REGRESS:BOOL=ON \
+ -DEVENT__DISABLE_SAMPLES:BOOL=ON \
+ $(if $(CONFIG_PACKAGE_libevent2-openssl),-DEVENT__DISABLE_OPENSSL:BOOL=OFF,-DEVENT__DISABLE_OPENSSL:BOOL=ON) \
+ $(if $(CONFIG_PACKAGE_libevent2-pthreads),-DEVENT__DISABLE_THREAD_SUPPORT:BOOL=OFF,-DEVENT__DISABLE_THREAD_SUPPORT:BOOL=ON) \
+ -DEVENT__DISABLE_TESTS:BOOL=ON
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent*.{la,a,so} $(1)/usr/lib/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent*-2.1.so* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent*.{a,so}* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libevent*.pc $(1)/usr/lib/pkgconfig/
endef
define Package/libevent2/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent-2.1.so.* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent.so.2.1.* $(1)/usr/lib/
endef
define Package/libevent2-core/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_core-2.1.so.* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_core.so.2.1.* $(1)/usr/lib/
endef
define Package/libevent2-extra/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_extra-2.1.so.* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_extra.so.2.1.* $(1)/usr/lib/
endef
define Package/libevent2-openssl/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_openssl-2.1.so.* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_openssl.so.2.1.* $(1)/usr/lib/
endef
define Package/libevent2-pthreads/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_pthreads-2.1.so.* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_pthreads.so.2.1.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libevent2))
+++ /dev/null
-From f519e0f30a00393b949c4e20868952726a9c6d2e Mon Sep 17 00:00:00 2001
-From: Pierce Lopez <pierce.lopez@gmail.com>
-Date: Thu, 2 Mar 2017 21:09:32 -0500
-Subject: [PATCH] Do not check for ERR_remove_thread_state() (do not link ssl
- into every library)
-
-This reverts commit c4e9d9bd662de7f575f2172c160795d452ebe709
-("sample/https-client: check for ERR_remove_thread_state() existence").
-
-Calling AC_SEARCH_LIBS() modifies LIBS - -lcrypto incorrectly
-ends up in LIBS, and thus linked to by libevent_core.so.
-
-Checking for ERR_remove_thread_state should no longer be needed
-because it was introduced in openssl 1.0.0, and the previous line
-0.9.8 had support discontinued at the end of 2015.
-
-Fixes: #473
----
- configure.ac | 4 ----
- sample/https-client.c | 4 ----
- 2 files changed, 8 deletions(-)
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -791,10 +791,6 @@ fi
-
- # check if we have and should use openssl
- AM_CONDITIONAL(OPENSSL, [test "$enable_openssl" != "no" && test "$have_openssl" = "yes"])
--if test "x$enable_openssl" = "xyes"; then
-- AC_SEARCH_LIBS([ERR_remove_thread_state], [crypto eay32],
-- [AC_DEFINE(HAVE_ERR_REMOVE_THREAD_STATE, 1, [Define to 1 if you have ERR_remove_thread_stat().])])
--fi
-
- # Add some more warnings which we use in development but not in the
- # released versions. (Some relevant gcc versions can't handle these.)
---- a/sample/https-client.c
-+++ b/sample/https-client.c
-@@ -484,11 +484,7 @@ cleanup:
- EVP_cleanup();
- ERR_free_strings();
-
--#ifdef EVENT__HAVE_ERR_REMOVE_THREAD_STATE
- ERR_remove_thread_state(NULL);
--#else
-- ERR_remove_state(0);
--#endif
- CRYPTO_cleanup_all_ex_data();
-
- sk_SSL_COMP_free(SSL_COMP_get_compression_methods());
--- /dev/null
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 98082cd..96c6c86 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -800,7 +800,7 @@ if (NOT EVENT__DISABLE_OPENSSL)
+
+ list(APPEND SRC_OPENSSL bufferevent_openssl.c)
+ list(APPEND HDR_PUBLIC include/event2/bufferevent_ssl.h)
+- list(APPEND LIB_APPS ${OPENSSL_LIBRARIES})
++# list(APPEND LIB_APPS ${OPENSSL_LIBRARIES})
+ endif()
+
+ if (NOT EVENT__DISABLE_THREAD_SUPPORT)
+@@ -902,7 +902,8 @@ add_event_library(event_extra
+
+ if (NOT EVENT__DISABLE_OPENSSL)
+ add_event_library(event_openssl
+- LIBRARIES event_core_shared ${OPENSSL_LIBRARIES}
++# LIBRARIES event_core_shared ${OPENSSL_LIBRARIES}
++ LIBRARIES event_core_shared
+ SOURCES ${SRC_OPENSSL})
+ endif()
+