luarocks: Update detected platform version

Now that our MACOSX_DEPLOYMENT_TARGET is set to 10.12, we shouldn't be
hardcoding the platform at build time as 10.10. This change makes it
inherit the MACOSX_DEPLOYMENT_TARGET value.
This commit is contained in:
Lily Ballard 2019-08-14 16:16:31 -07:00 committed by Matthieu Coudron
parent c22351d25e
commit 45e6253678
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ index f93e67a..2eb2db9 100644
+ defaults.variables.STAT = "stat"
defaults.variables.STATFLAG = "-f '%A'"
- local version = util.popen_read("sw_vers -productVersion")
+ local version = "10.10"
+ local version = os.getenv("MACOSX_DEPLOYMENT_TARGET") or "10.12"
version = tonumber(version and version:match("^[^.]+%.([^.]+)")) or 3
if version >= 10 then
version = 8

View File

@ -7,7 +7,7 @@ index c5af5a2..1949fdc 100644
defaults.arch = "macosx-"..target_cpu
defaults.variables.LIBFLAG = "-bundle -undefined dynamic_lookup -all_load"
- local version = util.popen_read("sw_vers -productVersion")
+ local version = "10.10"
+ local version = os.getenv("MACOSX_DEPLOYMENT_TARGET") or "10.12"
version = tonumber(version and version:match("^[^.]+%.([^.]+)")) or 3
if version >= 10 then
version = 8