zcashd/depends/packages/zeromq.mk

50 lines
1.7 KiB
Makefile

package=zeromq
$(package)_version=4.3.4
$(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($(package)_version)/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=c593001a89f5a85dd2ddf564805deb860e02471171b3f204944857336295c3e5
$(package)_patches=windows-unused-variables.diff use-snprintf-not-sprintf.patch check_snprintf_return.patch
ifneq ($(host_os),darwin)
$(package)_dependencies=libcxx
endif
define $(package)_set_vars
$(package)_config_opts=--without-docs --disable-shared --disable-curve --disable-curve-keygen --disable-perf
$(package)_config_opts += --without-libgssapi_krb5 --without-pgm --without-norm --without-vmci
$(package)_config_opts += --disable-libunwind --disable-radix-tree --without-gcov --disable-dependency-tracking
$(package)_config_opts += --disable-drafts --enable-option-checking
$(package)_config_opts_linux=--with-pic
$(package)_config_opts_freebsd=--with-pic
$(package)_cxxflags+=-std=c++17
ifeq ($(host_os),freebsd)
$(package)_ldflags+=-static-libstdc++ -lcxxrt
else
$(package)_ldflags+=-static-libstdc++ -lc++abi
endif
endef
define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/windows-unused-variables.diff && \
patch -p1 < $($(package)_patch_dir)/use-snprintf-not-sprintf.patch && \
patch -p1 < $($(package)_patch_dir)/check_snprintf_return.patch
endef
define $(package)_config_cmds
$($(package)_autoconf)
endef
define $(package)_build_cmds
$(MAKE) src/libzmq.la
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install-libLTLIBRARIES install-includeHEADERS install-pkgconfigDATA
endef
define $(package)_postprocess_cmds
rm -rf bin share lib/*.la
endef