summaryrefslogtreecommitdiffstats
path: root/waftools/checks
diff options
context:
space:
mode:
authorder richter <der.richter@gmx.de>2020-12-25 14:47:35 +0100
committerder richter <der.richter@gmx.de>2021-01-13 16:23:47 +0100
commitce1571ac01e815c71a6075a4bad1c7b5ec4820dd (patch)
tree340c593f25f05f6eba303104f1e12e858cbeb770 /waftools/checks
parentbc58361d86e695d3bf875e1dd826f9fbbd586502 (diff)
downloadmpv-ce1571ac01e815c71a6075a4bad1c7b5ec4820dd.tar.bz2
mpv-ce1571ac01e815c71a6075a4bad1c7b5ec4820dd.tar.xz
mac: drop build support for swift versions earlier than version 4.1
this drops support for swift <4.1 and with this support for xcode <=9.2. this was the last setup that is officially working on macOS 10.12. our old legacy build macOS 10.12 + xcode 9.2 is replaced by macOS 10.13 + xcode 9.4.1 with swift 4.1. the macOS 10.13 + xcode 10.1 VM is replaced by the latest macOS 10.14 + xcode 11.3.1 VM. this is the oldest version officially supported by Apple. this is in preparations for the following commit.
Diffstat (limited to 'waftools/checks')
-rw-r--r--waftools/checks/custom.py24
1 files changed, 13 insertions, 11 deletions
diff --git a/waftools/checks/custom.py b/waftools/checks/custom.py
index 36c1d85d06..964546977b 100644
--- a/waftools/checks/custom.py
+++ b/waftools/checks/custom.py
@@ -114,17 +114,19 @@ def check_cocoa(ctx, dependency_identifier):
return res
-def check_swift(ctx, dependency_identifier):
- minVer = StrictVersion("3.0.2")
- if ctx.env.SWIFT_VERSION:
- if StrictVersion(ctx.env.SWIFT_VERSION) >= minVer:
- ctx.add_optional_message(dependency_identifier,
- 'version found: ' + str(ctx.env.SWIFT_VERSION))
- return True
- ctx.add_optional_message(dependency_identifier,
- "'swift >= " + str(minVer) + "' not found, found " +
- str(ctx.env.SWIFT_VERSION or None))
- return False
+def check_swift(version):
+ def fn(ctx, dependency_identifier):
+ minVer = StrictVersion(version)
+ if ctx.env.SWIFT_VERSION:
+ if StrictVersion(ctx.env.SWIFT_VERSION) >= minVer:
+ ctx.add_optional_message(dependency_identifier,
+ 'version found: ' + str(ctx.env.SWIFT_VERSION))
+ return True
+ ctx.add_optional_message(dependency_identifier,
+ "'swift >= " + str(minVer) + "' not found, found " +
+ str(ctx.env.SWIFT_VERSION or None))
+ return False
+ return fn
def check_egl_provider(minVersion=None, name='egl', check=None):
def fn(ctx, dependency_identifier, **kw):