1
mirror of https://github.com/bitcoin/bitcoin synced 2024-10-08 05:16:41 +02:00

build: make protobuf optional in depends

Those that want to build it can now pass PROTOBUF=1.
This commit is contained in:
fanquake 2019-09-14 11:03:56 +08:00
parent ff6122f32b
commit 107e030723
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1
5 changed files with 16 additions and 4 deletions

View File

@ -7,6 +7,7 @@
export LC_ALL=C.UTF-8
export HOST=i686-pc-linux-gnu
export DEP_OPTS="PROTOBUF=1"
export PACKAGES="g++-multilib python3-zmq"
export GOAL="install"
export BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-bip70 --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++"

View File

@ -5,6 +5,7 @@ WORK_PATH = $(BASEDIR)/work
BASE_CACHE ?= $(BASEDIR)/built
SDK_PATH ?= $(BASEDIR)/SDKs
NO_QT ?=
PROTOBUF ?=
RAPIDCHECK ?=
NO_WALLET ?=
NO_ZMQ ?=
@ -96,13 +97,15 @@ wallet_packages_$(NO_WALLET) = $(wallet_packages)
upnp_packages_$(NO_UPNP) = $(upnp_packages)
zmq_packages_$(NO_ZMQ) = $(zmq_packages)
protobuf_packages_$(PROTOBUF) = $(protobuf_packages)
rapidcheck_packages_$(RAPIDCHECK) = $(rapidcheck_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)
ifneq ($(qt_packages_),)
native_packages += $(qt_native_packages)
ifeq ($(protobuf_packages_),)
native_packages += $(protobuf_native_packages)
packages += $(protobuf_packages)
endif
ifneq ($(zmq_packages_),)
@ -150,6 +153,7 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_
-e 's|@allow_host_packages@|$(ALLOW_HOST_PACKAGES)|' \
-e 's|@no_qt@|$(NO_QT)|' \
-e 's|@no_zmq@|$(NO_ZMQ)|' \
-e 's|@enable_bip70@|$(PROTOBUF)|' \
-e 's|@no_wallet@|$(NO_WALLET)|' \
-e 's|@no_upnp@|$(NO_UPNP)|' \
-e 's|@debug@|$(DEBUG)|' \

View File

@ -77,6 +77,7 @@ The following can be set when running make: make FOO=bar
NO_UPNP: Don't download/build/cache packages needed for enabling upnp
DEBUG: disable some optimizations and enable more runtime checking
RAPIDCHECK: build rapidcheck (experimental, requires cmake)
PROTOBUF: build protobuf (used for deprecated BIP70 support)
HOST_ID_SALT: Optional salt to use when generating host package ids
BUILD_ID_SALT: Optional salt to use when generating build package ids

View File

@ -37,6 +37,10 @@ if test -z $enable_zmq && test -n "@no_zmq@"; then
enable_zmq=no
fi
if test -n $enable_bip70 && test -n "@enable_bip70@"; then
enable_bip70=yes
fi
if test x@host_os@ = xdarwin; then
BREW=no
PORT=no

View File

@ -1,7 +1,9 @@
packages:=boost openssl libevent
qt_native_packages = native_protobuf
qt_packages = qrencode protobuf zlib
protobuf_native_packages = native_protobuf
protobuf_packages = protobuf
qt_packages = qrencode zlib
qt_linux_packages:=qt expat libxcb xcb_proto libXau xproto freetype fontconfig