Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1Avoids needing xcrun or xcodebuild in PATH for native package builds 2 3--- a/tools/gyp/pylib/gyp/xcode_emulation.py 4+++ b/tools/gyp/pylib/gyp/xcode_emulation.py 5@@ -522,7 +522,13 @@ class XcodeSettings: 6 # Since the CLT has no SDK paths anyway, returning None is the 7 # most sensible route and should still do the right thing. 8 try: 9- return GetStdoutQuiet(["xcrun", "--sdk", sdk, infoitem]) 10+ #return GetStdoutQuiet(["xcrun", "--sdk", sdk, infoitem]) 11+ return { 12+ "--show-sdk-platform-path": "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform", 13+ "--show-sdk-path": "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk", 14+ "--show-sdk-build-version": "19A547", 15+ "--show-sdk-version": "10.15" 16+ }[infoitem] 17 except GypError: 18 pass 19 20@@ -1499,7 +1505,8 @@ def XcodeVersion(): 21 version = "" 22 build = "" 23 try: 24- version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines() 25+ #version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines() 26+ version_list = [] 27 # In some circumstances xcodebuild exits 0 but doesn't return 28 # the right results; for example, a user on 10.7 or 10.8 with 29 # a bogus path set via xcode-select 30@@ -1510,7 +1517,8 @@ def XcodeVersion(): 31 version = version_list[0].split()[-1] # Last word on first line 32 build = version_list[-1].split()[-1] # Last word on last line 33 except GypError: # Xcode not installed so look for XCode Command Line Tools 34- version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322 35+ #version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322 36+ version = "11.0.0.0.1.1567737322" 37 if not version: 38 raise GypError("No Xcode or CLT version detected!") 39 # Be careful to convert "4.2.3" to "0423" and "11.0.0" to "1100": 40--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py 41+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py 42@@ -522,7 +522,13 @@ class XcodeSettings: 43 # Since the CLT has no SDK paths anyway, returning None is the 44 # most sensible route and should still do the right thing. 45 try: 46- return GetStdoutQuiet(["xcrun", "--sdk", sdk, infoitem]) 47+ #return GetStdoutQuiet(["xcrun", "--sdk", sdk, infoitem]) 48+ return { 49+ "--show-sdk-platform-path": "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform", 50+ "--show-sdk-path": "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk", 51+ "--show-sdk-build-version": "19A547", 52+ "--show-sdk-version": "10.15" 53+ }[infoitem] 54 except GypError: 55 pass 56 57@@ -1499,7 +1505,8 @@ def XcodeVersion(): 58 version = "" 59 build = "" 60 try: 61- version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines() 62+ #version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines() 63+ version_list = [] 64 # In some circumstances xcodebuild exits 0 but doesn't return 65 # the right results; for example, a user on 10.7 or 10.8 with 66 # a bogus path set via xcode-select 67@@ -1510,7 +1517,8 @@ def XcodeVersion(): 68 version = version_list[0].split()[-1] # Last word on first line 69 build = version_list[-1].split()[-1] # Last word on last line 70 except GypError: # Xcode not installed so look for XCode Command Line Tools 71- version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322 72+ #version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322 73+ version = "11.0.0.0.1.1567737322" 74 if not version: 75 raise GypError("No Xcode or CLT version detected!") 76 # Be careful to convert "4.2.3" to "0423" and "11.0.0" to "1100":