aboutsummaryrefslogtreecommitdiff
path: root/depends
diff options
context:
space:
mode:
Diffstat (limited to 'depends')
-rw-r--r--depends/config.site.in16
-rw-r--r--depends/packages/native_biplist.mk15
-rw-r--r--depends/packages/native_ds_store.mk5
-rw-r--r--depends/packages/packages.mk2
-rw-r--r--depends/packages/qt.mk51
-rw-r--r--depends/patches/qt/fix_mingw_cross_compile.patch25
-rw-r--r--depends/patches/qt/mac-qmake.conf4
7 files changed, 79 insertions, 39 deletions
diff --git a/depends/config.site.in b/depends/config.site.in
index 87a3379303..f4531830c8 100644
--- a/depends/config.site.in
+++ b/depends/config.site.in
@@ -1,4 +1,14 @@
-depends_prefix="`dirname ${ac_site_file}`/.."
+# shellcheck shell=sh disable=SC2034 # Many variables set will be used in
+ # ./configure but shellcheck doesn't know
+ # that, hence: disable=SC2034
+
+true # Dummy command because shellcheck treats all directives before first
+ # command as file-wide, and we only want to disable for one line.
+ #
+ # See: https://github.com/koalaman/shellcheck/wiki/Directive
+
+# shellcheck disable=SC2154
+depends_prefix="$(cd "$(dirname ${ac_site_file})/.." && pwd)"
cross_compiling=maybe
host_alias=@HOST@
@@ -50,7 +60,7 @@ if test x@host_os@ = xdarwin; then
fi
PATH=$depends_prefix/native/bin:$PATH
-PKG_CONFIG="`which pkg-config` --static"
+PKG_CONFIG="$(which pkg-config) --static"
# These two need to remain exported because pkg-config does not see them
# otherwise. That means they must be unexported at the end of configure.ac to
@@ -69,7 +79,7 @@ fi
if test -n "@CXX@" -a -z "${CXX}"; then
CXX="@CXX@"
fi
-PYTHONPATH=$depends_prefix/native/lib/python3/dist-packages:$PYTHONPATH
+PYTHONPATH="${depends_prefix}/native/lib/python3/dist-packages${PYTHONPATH:+${PATH_SEPARATOR}}${PYTHONPATH}"
if test -n "@AR@"; then
AR=@AR@
diff --git a/depends/packages/native_biplist.mk b/depends/packages/native_biplist.mk
deleted file mode 100644
index c3054cbd1a..0000000000
--- a/depends/packages/native_biplist.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-package=native_biplist
-$(package)_version=1.0.3
-$(package)_download_path=https://bitbucket.org/wooster/biplist/downloads
-$(package)_file_name=biplist-$($(package)_version).tar.gz
-$(package)_sha256_hash=4c0549764c5fe50b28042ec21aa2e14fe1a2224e239a1dae77d9e7f3932aa4c6
-$(package)_install_libdir=$(build_prefix)/lib/python3/dist-packages
-
-define $(package)_build_cmds
- python3 setup.py build
-endef
-
-define $(package)_stage_cmds
- mkdir -p $($(package)_install_libdir) && \
- python3 setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
-endef
diff --git a/depends/packages/native_ds_store.mk b/depends/packages/native_ds_store.mk
index f99b689ecd..44108925a4 100644
--- a/depends/packages/native_ds_store.mk
+++ b/depends/packages/native_ds_store.mk
@@ -1,10 +1,9 @@
package=native_ds_store
-$(package)_version=1.1.2
+$(package)_version=1.3.0
$(package)_download_path=https://github.com/al45tair/ds_store/archive/
$(package)_file_name=v$($(package)_version).tar.gz
-$(package)_sha256_hash=3b3ecb7bf0a5157f5b6010bc3af7c141fb0ad3527084e63336220d22744bc20c
+$(package)_sha256_hash=76b3280cd4e19e5179defa23fb594a9dd32643b0c80d774bd3108361d94fb46d
$(package)_install_libdir=$(build_prefix)/lib/python3/dist-packages
-$(package)_dependencies=native_biplist
define $(package)_build_cmds
python3 setup.py build
diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk
index 4627acb521..ca06b6dd7e 100644
--- a/depends/packages/packages.mk
+++ b/depends/packages/packages.mk
@@ -20,7 +20,7 @@ upnp_packages=miniupnpc
multiprocess_packages = libmultiprocess capnp
multiprocess_native_packages = native_libmultiprocess native_capnp
-darwin_native_packages = native_biplist native_ds_store native_mac_alias
+darwin_native_packages = native_ds_store native_mac_alias
ifneq ($(build_os),darwin)
darwin_native_packages += native_cctools native_cdrkit native_libdmg-hfsplus
diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk
index 083bc68d66..6c77dca8d5 100644
--- a/depends/packages/qt.mk
+++ b/depends/packages/qt.mk
@@ -12,6 +12,7 @@ $(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_configure_mac.patch
$(package)_patches+= fix_rcc_determinism.patch fix_riscv64_arch.patch xkb-default.patch no-xlib.patch
$(package)_patches+= fix_android_qmake_conf.patch fix_android_jni_static.patch dont_hardcode_pwd.patch
$(package)_patches+= freetype_back_compat.patch drop_lrelease_dependency.patch fix_powerpc_libpng.patch
+$(package)_patches+= fix_mingw_cross_compile.patch
# Update OSX_QT_TRANSLATIONS when this is updated
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
@@ -124,6 +125,7 @@ $(package)_config_opts_darwin += -device-option MAC_SDK_VERSION=$(OSX_SDK_VERSIO
$(package)_config_opts_darwin += -device-option CROSS_COMPILE="$(host)-"
$(package)_config_opts_darwin += -device-option MAC_MIN_VERSION=$(OSX_MIN_VERSION)
$(package)_config_opts_darwin += -device-option MAC_TARGET=$(host)
+$(package)_config_opts_darwin += -device-option XCODE_VERSION=$(XCODE_VERSION)
endif
$(package)_config_opts_linux = -qt-xkbcommon-x11
@@ -192,33 +194,52 @@ define $(package)_extract_cmds
tar --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttools_file_name) -C qttools
endef
+# Preprocessing steps work as follows:
+#
+# 1. Apply our patches to the extracted source. See each patch for more info.
+#
+# 2. Point to lrelease in qttools/bin/lrelease; otherwise Qt will look for it in
+# $(host)/native/bin/lrelease and not find it.
+#
+# 3. Create a macOS-Clang-Linux mkspec using our mac-qmake.conf.
+#
+# 4. After making a copy of the mkspec for the linux-arm-gnueabi host, named
+# bitcoin-linux-g++, replace instances of linux-arm-gnueabi with $(host). This
+# way we can generically support hosts like riscv64-linux-gnu, which Qt doesn't
+# ship a mkspec for. See it's usage in config_opts_* above.
+#
+# 5. Put our C, CXX and LD FLAGS into gcc-base.conf. Only used for non-host builds.
+#
+# 6. Do similar for the win32-g++ mkspec.
+#
+# 7. In clang.conf, swap out clang & clang++, for our compiler + flags. See #17466.
+#
+# 8. Adjust a regex in toolchain.prf, to accomodate Guix's usage of
+# CROSS_LIBRARY_PATH. See #15277.
define $(package)_preprocess_cmds
patch -p1 -i $($(package)_patch_dir)/freetype_back_compat.patch && \
patch -p1 -i $($(package)_patch_dir)/fix_powerpc_libpng.patch && \
- sed -i.old "s|updateqm.commands = \$$$$\$$$$LRELEASE|updateqm.commands = $($(package)_extract_dir)/qttools/bin/lrelease|" qttranslations/translations/translations.pro && \
patch -p1 -i $($(package)_patch_dir)/drop_lrelease_dependency.patch && \
- patch -p1 -i $($(package)_patch_dir)/dont_hardcode_pwd.patch &&\
+ patch -p1 -i $($(package)_patch_dir)/dont_hardcode_pwd.patch && \
+ patch -p1 -i $($(package)_patch_dir)/fix_qt_pkgconfig.patch && \
+ patch -p1 -i $($(package)_patch_dir)/fix_configure_mac.patch && \
+ patch -p1 -i $($(package)_patch_dir)/fix_no_printer.patch && \
+ patch -p1 -i $($(package)_patch_dir)/fix_rcc_determinism.patch && \
+ patch -p1 -i $($(package)_patch_dir)/xkb-default.patch && \
+ patch -p1 -i $($(package)_patch_dir)/fix_android_qmake_conf.patch && \
+ patch -p1 -i $($(package)_patch_dir)/fix_android_jni_static.patch && \
+ patch -p1 -i $($(package)_patch_dir)/fix_riscv64_arch.patch && \
+ patch -p1 -i $($(package)_patch_dir)/no-xlib.patch && \
+ patch -p1 -i $($(package)_patch_dir)/fix_mingw_cross_compile.patch && \
+ sed -i.old "s|updateqm.commands = \$$$$\$$$$LRELEASE|updateqm.commands = $($(package)_extract_dir)/qttools/bin/lrelease|" qttranslations/translations/translations.pro && \
mkdir -p qtbase/mkspecs/macx-clang-linux &&\
- cp -f qtbase/mkspecs/macx-clang/Info.plist.lib qtbase/mkspecs/macx-clang-linux/ &&\
- cp -f qtbase/mkspecs/macx-clang/Info.plist.app qtbase/mkspecs/macx-clang-linux/ &&\
cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\
cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \
cp -r qtbase/mkspecs/linux-arm-gnueabi-g++ qtbase/mkspecs/bitcoin-linux-g++ && \
sed -i.old "s/arm-linux-gnueabi-/$(host)-/g" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \
- patch -p1 -i $($(package)_patch_dir)/fix_qt_pkgconfig.patch &&\
- patch -p1 -i $($(package)_patch_dir)/fix_configure_mac.patch &&\
- patch -p1 -i $($(package)_patch_dir)/fix_no_printer.patch &&\
- patch -p1 -i $($(package)_patch_dir)/fix_rcc_determinism.patch &&\
- patch -p1 -i $($(package)_patch_dir)/xkb-default.patch &&\
- patch -p1 -i $($(package)_patch_dir)/fix_android_qmake_conf.patch &&\
- patch -p1 -i $($(package)_patch_dir)/fix_android_jni_static.patch &&\
echo "!host_build: QMAKE_CFLAGS += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
echo "!host_build: QMAKE_CXXFLAGS += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
echo "!host_build: QMAKE_LFLAGS += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
- patch -p1 -i $($(package)_patch_dir)/fix_riscv64_arch.patch &&\
- patch -p1 -i $($(package)_patch_dir)/no-xlib.patch &&\
- echo "QMAKE_LINK_OBJECT_MAX = 10" >> qtbase/mkspecs/win32-g++/qmake.conf &&\
- echo "QMAKE_LINK_OBJECT_SCRIPT = object_script" >> qtbase/mkspecs/win32-g++/qmake.conf &&\
sed -i.old "s|QMAKE_CFLAGS += |!host_build: QMAKE_CFLAGS = $($(package)_cflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \
sed -i.old "s|QMAKE_CXXFLAGS += |!host_build: QMAKE_CXXFLAGS = $($(package)_cxxflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \
sed -i.old "0,/^QMAKE_LFLAGS_/s|^QMAKE_LFLAGS_|!host_build: QMAKE_LFLAGS = $($(package)_ldflags)\n&|" qtbase/mkspecs/win32-g++/qmake.conf && \
diff --git a/depends/patches/qt/fix_mingw_cross_compile.patch b/depends/patches/qt/fix_mingw_cross_compile.patch
new file mode 100644
index 0000000000..67f76f1d85
--- /dev/null
+++ b/depends/patches/qt/fix_mingw_cross_compile.patch
@@ -0,0 +1,25 @@
+commit 5a992a549adfe5a587bbcd6cd2b2cee47d236e27
+Author: fanquake <fanquake@gmail.com>
+Date: Fri Sep 4 08:13:44 2020 +0800
+
+ Work around broken mingw cross-compilation
+
+ See upstream issues:
+ https://bugreports.qt.io/browse/QTBUG-63637
+ https://bugreports.qt.io/browse/QTBUG-63659
+ https://codereview.qt-project.org/q/8bebded9
+
+ We should be able to drop this once we are building qt 5.10.1 or later.
+
+ Added in #12971.
+
+diff --git a/qtbase/mkspecs/win32-g++/qmake.conf b/qtbase/mkspecs/win32-g++/qmake.conf
+index e071a0d1..ad229b10 100644
+--- a/qtbase/mkspecs/win32-g++/qmake.conf
++++ b/qtbase/mkspecs/win32-g++/qmake.conf
+@@ -87,3 +87,5 @@ QMAKE_NM = $${CROSS_COMPILE}nm -P
+ include(../common/angle.conf)
+
+ load(qt_config)
++QMAKE_LINK_OBJECT_MAX = 10
++QMAKE_LINK_OBJECT_SCRIPT = object_script
diff --git a/depends/patches/qt/mac-qmake.conf b/depends/patches/qt/mac-qmake.conf
index 4cd96df29f..0142667547 100644
--- a/depends/patches/qt/mac-qmake.conf
+++ b/depends/patches/qt/mac-qmake.conf
@@ -1,12 +1,12 @@
MAKEFILE_GENERATOR = UNIX
-CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname absolute_library_soname
+CONFIG += app_bundle incremental lib_version_first absolute_library_soname
QMAKE_INCREMENTAL_STYLE = sublib
include(../common/macx.conf)
include(../common/gcc-base-mac.conf)
include(../common/clang.conf)
include(../common/clang-mac.conf)
QMAKE_MAC_SDK_PATH=$${MAC_SDK_PATH}
-QMAKE_XCODE_VERSION=4.3
+QMAKE_XCODE_VERSION = $${XCODE_VERSION}
QMAKE_XCODE_DEVELOPER_PATH=/Developer
QMAKE_MACOSX_DEPLOYMENT_TARGET = $${MAC_MIN_VERSION}
QMAKE_MAC_SDK=macosx