Skip to content

Commit d2136e3

Browse files
committed
depends: Update from upstream
1 parent 68c81c4 commit d2136e3

32 files changed

+89
-61
lines changed

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.5.6

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
sudo: false
4949
cache: false
5050
language: python
51-
python: '3.6'
51+
python: '3.5' # Oldest supported version according to doc/dependencies.md
5252
install:
5353
- set -o errexit; source .travis/lint_04_install.sh
5454
before_script:
@@ -141,7 +141,7 @@ jobs:
141141
- stage: test
142142
env: >-
143143
HOST=x86_64-apple-darwin14
144-
PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev python3-setuptools-git"
144+
PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python3-dev python3-setuptools"
145145
OSX_SDK=10.11
146146
RUN_UNIT_TESTS=false
147147
RUN_FUNCTIONAL_TESTS=false

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ AC_PATH_TOOL(RANLIB, ranlib)
8181
AC_PATH_TOOL(STRIP, strip)
8282
AC_PATH_TOOL(GCOV, gcov)
8383
AC_PATH_PROG(LCOV, lcov)
84-
dnl Python 3.x is supported from 3.4 on (see https://github.com/bitcoin/bitcoin/issues/7893)
85-
AC_PATH_PROGS([PYTHON], [python3.7 python3.6 python3.5 python3.4 python3 python])
84+
dnl Python 3.5 is specified in .python-version and should be used if available, see doc/dependencies.md
85+
AC_PATH_PROGS([PYTHON], [python3.5 python3.6 python3.7 python3.8 python3 python])
8686
AC_PATH_PROG(GENHTML, genhtml)
8787
AC_PATH_PROG([GIT], [git])
8888
AC_PATH_PROG(CCACHE,ccache)

depends/Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ BASE_CACHE ?= $(BASEDIR)/built
66
SDK_PATH ?= $(BASEDIR)/SDKs
77
NO_QT ?=
88
NO_WALLET ?=
9+
NO_ZMQ ?=
910
NO_UPNP ?=
1011
FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources
1112

@@ -14,7 +15,7 @@ HOST ?= $(BUILD)
1415
PATCHES_PATH = $(BASEDIR)/patches
1516
BASEDIR = $(CURDIR)
1617
HASH_LENGTH:=11
17-
DOWNLOAD_CONNECT_TIMEOUT:=10
18+
DOWNLOAD_CONNECT_TIMEOUT:=30
1819
DOWNLOAD_RETRIES:=3
1920
HOST_ID_SALT ?= salt
2021
BUILD_ID_SALT ?= salt
@@ -92,6 +93,7 @@ $(host_arch)_$(host_os)_id_string+=$(shell $(host_STRIP) --version 2>/dev/null)
9293
qt_packages_$(NO_QT) = $(qt_packages) $(qt_$(host_os)_packages) $(qt_$(host_arch)_$(host_os)_packages)
9394
wallet_packages_$(NO_WALLET) = $(wallet_packages)
9495
upnp_packages_$(NO_UPNP) = $(upnp_packages)
96+
zmq_packages_$(NO_ZMQ) = $(zmq_packages)
9597

9698
packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(qt_packages_) $(wallet_packages_) $(upnp_packages_)
9799
native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages)
@@ -100,6 +102,10 @@ ifneq ($(qt_packages_),)
100102
native_packages += $(qt_native_packages)
101103
endif
102104

105+
ifneq ($(zmq_packages_),)
106+
packages += $(zmq_packages)
107+
endif
108+
103109
all_packages = $(packages) $(native_packages)
104110

105111
meta_depends = Makefile funcs.mk builders/default.mk hosts/default.mk hosts/$(host_os).mk builders/$(build_os).mk
@@ -136,6 +142,7 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_
136142
-e 's|@LDFLAGS@|$(strip $(host_LDFLAGS) $(host_$(release_type)_LDFLAGS))|' \
137143
-e 's|@allow_host_packages@|$(ALLOW_HOST_PACKAGES)|' \
138144
-e 's|@no_qt@|$(NO_QT)|' \
145+
-e 's|@no_zmq@|$(NO_ZMQ)|' \
139146
-e 's|@no_wallet@|$(NO_WALLET)|' \
140147
-e 's|@no_upnp@|$(NO_UPNP)|' \
141148
-e 's|@debug@|$(DEBUG)|' \
@@ -185,4 +192,6 @@ download-win:
185192
@$(MAKE) -s HOST=x86_64-w64-mingw32 download-one
186193
download: download-osx download-linux download-win
187194

