Skip to content

Commit 603fd6a

Browse files
committed
depends: add MULTIPROCESS depends option
Builds required packages and passes --enable-multiprocess option to bitcoin build
1 parent 5d1377b commit 603fd6a

File tree

14 files changed

+107
-2
lines changed

14 files changed

+107
-2
lines changed

depends/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ NO_QR ?=
1313
NO_WALLET ?=
1414
NO_ZMQ ?=
1515
NO_UPNP ?=
16+
MULTIPROCESS ?=
1617
FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources
1718

1819
BUILD = $(shell ./config.guess)
@@ -107,6 +108,7 @@ qt_packages_$(NO_QT) = $(qt_packages) $(qt_$(host_os)_packages) $(qt_$(host_arch
107108
wallet_packages_$(NO_WALLET) = $(wallet_packages)
108109
upnp_packages_$(NO_UPNP) = $(upnp_packages)
109110
zmq_packages_$(NO_ZMQ) = $(zmq_packages)
111+
multiprocess_packages_$(MULTIPROCESS) = $(multiprocess_packages)
110112

111113
packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(qt_packages_) $(wallet_packages_) $(upnp_packages_)
112114
native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages)
@@ -115,6 +117,11 @@ ifneq ($(zmq_packages_),)
115117
packages += $(zmq_packages)
116118
endif
117119

120+
ifeq ($(multiprocess_packages_),)
121+
packages += $(multiprocess_packages)
122+
native_packages += $(multiprocess_native_packages)
123+
endif
124+
118125
all_packages = $(packages) $(native_packages)
119126

120127
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_
155162
-e 's|@no_zmq@|$(NO_ZMQ)|' \
156163
-e 's|@no_wallet@|$(NO_WALLET)|' \
157164
-e 's|@no_upnp@|$(NO_UPNP)|' \
165+
-e 's|@multiprocess@|$(MULTIPROCESS)|' \
158166
-e 's|@debug@|$(DEBUG)|' \
159167
$< > $@
160168
$(AT)touch $@

depends/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ The following can be set when running make: make FOO=bar
9191
NO_ZMQ: Don't download/build/cache packages needed for enabling zeromq
9292
NO_WALLET: Don't download/build/cache libs needed to enable the wallet
9393
NO_UPNP: Don't download/build/cache packages needed for enabling upnp
94+
MULTIPROCESS: build libmultiprocess (experimental, requires cmake)
9495
DEBUG: disable some optimizations and enable more runtime checking
9596
HOST_ID_SALT: Optional salt to use when generating host package ids
9697
BUILD_ID_SALT: Optional salt to use when generating build package ids

depends/config.site.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ fi
1616
if test -z $with_qt_bindir && test -z "@no_qt@"; then
1717
with_qt_bindir=$depends_prefix/native/bin
1818
fi
19+
if test -z $with_mpgen && test -n "@multiprocess@"; then
20+
with_mpgen=$depends_prefix/native
21+
fi
1922

2023
if test -z $with_qrencode && test -n "@no_qr@"; then
2124
with_qrencode=no
@@ -25,6 +28,10 @@ if test -z $enable_wallet && test -n "@no_wallet@"; then
2528
enable_wallet=no
2629
fi
2730

31+
if test -z $enable_multiprocess && test -n "@multiprocess@"; then
32+
enable_multiprocess=yes
33+
fi
34+
2835
if test -z $with_miniupnpc && test -n "@no_upnp@"; then
2936
with_miniupnpc=no
3037
fi

depends/funcs.mk

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,11 @@ $(1)_config_env+=$($(1)_config_env_$(host_arch)_$(host_os)) $($(1)_config_env_$(
130130

131131
$(1)_config_env+=PKG_CONFIG_LIBDIR=$($($(1)_type)_prefix)/lib/pkgconfig
132132
$(1)_config_env+=PKG_CONFIG_PATH=$($($(1)_type)_prefix)/share/pkgconfig
133+
$(1)_config_env+=CMAKE_MODULE_PATH=$($($(1)_type)_prefix)/lib/cmake
133134
$(1)_config_env+=PATH=$(build_prefix)/bin:$(PATH)
134135
$(1)_build_env+=PATH=$(build_prefix)/bin:$(PATH)
135136
$(1)_stage_env+=PATH=$(build_prefix)/bin:$(PATH)
136137
$(1)_autoconf=./configure --host=$($($(1)_type)_host) --prefix=$($($(1)_type)_prefix) $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)"
137-
138138
ifneq ($($(1)_nm),)
139139
$(1)_autoconf += NM="$$($(1)_nm)"
140140
endif
@@ -156,6 +156,15 @@ endif
156156
ifneq ($($(1)_ldflags),)
157157
$(1)_autoconf += LDFLAGS="$$($(1)_ldflags)"
158158
endif
159+
160+
$(1)_cmake=cmake -DCMAKE_INSTALL_PREFIX=$($($(1)_type)_prefix)
161+
ifneq ($($(1)_type),build)
162+
ifneq ($(host),$(build))
163+
$(1)_cmake += -DCMAKE_SYSTEM_NAME=$($(host_os)_cmake_system) -DCMAKE_SYSROOT=$(host_prefix)
164+
$(1)_cmake += -DCMAKE_C_COMPILER_TARGET=$(host) -DCMAKE_C_COMPILER=$(firstword $($($(1)_type)_CC)) -DCMAKE_C_FLAGS="$(wordlist 2,1000,$($($(1)_type)_CC))"
165+
$(1)_cmake += -DCMAKE_CXX_COMPILER_TARGET=$(host) -DCMAKE_CXX_COMPILER=$(firstword $($($(1)_type)_CXX)) -DCMAKE_CXX_FLAGS="$(wordlist 2,1000,$($($(1)_type)_CXX))"
166+
endif
167+
endif
159168
endef
160169

161170
define int_add_cmds

depends/hosts/android.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ android_CXX=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)$(ANDROID_API_LEVEL)-clang++
99
android_CC=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)$(ANDROID_API_LEVEL)-clang
1010
android_RANLIB=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)-ranlib
1111
endif
12+
android_cmake_system=Android

