summaryrefslogtreecommitdiff
path: root/dev-lang/perl/files/perl-5.30.3-darwin-macos11.patch
blob: 73879b398c4db9ed94f12853cd5be53dc75d6ac0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
https://github.com/Perl/perl5/pull/17946
https://bugs.gentoo.org/757249
---
From b382aafc793fe1007f9058a5145a1d39d56cef70 Mon Sep 17 00:00:00 2001
From: Adam Hartley <git@ahartley.com>
Date: Mon, 6 Jul 2020 22:59:42 +0100
Subject: [PATCH 1/7] Add 11.x support for darwin.sh

---
 hints/darwin.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hints/darwin.sh b/hints/darwin.sh
index 0a91bc083c0..c0f06de1cab 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.*)
+    10.* | 11.*)
       add_macosx_version_min ccflags $MACOSX_DEPLOYMENT_TARGET
       add_macosx_version_min ldflags $MACOSX_DEPLOYMENT_TARGET
       ;;
@@ -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.*)
+    10.* | 11.*)
       add_macosx_version_min ccflags $prodvers
       add_macosx_version_min ldflags $prodvers
       ;;

From 960d1a5c4225d1dd12636a469e10a568464e4e7c Mon Sep 17 00:00:00 2001
From: Adam Hartley <git@ahartley.com>
Date: Wed, 8 Jul 2020 19:10:33 +0100
Subject: [PATCH 3/7] Update error message

---
 hints/darwin.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hints/darwin.sh b/hints/darwin.sh
index c0f06de1cab..988b766c4f4 100644
--- a/hints/darwin.sh
+++ b/hints/darwin.sh
@@ -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 10.something, 11.something or to empty.
 
 EOM
       exit 1

From d633cced1d5174e19c5f2234a9fb4c7603cfb9db Mon Sep 17 00:00:00 2001
From: Adam Hartley <git@ahartley.com>
Date: Sat, 11 Jul 2020 11:41:27 +0100
Subject: [PATCH 4/7] Update deprecated syscall check for 11.x and greater

---
 hints/darwin.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hints/darwin.sh b/hints/darwin.sh
index 988b766c4f4..4f73a9995e7 100644
--- a/hints/darwin.sh
+++ b/hints/darwin.sh
@@ -342,11 +342,11 @@ EOM
       exit 1
     esac
 
-    # The X in 10.X
+    prodvers_major=$(echo $prodvers|awk -F. '{print $1}')
     prodvers_minor=$(echo $prodvers|awk -F. '{print $2}')
 
     # macOS (10.12) deprecated syscall().
-    if [ "$prodvers_minor" -ge 12 ]; then
+    if [[ ( "$prodvers_minor" -ge 12 && "$prodvers_major" -eq 10 ) || "$prodvers_major" -ge 11 ]]; then
         d_syscall='undef'
         # If deploying to pre-10.12, suppress Time::HiRes's detection of the system clock_gettime()
         case "$MACOSX_DEPLOYMENT_TARGET" in

From 9c3890f8521a7db6d9b2aa21561c7d0dae9fb91d Mon Sep 17 00:00:00 2001
From: Adam Hartley <BytesGuy@users.noreply.github.com>
Date: Wed, 22 Jul 2020 13:15:30 +0100
Subject: [PATCH 5/7] Simplify syscall check

---
 hints/darwin.sh | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/hints/darwin.sh b/hints/darwin.sh
index 4f73a9995e7..40c84cf267a 100644
--- a/hints/darwin.sh
+++ b/hints/darwin.sh
@@ -342,11 +342,10 @@ EOM
       exit 1
     esac
 
-    prodvers_major=$(echo $prodvers|awk -F. '{print $1}')
-    prodvers_minor=$(echo $prodvers|awk -F. '{print $2}')
+    darwin_major=$(echo $osvers|awk -F. '{print $1}')
 
-    # macOS (10.12) deprecated syscall().
-    if [[ ( "$prodvers_minor" -ge 12 && "$prodvers_major" -eq 10 ) || "$prodvers_major" -ge 11 ]]; then
+    # macOS 10.12 (darwin 6.0.0) deprecated syscall().
+    if [ "$darwin_major" -ge 6 ]; then
         d_syscall='undef'
         # If deploying to pre-10.12, suppress Time::HiRes's detection of the system clock_gettime()
         case "$MACOSX_DEPLOYMENT_TARGET" in

From 99ff8934992102a3db63805e8ba9710577de164e Mon Sep 17 00:00:00 2001
From: Adam Hartley <BytesGuy@users.noreply.github.com>
Date: Wed, 22 Jul 2020 13:15:53 +0100
Subject: [PATCH 6/7] Update darwin.sh

---
 hints/darwin.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hints/darwin.sh b/hints/darwin.sh
index 40c84cf267a..1709d224f7c 100644
--- a/hints/darwin.sh
+++ b/hints/darwin.sh
@@ -344,8 +344,8 @@ EOM
 
     darwin_major=$(echo $osvers|awk -F. '{print $1}')
 
-    # macOS 10.12 (darwin 6.0.0) deprecated syscall().
-    if [ "$darwin_major" -ge 6 ]; then
+    # macOS 10.12 (darwin 16.0.0) deprecated syscall().
+    if [ "$darwin_major" -ge 16 ]; then
         d_syscall='undef'
         # If deploying to pre-10.12, suppress Time::HiRes's detection of the system clock_gettime()
         case "$MACOSX_DEPLOYMENT_TARGET" in

From 1b712e4b359d9508461a0a832d06baa6e589b955 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 7/7] 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.* | 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
       ;;