Skip to content

Commit

Permalink
Merge pull request jl777#271 from Asherda/libevent-upgrade
Browse files Browse the repository at this point in the history
Upgrade libevent to 2.1.12
  • Loading branch information
miketout authored Nov 17, 2023
2 parents 52b3428 + 2df1d25 commit 18b89dd
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
12 changes: 9 additions & 3 deletions depends/packages/libevent.mk
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
package=libevent
$(package)_version=2.1.8
$(package)_download_path=https://github.com/libevent/libevent/archive
$(package)_version=2.1.12
$(package)_download_path=https://github.com/libevent/libevent/archive/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_download_file=release-$($(package)_version)-stable.tar.gz
$(package)_sha256_hash=316ddb401745ac5d222d7c529ef1eada12f58f6376a66c1118eee803cb70f83d
$(package)_sha256_hash=7180a979aaa7000e1264da484f712d403fcf7679b1e9212c4e3d09f5c93efc24
$(package)_patches=0001-fix-windows-getaddrinfo.patch

define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/0001-fix-windows-getaddrinfo.patch && \
./autogen.sh
endef

# When building for Windows, we set _WIN32_WINNT to target the same Windows
# version as we do in configure. Due to quirks in libevents build system, this
# is also required to enable support for ipv6. See #19375.
define $(package)_set_vars
$(package)_config_opts=--disable-shared --disable-openssl --disable-libevent-regress
$(package)_config_opts_release=--disable-debug-mode
$(package)_config_opts_linux=--with-pic
$(package)_cppflags_mingw32=-D_WIN32_WINNT=0x0601
endef

define $(package)_config_cmds
Expand Down
15 changes: 15 additions & 0 deletions depends/patches/libevent/0001-fix-windows-getaddrinfo.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff -ur libevent-2.1.8-stable.orig/configure.ac libevent-2.1.8-stable/configure.ac
--- libevent-2.1.8-stable.orig/configure.ac 2017-01-29 17:51:00.000000000 +0000
+++ libevent-2.1.8-stable/configure.ac 2020-03-07 01:11:16.311335005 +0000
@@ -389,6 +389,10 @@
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
+#ifdef _WIN32
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
]],
[[
getaddrinfo;
Only in libevent-2.1.8-stable: configure.ac~

0 comments on commit 18b89dd

Please sign in to comment.