aboutsummaryrefslogtreecommitdiff
path: root/depends/patches/qt/fix_configure_mac.patch
blob: 0d7dd647debca93eb5383ee72f6d4db573dabaac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
--- old/qtbase/mkspecs/features/mac/sdk.prf	2018-02-08 10:24:48.000000000 -0800
+++ new/qtbase/mkspecs/features/mac/sdk.prf	2018-03-23 10:38:56.000000000 -0700
@@ -8,21 +8,21 @@
 defineReplace(xcodeSDKInfo) {
     info = $$1
     equals(info, "Path"): \
-        info = --show-sdk-path
+        infoarg = --show-sdk-path
     equals(info, "PlatformPath"): \
-        info = --show-sdk-platform-path
+        infoarg = --show-sdk-platform-path
     equals(info, "SDKVersion"): \
-        info = --show-sdk-version
+        infoarg = --show-sdk-version
     sdk = $$2
     isEmpty(sdk): \
         sdk = $$QMAKE_MAC_SDK
 
     isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}) {
-        QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcrun --sdk $$sdk $$info 2>/dev/null")
+        QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcrun --sdk $$sdk $$infoarg 2>/dev/null")
         # --show-sdk-platform-path won't work for Command Line Tools; this is fine
         # only used by the XCTest backend to testlib
-        isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}):if(!isEmpty(QMAKE_XCODEBUILD_PATH)|!equals(info, "--show-sdk-platform-path")): \
-            error("Could not resolve SDK $$info for \'$$sdk\'")
+        isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}):if(!isEmpty(QMAKE_XCODEBUILD_PATH)|!equals(infoarg, "--show-sdk-platform-path")): \
+            error("Could not resolve SDK $$info for \'$$sdk\' using $$infoarg")
         cache(QMAKE_MAC_SDK.$${sdk}.$${info}, set stash, QMAKE_MAC_SDK.$${sdk}.$${info})
     }

--- old/qtbase/configure	2018-02-08 10:24:48.000000000 -0800
+++ new/qtbase/configure	2018-03-23 05:42:29.000000000 -0700
@@ -232,8 +232,13 @@
 
     sdk=$(getSingleQMakeVariable "QMAKE_MAC_SDK" "$1")
     if [ -z "$sdk" ]; then echo "QMAKE_MAC_SDK must be set when building on Mac" >&2; exit 1; fi
-    sysroot=$(/usr/bin/xcrun --sdk $sdk --show-sdk-path 2>/dev/null)
-    if [ -z "$sysroot" ]; then echo "Failed to resolve SDK path for '$sdk'" >&2; exit 1; fi
+    sysroot=$(getSingleQMakeVariable "QMAKE_MAC_SDK_PATH" "$1")
+
+    echo "sysroot pre-configured as $sysroot";
+    if [ -z "$sysroot" ]; then
+       sysroot=$(/usr/bin/xcrun --sdk $sdk --show-sdk-path 2>/dev/null)
+       if [ -z "$sysroot" ]; then echo "Failed to resolve SDK path for '$sdk'" >&2; exit 1; fi
+    fi
 
     case "$sdk" in
         macosx*)