mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
fe71a4b139depends: Avoid `warning: "_FORTIFY_SOURCE" redefined` for `libevent` (Hennadii Stepanov) Pull request description: On Alpine Linux 3.12.3, compiling the `libevent` package produces multiple warnings: ``` $ gmake -C depends -j $(nproc) libevent <snip> <command-line>: warning: "_FORTIFY_SOURCE" redefined <built-in>: note: this is the location of the previous definition <snip> ``` This PR fixes these warnings. ACKs for top commit: shahsb: ACKfe71a4b139maflcko: lgtm ACKfe71a4b139theuni: utACKfe71a4b139Tree-SHA512: 0a3ffb2a4cf811bce93addac8e5394cf6b3d79a46245cbdd8488771b9b51e56f66cd9222548138041e69183d52ad4b909d3d1441593f9d79d557d6c000fb324b
47 lines
1.8 KiB
Makefile
47 lines
1.8 KiB
Makefile
package=libevent
|
|
$(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
|
|
$(package)_patches=cmake_fixups.patch
|
|
$(package)_patches += netbsd_fixup.patch
|
|
$(package)_patches += winver_fixup.patch
|
|
$(package)_build_subdir=build
|
|
|
|
# When building for Windows, we set _WIN32_WINNT to target the same Windows
|
|
# version as we do in releases. Due to quirks in libevents build system, this
|
|
# is also required to enable support for ipv6. See #19375.
|
|
define $(package)_set_vars
|
|
$(package)_config_opts=-DCMAKE_BUILD_TYPE=None -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
|
|
$(package)_cflags += -fdebug-prefix-map=$($(package)_extract_dir)=/usr -fmacro-prefix-map=$($(package)_extract_dir)=/usr
|
|
$(package)_cppflags += -D_GNU_SOURCE -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3
|
|
$(package)_cppflags_mingw32=-D_WIN32_WINNT=0x0A00
|
|
endef
|
|
|
|
define $(package)_preprocess_cmds
|
|
patch -p1 < $($(package)_patch_dir)/cmake_fixups.patch && \
|
|
patch -p1 < $($(package)_patch_dir)/netbsd_fixup.patch && \
|
|
patch -p1 < $($(package)_patch_dir)/winver_fixup.patch
|
|
endef
|
|
|
|
define $(package)_config_cmds
|
|
$($(package)_cmake) -S .. -B .
|
|
endef
|
|
|
|
define $(package)_build_cmds
|
|
$(MAKE)
|
|
endef
|
|
|
|
define $(package)_stage_cmds
|
|
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
|
endef
|
|
|
|
define $(package)_postprocess_cmds
|
|
rm -rf bin lib/pkgconfig && \
|
|
rm include/ev*.h && \
|
|
rm include/event2/*_compat.h && \
|
|
rm lib/libevent.a
|
|
endef
|