summaryrefslogtreecommitdiffstats
path: root/media/webrtc
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-07-31 20:27:48 -0400
committerMoonchild <moonchild@palemoon.org>2020-08-07 21:27:03 +0000
commitd419fe2d52790b039c0316059c6e9e56f39407ce (patch)
treefaa7bb8a2627254066216e62dd94009b0d88a2a2 /media/webrtc
parentc77c6de9ce177787192e6fc1af1d017f92603069 (diff)
downloadUXP-d419fe2d52790b039c0316059c6e9e56f39407ce.tar
UXP-d419fe2d52790b039c0316059c6e9e56f39407ce.tar.gz
UXP-d419fe2d52790b039c0316059c6e9e56f39407ce.tar.lz
UXP-d419fe2d52790b039c0316059c6e9e56f39407ce.tar.xz
UXP-d419fe2d52790b039c0316059c6e9e56f39407ce.zip
Use an alt script to properly determine the OSX SDK version
Diffstat (limited to 'media/webrtc')
-rw-r--r--media/webrtc/trunk/build/common.gypi2
-rw-r--r--media/webrtc/trunk/build/mac/find_sdk_uxp.py35
2 files changed, 36 insertions, 1 deletions
diff --git a/media/webrtc/trunk/build/common.gypi b/media/webrtc/trunk/build/common.gypi
index 68003ba06..47ad77de4 100644
--- a/media/webrtc/trunk/build/common.gypi
+++ b/media/webrtc/trunk/build/common.gypi
@@ -1176,7 +1176,7 @@
# Enable Keystone auto-update support.
'mac_keystone%': 1,
}, { # else: branding!="Chrome" or buildtype!="Official"
- 'mac_sdk%': '<!(<(PYTHON) <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))',
+ 'mac_sdk%': '<!(<(PYTHON) <(DEPTH)/build/mac/find_sdk_uxp.py <(mac_sdk_path))',
'mac_breakpad_uploads%': 0,
'mac_breakpad%': 0,
'mac_keystone%': 0,
diff --git a/media/webrtc/trunk/build/mac/find_sdk_uxp.py b/media/webrtc/trunk/build/mac/find_sdk_uxp.py
new file mode 100644
index 000000000..cc4b440d2
--- /dev/null
+++ b/media/webrtc/trunk/build/mac/find_sdk_uxp.py
@@ -0,0 +1,35 @@
+#!/usr/bin/env python
+
+from __future__ import print_function
+import os
+import re
+import sys
+
+if sys.platform == 'darwin':
+ if len(sys.argv) <= 1:
+ print("find_sdk_uxp.py: error: Not enough arguments")
+ sys.exit(1)
+ else:
+ if os.path.isdir(sys.argv[1]):
+ SDK_PATH = sys.argv[1]
+ else:
+ print("find_sdk_uxp.py: error: Specified path does not exist or is not a directory")
+ sys.exit(1)
+
+ KNOWN_SDK_VERSIONS = ["10.7", "10.8", "10.9", "10.10",
+ "10.11", "10.12", "10.13", "10.14",
+ "10.15"]
+
+ REGEX = "^MacOSX(10\.\d+)\.sdk$"
+ SDK_VERSION = re.findall(REGEX, os.path.basename(SDK_PATH))
+
+ if not SDK_VERSION:
+ print("find_sdk_uxp.py: error: Could not determin the MacOS X SDK version")
+ sys.exit(1)
+
+ if SDK_VERSION[0] in KNOWN_SDK_VERSIONS:
+ print(SDK_VERSION[0])
+ else:
+ print("find_sdk_uxp.py: error: Unknown MacOS X SDK version")
+
+sys.exit(0)