0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02:00
Commit Graph

5 Commits

Author SHA1 Message Date
der richter
1c98ab6239 TOOLS/macos-sdk-version: remove legacy sdk version retrieval
older macOS dev tools were inconsistent with the way how SDK versions
were returned, some truncated the minor versions. in those cases the
SDK version had to be retrieved through the SDK build version.

recently the scheme for the SDK build version changed that our heuristic
for converting it to an SDK version produced wrong version strings.
the stride of the minor version changed from 1 to 2, so SDK versions
ended up higher than they actually were. furthermore macOS 11 was
hardcoded.

since Xcode 12 Apple fixed the SDK version retrieval and it is no longer
truncated when using Xcode as dev tools. Xcode 12 is also the latest
supported version on macOS 10.15, which is also our oldest supported
version. we can remove the old SDK build version conversation and use
the Xcode only tool to retrieve the SDK version in the case Xcode is
used as dev tools. furthermore this als keeps support for Xcode 11 where
the problem wasn't fixed yet, but is still a supported version on macOS
10.15.

Fixes #9907
2023-11-10 14:28:39 +01:00
Dudemanguy
18885917a7 meson: do the macos sdk version comparison in meson
Since we can no longer rely on distuils for a version comparison, let's
modify the macos-sdk-version script so it returns multiple potential
versions to meson. Then use meson's built-in version comparison to pick
the right one instead. This avoids the complication of needing certain
python packages installed since everything simply uses stdlib functions.
2023-10-29 19:48:43 +00:00
Dudemanguy
65806ac4d1 TOOLS/macos-sdk-version: use packaging instead of distutils for version
Python 3.10 deprecated disutils and then removed it in 3.12. The macos
sdk check uses the version compare from there, so it needs to be
replaced with something else. So instead use the API from the packaging
module which is also widely available and a fit replacement.

Fixes #12762.
2023-10-27 18:07:28 +00:00
Guido Cella
fe9e074752 various: remove trailing whitespace 2022-05-14 14:51:34 +00:00
Dudemanguy
be536dd45a TOOLS: add macos-sdk-version.py script
Building for macos requires us to check the macos sdk path as well as
the sdk version that is on the system. To do this, let's steal the logic
that's in the compiler_swift.py check from the waf build. This returns a
comma-delinated string. The first entry is the absolute path to the sdk.
The second entry is the detected macos sdk version.
2021-11-14 19:13:10 +00:00