summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Hartley <BytesGuy@users.noreply.github.com>2020-07-23 19:53:07 +0100
committerSteve Hay <steve.m.hay@googlemail.com>2020-12-26 15:21:53 +0000
commite4980fefb3e051fdcfad599af760a899515bb1fe (patch)
tree8d43bbffba6a53526a90198af669a3e8b30d7c52
parent0afeb6e8ebd7f875f7e1b54c9a4cab9655d0715a (diff)
downloadperl-e4980fefb3e051fdcfad599af760a899515bb1fe.tar.gz
Future proof version check
(cherry picked from commit 54d41b60822734cf8df543053f7bd270dfded3ed)
-rw-r--r--hints/darwin.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/hints/darwin.sh b/hints/darwin.sh
index 1709d224f7..fdfbdd4a3b 100644
--- a/hints/darwin.sh
+++ b/hints/darwin.sh
@@ -301,7 +301,7 @@ case "$osvers" in # Note: osvers is the kernel version, not the 10.x
# We now use MACOSX_DEPLOYMENT_TARGET, if set, as an override by
# capturing its value and adding it to the flags.
case "$MACOSX_DEPLOYMENT_TARGET" in
- 10.* | 11.*)
+ [1-9][0-9].*)
add_macosx_version_min ccflags $MACOSX_DEPLOYMENT_TARGET
add_macosx_version_min ldflags $MACOSX_DEPLOYMENT_TARGET
;;
@@ -313,7 +313,7 @@ case "$osvers" in # Note: osvers is the kernel version, not the 10.x
*** Unexpected MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET
***
-*** Please either set it to 10.something, 11.something or to empty.
+*** Please either set it to a valid macOS version number (e.g., 10.15) or to empty.
EOM
exit 1
@@ -327,7 +327,7 @@ EOM
# "ProductVersion: 10.11" "10.11"
prodvers=`sw_vers|awk '/^ProductVersion:/{print $2}'|awk -F. '{print $1"."$2}'`
case "$prodvers" in
- 10.* | 11.*)
+ [1-9][0-9].*)
add_macosx_version_min ccflags $prodvers
add_macosx_version_min ldflags $prodvers
;;