diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2024-07-13 12:42:01 +0100 |
---|---|---|
committer | Cory Fields <cory-nospam-@coryfields.com> | 2024-07-19 17:45:53 +0000 |
commit | 8c935e625ea75d180144f0526d6a0d5fd58c1f29 (patch) | |
tree | 582b990e67a0058217d4976ec1b4f212f6e40d6b /depends | |
parent | ed739d14b58b5e772a65b85bb421703963b06852 (diff) |
depends: Fix CMake-generated `libevent*.pc` files
See https://github.com/libevent/libevent/pull/1622.
Diffstat (limited to 'depends')
-rw-r--r-- | depends/packages/libevent.mk | 4 | ||||
-rw-r--r-- | depends/patches/libevent/fix_mingw_link.patch | 25 |
2 files changed, 28 insertions, 1 deletions
diff --git a/depends/packages/libevent.mk b/depends/packages/libevent.mk index 60e1ee469e..2636d91495 100644 --- a/depends/packages/libevent.mk +++ b/depends/packages/libevent.mk @@ -4,6 +4,7 @@ $(package)_download_path=https://github.com/libevent/libevent/releases/download/ $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb $(package)_patches=cmake_fixups.patch +$(package)_patches+=fix_mingw_link.patch $(package)_build_subdir=build # When building for Windows, we set _WIN32_WINNT to target the same Windows @@ -21,7 +22,8 @@ define $(package)_set_vars endef define $(package)_preprocess_cmds - patch -p1 < $($(package)_patch_dir)/cmake_fixups.patch + patch -p1 < $($(package)_patch_dir)/cmake_fixups.patch && \ + patch -p1 < $($(package)_patch_dir)/fix_mingw_link.patch endef define $(package)_config_cmds diff --git a/depends/patches/libevent/fix_mingw_link.patch b/depends/patches/libevent/fix_mingw_link.patch new file mode 100644 index 0000000000..41cbd463c9 --- /dev/null +++ b/depends/patches/libevent/fix_mingw_link.patch @@ -0,0 +1,25 @@ +commit d108099913c5fdbe518f3f4d711f248f8522bd10 +Author: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> +Date: Mon Apr 22 06:39:35 2024 +0100 + + build: Add `Iphlpapi` to `Libs.private` in `*.pc` files on Windows + + It has been required since https://github.com/libevent/libevent/pull/923 + at least for the `if_nametoindex` call. + + See https://github.com/libevent/libevent/pull/1622. + + +diff --git a/configure.ac b/configure.ac +index d00e063a..cd1fce37 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -906,7 +906,7 @@ if(WIN32) + list(APPEND HDR_PRIVATE WIN32-Code/getopt.h) + + set(EVENT__DNS_USE_FTIME_FOR_ID 1) +- set(LIB_PLATFORM ws2_32 shell32 advapi32) ++ set(LIB_PLATFORM ws2_32 shell32 advapi32 iphlpapi) + add_definitions( + -D_CRT_SECURE_NO_WARNINGS + -D_CRT_NONSTDC_NO_DEPRECATE) |