| @@ -1,259 +1,259 @@ | | | @@ -1,259 +1,259 @@ |
1 | # $NetBSD: phpversion.mk,v 1.426 2024/03/17 19:19:38 jklos Exp $ | | 1 | # $NetBSD: phpversion.mk,v 1.427 2024/04/13 02:49:41 taca Exp $ |
2 | # | | 2 | # |
3 | # This file selects a PHP version, based on the user's preferences and | | 3 | # This file selects a PHP version, based on the user's preferences and |
4 | # the installed packages. It does not add a dependency on the PHP | | 4 | # the installed packages. It does not add a dependency on the PHP |
5 | # package. | | 5 | # package. |
6 | # | | 6 | # |
7 | # === User-settable variables === | | 7 | # === User-settable variables === |
8 | # | | 8 | # |
9 | # PHP_VERSION_DEFAULT | | 9 | # PHP_VERSION_DEFAULT |
10 | # The PHP version to choose when more than one is acceptable to | | 10 | # The PHP version to choose when more than one is acceptable to |
11 | # the package. | | 11 | # the package. |
12 | # | | 12 | # |
13 | # Possible: 56 74 80 81 82 83 | | 13 | # Possible: 56 74 80 81 82 83 |
14 | # Default: 82 | | 14 | # Default: 82 |
15 | # | | 15 | # |
16 | # === Infrastructure variables === | | 16 | # === Infrastructure variables === |
17 | # | | 17 | # |
18 | # PHP_VERSION_REQD | | 18 | # PHP_VERSION_REQD |
19 | # PHP version to use. This variable should not be set in | | 19 | # PHP version to use. This variable should not be set in |
20 | # packages. Normally it is used by bulk build tools. | | 20 | # packages. Normally it is used by bulk build tools. |
21 | # | | 21 | # |
22 | # Possible: ${PHP_VERSIONS_ACCEPTED} | | 22 | # Possible: ${PHP_VERSIONS_ACCEPTED} |
23 | # Default: ${PHP_VERSION_DEFAULT} | | 23 | # Default: ${PHP_VERSION_DEFAULT} |
24 | # | | 24 | # |
25 | # === Package-settable variables === | | 25 | # === Package-settable variables === |
26 | # | | 26 | # |
27 | # PHP_VERSIONS_ACCEPTED | | 27 | # PHP_VERSIONS_ACCEPTED |
28 | # The PHP versions that are accepted by the package. | | 28 | # The PHP versions that are accepted by the package. |
29 | # | | 29 | # |
30 | # Possible: 56 74 80 81 82 83 | | 30 | # Possible: 56 74 80 81 82 83 |
31 | # Default: 82 81 83 74 56 80 | | 31 | # Default: 82 81 83 74 56 80 |
32 | # | | 32 | # |
33 | # PHP_VERSIONS_INCOMPATIBLE | | 33 | # PHP_VERSIONS_INCOMPATIBLE |
34 | # The PHP versions that are not supported by the package. | | 34 | # The PHP versions that are not supported by the package. |
35 | # | | 35 | # |
36 | # Possible: 56 74 80 81 82 83 | | 36 | # Possible: 56 74 80 81 82 83 |
37 | # Default: (empty) | | 37 | # Default: (empty) |
38 | # | | 38 | # |
39 | # PHP_CHECK_INSTALLED | | 39 | # PHP_CHECK_INSTALLED |
40 | # Check installed version of PHP. Should be only used by | | 40 | # Check installed version of PHP. Should be only used by |
41 | # lang/php56, lang/php74, lang/php80, lang/php81, lang/php82 | | 41 | # lang/php56, lang/php74, lang/php80, lang/php81, lang/php82 |
42 | # and lang/php83. | | 42 | # and lang/php83. |
43 | # | | 43 | # |
44 | # Possible: Yes No | | 44 | # Possible: Yes No |
45 | # Default: Yes | | 45 | # Default: Yes |
46 | # | | 46 | # |
47 | # === Variables defined by this file === | | 47 | # === Variables defined by this file === |
48 | # | | 48 | # |
49 | # PKG_PHP_VERSION | | 49 | # PKG_PHP_VERSION |
50 | # The selected PHP version. | | 50 | # The selected PHP version. |
51 | # | | 51 | # |
52 | # Possible: 56 74 80 81 82 83 | | 52 | # Possible: 56 74 80 81 82 83 |
53 | # Default: ${PHP_VERSION_DEFAULT} | | 53 | # Default: ${PHP_VERSION_DEFAULT} |
54 | # | | 54 | # |
55 | # PHP_BASE_VERS | | 55 | # PHP_BASE_VERS |
56 | # The selected PHP's full version depends on PKG_PHP_VERSION | | 56 | # The selected PHP's full version depends on PKG_PHP_VERSION |
57 | # | | 57 | # |
58 | # PKG_PHP_MAJOR_VERS | | 58 | # PKG_PHP_MAJOR_VERS |
59 | # The selected PHP's major version. | | 59 | # The selected PHP's major version. |
60 | # | | 60 | # |
61 | # Possible: 5 7 8 | | 61 | # Possible: 5 7 8 |
62 | # Default: 8 | | 62 | # Default: 8 |
63 | # | | 63 | # |
64 | # PKG_PHP | | 64 | # PKG_PHP |
65 | # The same as ${PKG_PHP_VERSION}, prefixed with "php-". | | 65 | # The same as ${PKG_PHP_VERSION}, prefixed with "php-". |
66 | # | | 66 | # |
67 | # PHPPKGSRCDIR | | 67 | # PHPPKGSRCDIR |
68 | # The directory of the PHP implementation, relative to the | | 68 | # The directory of the PHP implementation, relative to the |
69 | # package directory. | | 69 | # package directory. |
70 | # | | 70 | # |
71 | # Example: ../../lang/php81 | | 71 | # Example: ../../lang/php81 |
72 | # | | 72 | # |
73 | # PHP_PKG_PREFIX | | 73 | # PHP_PKG_PREFIX |
74 | # The prefix that is prepended to the package name. | | 74 | # The prefix that is prepended to the package name. |
75 | # | | 75 | # |
76 | # Example: php56 php74 php80 php81 php82 php83 | | 76 | # Example: php56 php74 php80 php81 php82 php83 |
77 | # | | 77 | # |
78 | # PHP_EXTENSION_DIR | | 78 | # PHP_EXTENSION_DIR |
79 | # Relative path to ${PREFIX} for PHP's extensions. It is derived from | | 79 | # Relative path to ${PREFIX} for PHP's extensions. It is derived from |
80 | # initial release of major version. | | 80 | # initial release of major version. |
81 | # | | 81 | # |
82 | # Example: lib/php/20181200 | | 82 | # Example: lib/php/20181200 |
83 | # | | 83 | # |
84 | # Keywords: php | | 84 | # Keywords: php |
85 | # | | 85 | # |
86 | | | 86 | |
87 | .if !defined(PHPVERSION_MK) | | 87 | .if !defined(PHPVERSION_MK) |
88 | PHPVERSION_MK= defined | | 88 | PHPVERSION_MK= defined |
89 | | | 89 | |
90 | # Define each PHP's version. | | 90 | # Define each PHP's version. |
91 | PHP56_VERSION= 5.6.40 | | 91 | PHP56_VERSION= 5.6.40 |
92 | PHP74_VERSION= 7.4.33 | | 92 | PHP74_VERSION= 7.4.33 |
93 | PHP80_VERSION= 8.0.30 | | 93 | PHP80_VERSION= 8.0.30 |
94 | PHP81_VERSION= 8.1.27 | | 94 | PHP81_VERSION= 8.1.27 |
95 | PHP82_VERSION= 8.2.17 | | 95 | PHP82_VERSION= 8.2.18 |
96 | PHP83_VERSION= 8.3.4 | | 96 | PHP83_VERSION= 8.3.4 |
97 | | | 97 | |
98 | # Define API version or initial release of major version. | | 98 | # Define API version or initial release of major version. |
99 | PHP56_RELDATE= 20140828 | | 99 | PHP56_RELDATE= 20140828 |
100 | PHP74_RELDATE= 20191128 | | 100 | PHP74_RELDATE= 20191128 |
101 | PHP80_RELDATE= 20201124 | | 101 | PHP80_RELDATE= 20201124 |
102 | PHP81_RELDATE= 20211125 | | 102 | PHP81_RELDATE= 20211125 |
103 | PHP82_RELDATE= 20220829 | | 103 | PHP82_RELDATE= 20220829 |
104 | PHP83_RELDATE= 20231123 | | 104 | PHP83_RELDATE= 20231123 |
105 | | | 105 | |
106 | _VARGROUPS+= php | | 106 | _VARGROUPS+= php |
107 | _USER_VARS.php= PHP_VERSION_DEFAULT | | 107 | _USER_VARS.php= PHP_VERSION_DEFAULT |
108 | _PKG_VARS.php= PHP_VERSIONS_ACCEPTED PHP_VERSION_REQD | | 108 | _PKG_VARS.php= PHP_VERSIONS_ACCEPTED PHP_VERSION_REQD |
109 | _SYS_VARS.php= PKG_PHP_VERSION PKG_PHP PHPPKGSRCDIR PHP_PKG_PREFIX \ | | 109 | _SYS_VARS.php= PKG_PHP_VERSION PKG_PHP PHPPKGSRCDIR PHP_PKG_PREFIX \ |
110 | PKG_PHP_MAJOR_VERS | | 110 | PKG_PHP_MAJOR_VERS |
111 | | | 111 | |
112 | .include "../../mk/bsd.prefs.mk" | | 112 | .include "../../mk/bsd.prefs.mk" |
113 | | | 113 | |
114 | PHP_VERSION_DEFAULT?= 82 | | 114 | PHP_VERSION_DEFAULT?= 82 |
115 | PHP_VERSIONS_ACCEPTED?= 82 81 83 74 56 80 | | 115 | PHP_VERSIONS_ACCEPTED?= 82 81 83 74 56 80 |
116 | .for pv in ${PHP_VERSIONS_ACCEPTED} | | 116 | .for pv in ${PHP_VERSIONS_ACCEPTED} |
117 | . if empty(PHP_VERSIONS_INCOMPATIBLE:M${pv}) | | 117 | . if empty(PHP_VERSIONS_INCOMPATIBLE:M${pv}) |
118 | _PHP_VERSIONS_ACCEPTED+= ${pv} | | 118 | _PHP_VERSIONS_ACCEPTED+= ${pv} |
119 | . endif | | 119 | . endif |
120 | .endfor | | 120 | .endfor |
121 | | | 121 | |
122 | # transform the list into individual variables | | 122 | # transform the list into individual variables |
123 | .for pv in ${_PHP_VERSIONS_ACCEPTED} | | 123 | .for pv in ${_PHP_VERSIONS_ACCEPTED} |
124 | _PHP_VERSION_${pv}_OK= yes | | 124 | _PHP_VERSION_${pv}_OK= yes |
125 | .endfor | | 125 | .endfor |
126 | | | 126 | |
127 | # check what is installed | | 127 | # check what is installed |
128 | .if exists(${LOCALBASE}/lib/php/${PHP83_RELDATE}) | | 128 | .if exists(${LOCALBASE}/lib/php/${PHP83_RELDATE}) |
129 | _PHP_VERSION_83_INSTALLED= yes | | 129 | _PHP_VERSION_83_INSTALLED= yes |
130 | _PHP_INSTALLED= yes | | 130 | _PHP_INSTALLED= yes |
131 | .elif exists(${LOCALBASE}/lib/php/${PHP82_RELDATE}) | | 131 | .elif exists(${LOCALBASE}/lib/php/${PHP82_RELDATE}) |
132 | _PHP_VERSION_82_INSTALLED= yes | | 132 | _PHP_VERSION_82_INSTALLED= yes |
133 | _PHP_INSTALLED= yes | | 133 | _PHP_INSTALLED= yes |
134 | .elif exists(${LOCALBASE}/lib/php/${PHP81_RELDATE}) | | 134 | .elif exists(${LOCALBASE}/lib/php/${PHP81_RELDATE}) |
135 | _PHP_VERSION_81_INSTALLED= yes | | 135 | _PHP_VERSION_81_INSTALLED= yes |
136 | _PHP_INSTALLED= yes | | 136 | _PHP_INSTALLED= yes |
137 | .elif exists(${LOCALBASE}/lib/php/${PHP80_RELDATE}) | | 137 | .elif exists(${LOCALBASE}/lib/php/${PHP80_RELDATE}) |
138 | _PHP_VERSION_80_INSTALLED= yes | | 138 | _PHP_VERSION_80_INSTALLED= yes |
139 | _PHP_INSTALLED= yes | | 139 | _PHP_INSTALLED= yes |
140 | .elif exists(${LOCALBASE}/lib/php/${PHP74_RELDATE}) | | 140 | .elif exists(${LOCALBASE}/lib/php/${PHP74_RELDATE}) |
141 | _PHP_VERSION_74_INSTALLED= yes | | 141 | _PHP_VERSION_74_INSTALLED= yes |
142 | _PHP_INSTALLED= yes | | 142 | _PHP_INSTALLED= yes |
143 | .elif exists(${LOCALBASE}/lib/php/${PHP56_RELDATE}) | | 143 | .elif exists(${LOCALBASE}/lib/php/${PHP56_RELDATE}) |
144 | _PHP_VERSION_56_INSTALLED= yes | | 144 | _PHP_VERSION_56_INSTALLED= yes |
145 | _PHP_INSTALLED= yes | | 145 | _PHP_INSTALLED= yes |
146 | .endif | | 146 | .endif |
147 | | | 147 | |
148 | # if a version is explicitly required, take it | | 148 | # if a version is explicitly required, take it |
149 | .if defined(PHP_VERSION_REQD) | | 149 | .if defined(PHP_VERSION_REQD) |
150 | _PHP_VERSION= ${PHP_VERSION_REQD} | | 150 | _PHP_VERSION= ${PHP_VERSION_REQD} |
151 | .endif | | 151 | .endif |
152 | # if the default is already installed, it is first choice | | 152 | # if the default is already installed, it is first choice |
153 | .if !defined(_PHP_VERSION) | | 153 | .if !defined(_PHP_VERSION) |
154 | .if defined(_PHP_VERSION_${PHP_VERSION_DEFAULT}_OK) | | 154 | .if defined(_PHP_VERSION_${PHP_VERSION_DEFAULT}_OK) |
155 | .if defined(_PHP_VERSION_${PHP_VERSION_DEFAULT}_INSTALLED) | | 155 | .if defined(_PHP_VERSION_${PHP_VERSION_DEFAULT}_INSTALLED) |
156 | _PHP_VERSION= ${PHP_VERSION_DEFAULT} | | 156 | _PHP_VERSION= ${PHP_VERSION_DEFAULT} |
157 | .endif | | 157 | .endif |
158 | .endif | | 158 | .endif |
159 | .endif | | 159 | .endif |
160 | # prefer an already installed version, in order of "accepted" | | 160 | # prefer an already installed version, in order of "accepted" |
161 | .if !defined(_PHP_VERSION) | | 161 | .if !defined(_PHP_VERSION) |
162 | .for pv in ${_PHP_VERSIONS_ACCEPTED} | | 162 | .for pv in ${_PHP_VERSIONS_ACCEPTED} |
163 | .if defined(_PHP_VERSION_${pv}_INSTALLED) | | 163 | .if defined(_PHP_VERSION_${pv}_INSTALLED) |
164 | _PHP_VERSION?= ${pv} | | 164 | _PHP_VERSION?= ${pv} |
165 | .else | | 165 | .else |
166 | # keep information as last resort - see below | | 166 | # keep information as last resort - see below |
167 | _PHP_VERSION_FIRSTACCEPTED?= ${pv} | | 167 | _PHP_VERSION_FIRSTACCEPTED?= ${pv} |
168 | .endif | | 168 | .endif |
169 | .endfor | | 169 | .endfor |
170 | .endif | | 170 | .endif |
171 | # if the default is OK for the add-on pkg, take this | | 171 | # if the default is OK for the add-on pkg, take this |
172 | .if !defined(_PHP_VERSION) | | 172 | .if !defined(_PHP_VERSION) |
173 | .if defined(_PHP_VERSION_${PHP_VERSION_DEFAULT}_OK) | | 173 | .if defined(_PHP_VERSION_${PHP_VERSION_DEFAULT}_OK) |
174 | _PHP_VERSION= ${PHP_VERSION_DEFAULT} | | 174 | _PHP_VERSION= ${PHP_VERSION_DEFAULT} |
175 | .endif | | 175 | .endif |
176 | .endif | | 176 | .endif |
177 | # take the first one accepted by the package | | 177 | # take the first one accepted by the package |
178 | .if !defined(_PHP_VERSION) | | 178 | .if !defined(_PHP_VERSION) |
179 | _PHP_VERSION= ${_PHP_VERSION_FIRSTACCEPTED} | | 179 | _PHP_VERSION= ${_PHP_VERSION_FIRSTACCEPTED} |
180 | .endif | | 180 | .endif |
181 | | | 181 | |
182 | # | | 182 | # |
183 | # Variable assignment for multi-PHP packages | | 183 | # Variable assignment for multi-PHP packages |
184 | MULTI+= PHP_VERSION_REQD=${_PHP_VERSION} | | 184 | MULTI+= PHP_VERSION_REQD=${_PHP_VERSION} |
185 | | | 185 | |
186 | # export some of the internal variables | | 186 | # export some of the internal variables |
187 | PKG_PHP_VERSION:= ${_PHP_VERSION:C/\.[0-9]//} | | 187 | PKG_PHP_VERSION:= ${_PHP_VERSION:C/\.[0-9]//} |
188 | PKG_PHP:= PHP${_PHP_VERSION:C/([0-9])([0-9])/\1.\2/} | | 188 | PKG_PHP:= PHP${_PHP_VERSION:C/([0-9])([0-9])/\1.\2/} |
189 | | | 189 | |
190 | # Major version | | 190 | # Major version |
191 | PKG_PHP_MAJOR_VERS:= ${_PHP_VERSION:C/^([0-9]).*/\1/} | | 191 | PKG_PHP_MAJOR_VERS:= ${_PHP_VERSION:C/^([0-9]).*/\1/} |
192 | | | 192 | |
193 | PHP_CHECK_INSTALLED?= Yes | | 193 | PHP_CHECK_INSTALLED?= Yes |
194 | | | 194 | |
195 | # if installed PHP isn't compatible with required PHP, bail out | | 195 | # if installed PHP isn't compatible with required PHP, bail out |
196 | .if empty(PHP_CHECK_INSTALLED:M[nN][oO]) | | 196 | .if empty(PHP_CHECK_INSTALLED:M[nN][oO]) |
197 | .if defined(_PHP_INSTALLED) && !defined(_PHP_VERSION_${_PHP_VERSION}_INSTALLED) | | 197 | .if defined(_PHP_INSTALLED) && !defined(_PHP_VERSION_${_PHP_VERSION}_INSTALLED) |
198 | PKG_FAIL_REASON+= "Package accepts ${PKG_PHP}, but a different version is installed" | | 198 | PKG_FAIL_REASON+= "Package accepts ${PKG_PHP}, but a different version is installed" |
199 | .endif | | 199 | .endif |
200 | .endif | | 200 | .endif |
201 | | | 201 | |
202 | MESSAGE_SUBST+= PKG_PHP_VERSION=${PKG_PHP_VERSION} \ | | 202 | MESSAGE_SUBST+= PKG_PHP_VERSION=${PKG_PHP_VERSION} \ |
203 | PKG_PHP=${PKG_PHP} | | 203 | PKG_PHP=${PKG_PHP} |
204 | PLIST_SUBST+= PHP_PKG_PREFIX=${PHP_PKG_PREFIX} \ | | 204 | PLIST_SUBST+= PHP_PKG_PREFIX=${PHP_PKG_PREFIX} \ |
205 | PKG_PHP_VERSION=${PKG_PHP_VERSION} \ | | 205 | PKG_PHP_VERSION=${PKG_PHP_VERSION} \ |
206 | PKG_PHP_MAJOR_VERS=${PKG_PHP_MAJOR_VERS} \ | | 206 | PKG_PHP_MAJOR_VERS=${PKG_PHP_MAJOR_VERS} \ |
207 | PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR} | | 207 | PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR} |
208 | | | 208 | |
209 | # force the selected PHP version for recursive builds | | 209 | # force the selected PHP version for recursive builds |
210 | PHP_VERSION_REQD:= ${PKG_PHP_VERSION} | | 210 | PHP_VERSION_REQD:= ${PKG_PHP_VERSION} |
211 | | | 211 | |
212 | # | | 212 | # |
213 | # set variables for the version we decided to use: | | 213 | # set variables for the version we decided to use: |
214 | # | | 214 | # |
215 | .if ${_PHP_VERSION} == 56 | | 215 | .if ${_PHP_VERSION} == 56 |
216 | PHP_VERSION= ${PHP56_VERSION} | | 216 | PHP_VERSION= ${PHP56_VERSION} |
217 | PHP_INITIAL_TEENY= 3 | | 217 | PHP_INITIAL_TEENY= 3 |
218 | PHP_EXTENSION_DIR= lib/php/${PHP56_RELDATE} | | 218 | PHP_EXTENSION_DIR= lib/php/${PHP56_RELDATE} |
219 | .elif ${_PHP_VERSION} == 74 | | 219 | .elif ${_PHP_VERSION} == 74 |
220 | PHP_VERSION= ${PHP74_VERSION} | | 220 | PHP_VERSION= ${PHP74_VERSION} |
221 | PHP_EXTENSION_DIR= lib/php/${PHP74_RELDATE} | | 221 | PHP_EXTENSION_DIR= lib/php/${PHP74_RELDATE} |
222 | .elif ${_PHP_VERSION} == 80 | | 222 | .elif ${_PHP_VERSION} == 80 |
223 | PHP_VERSION= ${PHP80_VERSION} | | 223 | PHP_VERSION= ${PHP80_VERSION} |
224 | PHP_EXTENSION_DIR= lib/php/${PHP80_RELDATE} | | 224 | PHP_EXTENSION_DIR= lib/php/${PHP80_RELDATE} |
225 | .elif ${_PHP_VERSION} == 81 | | 225 | .elif ${_PHP_VERSION} == 81 |
226 | PHP_VERSION= ${PHP81_VERSION} | | 226 | PHP_VERSION= ${PHP81_VERSION} |
227 | PHP_EXTENSION_DIR= lib/php/${PHP81_RELDATE} | | 227 | PHP_EXTENSION_DIR= lib/php/${PHP81_RELDATE} |
228 | .elif ${_PHP_VERSION} == 82 | | 228 | .elif ${_PHP_VERSION} == 82 |
229 | PHP_VERSION= ${PHP82_VERSION} | | 229 | PHP_VERSION= ${PHP82_VERSION} |
230 | PHP_EXTENSION_DIR= lib/php/${PHP82_RELDATE} | | 230 | PHP_EXTENSION_DIR= lib/php/${PHP82_RELDATE} |
231 | .elif ${_PHP_VERSION} == 83 | | 231 | .elif ${_PHP_VERSION} == 83 |
232 | PHP_VERSION= ${PHP83_VERSION} | | 232 | PHP_VERSION= ${PHP83_VERSION} |
233 | PHP_EXTENSION_DIR= lib/php/${PHP83_RELDATE} | | 233 | PHP_EXTENSION_DIR= lib/php/${PHP83_RELDATE} |
234 | .else | | 234 | .else |
235 | # force an error | | 235 | # force an error |
236 | PKG_FAIL_REASON+= "${PKG_PHP} is not a valid package" | | 236 | PKG_FAIL_REASON+= "${PKG_PHP} is not a valid package" |
237 | .endif | | 237 | .endif |
238 | | | 238 | |
239 | PHP_INITIAL_TEENY?= 0 | | 239 | PHP_INITIAL_TEENY?= 0 |
240 | PHPPKGSRCDIR= ../../lang/php${PKG_PHP_VERSION} | | 240 | PHPPKGSRCDIR= ../../lang/php${PKG_PHP_VERSION} |
241 | PHP_PKG_PREFIX= php${PKG_PHP_VERSION} | | 241 | PHP_PKG_PREFIX= php${PKG_PHP_VERSION} |
242 | | | 242 | |
243 | _PHP_VER_MAJOR= ${PHP_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\1/} | | 243 | _PHP_VER_MAJOR= ${PHP_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\1/} |
244 | _PHP_VER_MINOR= ${PHP_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\2/} | | 244 | _PHP_VER_MINOR= ${PHP_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\2/} |
245 | | | 245 | |
246 | PHP_BASE_VERS= ${_PHP_VER_MAJOR}.${_PHP_VER_MINOR}.${PHP_INITIAL_TEENY} | | 246 | PHP_BASE_VERS= ${_PHP_VER_MAJOR}.${_PHP_VER_MINOR}.${PHP_INITIAL_TEENY} |
247 | | | 247 | |
248 | # | | 248 | # |
249 | # check installed version against required: | | 249 | # check installed version against required: |
250 | # | | 250 | # |
251 | .if !empty(PHP_CHECK_INSTALLED:M[nN][oO]) | | 251 | .if !empty(PHP_CHECK_INSTALLED:M[nN][oO]) |
252 | .if defined(_PHP_VERSION_INSTALLED) && ${_PHP_VERSION} != ${_PHP_VERSION_INSTALLED} | | 252 | .if defined(_PHP_VERSION_INSTALLED) && ${_PHP_VERSION} != ${_PHP_VERSION_INSTALLED} |
253 | PKG_FAIL_REASON+= "${PKGBASE} requires ${PKG_PHP}, but php-${_PHP_VERSION_INSTALLED} is already installed." | | 253 | PKG_FAIL_REASON+= "${PKGBASE} requires ${PKG_PHP}, but php-${_PHP_VERSION_INSTALLED} is already installed." |
254 | .endif | | 254 | .endif |
255 | .endif | | 255 | .endif |
256 | | | 256 | |
257 | MAKEFLAGS+= PHP_VERSION_REQD=${PHP_VERSION_REQD} | | 257 | MAKEFLAGS+= PHP_VERSION_REQD=${PHP_VERSION_REQD} |
258 | | | 258 | |
259 | .endif # PHPVERSION_MK | | 259 | .endif # PHPVERSION_MK |