| @@ -1,95 +1,95 @@ | | | @@ -1,95 +1,95 @@ |
1 | # $NetBSD: phpversion.mk,v 1.30 2013/02/22 03:08:22 taca Exp $ | | 1 | # $NetBSD: phpversion.mk,v 1.31 2013/03/16 02:02:13 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 | | 13 | # Possible: 53 54 |
14 | # Default: 53 | | 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 | | 30 | # Possible: 53 54 |
31 | # Default: 53 54 | | 31 | # Default: 54 53 |
32 | # | | 32 | # |
33 | # === Variables defined by this file === | | 33 | # === Variables defined by this file === |
34 | # | | 34 | # |
35 | # PKG_PHP_VERSION | | 35 | # PKG_PHP_VERSION |
36 | # The selected PHP version. | | 36 | # The selected PHP version. |
37 | # | | 37 | # |
38 | # Possible: 53 54 | | 38 | # Possible: 53 54 |
39 | # Default: ${PHP_VERSION_DEFAULT} | | 39 | # Default: ${PHP_VERSION_DEFAULT} |
40 | # | | 40 | # |
41 | # PHP_BASE_VERS | | 41 | # PHP_BASE_VERS |
42 | # The selected PHP's full version depends on PKG_PHP_VERSION | | 42 | # The selected PHP's full version depends on PKG_PHP_VERSION |
43 | # | | 43 | # |
44 | # PKG_PHP_MAJOR_VERS | | 44 | # PKG_PHP_MAJOR_VERS |
45 | # The selected PHP's major version. | | 45 | # The selected PHP's major version. |
46 | # | | 46 | # |
47 | # Possible: 5 | | 47 | # Possible: 5 |
48 | # Default: 5 | | 48 | # Default: 5 |
49 | # | | 49 | # |
50 | # PKG_PHP | | 50 | # PKG_PHP |
51 | # The same as ${PKG_PHP_VERSION}, prefixed with "php-". | | 51 | # The same as ${PKG_PHP_VERSION}, prefixed with "php-". |
52 | # | | 52 | # |
53 | # PHPPKGSRCDIR | | 53 | # PHPPKGSRCDIR |
54 | # The directory of the PHP implementation, relative to the | | 54 | # The directory of the PHP implementation, relative to the |
55 | # package directory. | | 55 | # package directory. |
56 | # | | 56 | # |
57 | # Example: ../../lang/php5 | | 57 | # Example: ../../lang/php54 |
58 | # | | 58 | # |
59 | # PHP_PKG_PREFIX | | 59 | # PHP_PKG_PREFIX |
60 | # The prefix that is prepended to the package name. | | 60 | # The prefix that is prepended to the package name. |
61 | # | | 61 | # |
62 | # Example: php53, php54 | | 62 | # Example: php53, php54 |
63 | # | | 63 | # |
64 | # Keywords: php | | 64 | # Keywords: php |
65 | # | | 65 | # |
66 | | | 66 | |
67 | .if !defined(PHPVERSION_MK) | | 67 | .if !defined(PHPVERSION_MK) |
68 | PHPVERSION_MK= defined | | 68 | PHPVERSION_MK= defined |
69 | | | 69 | |
70 | _VARGROUPS+= php | | 70 | _VARGROUPS+= php |
71 | _USER_VARS.php= PHP_VERSION_DEFAULT | | 71 | _USER_VARS.php= PHP_VERSION_DEFAULT |
72 | _PKG_VARS.php= PHP_VERSIONS_ACCEPTED PHP_VERSION_REQD | | 72 | _PKG_VARS.php= PHP_VERSIONS_ACCEPTED PHP_VERSION_REQD |
73 | _SYS_VARS.php= PKG_PHP_VERSION PKG_PHP PHPPKGSRCDIR PHP_PKG_PREFIX \ | | 73 | _SYS_VARS.php= PKG_PHP_VERSION PKG_PHP PHPPKGSRCDIR PHP_PKG_PREFIX \ |
74 | PKG_PHP_MAJOR_VERS | | 74 | PKG_PHP_MAJOR_VERS |
75 | | | 75 | |
76 | .include "../../mk/bsd.prefs.mk" | | 76 | .include "../../mk/bsd.prefs.mk" |
77 | | | 77 | |
78 | PHP53_VERSION= 5.3.22 | | 78 | PHP53_VERSION= 5.3.23 |
79 | PHP54_VERSION= 5.4.12 | | 79 | PHP54_VERSION= 5.4.13 |
80 | | | 80 | |
81 | PHP_VERSION_DEFAULT?= 53 | | 81 | PHP_VERSION_DEFAULT?= 54 |
82 | PHP_VERSIONS_ACCEPTED?= 53 54 | | 82 | PHP_VERSIONS_ACCEPTED?= 54 53 |
83 | | | 83 | |
84 | # transform the list into individual variables | | 84 | # transform the list into individual variables |
85 | .for pv in ${PHP_VERSIONS_ACCEPTED} | | 85 | .for pv in ${PHP_VERSIONS_ACCEPTED} |
86 | _PHP_VERSION_${pv}_OK= yes | | 86 | _PHP_VERSION_${pv}_OK= yes |
87 | .endfor | | 87 | .endfor |
88 | | | 88 | |
89 | # check what is installed | | 89 | # check what is installed |
90 | .if exists(${LOCALBASE}/lib/php/20120301) | | 90 | .if exists(${LOCALBASE}/lib/php/20120301) |
91 | _PHP_VERSION_54_INSTALLED= yes | | 91 | _PHP_VERSION_54_INSTALLED= yes |
92 | _PHP_INSTALLED= yes | | 92 | _PHP_INSTALLED= yes |
93 | .elif exists(${LOCALBASE}/lib/php/20090626) || exists(${LOCALBASE}/include/php/Zend/zend_gc.h) | | 93 | .elif exists(${LOCALBASE}/lib/php/20090626) || exists(${LOCALBASE}/include/php/Zend/zend_gc.h) |
94 | _PHP_VERSION_53_INSTALLED= yes | | 94 | _PHP_VERSION_53_INSTALLED= yes |
95 | _PHP_INSTALLED= yes | | 95 | _PHP_INSTALLED= yes |