| @@ -1,136 +1,131 @@ | | | @@ -1,136 +1,131 @@ |
1 | # $NetBSD: phpversion.mk,v 1.89 2015/03/15 11:50:53 taca Exp $ | | 1 | # $NetBSD: phpversion.mk,v 1.90 2015/03/15 15:25:57 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: 53 54 55 56 | | 13 | # Possible: 54 55 56 |
14 | # Default: 54 | | 14 | # Default: 54 |
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: 53 54 55 56 | | 30 | # Possible: 54 55 56 |
31 | # Default: 54 53 | | 31 | # Default: 54 |
32 | # | | 32 | # |
33 | # PHP_CHECK_INSTALLED | | 33 | # PHP_CHECK_INSTALLED |
34 | # Check installed version of PHP. Should be used lang/php53, | | 34 | # Check installed version of PHP. Should be used by lang/php54, |
35 | # lang/php54, lang/php55 and lang/php56 only. | | 35 | # lang/php55 and lang/php56 only. |
36 | # | | 36 | # |
37 | # Possible: Yes No | | 37 | # Possible: Yes No |
38 | # Default: Yes | | 38 | # Default: Yes |
39 | # | | 39 | # |
40 | # === Variables defined by this file === | | 40 | # === Variables defined by this file === |
41 | # | | 41 | # |
42 | # PKG_PHP_VERSION | | 42 | # PKG_PHP_VERSION |
43 | # The selected PHP version. | | 43 | # The selected PHP version. |
44 | # | | 44 | # |
45 | # Possible: 53 54 55 56 | | 45 | # Possible: 54 55 56 |
46 | # Default: ${PHP_VERSION_DEFAULT} | | 46 | # Default: ${PHP_VERSION_DEFAULT} |
47 | # | | 47 | # |
48 | # PHP_BASE_VERS | | 48 | # PHP_BASE_VERS |
49 | # The selected PHP's full version depends on PKG_PHP_VERSION | | 49 | # The selected PHP's full version depends on PKG_PHP_VERSION |
50 | # | | 50 | # |
51 | # PKG_PHP_MAJOR_VERS | | 51 | # PKG_PHP_MAJOR_VERS |
52 | # The selected PHP's major version. | | 52 | # The selected PHP's major version. |
53 | # | | 53 | # |
54 | # Possible: 5 | | 54 | # Possible: 5 |
55 | # Default: 5 | | 55 | # Default: 5 |
56 | # | | 56 | # |
57 | # PKG_PHP | | 57 | # PKG_PHP |
58 | # The same as ${PKG_PHP_VERSION}, prefixed with "php-". | | 58 | # The same as ${PKG_PHP_VERSION}, prefixed with "php-". |
59 | # | | 59 | # |
60 | # PHPPKGSRCDIR | | 60 | # PHPPKGSRCDIR |
61 | # The directory of the PHP implementation, relative to the | | 61 | # The directory of the PHP implementation, relative to the |
62 | # package directory. | | 62 | # package directory. |
63 | # | | 63 | # |
64 | # Example: ../../lang/php54 | | 64 | # Example: ../../lang/php54 |
65 | # | | 65 | # |
66 | # PHP_PKG_PREFIX | | 66 | # PHP_PKG_PREFIX |
67 | # The prefix that is prepended to the package name. | | 67 | # The prefix that is prepended to the package name. |
68 | # | | 68 | # |
69 | # Example: php53, php54, php55 php56 | | 69 | # Example: php54, php55 php56 |
70 | # | | 70 | # |
71 | # PHP_EXTENSION_DIR | | 71 | # PHP_EXTENSION_DIR |
72 | # Relative path to ${PREFIX} for PHP's extensions. It is derived from | | 72 | # Relative path to ${PREFIX} for PHP's extensions. It is derived from |
73 | # initial release of major version. | | 73 | # initial release of major version. |
74 | # | | 74 | # |
75 | # Example: lib/php/20090630 | | 75 | # Example: lib/php/20090630 |
76 | # | | 76 | # |
77 | # Keywords: php | | 77 | # Keywords: php |
78 | # | | 78 | # |
79 | | | 79 | |
80 | .if !defined(PHPVERSION_MK) | | 80 | .if !defined(PHPVERSION_MK) |
81 | PHPVERSION_MK= defined | | 81 | PHPVERSION_MK= defined |
82 | | | 82 | |
83 | # Define each PHP's version. | | 83 | # Define each PHP's version. |
84 | PHP53_VERSION= 5.3.29 | | | |
85 | PHP54_VERSION= 5.4.38 | | 84 | PHP54_VERSION= 5.4.38 |
86 | PHP55_VERSION= 5.5.22 | | 85 | PHP55_VERSION= 5.5.22 |
87 | PHP56_VERSION= 5.6.6 | | 86 | PHP56_VERSION= 5.6.6 |
88 | | | 87 | |
89 | # Define initial release of major version. | | 88 | # Define initial release of major version. |
90 | PHP53_RELDATE= 20090630 | | | |
91 | PHP54_RELDATE= 20120301 | | 89 | PHP54_RELDATE= 20120301 |
92 | PHP55_RELDATE= 20130620 | | 90 | PHP55_RELDATE= 20130620 |
93 | PHP56_RELDATE= 20140828 | | 91 | PHP56_RELDATE= 20140828 |
94 | | | 92 | |
95 | _VARGROUPS+= php | | 93 | _VARGROUPS+= php |
96 | _USER_VARS.php= PHP_VERSION_DEFAULT | | 94 | _USER_VARS.php= PHP_VERSION_DEFAULT |
97 | _PKG_VARS.php= PHP_VERSIONS_ACCEPTED PHP_VERSION_REQD | | 95 | _PKG_VARS.php= PHP_VERSIONS_ACCEPTED PHP_VERSION_REQD |
98 | _SYS_VARS.php= PKG_PHP_VERSION PKG_PHP PHPPKGSRCDIR PHP_PKG_PREFIX \ | | 96 | _SYS_VARS.php= PKG_PHP_VERSION PKG_PHP PHPPKGSRCDIR PHP_PKG_PREFIX \ |
99 | PKG_PHP_MAJOR_VERS | | 97 | PKG_PHP_MAJOR_VERS |
100 | | | 98 | |
101 | .include "../../mk/bsd.prefs.mk" | | 99 | .include "../../mk/bsd.prefs.mk" |
102 | | | 100 | |
103 | PHP_VERSION_DEFAULT?= 54 | | 101 | PHP_VERSION_DEFAULT?= 54 |
104 | PHP_VERSIONS_ACCEPTED?= 54 55 56 53 | | 102 | PHP_VERSIONS_ACCEPTED?= 54 55 56 |
105 | | | 103 | |
106 | # transform the list into individual variables | | 104 | # transform the list into individual variables |
107 | .for pv in ${PHP_VERSIONS_ACCEPTED} | | 105 | .for pv in ${PHP_VERSIONS_ACCEPTED} |
108 | _PHP_VERSION_${pv}_OK= yes | | 106 | _PHP_VERSION_${pv}_OK= yes |
109 | .endfor | | 107 | .endfor |
110 | | | 108 | |
111 | # check what is installed | | 109 | # check what is installed |
112 | .if exists(${LOCALBASE}/lib/php/20140828) | | 110 | .if exists(${LOCALBASE}/lib/php/20140828) |
113 | _PHP_VERSION_56_INSTALLED= yes | | 111 | _PHP_VERSION_56_INSTALLED= yes |
114 | _PHP_INSTALLED= yes | | 112 | _PHP_INSTALLED= yes |
115 | .elif exists(${LOCALBASE}/lib/php/20130620) | | 113 | .elif exists(${LOCALBASE}/lib/php/20130620) |
116 | _PHP_VERSION_55_INSTALLED= yes | | 114 | _PHP_VERSION_55_INSTALLED= yes |
117 | _PHP_INSTALLED= yes | | 115 | _PHP_INSTALLED= yes |
118 | .elif exists(${LOCALBASE}/lib/php/20120301) | | 116 | .elif exists(${LOCALBASE}/lib/php/20120301) |
119 | _PHP_VERSION_54_INSTALLED= yes | | 117 | _PHP_VERSION_54_INSTALLED= yes |
120 | _PHP_INSTALLED= yes | | 118 | _PHP_INSTALLED= yes |
121 | .elif exists(${LOCALBASE}/lib/php/20090626) || exists(${LOCALBASE}/include/php/Zend/zend_gc.h) | | | |
122 | _PHP_VERSION_53_INSTALLED= yes | | | |
123 | _PHP_INSTALLED= yes | | | |
124 | .endif | | 119 | .endif |
125 | | | 120 | |
126 | # if a version is explicitely required, take it | | 121 | # if a version is explicitely required, take it |
127 | .if defined(PHP_VERSION_REQD) | | 122 | .if defined(PHP_VERSION_REQD) |
128 | _PHP_VERSION= ${PHP_VERSION_REQD} | | 123 | _PHP_VERSION= ${PHP_VERSION_REQD} |
129 | .endif | | 124 | .endif |
130 | # if the default is already installed, it is first choice | | 125 | # if the default is already installed, it is first choice |
131 | .if !defined(_PHP_VERSION) | | 126 | .if !defined(_PHP_VERSION) |
132 | .if defined(_PHP_VERSION_${PHP_VERSION_DEFAULT}_OK) | | 127 | .if defined(_PHP_VERSION_${PHP_VERSION_DEFAULT}_OK) |
133 | .if defined(_PHP_VERSION_${PHP_VERSION_DEFAULT}_INSTALLED) | | 128 | .if defined(_PHP_VERSION_${PHP_VERSION_DEFAULT}_INSTALLED) |
134 | _PHP_VERSION= ${PHP_VERSION_DEFAULT} | | 129 | _PHP_VERSION= ${PHP_VERSION_DEFAULT} |
135 | .endif | | 130 | .endif |
136 | .endif | | 131 | .endif |
| @@ -179,33 +174,27 @@ PKG_FAIL_REASON+= "Package accepts ${PKG | | | @@ -179,33 +174,27 @@ PKG_FAIL_REASON+= "Package accepts ${PKG |
179 | | | 174 | |
180 | MESSAGE_SUBST+= PKG_PHP_VERSION=${PKG_PHP_VERSION} \ | | 175 | MESSAGE_SUBST+= PKG_PHP_VERSION=${PKG_PHP_VERSION} \ |
181 | PKG_PHP=${PKG_PHP} | | 176 | PKG_PHP=${PKG_PHP} |
182 | PLIST_SUBST+= PKG_PHP_VERSION=${PKG_PHP_VERSION} \ | | 177 | PLIST_SUBST+= PKG_PHP_VERSION=${PKG_PHP_VERSION} \ |
183 | PKG_PHP_MAJOR_VERS=${PKG_PHP_MAJOR_VERS} \ | | 178 | PKG_PHP_MAJOR_VERS=${PKG_PHP_MAJOR_VERS} \ |
184 | PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR} | | 179 | PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR} |
185 | | | 180 | |
186 | # force the selected PHP version for recursive builds | | 181 | # force the selected PHP version for recursive builds |
187 | PHP_VERSION_REQD:= ${PKG_PHP_VERSION} | | 182 | PHP_VERSION_REQD:= ${PKG_PHP_VERSION} |
188 | | | 183 | |
189 | # | | 184 | # |
190 | # set variables for the version we decided to use: | | 185 | # set variables for the version we decided to use: |
191 | # | | 186 | # |
192 | .if ${_PHP_VERSION} == "53" | | 187 | .if ${_PHP_VERSION} == "54" |
193 | PHPPKGSRCDIR= ../../lang/php53 | | | |
194 | PHP_VERSION= ${PHP53_VERSION} | | | |
195 | PHP_INITIAL_TEENY= 2 | | | |
196 | PHP_PKG_PREFIX= php53 | | | |
197 | PHP_EXTENSION_DIR= lib/php/${PHP53_RELDATE} | | | |
198 | .elif ${_PHP_VERSION} == "54" | | | |
199 | PHPPKGSRCDIR= ../../lang/php54 | | 188 | PHPPKGSRCDIR= ../../lang/php54 |
200 | PHP_VERSION= ${PHP54_VERSION} | | 189 | PHP_VERSION= ${PHP54_VERSION} |
201 | PHP_INITIAL_TEENY= 4 | | 190 | PHP_INITIAL_TEENY= 4 |
202 | PHP_PKG_PREFIX= php54 | | 191 | PHP_PKG_PREFIX= php54 |
203 | PHP_EXTENSION_DIR= lib/php/${PHP54_RELDATE} | | 192 | PHP_EXTENSION_DIR= lib/php/${PHP54_RELDATE} |
204 | .elif ${_PHP_VERSION} == "55" | | 193 | .elif ${_PHP_VERSION} == "55" |
205 | PHPPKGSRCDIR= ../../lang/php55 | | 194 | PHPPKGSRCDIR= ../../lang/php55 |
206 | PHP_VERSION= ${PHP55_VERSION} | | 195 | PHP_VERSION= ${PHP55_VERSION} |
207 | PHP_INITIAL_TEENY= 1 | | 196 | PHP_INITIAL_TEENY= 1 |
208 | PHP_PKG_PREFIX= php55 | | 197 | PHP_PKG_PREFIX= php55 |
209 | PHP_EXTENSION_DIR= lib/php/${PHP55_RELDATE} | | 198 | PHP_EXTENSION_DIR= lib/php/${PHP55_RELDATE} |
210 | .elif ${_PHP_VERSION} == "56" | | 199 | .elif ${_PHP_VERSION} == "56" |
211 | PHPPKGSRCDIR= ../../lang/php56 | | 200 | PHPPKGSRCDIR= ../../lang/php56 |