195+
$(foreach package,$(all_packages),$(eval $(call ext_add_stages,$(package))))
196+
188197
.PHONY: install cached clean clean-all download-one download-osx download-linux download-win download check-packages check-sources

depends/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ No other options are needed, the paths are automatically configured.
3434

3535
#### For macOS cross compilation
3636

37-
sudo apt-get install curl librsvg2-bin libtiff-tools bsdmainutils cmake imagemagick libcap-dev libz-dev libbz2-dev python-setuptools
37+
sudo apt-get install curl librsvg2-bin libtiff-tools bsdmainutils cmake imagemagick libcap-dev libz-dev libbz2-dev python3-setuptools
3838

3939
#### For Win32/Win64 cross compilation
4040

@@ -44,7 +44,7 @@ No other options are needed, the paths are automatically configured.
4444

4545
Common linux dependencies:
4646

47-
sudo apt-get install make automake cmake curl g++-multilib libtool binutils-gold bsdmainutils pkg-config python3
47+
sudo apt-get install make automake cmake curl g++-multilib libtool binutils-gold bsdmainutils pkg-config python3 patch
4848

4949
For linux ARM cross compilation:
5050

@@ -69,6 +69,7 @@ The following can be set when running make: make FOO=bar
6969
SDK_PATH: Path where sdk's can be found (used by macOS)
7070
FALLBACK_DOWNLOAD_PATH: If a source file can't be fetched, try here before giving up
7171
NO_QT: Don't download/build/cache qt and its dependencies
72+
NO_ZMQ: Don't download/build/cache packages needed for enabling zeromq
7273
NO_WALLET: Don't download/build/cache libs needed to enable the wallet
7374
NO_UPNP: Don't download/build/cache packages needed for enabling upnp
7475
DEBUG: disable some optimizations and enable more runtime checking

depends/builders/darwin.mk

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
build_darwin_CC: = $(shell xcrun -f clang)
2-
build_darwin_CXX: = $(shell xcrun -f clang++)
3-
build_darwin_AR: = $(shell xcrun -f ar)
4-
build_darwin_RANLIB: = $(shell xcrun -f ranlib)
5-
build_darwin_STRIP: = $(shell xcrun -f strip)
6-
build_darwin_OTOOL: = $(shell xcrun -f otool)
7-
build_darwin_NM: = $(shell xcrun -f nm)
1+
build_darwin_CC:=$(shell xcrun -f clang)
2+
build_darwin_CXX:=$(shell xcrun -f clang++)
3+
build_darwin_AR:=$(shell xcrun -f ar)
4+
build_darwin_RANLIB:=$(shell xcrun -f ranlib)
5+
build_darwin_STRIP:=$(shell xcrun -f strip)
6+
build_darwin_OTOOL:=$(shell xcrun -f otool)
7+
build_darwin_NM:=$(shell xcrun -f nm)
88
build_darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool)
9-
build_darwin_SHA256SUM = shasum -a 256
10-
build_darwin_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o
9+
build_darwin_SHA256SUM=shasum -a 256
10+
build_darwin_DOWNLOAD=curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o
1111

1212
#darwin host on darwin builder. overrides darwin host preferences.
1313
darwin_CC=$(shell xcrun -f clang) -mmacosx-version-min=$(OSX_MIN_VERSION)

depends/config.site.in

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ if test -z $with_gui && test -n "@no_qt@"; then
3333
with_gui=no
3434
fi
3535

36+
if test -z $enable_zmq && test -n "@no_zmq@"; then
37+
enable_zmq=no
38+
fi
39+
3640
if test x@host_os@ = xdarwin; then
3741
BREW=no
3842
PORT=no
@@ -67,7 +71,7 @@ fi
6771
if test -n "@CXX@" -a -z "${CXX}"; then
6872
CXX="@CXX@"
6973
fi
70-
PYTHONPATH=$depends_prefix/native/lib/python/dist-packages:$PYTHONPATH
74+
PYTHONPATH=$depends_prefix/native/lib/python3/dist-packages:$PYTHONPATH
7175

7276
if test -n "@AR@"; then
7377
AR=@AR@

depends/funcs.mk

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,9 @@ $(1)_download_path_fixed=$(subst :,\:,$$($(1)_download_path))
7676

7777

