Skip to content

Commit 8c935e6

Browse files
hebastotheuni
authored andcommitted
depends: Fix CMake-generated libevent*.pc files
See libevent/libevent#1622.
1 parent ed739d1 commit 8c935e6

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

depends/packages/libevent.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ $(package)_download_path=https://github.com/libevent/libevent/releases/download/
44
$(package)_file_name=$(package)-$($(package)_version).tar.gz
55
$(package)_sha256_hash=92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb
66
$(package)_patches=cmake_fixups.patch
7+
$(package)_patches+=fix_mingw_link.patch
78
$(package)_build_subdir=build
89

910
# When building for Windows, we set _WIN32_WINNT to target the same Windows
@@ -21,7 +22,8 @@ define $(package)_set_vars
2122
endef
2223

2324
define $(package)_preprocess_cmds
24-
patch -p1 < $($(package)_patch_dir)/cmake_fixups.patch
25+
patch -p1 < $($(package)_patch_dir)/cmake_fixups.patch && \
26+
patch -p1 < $($(package)_patch_dir)/fix_mingw_link.patch
2527
endef
2628

2729
define $(package)_config_cmds
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
commit d108099913c5fdbe518f3f4d711f248f8522bd10
2+
Author: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
3+
Date: Mon Apr 22 06:39:35 2024 +0100
4+
5+
build: Add `Iphlpapi` to `Libs.private` in `*.pc` files on Windows
6+
7+
It has been required since https://github.com/libevent/libevent/pull/923
8+
at least for the `if_nametoindex` call.
9+
10+
See https://github.com/libevent/libevent/pull/1622.
11+
12+
13+
diff --git a/configure.ac b/configure.ac
14+
index d00e063a..cd1fce37 100644
15+
--- a/CMakeLists.txt
16+
+++ b/CMakeLists.txt
17+
@@ -906,7 +906,7 @@ if(WIN32)
18+
list(APPEND HDR_PRIVATE WIN32-Code/getopt.h)
19+
20+
set(EVENT__DNS_USE_FTIME_FOR_ID 1)
21+
- set(LIB_PLATFORM ws2_32 shell32 advapi32)
22+
+ set(LIB_PLATFORM ws2_32 shell32 advapi32 iphlpapi)
23+
add_definitions(
24+
-D_CRT_SECURE_NO_WARNINGS
25+
-D_CRT_NONSTDC_NO_DEPRECATE)

0 commit comments

Comments
 (0)