From 5a96767e3f531ba9e8a676eec47727421f9f589f Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Wed, 30 Oct 2024 07:34:00 +0000 Subject: [PATCH] depends, libevent: Do not install *.pc files and remove patches for them --- depends/packages/libevent.mk | 9 +++---- depends/patches/libevent/cmake_fixups.patch | 22 ---------------- depends/patches/libevent/fix_mingw_link.patch | 25 ------------------- 3 files changed, 4 insertions(+), 52 deletions(-) delete mode 100644 depends/patches/libevent/fix_mingw_link.patch diff --git a/depends/packages/libevent.mk b/depends/packages/libevent.mk index 4c05e8a0a74..91bc75c1d30 100644 --- a/depends/packages/libevent.mk +++ b/depends/packages/libevent.mk @@ -4,7 +4,6 @@ $(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 @@ -23,8 +22,7 @@ define $(package)_set_vars endef define $(package)_preprocess_cmds - patch -p1 < $($(package)_patch_dir)/cmake_fixups.patch && \ - patch -p1 < $($(package)_patch_dir)/fix_mingw_link.patch + patch -p1 < $($(package)_patch_dir)/cmake_fixups.patch endef define $(package)_config_cmds @@ -40,7 +38,8 @@ define $(package)_stage_cmds endef define $(package)_postprocess_cmds - rm -rf bin && \ + rm -rf bin lib/pkgconfig && \ rm include/ev*.h && \ - rm include/event2/*_compat.h + rm include/event2/*_compat.h && \ + rm lib/libevent.a endef diff --git a/depends/patches/libevent/cmake_fixups.patch b/depends/patches/libevent/cmake_fixups.patch index d80c1a94898..a8812afd1e1 100644 --- a/depends/patches/libevent/cmake_fixups.patch +++ b/depends/patches/libevent/cmake_fixups.patch @@ -1,8 +1,5 @@ cmake: set minimum version to 3.5 -Fix generated pkg-config files, see -https://github.com/libevent/libevent/pull/1165. - --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ @@ -14,22 +11,3 @@ https://github.com/libevent/libevent/pull/1165. if (POLICY CMP0054) cmake_policy(SET CMP0054 NEW) -diff --git a/cmake/AddEventLibrary.cmake b/cmake/AddEventLibrary.cmake -index 04f5837e..d8ea42c4 100644 ---- a/cmake/AddEventLibrary.cmake -+++ b/cmake/AddEventLibrary.cmake -@@ -20,12 +20,12 @@ macro(generate_pkgconfig LIB_NAME) - - set(LIBS "") - foreach (LIB ${LIB_PLATFORM}) -- set(LIBS "${LIBS} -L${LIB}") -+ set(LIBS "${LIBS} -l${LIB}") - endforeach() - - set(OPENSSL_LIBS "") - foreach(LIB ${OPENSSL_LIBRARIES}) -- set(OPENSSL_LIBS "${OPENSSL_LIBS} -L${LIB}") -+ set(OPENSSL_LIBS "${OPENSSL_LIBS} -l${LIB}") - endforeach() - - configure_file("lib${LIB_NAME}.pc.in" "lib${LIB_NAME}.pc" @ONLY) diff --git a/depends/patches/libevent/fix_mingw_link.patch b/depends/patches/libevent/fix_mingw_link.patch deleted file mode 100644 index 41cbd463c91..00000000000 --- a/depends/patches/libevent/fix_mingw_link.patch +++ /dev/null @@ -1,25 +0,0 @@ -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)