mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-03 09:56:38 -05:00
Merge #21495: build, qt: Fix static builds on macOS Big Sur
ec76bad655
build, qt: Fix static builds on macOS Big Sur (Hennadii Stepanov) Pull request description: See details and the patch in https://bugreports.qt.io/browse/QTBUG-87014 Fixes https://github.com/bitcoin-core/gui/issues/249 ACKs for top commit: fanquake: ACKec76bad655
Tree-SHA512: f2fa4a6a1b7dd6d5adc6ef6f5169aedeb3bf45b2b087305e8ab78041755b9f04203d2b0550ee95656042d16775b06da0a17730915b7bff996dd14dd1b6d34ea7
This commit is contained in:
commit
8f94c70625
2 changed files with 33 additions and 0 deletions
|
@ -10,6 +10,7 @@ $(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_no_printer.patch no
|
|||
$(package)_patches+= fix_android_qmake_conf.patch fix_android_jni_static.patch dont_hardcode_pwd.patch
|
||||
$(package)_patches+= drop_lrelease_dependency.patch no_sdk_version_check.patch
|
||||
$(package)_patches+= fix_qpainter_non_determinism.patch fix_lib_paths.patch fix_android_pch.patch
|
||||
$(package)_patches+= fix_bigsur_drawing.patch
|
||||
|
||||
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
|
||||
$(package)_qttranslations_sha256_hash=e1de58ed108b7e0a138815ea60fd46a2c4e1fc31396a707e5630e92de79c53de
|
||||
|
@ -230,6 +231,7 @@ define $(package)_preprocess_cmds
|
|||
patch -p1 -i $($(package)_patch_dir)/fix_qpainter_non_determinism.patch &&\
|
||||
patch -p1 -i $($(package)_patch_dir)/no_sdk_version_check.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/fix_lib_paths.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/fix_bigsur_drawing.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/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\
|
||||
|
|
31
depends/patches/qt/fix_bigsur_drawing.patch
Normal file
31
depends/patches/qt/fix_bigsur_drawing.patch
Normal file
|
@ -0,0 +1,31 @@
|
|||
Fix GUI stuck on Big Sur
|
||||
|
||||
See:
|
||||
- https://github.com/bitcoin-core/gui/issues/249
|
||||
- https://github.com/bitcoin/bitcoin/pull/21495
|
||||
- https://bugreports.qt.io/browse/QTBUG-87014
|
||||
|
||||
We should be able to drop this once we are using one of the following versions:
|
||||
- Qt 5.12.11 or later, see upstream commit: c5d904639dbd690a36306e2b455610029704d821
|
||||
- Qt 5.15.3 or later, see upstream commit: 2cae34354bd41ae286258c7a6b3653b746e786ae
|
||||
|
||||
--- a/qtbase/src/plugins/platforms/cocoa/qnsview_drawing.mm
|
||||
+++ b/qtbase/src/plugins/platforms/cocoa/qnsview_drawing.mm
|
||||
@@ -95,8 +95,15 @@
|
||||
// by AppKit at a point where we've already set up other parts of the platform plugin
|
||||
// based on the presence of layers or not. Once we've rewritten these parts to support
|
||||
// dynamically picking up layer enablement we can let AppKit do its thing.
|
||||
- return QMacVersion::buildSDK() >= QOperatingSystemVersion::MacOSMojave
|
||||
- && QMacVersion::currentRuntime() >= QOperatingSystemVersion::MacOSMojave;
|
||||
+
|
||||
+ if (QMacVersion::currentRuntime() >= QOperatingSystemVersion::MacOSBigSur)
|
||||
+ return true; // Big Sur always enables layer-backing, regardless of SDK
|
||||
+
|
||||
+ if (QMacVersion::currentRuntime() >= QOperatingSystemVersion::MacOSMojave
|
||||
+ && QMacVersion::buildSDK() >= QOperatingSystemVersion::MacOSMojave)
|
||||
+ return true; // Mojave and Catalina enable layers based on the app's SDK
|
||||
+
|
||||
+ return false; // Prior versions needed explicitly enabled layer backing
|
||||
}
|
||||
|
||||
- (BOOL)layerExplicitlyRequested
|
Loading…
Add table
Reference in a new issue