diff --git a/depends/Makefile b/depends/Makefile index eeb5fdd2..3d4d7f65 100644 --- a/depends/Makefile +++ b/depends/Makefile @@ -76,7 +76,7 @@ qt: $(qt_packages) $(qt_$(host_os)_packages) # Download-only: uses stage targets generated by funcs.mk .PHONY: download -download: $(addsuffix _fetched,$(all_packages)) +download: $(foreach p,$(all_packages),$($(p)_fetched)) # -------------------------------------------------------------------- # Beginner-friendly: populate depends/$(HOST)/ prefix from built cache @@ -105,19 +105,67 @@ install-prefix: $(packages) @{ \ echo "# Autoconf site defaults for Agrarian depends (generated)"; \ echo "depends_prefix='$(host_prefix)'"; \ + echo "cross_compiling=maybe"; \ + echo "host_alias='$(HOST)'"; \ + echo "ac_tool_prefix='$(HOST)-'"; \ echo "with_boost='$(host_prefix)'"; \ + echo "with_qt_plugindir='$(host_prefix)/plugins'"; \ + echo "with_qt_translationdir='$(host_prefix)/translations'"; \ + echo "with_qt_bindir='$(host_prefix)/native/bin'"; \ + echo "with_protoc_bindir='$(host_prefix)/native/bin'"; \ echo "CPPFLAGS='-I$(host_prefix)/include'"; \ echo "LDFLAGS='-L$(host_prefix)/lib'"; \ echo "BOOST_CPPFLAGS='-I$(host_prefix)/include'"; \ echo "BOOST_LDFLAGS='-L$(host_prefix)/lib'"; \ + echo "PATH=\"$(host_prefix)/native/bin:\$$PATH\""; \ echo "PKG_CONFIG='`which pkg-config` --static'"; \ echo "PKG_CONFIG_LIBDIR='$(host_prefix)/lib/pkgconfig:$(host_prefix)/share/pkgconfig'"; \ echo "PKG_CONFIG_PATH=\"$$PKG_CONFIG_LIBDIR\""; \ echo "export PKG_CONFIG_LIBDIR"; \ echo "export PKG_CONFIG_PATH"; \ + echo "export PKG_CONFIG"; \ echo "BDB_CFLAGS='-I$(host_prefix)/include'"; \ echo "BDB_LIBS='-L$(host_prefix)/lib -ldb_cxx-4.8 -ldb-4.8'"; \ } > "$(host_prefix)/share/config.site" + @# Ensure boost headers are available under include/boost for configure probes. + @set -euo pipefail; \ + if [[ ! -e "$(host_prefix)/include/boost" ]]; then \ + boost_inc="$$(ls -d "$(host_prefix)"/include/boost-* 2>/dev/null | sort -V | tail -n 1)"; \ + if [[ -n "$$boost_inc" && -d "$$boost_inc/boost" ]]; then \ + ln -sfn "$$(basename "$$boost_inc")/boost" "$(host_prefix)/include/boost"; \ + fi; \ + fi + @# If Boost emits versioned/-mt libs, create non-mt and unversioned symlinks. + @set -euo pipefail; \ + shopt -s nullglob; \ + for f in "$(host_prefix)"/lib/libboost_*-mt*; do \ + if [[ -f "$$f" || -L "$$f" ]]; then \ + base="$${f/-mt/}"; \ + if [[ "$$base" != "$$f" ]]; then \ + ln -sf "$$(basename "$$f")" "$$base"; \ + fi; \ + fi; \ + done + @set -euo pipefail; \ + shopt -s nullglob; \ + for f in "$(host_prefix)"/lib/libboost_*.a; do \ + name="$$(basename "$$f")"; \ + unversioned="$${name%%-gcc*}"; \ + if [[ "$$unversioned" != "$$name" ]]; then \ + if [[ ! -e "$(host_prefix)/lib/$$unversioned" ]]; then \ + ln -sf "$$name" "$(host_prefix)/lib/$$unversioned"; \ + fi; \ + fi; \ + done + @if [[ "$(NO_QT)" = "0" ]] && [[ "$(host_os)" = "linux" ]]; then \ + for pc in Qt5Core Qt5Gui Qt5Network Qt5Widgets; do \ + if [[ ! -f "$(host_prefix)/lib/pkgconfig/$${pc}.pc" ]] && [[ ! -f "$(host_prefix)/share/pkgconfig/$${pc}.pc" ]]; then \ + echo "ERROR: missing Qt pkg-config file for $${pc} under $(host_prefix)/(lib|share)/pkgconfig"; \ + echo "Fix: make -C $(BASEDIR) HOST=$(HOST) USE_WALLET=$(USE_WALLET)"; \ + exit 1; \ + fi; \ + done; \ + fi @echo "== Done." install-clean: diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index 4539370e..e5a47b97 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -10,7 +10,7 @@ $(package)_sha256_hash=7bcc5caace97baa948931d712ea5f37038dbb1c5d89b43ad4def4ed7c define $(package)_set_vars $(package)_config_opts_release=variant=release $(package)_config_opts_debug=variant=debug -$(package)_config_opts=--layout=system --user-config=user-config.jam +$(package)_config_opts=--layout=versioned --user-config=user-config.jam $(package)_config_opts+=threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1 $(package)_config_opts_linux=threadapi=pthread runtime-link=shared $(package)_config_opts_darwin=--toolset=darwin-4.2.1 runtime-link=shared