summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorzhiyuanzhai <37478391+zhiyuanzhai@users.noreply.github.com>2020-10-08 02:55:35 +0800
committerGitHub <noreply@github.com>2020-10-07 13:55:35 -0500
commit38bfb81e2b8d130d3995ca0a189ee3d42a198a8c (patch)
treef41b3208c97a7a802ac42ebc73c0dcb64324d2c8 /var
parent215183524c14ce2b13638f172d61ffd9400bae95 (diff)
downloadspack-38bfb81e2b8d130d3995ca0a189ee3d42a198a8c.tar.gz
spack-38bfb81e2b8d130d3995ca0a189ee3d42a198a8c.tar.bz2
spack-38bfb81e2b8d130d3995ca0a189ee3d42a198a8c.tar.xz
spack-38bfb81e2b8d130d3995ca0a189ee3d42a198a8c.zip
macOS 11 version check for Perl (#19210)
* Fix 'unexpected product version' error for macOS 11.0 * Adjustment: add the minimum version that this macOS patch is necessary. * Adding a keyword to prevent the patch being applied to systems other than darwin (macOS) * Deleting quotation marks
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/perl/macos-11-version-check.patch40
-rw-r--r--var/spack/repos/builtin/packages/perl/package.py4
2 files changed, 44 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/perl/macos-11-version-check.patch b/var/spack/repos/builtin/packages/perl/macos-11-version-check.patch
new file mode 100644
index 0000000000..603d009d7d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl/macos-11-version-check.patch
@@ -0,0 +1,40 @@
+From 54d41b60822734cf8df543053f7bd270dfded3ed Mon Sep 17 00:00:00 2001
+From: Adam Hartley <BytesGuy@users.noreply.github.com>
+Date: Thu, 23 Jul 2020 19:53:07 +0100
+Subject: [PATCH] Future proof version check
+
+---
+ hints/darwin.sh | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/hints/darwin.sh b/hints/darwin.sh
+index 1709d224f7c..fdfbdd4a3b9 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.*)
++ [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, 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.*)
++ [1-9][0-9].*)
+ add_macosx_version_min ccflags $prodvers
+ add_macosx_version_min ldflags $prodvers
+ ;;
diff --git a/var/spack/repos/builtin/packages/perl/package.py b/var/spack/repos/builtin/packages/perl/package.py
index 20c7ee6ee4..27eba5d8c7 100644
--- a/var/spack/repos/builtin/packages/perl/package.py
+++ b/var/spack/repos/builtin/packages/perl/package.py
@@ -73,6 +73,10 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package
# https://bugzilla.redhat.com/show_bug.cgi?id=1536752
patch('https://src.fedoraproject.org/rpms/perl/raw/004cea3a67df42e92ffdf4e9ac36d47a3c6a05a4/f/perl-5.26.1-guard_old_libcrypt_fix.patch', level=1, sha256='0eac10ed90aeb0459ad8851f88081d439a4e41978e586ec743069e8b059370ac', when='@:5.26.2')
+ # Fix 'Unexpected product version' error on macOS 11.0 Big Sur
+ # https://github.com/Perl/perl5/pull/17946
+ patch('macos-11-version-check.patch', when='@5.24.1:5.32.0 platform=darwin')
+
# Installing cpanm alongside the core makes it safe and simple for
# people/projects to install their own sets of perl modules. Not
# having it in core increases the "energy of activation" for doing