Merge #16871: build: make building protobuf optional in depends

107e030723552cf272dc8da01bb682032a457a3d build: make protobuf optional in depends (fanquake)
ff6122f32b21fa00e9308e098b33b9657debc1d7 doc: clarify protobuf build requirements (fanquake)

Pull request description:

  As mentioned by dongcarl in https://github.com/bitcoin/bitcoin/pull/15584#issuecomment-521780972, make building `protobuf` optional in depends. With this change it will only be built if you pass `PROTOBUF=1`.

ACKs for top commit:
  laanwj:
    code review ACK 107e030723552cf272dc8da01bb682032a457a3d
  Sjors:
    tACK 107e030 on macOS 10.14. When I build depends with `PROTOBUF=1` then `./configure` has `bip70` enabled.

Tree-SHA512: 49bc247a6879aaf55b943a3d0b930544ddef1e69a481955a8bebe0b02c9ad0fe168b93025f34168334cef34bb567478eb98eacab62ba909f2f64fb21119c71b8
This commit is contained in:
Wladimir J. van der Laan 2019-09-16 12:45:40 +02:00 committed by munkybooty
parent 042207fa33
commit fc5ed587ca
5 changed files with 18 additions and 4 deletions

View File

@ -53,6 +53,7 @@ elif [ "$BUILD_TARGET" = "win64" ]; then
export DIRECT_WINE_EXEC_TESTS=true
elif [ "$BUILD_TARGET" = "linux32" ]; then
export HOST=i686-pc-linux-gnu
export DEP_OPTS="NO_PROTOBUF=1"
export BITCOIN_CONFIG="--enable-zmq --disable-bip70 --enable-reduce-exports --enable-crash-hooks"
export USE_SHELL="/bin/dash"
export PYZMQ=true

View File

@ -33,6 +33,7 @@ WORK_PATH = $(BASEDIR)/work
BASE_CACHE ?= $(BASEDIR)/built
SDK_PATH ?= $(BASEDIR)/SDKs
NO_QT ?=
NO_PROTOBUF ?=
NO_WALLET ?=
NO_ZMQ ?=
NO_UPNP ?=
@ -134,11 +135,14 @@ wallet_packages_$(NO_WALLET) = $(wallet_packages)
upnp_packages_$(NO_UPNP) = $(upnp_packages)
zmq_packages_$(NO_ZMQ) = $(zmq_packages)
protobuf_packages_$(NO_PROTOBUF) = $(protobuf_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)
ifneq ($(protobuf_packages_),)
native_packages += $(protobuf_native_packages)
packages += $(protobuf_packages)
endif
ifneq ($(zmq_packages_),)
@ -205,6 +209,7 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_
-e 's|@LDFLAGS@|$(strip $(host_LDFLAGS) $(host_$(release_type)_LDFLAGS))|' \
-e 's|@no_qt@|$(NO_QT)|' \
-e 's|@no_zmq@|$(NO_ZMQ)|' \
-e 's|@disable_bip70@|$(NO_PROTOBUF)|' \
-e 's|@no_wallet@|$(NO_WALLET)|' \
-e 's|@no_upnp@|$(NO_UPNP)|' \
-e 's|@debug@|$(DEBUG)|' \

View File

@ -91,6 +91,8 @@ The following can be set when running make: `make FOO=bar`
<dd>Don't download/build/cache packages needed for enabling upnp</dd>
<dt>DEBUG</dt>
<dd>disable some optimizations and enable more runtime checking</dd>
<dt>PROTOBUF</dt>
<dd>build protobuf (used for deprecated BIP70 support)</dd>
<dt>HOST_ID_SALT</dt>
<dd>Optional salt to use when generating host package ids</dd>
<dt>BUILD_ID_SALT</dt>

View File

@ -47,6 +47,10 @@ if test -z $enable_zmq && test -n "@no_zmq@"; then
enable_zmq=no
fi
if test -n $disable_bip70 && test -n "@disable_bip70@"; then
disable_bip70=no
fi
if test -n "@debug@" && test -z "@no_qt@" && test "x$with_gui" != xno; then
with_gui=qt5_debug
fi

View File

@ -1,7 +1,9 @@
packages:=boost openssl libevent gmp bls-dash backtrace cmake immer
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 dbus libxcb xcb_proto libXau xproto freetype fontconfig