Skip to content

Commit

Permalink
build: disable qt SDK version checking
Browse files Browse the repository at this point in the history
This tries to invoke xcrun, which is not available when cross-compiling.
Given we are in control of the SDK versions being used, removing this
check has minimal-no effect.
  • Loading branch information
fanquake committed Mar 10, 2021
1 parent 1be8e0f commit fa5e97e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
3 changes: 2 additions & 1 deletion depends/packages/qt.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $(package)_linux_dependencies=freetype fontconfig libxcb libxkbcommon
$(package)_qt_libs=corelib network widgets gui plugins testlib
$(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_no_printer.patch no-xlib.patch
$(package)_patches+= fix_android_qmake_conf.patch fix_android_jni_static.patch dont_hardcode_pwd.patch
$(package)_patches+= drop_lrelease_dependency.patch
$(package)_patches+= drop_lrelease_dependency.patch no_sdk_version_check.patch
$(package)_patches+= fix_qpainter_non_determinism.patch

$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
Expand Down Expand Up @@ -225,6 +225,7 @@ define $(package)_preprocess_cmds
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)/fix_qpainter_non_determinism.patch &&\
patch -p1 -i $($(package)_patch_dir)/no_sdk_version_check.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/ &&\
Expand Down
20 changes: 20 additions & 0 deletions depends/patches/qt/no_sdk_version_check.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
commit f5eb142cd04be2bc4ca610ed3b5b7e8ce3520ee3
Author: fanquake <[email protected]>
Date: Tue Jan 5 16:08:49 2021 +0800

Don't invoke macOS SDK version checking

This tries to use xcrun which is not available when cross-compiling.

diff --git a/qtbase/mkspecs/features/mac/default_post.prf b/qtbase/mkspecs/features/mac/default_post.prf
index 92a9112bca6..447e186eb26 100644
--- a/qtbase/mkspecs/features/mac/default_post.prf
+++ b/qtbase/mkspecs/features/mac/default_post.prf
@@ -8,7 +8,6 @@ contains(TEMPLATE, .*app) {
!macx-xcode:if(isEmpty(BUILDS)|build_pass) {
# Detect changes to the platform SDK
QMAKE_EXTRA_VARIABLES += QMAKE_MAC_SDK QMAKE_MAC_SDK_VERSION QMAKE_XCODE_DEVELOPER_PATH
- QMAKE_EXTRA_INCLUDES += $$shell_quote($$PWD/sdk.mk)
}

# Detect incompatible SDK versions

0 comments on commit fa5e97e

Please sign in to comment.