mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 02:33:24 -03:00
depends: add MULTIPROCESS depends option
Builds required packages and passes --enable-multiprocess option to bitcoin build
This commit is contained in:
parent
5d1377b52b
commit
603fd6a2e7
14 changed files with 107 additions and 2 deletions
|
@ -13,6 +13,7 @@ NO_QR ?=
|
|||
NO_WALLET ?=
|
||||
NO_ZMQ ?=
|
||||
NO_UPNP ?=
|
||||
MULTIPROCESS ?=
|
||||
FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources
|
||||
|
||||
BUILD = $(shell ./config.guess)
|
||||
|
@ -107,6 +108,7 @@ qt_packages_$(NO_QT) = $(qt_packages) $(qt_$(host_os)_packages) $(qt_$(host_arch
|
|||
wallet_packages_$(NO_WALLET) = $(wallet_packages)
|
||||
upnp_packages_$(NO_UPNP) = $(upnp_packages)
|
||||
zmq_packages_$(NO_ZMQ) = $(zmq_packages)
|
||||
multiprocess_packages_$(MULTIPROCESS) = $(multiprocess_packages)
|
||||
|
||||
packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(qt_packages_) $(wallet_packages_) $(upnp_packages_)
|
||||
native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages)
|
||||
|
@ -115,6 +117,11 @@ ifneq ($(zmq_packages_),)
|
|||
packages += $(zmq_packages)
|
||||
endif
|
||||
|
||||
ifeq ($(multiprocess_packages_),)
|
||||
packages += $(multiprocess_packages)
|
||||
native_packages += $(multiprocess_native_packages)
|
||||
endif
|
||||
|
||||
all_packages = $(packages) $(native_packages)
|
||||
|
||||
meta_depends = Makefile funcs.mk builders/default.mk hosts/default.mk hosts/$(host_os).mk builders/$(build_os).mk
|
||||
|
@ -155,6 +162,7 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_
|
|||
-e 's|@no_zmq@|$(NO_ZMQ)|' \
|
||||
-e 's|@no_wallet@|$(NO_WALLET)|' \
|
||||
-e 's|@no_upnp@|$(NO_UPNP)|' \
|
||||
-e 's|@multiprocess@|$(MULTIPROCESS)|' \
|
||||
-e 's|@debug@|$(DEBUG)|' \
|
||||
$< > $@
|
||||
$(AT)touch $@
|
||||
|
|
|
@ -91,6 +91,7 @@ The following can be set when running make: make FOO=bar
|
|||
NO_ZMQ: Don't download/build/cache packages needed for enabling zeromq
|
||||
NO_WALLET: Don't download/build/cache libs needed to enable the wallet
|
||||
NO_UPNP: Don't download/build/cache packages needed for enabling upnp
|
||||
MULTIPROCESS: build libmultiprocess (experimental, requires cmake)
|
||||
DEBUG: disable some optimizations and enable more runtime checking
|
||||
HOST_ID_SALT: Optional salt to use when generating host package ids
|
||||
BUILD_ID_SALT: Optional salt to use when generating build package ids
|
||||
|
|
|
@ -16,6 +16,9 @@ fi
|
|||
if test -z $with_qt_bindir && test -z "@no_qt@"; then
|
||||
with_qt_bindir=$depends_prefix/native/bin
|
||||
fi
|
||||
if test -z $with_mpgen && test -n "@multiprocess@"; then
|
||||
with_mpgen=$depends_prefix/native
|
||||
fi
|
||||
|
||||
if test -z $with_qrencode && test -n "@no_qr@"; then
|
||||
with_qrencode=no
|
||||
|
@ -25,6 +28,10 @@ if test -z $enable_wallet && test -n "@no_wallet@"; then
|
|||
enable_wallet=no
|
||||
fi
|
||||
|
||||
if test -z $enable_multiprocess && test -n "@multiprocess@"; then
|
||||
enable_multiprocess=yes
|
||||
fi
|
||||
|
||||
if test -z $with_miniupnpc && test -n "@no_upnp@"; then
|
||||
with_miniupnpc=no
|
||||
fi
|
||||
|
|
|
@ -130,11 +130,11 @@ $(1)_config_env+=$($(1)_config_env_$(host_arch)_$(host_os)) $($(1)_config_env_$(
|
|||
|
||||
$(1)_config_env+=PKG_CONFIG_LIBDIR=$($($(1)_type)_prefix)/lib/pkgconfig
|
||||
$(1)_config_env+=PKG_CONFIG_PATH=$($($(1)_type)_prefix)/share/pkgconfig
|
||||
$(1)_config_env+=CMAKE_MODULE_PATH=$($($(1)_type)_prefix)/lib/cmake
|
||||
$(1)_config_env+=PATH=$(build_prefix)/bin:$(PATH)
|
||||
$(1)_build_env+=PATH=$(build_prefix)/bin:$(PATH)
|
||||
$(1)_stage_env+=PATH=$(build_prefix)/bin:$(PATH)
|
||||
$(1)_autoconf=./configure --host=$($($(1)_type)_host) --prefix=$($($(1)_type)_prefix) $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)"
|
||||
|
||||
ifneq ($($(1)_nm),)
|
||||
$(1)_autoconf += NM="$$($(1)_nm)"
|
||||
endif
|
||||
|
@ -156,6 +156,15 @@ endif
|
|||
ifneq ($($(1)_ldflags),)
|
||||
$(1)_autoconf += LDFLAGS="$$($(1)_ldflags)"
|
||||
endif
|
||||
|
||||
$(1)_cmake=cmake -DCMAKE_INSTALL_PREFIX=$($($(1)_type)_prefix)
|
||||
ifneq ($($(1)_type),build)
|
||||
ifneq ($(host),$(build))
|
||||
$(1)_cmake += -DCMAKE_SYSTEM_NAME=$($(host_os)_cmake_system) -DCMAKE_SYSROOT=$(host_prefix)
|
||||
$(1)_cmake += -DCMAKE_C_COMPILER_TARGET=$(host) -DCMAKE_C_COMPILER=$(firstword $($($(1)_type)_CC)) -DCMAKE_C_FLAGS="$(wordlist 2,1000,$($($(1)_type)_CC))"
|
||||
$(1)_cmake += -DCMAKE_CXX_COMPILER_TARGET=$(host) -DCMAKE_CXX_COMPILER=$(firstword $($($(1)_type)_CXX)) -DCMAKE_CXX_FLAGS="$(wordlist 2,1000,$($($(1)_type)_CXX))"
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
|
||||
define int_add_cmds
|
||||
|
|
|
@ -9,3 +9,4 @@ android_CXX=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)$(ANDROID_API_LEVEL)-clang++
|
|||
android_CC=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)$(ANDROID_API_LEVEL)-clang
|
||||
android_RANLIB=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)-ranlib
|
||||
endif
|
||||
android_cmake_system=Android
|
||||
|
|
|
@ -14,3 +14,4 @@ darwin_debug_CFLAGS=-O1
|
|||
darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS)
|
||||
|
||||
darwin_native_toolchain=native_cctools
|
||||
darwin_cmake_system=Darwin
|
||||
|
|
|
@ -29,3 +29,4 @@ i686_linux_CXX=$(default_host_CXX) -m32
|
|||
x86_64_linux_CC=$(default_host_CC) -m64
|
||||
x86_64_linux_CXX=$(default_host_CXX) -m64
|
||||
endif
|
||||
linux_cmake_system=Linux
|
||||
|
|
|
@ -8,3 +8,5 @@ mingw32_debug_CFLAGS=-O1
|
|||
mingw32_debug_CXXFLAGS=$(mingw32_debug_CFLAGS)
|
||||
|
||||
mingw32_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
|
||||
|
||||
mingw_cmake_system=Windows
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package=boost
|
||||
$(package)_version=1_70_0
|
||||
$(package)_download_path=https://dl.bintray.com/boostorg/release/1.70.0/source/
|
||||
$(package)_file_name=$(package)_$($(package)_version).tar.bz2
|
||||
$(package)_file_name=boost_$($(package)_version).tar.bz2
|
||||
$(package)_sha256_hash=430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778
|
||||
|
||||
define $(package)_set_vars
|
||||
|
|
18
depends/packages/capnp.mk
Normal file
18
depends/packages/capnp.mk
Normal file
|
@ -0,0 +1,18 @@
|
|||
package=capnp
|
||||
$(package)_version=$(native_$(package)_version)
|
||||
$(package)_download_path=$(native_$(package)_download_path)
|
||||
$(package)_file_name=$(native_$(package)_file_name)
|
||||
$(package)_sha256_hash=$(native_$(package)_sha256_hash)
|
||||
$(package)_dependencies=native_$(package)
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf) --with-external-capnp
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
18
depends/packages/libmultiprocess.mk
Normal file
18
depends/packages/libmultiprocess.mk
Normal file
|
@ -0,0 +1,18 @@
|
|||
package=libmultiprocess
|
||||
$(package)_version=$(native_$(package)_version)
|
||||
$(package)_download_path=$(native_$(package)_download_path)
|
||||
$(package)_file_name=$(native_$(package)_file_name)
|
||||
$(package)_sha256_hash=$(native_$(package)_sha256_hash)
|
||||
$(package)_dependencies=native_$(package) boost capnp
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_cmake)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
18
depends/packages/native_capnp.mk
Normal file
18
depends/packages/native_capnp.mk
Normal file
|
@ -0,0 +1,18 @@
|
|||
package=native_capnp
|
||||
$(package)_version=0.7.0
|
||||
$(package)_download_path=https://capnproto.org/
|
||||
$(package)_download_file=capnproto-c++-$($(package)_version).tar.gz
|
||||
$(package)_file_name=capnproto-cxx-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=c9a4c0bd88123064d483ab46ecee777f14d933359e23bff6fb4f4dbd28b4cd41
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
18
depends/packages/native_libmultiprocess.mk
Normal file
18
depends/packages/native_libmultiprocess.mk
Normal file
|
@ -0,0 +1,18 @@
|
|||
package=native_libmultiprocess
|
||||
$(package)_version=5741d750a04e644a03336090d8979c6d033e32c0
|
||||
$(package)_download_path=https://github.com/chaincodelabs/libmultiprocess/archive
|
||||
$(package)_file_name=$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=ac848db49a6ed53e423c62d54bd87f1f08cbb0326254a8667e10bbfe5bf032a4
|
||||
$(package)_dependencies=native_capnp
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_cmake)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
$(MAKE)
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
||||
endef
|
|
@ -16,6 +16,9 @@ zmq_packages=zeromq
|
|||
|
||||
upnp_packages=miniupnpc
|
||||
|
||||
multiprocess_packages = libmultiprocess capnp
|
||||
multiprocess_native_packages = native_libmultiprocess native_capnp
|
||||
|
||||
darwin_native_packages = native_biplist native_ds_store native_mac_alias
|
||||
|
||||
ifneq ($(build_os),darwin)
|
||||
|
|
Loading…
Add table
Reference in a new issue