7878
#default commands
79+
# The default behavior for tar will try to set ownership when running as uid 0 and may not succeed, --no-same-owner disables this behavior
7980
$(1)_fetch_cmds ?= $(call fetch_file,$(1),$(subst \:,:,$$($(1)_download_path_fixed)),$$($(1)_download_file),$($(1)_file_name),$($(1)_sha256_hash))
80-
$(1)_extract_cmds ?= mkdir -p $$($(1)_extract_dir) && echo "$$($(1)_sha256_hash) $$($(1)_source)" > $$($(1)_extract_dir)/.$$($(1)_file_name).hash && $(build_SHA256SUM) -c $$($(1)_extract_dir)/.$$($(1)_file_name).hash && tar --strip-components=1 -xf $$($(1)_source)
81+
$(1)_extract_cmds ?= mkdir -p $$($(1)_extract_dir) && echo "$$($(1)_sha256_hash) $$($(1)_source)" > $$($(1)_extract_dir)/.$$($(1)_file_name).hash && $(build_SHA256SUM) -c $$($(1)_extract_dir)/.$$($(1)_file_name).hash && tar --no-same-owner --strip-components=1 -xf $$($(1)_source)
8182
$(1)_preprocess_cmds ?=
8283
$(1)_build_cmds ?=
8384
$(1)_config_cmds ?=
@@ -170,15 +171,15 @@ $($(1)_extracted): | $($(1)_fetched)
170171
$(AT)mkdir -p $$(@D)
171172
$(AT)cd $$(@D); $(call $(1)_extract_cmds,$(1))
172173
$(AT)touch $$@
173-
$($(1)_preprocessed): | $($(1)_dependencies) $($(1)_extracted)
174+
$($(1)_preprocessed): | $($(1)_extracted)
174175
$(AT)echo Preprocessing $(1)...
175176
$(AT)mkdir -p $$(@D) $($(1)_patch_dir)
176177
$(AT)$(foreach patch,$($(1)_patches),cd $(PATCHES_PATH)/$(1); cp $(patch) $($(1)_patch_dir) ;)
177178
$(AT)cd $$(@D); $(call $(1)_preprocess_cmds, $(1))
178179
$(AT)touch $$@
179-
$($(1)_configured): | $($(1)_preprocessed)
180+
$($(1)_configured): | $($(1)_dependencies) $($(1)_preprocessed)
180181
$(AT)echo Configuring $(1)...
181-
$(AT)rm -rf $(host_prefix); mkdir -p $(host_prefix)/lib; cd $(host_prefix); $(foreach package,$($(1)_all_dependencies), tar xf $($(package)_cached); )
182+
$(AT)rm -rf $(host_prefix); mkdir -p $(host_prefix)/lib; cd $(host_prefix); $(foreach package,$($(1)_all_dependencies), tar --no-same-owner -xf $($(package)_cached); )
182183
$(AT)mkdir -p $$(@D)
183184
$(AT)+cd $$(@D); $($(1)_config_env) $(call $(1)_config_cmds, $(1))
184185
$(AT)touch $$@
@@ -213,6 +214,14 @@ $(1): | $($(1)_cached_checksum)
213214

214215
endef
215216

217+
stages = fetched extracted preprocessed configured built staged postprocessed cached cached_checksum
218+
219+
define ext_add_stages
220+
$(foreach stage,$(stages),
221+
$(1)_$(stage): $($(1)_$(stage))
222+
.PHONY: $(1)_$(stage))
223+
endef
224+
216225
# These functions create the build targets for each package. They must be
217226
# broken down into small steps so that each part is done for all packages
218227
# before moving on to the next step. Otherwise, a package's info

depends/packages.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ Each package is required to define at least these variables:
1414
placeholder such as 1.0 can be used.
1515

1616
$(package)_download_path:
17-
Location of the upstream source, without the file-name. Usually http or
18-
ftp.
17+
Location of the upstream source, without the file-name. Usually http, https
18+
or ftp. Secure transmission options like https should be preferred if
19+
available.
1920

2021
$(package)_file_name:
2122
The upstream source filename available at the download path.

depends/packages/bdb.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package=bdb
22
$(package)_version=4.8.30
3-
$(package)_download_path=http://download.oracle.com/berkeley-db
3+
$(package)_download_path=https://download.oracle.com/berkeley-db
44
$(package)_file_name=db-$($(package)_version).NC.tar.gz
55
$(package)_sha256_hash=12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef
66
$(package)_build_subdir=build_unix
@@ -10,6 +10,7 @@ $(package)_config_opts=--disable-shared --enable-cxx --disable-replication
1010
$(package)_config_opts_mingw32=--enable-mingw
1111
$(package)_config_opts_linux=--with-pic
1212
$(package)_cxxflags=-std=c++11
13+
$(package)_cppflags_mingw32=-DUNICODE -D_UNICODE
1314
endef
1415

1516
define $(package)_preprocess_cmds

0 commit comments

Comments
 (0)