aboutsummaryrefslogtreecommitdiff
path: root/depends
diff options
context:
space:
mode:
Diffstat (limited to 'depends')
-rw-r--r--depends/Makefile2
-rw-r--r--depends/README.md5
-rw-r--r--depends/funcs.mk22
-rw-r--r--depends/hosts/openbsd.mk10
-rw-r--r--depends/packages/libevent.mk3
-rw-r--r--depends/packages/libmultiprocess.mk2
-rw-r--r--depends/packages/native_libmultiprocess.mk2
-rw-r--r--depends/packages/qt.mk33
-rw-r--r--depends/patches/qt/dont_use_avx_android_x86_64.patch32
-rw-r--r--depends/patches/qt/duplicate_lcqpafonts.patch104
-rw-r--r--depends/patches/qt/fix_android_jni_static.patch2
-rw-r--r--depends/patches/qt/fix_bigsur_style.patch90
-rw-r--r--depends/patches/qt/fix_limits_header.patch49
-rw-r--r--depends/patches/qt/fix_no_printer.patch19
-rw-r--r--depends/patches/qt/mac-qmake.conf2
-rw-r--r--depends/patches/qt/use_android_ndk23.patch2
16 files changed, 162 insertions, 217 deletions
diff --git a/depends/Makefile b/depends/Makefile
index 723509c81d..b901533786 100644
--- a/depends/Makefile
+++ b/depends/Makefile
@@ -271,7 +271,7 @@ clean-all: clean
@rm -rf $(SOURCES_PATH) x86_64* i686* mips* arm* aarch64* powerpc* riscv32* riscv64* s390x*
clean:
- @rm -rf $(WORK_PATH) $(BASE_CACHE) $(BUILD)
+ @rm -rf $(WORK_PATH) $(BASE_CACHE) $(BUILD) *.log
install: check-packages $(host_prefix)/share/config.site
diff --git a/depends/README.md b/depends/README.md
index f7647198c6..da2a74e0e7 100644
--- a/depends/README.md
+++ b/depends/README.md
@@ -113,7 +113,10 @@ The following can be set when running make: `make FOO=bar`
- `BUILD_ID_SALT`: Optional salt to use when generating build package ids
- `FORCE_USE_SYSTEM_CLANG`: (EXPERTS ONLY) When cross-compiling for macOS, use Clang found in the
system's `$PATH` rather than the default prebuilt release of Clang
- from llvm.org. Clang 8 or later is required.
+ from llvm.org. Clang 8 or later is required
+- `LOG`: Use file-based logging for individual packages. During a package build its log file
+ resides in the `depends` directory, and the log file is printed out automatically in case
+ of build error. After successful build log files are moved along with package archives
If some packages are not built, for example `make NO_WALLET=1`, the appropriate
options will be passed to bitcoin's configure. In this case, `--disable-wallet`.
diff --git a/depends/funcs.mk b/depends/funcs.mk
index c4ad109c69..75fa1ed43f 100644
--- a/depends/funcs.mk
+++ b/depends/funcs.mk
@@ -67,6 +67,7 @@ $(1)_cached_checksum:=$(BASE_CACHE)/$(host)/$(1)/$(1)-$($(1)_version)-$($(1)_bui
$(1)_patch_dir:=$(base_build_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id)/.patches-$($(1)_build_id)
$(1)_prefixbin:=$($($(1)_type)_prefix)/bin/
$(1)_cached:=$(BASE_CACHE)/$(host)/$(1)/$(1)-$($(1)_version)-$($(1)_build_id).tar.gz
+$(1)_build_log:=$(BASEDIR)/$(1)-$($(1)_version)-$($(1)_build_id).log
$(1)_all_sources=$($(1)_file_name) $($(1)_extra_sources)
#stamps
@@ -85,7 +86,7 @@ $(1)_download_path_fixed=$(subst :,\:,$$($(1)_download_path))
# 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
$(1)_fetch_cmds ?= $(call fetch_file,$(1),$(subst \:,:,$$($(1)_download_path_fixed)),$$($(1)_download_file),$($(1)_file_name),$($(1)_sha256_hash))
$(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 && $(build_TAR) --no-same-owner --strip-components=1 -xf $$($(1)_source)
-$(1)_preprocess_cmds ?=
+$(1)_preprocess_cmds ?= true
$(1)_build_cmds ?=
$(1)_config_cmds ?=
$(1)_stage_cmds ?=
@@ -187,44 +188,48 @@ endif
endef
define int_add_cmds
+ifneq ($(LOG),)
+$(1)_logging = >>$$($(1)_build_log) 2>&1 || { if test -f $$($(1)_build_log); then cat $$($(1)_build_log); fi; exit 1; }
+endif
+
$($(1)_fetched):
mkdir -p $$(@D) $(SOURCES_PATH)
rm -f $$@
touch $$@
- cd $$(@D); $(call $(1)_fetch_cmds,$(1))
+ cd $$(@D); $($(1)_fetch_cmds)
cd $($(1)_source_dir); $(foreach source,$($(1)_all_sources),$(build_SHA256SUM) $(source) >> $$(@);)
touch $$@
$($(1)_extracted): | $($(1)_fetched)
echo Extracting $(1)...
mkdir -p $$(@D)
- cd $$(@D); $(call $(1)_extract_cmds,$(1))
+ cd $$(@D); $($(1)_extract_cmds)
touch $$@
$($(1)_preprocessed): | $($(1)_extracted)
echo Preprocessing $(1)...
mkdir -p $$(@D) $($(1)_patch_dir)
$(foreach patch,$($(1)_patches),cd $(PATCHES_PATH)/$(1); cp $(patch) $($(1)_patch_dir) ;)
- cd $$(@D); $(call $(1)_preprocess_cmds, $(1))
+ { cd $$(@D); $($(1)_preprocess_cmds); } $$($(1)_logging)
touch $$@
$($(1)_configured): | $($(1)_dependencies) $($(1)_preprocessed)
echo Configuring $(1)...
rm -rf $(host_prefix); mkdir -p $(host_prefix)/lib; cd $(host_prefix); $(foreach package,$($(1)_all_dependencies), $(build_TAR) --no-same-owner -xf $($(package)_cached); )
mkdir -p $$(@D)
- +cd $$(@D); $($(1)_config_env) $(call $(1)_config_cmds, $(1))
+ +{ cd $$(@D); $($(1)_config_env) $($(1)_config_cmds); } $$($(1)_logging)
touch $$@
$($(1)_built): | $($(1)_configured)
echo Building $(1)...
mkdir -p $$(@D)
- +cd $$(@D); $($(1)_build_env) $(call $(1)_build_cmds, $(1))
+ +{ cd $$(@D); $($(1)_build_env) $($(1)_build_cmds); } $$($(1)_logging)
touch $$@
$($(1)_staged): | $($(1)_built)
echo Staging $(1)...
mkdir -p $($(1)_staging_dir)/$(host_prefix)
- cd $($(1)_build_dir); $($(1)_stage_env) $(call $(1)_stage_cmds, $(1))
+ +{ cd $($(1)_build_dir); $($(1)_stage_env) $($(1)_stage_cmds); } $$($(1)_logging)
rm -rf $($(1)_extract_dir)
touch $$@
$($(1)_postprocessed): | $($(1)_staged)
echo Postprocessing $(1)...
- cd $($(1)_staging_prefix_dir); $(call $(1)_postprocess_cmds)
+ cd $($(1)_staging_prefix_dir); $($(1)_postprocess_cmds)
touch $$@
$($(1)_cached): | $($(1)_dependencies) $($(1)_postprocessed)
echo Caching $(1)...
@@ -233,6 +238,7 @@ $($(1)_cached): | $($(1)_dependencies) $($(1)_postprocessed)
rm -rf $$(@D) && mkdir -p $$(@D)
mv $$($(1)_staging_dir)/$$(@F) $$(@)
rm -rf $($(1)_staging_dir)
+ if test -f $($(1)_build_log); then mv $($(1)_build_log) $$(@D); fi
$($(1)_cached_checksum): $($(1)_cached)
cd $$(@D); $(build_SHA256SUM) $$(<F) > $$(@)
diff --git a/depends/hosts/openbsd.mk b/depends/hosts/openbsd.mk
index dc8393e04c..5988f24bff 100644
--- a/depends/hosts/openbsd.mk
+++ b/depends/hosts/openbsd.mk
@@ -1,11 +1,11 @@
openbsd_CFLAGS=-pipe
-openbsd_CFLAGS_CXXFLAGS=$(openbsd_CFLAGS)
+openbsd_CXXFLAGS=$(openbsd_CFLAGS)
-openbsd_CFLAGS_release_CFLAGS=-O2
-openbsd_CFLAGS_release_CXXFLAGS=$(openbsd_release_CFLAGS)
+openbsd_release_CFLAGS=-O2
+openbsd_release_CXXFLAGS=$(openbsd_release_CFLAGS)
-openbsd_CFLAGS_debug_CFLAGS=-O1
-openbsd_CFLAGS_debug_CXXFLAGS=$(openbsd_debug_CFLAGS)
+openbsd_debug_CFLAGS=-O1
+openbsd_debug_CXXFLAGS=$(openbsd_debug_CFLAGS)
ifeq (86,$(findstring 86,$(build_arch)))
i686_openbsd_CC=clang -m32
diff --git a/depends/packages/libevent.mk b/depends/packages/libevent.mk
index 748ed510c1..1efe6220d3 100644
--- a/depends/packages/libevent.mk
+++ b/depends/packages/libevent.mk
@@ -36,5 +36,6 @@ define $(package)_stage_cmds
endef
define $(package)_postprocess_cmds
- rm lib/*.la
+ rm lib/*.la && \
+ rm include/ev*.h
endef
diff --git a/depends/packages/libmultiprocess.mk b/depends/packages/libmultiprocess.mk
index 40ab3c68ea..864e33bc9a 100644
--- a/depends/packages/libmultiprocess.mk
+++ b/depends/packages/libmultiprocess.mk
@@ -6,7 +6,7 @@ $(package)_sha256_hash=$(native_$(package)_sha256_hash)
$(package)_dependencies=native_$(package) capnp
define $(package)_config_cmds
- $($(package)_cmake)
+ $($(package)_cmake) .
endef
define $(package)_build_cmds
diff --git a/depends/packages/native_libmultiprocess.mk b/depends/packages/native_libmultiprocess.mk
index 14653ce9fb..6e600c5720 100644
--- a/depends/packages/native_libmultiprocess.mk
+++ b/depends/packages/native_libmultiprocess.mk
@@ -6,7 +6,7 @@ $(package)_sha256_hash=9f8b055c8bba755dc32fe799b67c20b91e7b13e67cadafbc54c0f1def
$(package)_dependencies=native_capnp
define $(package)_config_cmds
- $($(package)_cmake)
+ $($(package)_cmake) .
endef
define $(package)_build_cmds
diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk
index 9cdfd21d2c..2bc3a81430 100644
--- a/depends/packages/qt.mk
+++ b/depends/packages/qt.mk
@@ -1,25 +1,32 @@
package=qt
-$(package)_version=5.15.2
+$(package)_version=5.15.3
$(package)_download_path=https://download.qt.io/official_releases/qt/5.15/$($(package)_version)/submodules
-$(package)_suffix=everywhere-src-$($(package)_version).tar.xz
+$(package)_suffix=everywhere-opensource-src-$($(package)_version).tar.xz
$(package)_file_name=qtbase-$($(package)_suffix)
-$(package)_sha256_hash=909fad2591ee367993a75d7e2ea50ad4db332f05e1c38dd7a5a274e156a4e0f8
+$(package)_sha256_hash=26394ec9375d52c1592bd7b689b1619c6b8dbe9b6f91fdd5c355589787f3a0b6
$(package)_linux_dependencies=freetype fontconfig libxcb libxkbcommon libxcb_util libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm
$(package)_qt_libs=corelib network widgets gui plugins testlib
$(package)_linguist_tools = lrelease lupdate lconvert
-$(package)_patches = qt.pro qttools_src.pro
-$(package)_patches += fix_qt_pkgconfig.patch mac-qmake.conf fix_no_printer.patch no-xlib.patch
-$(package)_patches += dont_use_avx_android_x86_64.patch dont_hardcode_x86_64.patch fix_montery_include.patch
-$(package)_patches += fix_android_jni_static.patch dont_hardcode_pwd.patch
-$(package)_patches += qtbase-moc-ignore-gcc-macro.patch fix_limits_header.patch
-$(package)_patches += fix_bigsur_style.patch use_android_ndk23.patch
+$(package)_patches = qt.pro
+$(package)_patches += qttools_src.pro
+$(package)_patches += mac-qmake.conf
+$(package)_patches += fix_qt_pkgconfig.patch
+$(package)_patches += no-xlib.patch
+$(package)_patches += dont_hardcode_x86_64.patch
+$(package)_patches += fix_montery_include.patch
+$(package)_patches += fix_android_jni_static.patch
+$(package)_patches += dont_hardcode_pwd.patch
+$(package)_patches += qtbase-moc-ignore-gcc-macro.patch
+$(package)_patches += fix_limits_header.patch
+$(package)_patches += use_android_ndk23.patch
$(package)_patches += rcc_hardcode_timestamp.patch
+$(package)_patches += duplicate_lcqpafonts.patch
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
-$(package)_qttranslations_sha256_hash=d5788e86257b21d5323f1efd94376a213e091d1e5e03b45a95dd052b5f570db8
+$(package)_qttranslations_sha256_hash=5d7869f670a135ad0986e266813b9dd5bbae2b09577338f9cdf8904d4af52db0
$(package)_qttools_file_name=qttools-$($(package)_suffix)
-$(package)_qttools_sha256_hash=c189d0ce1ff7c739db9a3ace52ac3e24cb8fd6dbf234e49f075249b38f43c1cc
+$(package)_qttools_sha256_hash=463b2fe71a085e7ab4e39333ae360ab0ec857b966d7a08f752c427e5df55f90d
$(package)_extra_sources = $($(package)_qttranslations_file_name)
$(package)_extra_sources += $($(package)_qttools_file_name)
@@ -232,17 +239,15 @@ define $(package)_preprocess_cmds
cp $($(package)_patch_dir)/qttools_src.pro qttools/src/src.pro && \
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_no_printer.patch && \
patch -p1 -i $($(package)_patch_dir)/fix_android_jni_static.patch && \
patch -p1 -i $($(package)_patch_dir)/no-xlib.patch && \
- patch -p1 -i $($(package)_patch_dir)/dont_use_avx_android_x86_64.patch && \
patch -p1 -i $($(package)_patch_dir)/dont_hardcode_x86_64.patch && \
patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \
patch -p1 -i $($(package)_patch_dir)/fix_limits_header.patch && \
patch -p1 -i $($(package)_patch_dir)/fix_montery_include.patch && \
- patch -p1 -i $($(package)_patch_dir)/fix_bigsur_style.patch && \
patch -p1 -i $($(package)_patch_dir)/use_android_ndk23.patch && \
patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch && \
+ patch -p1 -i $($(package)_patch_dir)/duplicate_lcqpafonts.patch && \
mkdir -p 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 && \
diff --git a/depends/patches/qt/dont_use_avx_android_x86_64.patch b/depends/patches/qt/dont_use_avx_android_x86_64.patch
deleted file mode 100644
index b12ac8f4d0..0000000000
--- a/depends/patches/qt/dont_use_avx_android_x86_64.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Android: don't use avx and avx2 when building for Android x86_64
-
-AVX and AVX2 are not supported on x86_64 ABI.
-See:
- - https://developer.android.com/ndk/guides/abis#86-64
- - https://bugreports.qt.io/browse/QTBUG-86785
-
-Upstream commits:
- - Qt 6.0: ff1a44be33f4bc05d502a2ca49171e0408992f61
- - Qt 5.15: 8b2cc0f6deb038a4c9d4f0d9b690c7726bd809a9
-
-
---- old/qtbase/configure.json
-+++ new/qtbase/configure.json
-@@ -1098,7 +1098,7 @@
- },
- "avx": {
- "label": "AVX",
-- "condition": "features.sse4_2 && tests.avx",
-+ "condition": "features.sse4_2 && tests.avx && (!config.android || !arch.x86_64)",
- "output": [
- "privateConfig",
- { "type": "define", "name": "QT_COMPILER_SUPPORTS_AVX", "value": 1 }
-@@ -1114,7 +1114,7 @@
- },
- "avx2": {
- "label": "AVX2",
-- "condition": "features.avx && tests.avx2",
-+ "condition": "features.avx && tests.avx2 && (!config.android || !arch.x86_64)",
- "output": [
- "privateConfig",
- "privateFeature",
diff --git a/depends/patches/qt/duplicate_lcqpafonts.patch b/depends/patches/qt/duplicate_lcqpafonts.patch
new file mode 100644
index 0000000000..c460b51dcf
--- /dev/null
+++ b/depends/patches/qt/duplicate_lcqpafonts.patch
@@ -0,0 +1,104 @@
+QtGui: Fix duplication of logging category lcQpaFonts
+
+Move it to qplatformfontdatabase.h.
+
+Upstream commit:
+ - Qt 6.0: ab01885e48873fb2ad71841a3f1627fe4d9cd835
+
+--- a/qtbase/src/gui/text/qplatformfontdatabase.cpp
++++ b/qtbase/src/gui/text/qplatformfontdatabase.cpp
+@@ -52,6 +52,8 @@
+
+ QT_BEGIN_NAMESPACE
+
++Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts")
++
+ void qt_registerFont(const QString &familyname, const QString &stylename,
+ const QString &foundryname, int weight,
+ QFont::Style style, int stretch, bool antialiased,
+
+--- a/qtbase/src/gui/text/qplatformfontdatabase.h
++++ b/qtbase/src/gui/text/qplatformfontdatabase.h
+@@ -50,6 +50,7 @@
+ //
+
+ #include <QtGui/qtguiglobal.h>
++#include <QtCore/qloggingcategory.h>
+ #include <QtCore/QString>
+ #include <QtCore/QStringList>
+ #include <QtCore/QList>
+@@ -62,6 +63,7 @@
+
+ QT_BEGIN_NAMESPACE
+
++Q_DECLARE_LOGGING_CATEGORY(lcQpaFonts)
+
+ class QWritingSystemsPrivate;
+
+
+--- a/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
++++ b/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
+@@ -86,8 +86,6 @@
+
+ QT_BEGIN_NAMESPACE
+
+-Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts")
+-
+ static float SYNTHETIC_ITALIC_SKEW = std::tan(14.f * std::acos(0.f) / 90.f);
+
+ bool QCoreTextFontEngine::ct_getSfntTable(void *user_data, uint tag, uchar *buffer, uint *length)
+
+--- a/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
++++ b/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
+@@ -64,8 +64,6 @@
+
+ QT_BEGIN_NAMESPACE
+
+-Q_DECLARE_LOGGING_CATEGORY(lcQpaFonts)
+-
+ class QCoreTextFontEngine : public QFontEngine
+ {
+ Q_GADGET
+
+--- a/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp
++++ b/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp
+@@ -68,8 +68,6 @@
+
+ QT_BEGIN_NAMESPACE
+
+-Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts")
+-
+ #ifndef QT_NO_DIRECTWRITE
+ // ### fixme: Consider direct linking of dwrite.dll once Windows Vista pre SP2 is dropped (QTBUG-49711)
+
+
+--- a/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h
++++ b/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h
+@@ -63,8 +63,6 @@
+
+ QT_BEGIN_NAMESPACE
+
+-Q_DECLARE_LOGGING_CATEGORY(lcQpaFonts)
+-
+ class QWindowsFontEngineData
+ {
+ Q_DISABLE_COPY_MOVE(QWindowsFontEngineData)
+
+--- a/qtbase/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
++++ b/qtbase/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
+@@ -40,6 +40,7 @@
+ #include "qgenericunixthemes_p.h"
+
+ #include "qpa/qplatformtheme_p.h"
++#include "qpa/qplatformfontdatabase.h"
+
+ #include <QtGui/QPalette>
+ #include <QtGui/QFont>
+@@ -76,7 +77,6 @@
+ QT_BEGIN_NAMESPACE
+
+ Q_DECLARE_LOGGING_CATEGORY(qLcTray)
+-Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts")
+
+ ResourceHelper::ResourceHelper()
+ {
diff --git a/depends/patches/qt/fix_android_jni_static.patch b/depends/patches/qt/fix_android_jni_static.patch
index bb64661761..22a4d5ab0e 100644
--- a/depends/patches/qt/fix_android_jni_static.patch
+++ b/depends/patches/qt/fix_android_jni_static.patch
@@ -1,6 +1,6 @@
--- old/qtbase/src/plugins/platforms/android/androidjnimain.cpp
+++ new/qtbase/src/plugins/platforms/android/androidjnimain.cpp
-@@ -914,6 +914,14 @@ Q_DECL_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void */*reserved*/)
+@@ -934,6 +934,14 @@ Q_DECL_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void */*reserved*/)
__android_log_print(ANDROID_LOG_FATAL, "Qt", "registerNatives failed");
return -1;
}
diff --git a/depends/patches/qt/fix_bigsur_style.patch b/depends/patches/qt/fix_bigsur_style.patch
deleted file mode 100644
index 0f6c848bb0..0000000000
--- a/depends/patches/qt/fix_bigsur_style.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-Fix rendering in macOS BigSur
-
-See: https://bugreports.qt.io/browse/QTBUG-86513.
-
-Upstream commits (combined in this patch):
- - Qt 6.0: 40fb97e97f550b8afd13ecc3a038d9d0c2d82bbb
- - Qt 6.0: 3857f104cac127f62e64e55a20613f0ac2e6b843
- - Qt 6.1: abee4cdd5925a8513f51784754fca8fa35031732
-
---- old/qtbase/src/plugins/styles/mac/qmacstyle_mac.mm
-+++ new/qtbase/src/plugins/styles/mac/qmacstyle_mac.mm
-@@ -3870,6 +3870,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
- const auto cs = d->effectiveAquaSizeConstrain(opt, w);
- // Extra hacks to get the proper pressed appreance when not selected or selected and inactive
- const bool needsInactiveHack = (!isActive && isSelected);
-+ const bool isBigSurOrAbove = QOperatingSystemVersion::current() >= QOperatingSystemVersion::MacOSBigSur;
- const auto ct = !needsInactiveHack && (isSelected || tp == QStyleOptionTab::OnlyOneTab) ?
- QMacStylePrivate::Button_PushButton :
- QMacStylePrivate::Button_PopupButton;
-@@ -3878,6 +3879,12 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
- auto *pb = static_cast<NSButton *>(d->cocoaControl(cw));
-
- auto vOffset = isPopupButton ? 1 : 2;
-+ if (isBigSurOrAbove) {
-+ // Make it 1, otherwise, offset is very visible compared
-+ // to selected tab (which is not a popup button).
-+ vOffset = 1;
-+ }
-+
- if (tabDirection == QMacStylePrivate::East)
- vOffset -= 1;
- const auto outerAdjust = isPopupButton ? 1 : 4;
-@@ -3894,9 +3901,22 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
- frameRect = frameRect.adjusted(-innerAdjust, 0, outerAdjust, 0);
- else
- frameRect = frameRect.adjusted(-outerAdjust, 0, innerAdjust, 0);
-+
-+ if (isSelected && isBigSurOrAbove) {
-+ // 1 pixed of 'roundness' is still visible on the right
-+ // (the left is OK, it's rounded).
-+ frameRect = frameRect.adjusted(0, 0, 1, 0);
-+ }
-+
- break;
- case QStyleOptionTab::Middle:
- frameRect = frameRect.adjusted(-innerAdjust, 0, innerAdjust, 0);
-+
-+ if (isSelected && isBigSurOrAbove) {
-+ // 1 pixel of 'roundness' is still visible on both
-+ // sides - left and right.
-+ frameRect = frameRect.adjusted(-1, 0, 1, 0);
-+ }
- break;
- case QStyleOptionTab::End:
- // Pressed state hack: tweak adjustments in preparation for flip below
-@@ -3904,6 +3924,11 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
- frameRect = frameRect.adjusted(-innerAdjust, 0, outerAdjust, 0);
- else
- frameRect = frameRect.adjusted(-outerAdjust, 0, innerAdjust, 0);
-+
-+ if (isSelected && isBigSurOrAbove) {
-+ // 1 pixel of 'roundness' is still visible on the left.
-+ frameRect = frameRect.adjusted(-1, 0, 0, 0);
-+ }
- break;
- case QStyleOptionTab::OnlyOneTab:
- frameRect = frameRect.adjusted(-outerAdjust, 0, outerAdjust, 0);
-@@ -3951,7 +3976,10 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
- NSPopUpArrowPosition oldPosition = NSPopUpArrowAtCenter;
- NSPopUpButtonCell *pbCell = nil;
- auto rAdjusted = r;
-- if (isPopupButton && tp == QStyleOptionTab::OnlyOneTab) {
-+ if (isPopupButton && (tp == QStyleOptionTab::OnlyOneTab || isBigSurOrAbove)) {
-+ // Note: starting from macOS BigSur NSPopupButton has this
-+ // arrow 'button' in a different place and it became
-+ // quite visible 'in between' inactive tabs.
- pbCell = static_cast<NSPopUpButtonCell *>(pb.cell);
- oldPosition = pbCell.arrowPosition;
- pbCell.arrowPosition = NSPopUpNoArrow;
-@@ -3959,6 +3987,10 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
- // NSPopUpButton in this state is smaller.
- rAdjusted.origin.x -= 3;
- rAdjusted.size.width += 6;
-+ if (isBigSurOrAbove) {
-+ if (tp == QStyleOptionTab::End)
-+ rAdjusted.origin.x -= 2;
-+ }
- }
- }
-
diff --git a/depends/patches/qt/fix_limits_header.patch b/depends/patches/qt/fix_limits_header.patch
index cb5a8cd1b5..258128c0ca 100644
--- a/depends/patches/qt/fix_limits_header.patch
+++ b/depends/patches/qt/fix_limits_header.patch
@@ -1,46 +1,9 @@
Fix compiling with GCC 11
-See: https://bugreports.qt.io/browse/QTBUG-90395.
+Upstream:
+ - bug report: https://bugreports.qt.io/browse/QTBUG-89977
+ - fix in Qt 6.1: 813a928c7c3cf98670b6043149880ed5c955efb9
-Upstream commits:
- - Qt 5.15 -- unavailable as open source
- - Qt 6.0: b2af6332ea37e45ab230a7a5d2d278f86d961b83
- - Qt 6.1: 9c56d4da2ff631a8c1c30475bd792f6c86bda53c
-
---- old/qtbase/src/corelib/global/qendian.h
-+++ new/qtbase/src/corelib/global/qendian.h
-@@ -44,6 +44,8 @@
- #include <QtCore/qfloat16.h>
- #include <QtCore/qglobal.h>
-
-+#include <limits>
-+
- // include stdlib.h and hope that it defines __GLIBC__ for glibc-based systems
- #include <stdlib.h>
- #include <string.h>
-
---- old/qtbase/src/corelib/global/qfloat16.h
-+++ new/qtbase/src/corelib/global/qfloat16.h
-@@ -43,6 +43,7 @@
-
- #include <QtCore/qglobal.h>
- #include <QtCore/qmetatype.h>
-+#include <limits>
- #include <string.h>
-
- #if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && !defined(__F16C__)
-
---- old/qtbase/src/tools/moc/generator.cpp
-+++ new/qtbase/src/tools/moc/generator.cpp
-@@ -40,6 +40,8 @@
- #include <QtCore/qplugin.h>
- #include <QtCore/qstringview.h>
-
-+#include <limits>
-+
- #include <math.h>
- #include <stdio.h>
-
--- old/qtbase/src/corelib/text/qbytearraymatcher.h
+++ new/qtbase/src/corelib/text/qbytearraymatcher.h
@@ -42,6 +42,8 @@
@@ -52,6 +15,12 @@ Upstream commits:
QT_BEGIN_NAMESPACE
+
+Upstream fix and backports:
+ - Qt 6.1: 3eab20ad382569cb2c9e6ccec2322c3d08c0f716
+ - Qt 6.2: 380294a5971da85010a708dc23b0edec192cbf27
+ - Qt 6.3: 2b2b3155d9f6ba1e4f859741468fbc47db09292b
+
--- old/qtbase/src/corelib/tools/qoffsetstringarray_p.h
+++ new/qtbase/src/corelib/tools/qoffsetstringarray_p.h
@@ -55,6 +55,7 @@
diff --git a/depends/patches/qt/fix_no_printer.patch b/depends/patches/qt/fix_no_printer.patch
deleted file mode 100644
index 1372356138..0000000000
--- a/depends/patches/qt/fix_no_printer.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- x/qtbase/src/plugins/platforms/cocoa/qprintengine_mac_p.h
-+++ y/qtbase/src/plugins/platforms/cocoa/qprintengine_mac_p.h
-@@ -52,6 +52,7 @@
- //
-
- #include <QtCore/qglobal.h>
-+#include <qpa/qplatformprintdevice.h>
-
- #ifndef QT_NO_PRINTER
-
---- x/qtbase/src/plugins/plugins.pro
-+++ y/qtbase/src/plugins/plugins.pro
-@@ -9,6 +9,3 @@ qtHaveModule(gui) {
- !android:qtConfig(library): SUBDIRS *= generic
- }
- qtHaveModule(widgets): SUBDIRS += styles
--
--!winrt:qtHaveModule(printsupport): \
-- SUBDIRS += printsupport
diff --git a/depends/patches/qt/mac-qmake.conf b/depends/patches/qt/mac-qmake.conf
index e4bfaa1463..543407f853 100644
--- a/depends/patches/qt/mac-qmake.conf
+++ b/depends/patches/qt/mac-qmake.conf
@@ -19,6 +19,4 @@ QMAKE_MAC_SDK.macosx.PlatformPath = /phony
!host_build: QMAKE_LFLAGS += -target $${MAC_TARGET}
QMAKE_AR = $${CROSS_COMPILE}ar cq
QMAKE_RANLIB=$${CROSS_COMPILE}ranlib
-QMAKE_LIBTOOL=$${CROSS_COMPILE}libtool
-QMAKE_INSTALL_NAME_TOOL=$${CROSS_COMPILE}install_name_tool
load(qt_config)
diff --git a/depends/patches/qt/use_android_ndk23.patch b/depends/patches/qt/use_android_ndk23.patch
index 85b8690218..f22367d527 100644
--- a/depends/patches/qt/use_android_ndk23.patch
+++ b/depends/patches/qt/use_android_ndk23.patch
@@ -2,7 +2,7 @@ Use Android NDK r23 LTS
--- old/qtbase/mkspecs/features/android/default_pre.prf
+++ new/qtbase/mkspecs/features/android/default_pre.prf
-@@ -73,7 +73,7 @@ else: equals(QT_ARCH, x86_64): CROSS_COMPILE = $$NDK_LLVM_PATH/bin/x86_64-linux-
+@@ -76,7 +76,7 @@ else: equals(QT_ARCH, x86_64): CROSS_COMPILE = $$NDK_LLVM_PATH/bin/x86_64-linux-
else: equals(QT_ARCH, arm64-v8a): CROSS_COMPILE = $$NDK_LLVM_PATH/bin/aarch64-linux-android-
else: CROSS_COMPILE = $$NDK_LLVM_PATH/bin/arm-linux-androideabi-