depends/hosts/darwin.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ darwin_debug_CFLAGS=-O1
1414
darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS)
1515

1616
darwin_native_toolchain=native_cctools
17+
darwin_cmake_system=Darwin

depends/hosts/linux.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ i686_linux_CXX=$(default_host_CXX) -m32
2929
x86_64_linux_CC=$(default_host_CC) -m64
3030
x86_64_linux_CXX=$(default_host_CXX) -m64
3131
endif
32+
linux_cmake_system=Linux

depends/hosts/mingw32.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ mingw32_debug_CFLAGS=-O1
88
mingw32_debug_CXXFLAGS=$(mingw32_debug_CFLAGS)
99

1010
mingw32_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
11+
12+
mingw_cmake_system=Windows

depends/packages/boost.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package=boost
22
$(package)_version=1_70_0
33
$(package)_download_path=https://dl.bintray.com/boostorg/release/1.70.0/source/
4-
$(package)_file_name=$(package)_$($(package)_version).tar.bz2
4+
$(package)_file_name=boost_$($(package)_version).tar.bz2
55
$(package)_sha256_hash=430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778
66

77
define $(package)_set_vars

depends/packages/capnp.mk

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package=capnp
2+
$(package)_version=$(native_$(package)_version)
3+
$(package)_download_path=$(native_$(package)_download_path)
4+
$(package)_file_name=$(native_$(package)_file_name)
5+
$(package)_sha256_hash=$(native_$(package)_sha256_hash)
6+
$(package)_dependencies=native_$(package)
7+
8+
define $(package)_config_cmds
9+
$($(package)_autoconf) --with-external-capnp
10+
endef
11+
12+
define $(package)_build_cmds
13+
$(MAKE)
14+
endef
15+
16+
define $(package)_stage_cmds
17+
$(MAKE) DESTDIR=$($(package)_staging_dir) install
18+
endef

0 commit comments

Comments
 (0)