| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: phpversion.mk,v 1.38 2013/07/29 16:38:12 taca Exp $ | | 1 | # $NetBSD: phpversion.mk,v 1.39 2013/08/14 14:53:03 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 | | 13 | # Possible: 53 54 55 |
14 | # Default: 54 | | 14 | # Default: 54 |
| @@ -156,27 +156,27 @@ _PHP_VERSION= ${_PHP_VERSION_FIRSTACCEPT | | | @@ -156,27 +156,27 @@ _PHP_VERSION= ${_PHP_VERSION_FIRSTACCEPT |
156 | # Variable assignment for multi-PHP packages | | 156 | # Variable assignment for multi-PHP packages |
157 | MULTI+= PHP_VERSION_REQD=${_PHP_VERSION} | | 157 | MULTI+= PHP_VERSION_REQD=${_PHP_VERSION} |
158 | | | 158 | |
159 | # export some of internal variables | | 159 | # export some of internal variables |
160 | PKG_PHP_VERSION:= ${_PHP_VERSION:C/\.[0-9]//} | | 160 | PKG_PHP_VERSION:= ${_PHP_VERSION:C/\.[0-9]//} |
161 | PKG_PHP:= PHP${_PHP_VERSION:C/([0-9])([0-9])/\1.\2/} | | 161 | PKG_PHP:= PHP${_PHP_VERSION:C/([0-9])([0-9])/\1.\2/} |
162 | | | 162 | |
163 | # currently we have only PHP 5.x packages. | | 163 | # currently we have only PHP 5.x packages. |
164 | PKG_PHP_MAJOR_VERS:= 5 | | 164 | PKG_PHP_MAJOR_VERS:= 5 |
165 | | | 165 | |
166 | PHP_CHECK_INSTALLED?= Yes | | 166 | PHP_CHECK_INSTALLED?= Yes |
167 | | | 167 | |
168 | # if installed PHP isn't compatible with required PHP, bail out | | 168 | # if installed PHP isn't compatible with required PHP, bail out |
169 | .if !empty(PHP_CHECK_INSTALLED:M[nN][oO]) | | 169 | .if empty(PHP_CHECK_INSTALLED:M[nN][oO]) |
170 | .if defined(_PHP_INSTALLED) && !defined(_PHP_VERSION_${_PHP_VERSION}_INSTALLED) | | 170 | .if defined(_PHP_INSTALLED) && !defined(_PHP_VERSION_${_PHP_VERSION}_INSTALLED) |
171 | PKG_SKIP_REASON+= "Package accepts ${PKG_PHP}, but different version is installed" | | 171 | PKG_SKIP_REASON+= "Package accepts ${PKG_PHP}, but different version is installed" |
172 | .endif | | 172 | .endif |
173 | .endif | | 173 | .endif |
174 | | | 174 | |
175 | MESSAGE_SUBST+= PKG_PHP_VERSION=${PKG_PHP_VERSION} \ | | 175 | MESSAGE_SUBST+= PKG_PHP_VERSION=${PKG_PHP_VERSION} \ |
176 | PKG_PHP=${PKG_PHP} | | 176 | PKG_PHP=${PKG_PHP} |
177 | PLIST_SUBST+= PKG_PHP_VERSION=${PKG_PHP_VERSION} \ | | 177 | PLIST_SUBST+= PKG_PHP_VERSION=${PKG_PHP_VERSION} \ |
178 | PKG_PHP_MAJOR_VERS=${PKG_PHP_MAJOR_VERS} \ | | 178 | PKG_PHP_MAJOR_VERS=${PKG_PHP_MAJOR_VERS} \ |
179 | PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR} | | 179 | PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR} |
180 | | | 180 | |
181 | # force the selected PHP version for recursive builds | | 181 | # force the selected PHP version for recursive builds |
182 | PHP_VERSION_REQD:= ${PKG_PHP_VERSION} | | 182 | PHP_VERSION_REQD:= ${PKG_PHP_VERSION} |