Skip to content

Commit 107e030

Browse files
committed
build: make protobuf optional in depends
Those that want to build it can now pass PROTOBUF=1.
1 parent ff6122f commit 107e030

File tree

5 files changed

+16
-4
lines changed

5 files changed

+16
-4
lines changed

ci/test/00_setup_env_i686.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
export LC_ALL=C.UTF-8
88

99
export HOST=i686-pc-linux-gnu
10+
export DEP_OPTS="PROTOBUF=1"
1011
export PACKAGES="g++-multilib python3-zmq"
1112
export GOAL="install"
1213
export BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-bip70 --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++"

depends/Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ WORK_PATH = $(BASEDIR)/work
55
BASE_CACHE ?= $(BASEDIR)/built
66
SDK_PATH ?= $(BASEDIR)/SDKs
77
NO_QT ?=
8+
PROTOBUF ?=
89
RAPIDCHECK ?=
910
NO_WALLET ?=
1011
NO_ZMQ ?=
@@ -96,13 +97,15 @@ wallet_packages_$(NO_WALLET) = $(wallet_packages)
9697
upnp_packages_$(NO_UPNP) = $(upnp_packages)
9798
zmq_packages_$(NO_ZMQ) = $(zmq_packages)
9899

100+
protobuf_packages_$(PROTOBUF) = $(protobuf_packages)
99101
rapidcheck_packages_$(RAPIDCHECK) = $(rapidcheck_packages)
100102

101103
packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(qt_packages_) $(wallet_packages_) $(upnp_packages_)
102104
native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages)
103105

104-
ifneq ($(qt_packages_),)
105-
native_packages += $(qt_native_packages)
106+
ifeq ($(protobuf_packages_),)
107+
native_packages += $(protobuf_native_packages)
108+
packages += $(protobuf_packages)
106109
endif
107110

108111
ifneq ($(zmq_packages_),)
@@ -150,6 +153,7 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_
150153
-e 's|@allow_host_packages@|$(ALLOW_HOST_PACKAGES)|' \
151154
-e 's|@no_qt@|$(NO_QT)|' \
152155
-e 's|@no_zmq@|$(NO_ZMQ)|' \
156+
-e 's|@enable_bip70@|$(PROTOBUF)|' \
153157
-e 's|@no_wallet@|$(NO_WALLET)|' \
154158
-e 's|@no_upnp@|$(NO_UPNP)|' \
155159
-e 's|@debug@|$(DEBUG)|' \

depends/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ The following can be set when running make: make FOO=bar
7777
NO_UPNP: Don't download/build/cache packages needed for enabling upnp
7878
DEBUG: disable some optimizations and enable more runtime checking
7979
RAPIDCHECK: build rapidcheck (experimental, requires cmake)
80+
PROTOBUF: build protobuf (used for deprecated BIP70 support)
8081
HOST_ID_SALT: Optional salt to use when generating host package ids
8182
BUILD_ID_SALT: Optional salt to use when generating build package ids
8283

depends/config.site.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ if test -z $enable_zmq && test -n "@no_zmq@"; then
3737
enable_zmq=no
3838
fi
3939

40+
if test -n $enable_bip70 && test -n "@enable_bip70@"; then
41+
enable_bip70=yes
42+
fi
43+
4044
if test x@host_os@ = xdarwin; then
4145
BREW=no
4246
PORT=no

depends/packages/packages.mk

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
packages:=boost openssl libevent
22

3-
qt_native_packages = native_protobuf
4-
qt_packages = qrencode protobuf zlib
3+
protobuf_native_packages = native_protobuf
4+
protobuf_packages = protobuf
5+
6+
qt_packages = qrencode zlib
57

68
qt_linux_packages:=qt expat libxcb xcb_proto libXau xproto freetype fontconfig
79

0 commit comments

Comments
 (0)