2015-01-20 00:47:44 -03:00
|
|
|
package=libevent
|
2021-05-16 21:31:14 -04:00
|
|
|
$(package)_version=2.1.12-stable
|
|
|
|
$(package)_download_path=https://github.com/libevent/libevent/releases/download/release-$($(package)_version)/
|
|
|
|
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
|
|
|
$(package)_sha256_hash=92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb
|
2023-04-19 16:11:45 -04:00
|
|
|
$(package)_patches=cmake_fixups.patch
|
2024-07-13 07:42:01 -04:00
|
|
|
$(package)_patches+=fix_mingw_link.patch
|
2023-04-19 16:11:45 -04:00
|
|
|
$(package)_build_subdir=build
|
2015-01-20 00:47:44 -03:00
|
|
|
|
2020-06-24 22:25:23 -04:00
|
|
|
# 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.
|
2015-01-20 00:47:44 -03:00
|
|
|
define $(package)_set_vars
|
2023-04-19 16:11:45 -04:00
|
|
|
$(package)_config_opts=-DEVENT__DISABLE_BENCHMARK=ON -DEVENT__DISABLE_OPENSSL=ON
|
|
|
|
$(package)_config_opts+=-DEVENT__DISABLE_SAMPLES=ON -DEVENT__DISABLE_REGRESS=ON
|
|
|
|
$(package)_config_opts+=-DEVENT__DISABLE_TESTS=ON -DEVENT__LIBRARY_TYPE=STATIC
|
2024-08-28 12:35:29 -04:00
|
|
|
$(package)_cppflags += -D_GNU_SOURCE
|
2020-06-24 22:25:23 -04:00
|
|
|
$(package)_cppflags_mingw32=-D_WIN32_WINNT=0x0601
|
2023-04-03 08:36:32 -04:00
|
|
|
|
|
|
|
ifeq ($(NO_HARDEN),)
|
|
|
|
$(package)_cppflags+=-D_FORTIFY_SOURCE=3
|
|
|
|
endif
|
2015-01-20 00:47:44 -03:00
|
|
|
endef
|
|
|
|
|
2021-05-03 07:51:45 -04:00
|
|
|
define $(package)_preprocess_cmds
|
2024-07-13 07:42:01 -04:00
|
|
|
patch -p1 < $($(package)_patch_dir)/cmake_fixups.patch && \
|
|
|
|
patch -p1 < $($(package)_patch_dir)/fix_mingw_link.patch
|
2021-05-03 07:51:45 -04:00
|
|
|
endef
|
|
|
|
|
2015-01-20 00:47:44 -03:00
|
|
|
define $(package)_config_cmds
|
2023-04-19 16:11:45 -04:00
|
|
|
$($(package)_cmake) -S .. -B .
|
2015-01-20 00:47:44 -03:00
|
|
|
endef
|
|
|
|
|
|
|
|
define $(package)_build_cmds
|
|
|
|
$(MAKE)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define $(package)_stage_cmds
|
|
|
|
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
|
|
|
endef
|
|
|
|
|
|
|
|
define $(package)_postprocess_cmds
|
2024-07-23 06:39:21 -04:00
|
|
|
rm -rf bin && \
|
2022-08-24 11:10:00 -04:00
|
|
|
rm include/ev*.h && \
|
|
|
|
rm include/event2/*_compat.h
|
2015-01-20 00:47:44 -03:00
|
|
|
endef
|