Skip to content

Commit

Permalink
depends, libevent: Do not install *.pc files and remove patches for them
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed Oct 30, 2024
1 parent fd5dce5 commit b67100b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 52 deletions.
9 changes: 4 additions & 5 deletions depends/packages/libevent.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
22 changes: 0 additions & 22 deletions depends/patches/libevent/cmake_fixups.patch
Original file line number Diff line number Diff line change
@@ -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 @@
Expand All @@ -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)
25 changes: 0 additions & 25 deletions depends/patches/libevent/fix_mingw_link.patch

This file was deleted.

0 comments on commit b67100b

Please sign in to comment.