Mon Jun 3 15:23:14 2013 UTC ()
Update PHP53_VERSION and PHP54_VERSION.  It should be updated with
last update of php53/php54.


(taca)
diff -r1.32 -r1.33 pkgsrc/lang/php/phpversion.mk

cvs diff -r1.32 -r1.33 pkgsrc/lang/php/phpversion.mk (switch to unified diff)

--- pkgsrc/lang/php/phpversion.mk 2013/04/12 17:01:46 1.32
+++ pkgsrc/lang/php/phpversion.mk 2013/06/03 15:23:14 1.33
@@ -1,182 +1,182 @@ @@ -1,182 +1,182 @@
1# $NetBSD: phpversion.mk,v 1.32 2013/04/12 17:01:46 taca Exp $ 1# $NetBSD: phpversion.mk,v 1.33 2013/06/03 15:23:14 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: 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 30# Possible: 53 54
31# Default: 54 53 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/php54 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)
68PHPVERSION_MK= defined 68PHPVERSION_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
78PHP53_VERSION= 5.3.24 78PHP53_VERSION= 5.3.25
79PHP54_VERSION= 5.4.14 79PHP54_VERSION= 5.4.15
80 80
81PHP_VERSION_DEFAULT?= 54 81PHP_VERSION_DEFAULT?= 54
82PHP_VERSIONS_ACCEPTED?= 54 53 82PHP_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
96.endif 96.endif
97 97
98# if a version is explicitely required, take it 98# if a version is explicitely required, take it
99.if defined(PHP_VERSION_REQD) 99.if defined(PHP_VERSION_REQD)
100_PHP_VERSION= ${PHP_VERSION_REQD} 100_PHP_VERSION= ${PHP_VERSION_REQD}
101.endif 101.endif
102# if the default is already installed, it is first choice 102# if the default is already installed, it is first choice
103.if !defined(_PHP_VERSION) 103.if !defined(_PHP_VERSION)
104.if defined(_PHP_VERSION_${PHP_VERSION_DEFAULT}_OK) 104.if defined(_PHP_VERSION_${PHP_VERSION_DEFAULT}_OK)
105.if defined(_PHP_VERSION_${PHP_VERSION_DEFAULT}_INSTALLED) 105.if defined(_PHP_VERSION_${PHP_VERSION_DEFAULT}_INSTALLED)
106_PHP_VERSION= ${PHP_VERSION_DEFAULT} 106_PHP_VERSION= ${PHP_VERSION_DEFAULT}
107.endif 107.endif
108.endif 108.endif
109.endif 109.endif
110# prefer an already installed version, in order of "accepted" 110# prefer an already installed version, in order of "accepted"
111.if !defined(_PHP_VERSION) 111.if !defined(_PHP_VERSION)
112.for pv in ${PHP_VERSIONS_ACCEPTED} 112.for pv in ${PHP_VERSIONS_ACCEPTED}
113.if defined(_PHP_VERSION_${pv}_INSTALLED) 113.if defined(_PHP_VERSION_${pv}_INSTALLED)
114_PHP_VERSION?= ${pv} 114_PHP_VERSION?= ${pv}
115.else 115.else
116# keep information as last resort - see below 116# keep information as last resort - see below
117_PHP_VERSION_FIRSTACCEPTED?= ${pv} 117_PHP_VERSION_FIRSTACCEPTED?= ${pv}
118.endif 118.endif
119.endfor 119.endfor
120.endif 120.endif
121# if the default is OK for the addon pkg, take this 121# if the default is OK for the addon pkg, take this
122.if !defined(_PHP_VERSION) 122.if !defined(_PHP_VERSION)
123.if defined(_PHP_VERSION_${PHP_VERSION_DEFAULT}_OK) 123.if defined(_PHP_VERSION_${PHP_VERSION_DEFAULT}_OK)
124_PHP_VERSION= ${PHP_VERSION_DEFAULT} 124_PHP_VERSION= ${PHP_VERSION_DEFAULT}
125.endif 125.endif
126.endif 126.endif
127# take the first one accepted by the package 127# take the first one accepted by the package
128.if !defined(_PHP_VERSION) 128.if !defined(_PHP_VERSION)
129_PHP_VERSION= ${_PHP_VERSION_FIRSTACCEPTED} 129_PHP_VERSION= ${_PHP_VERSION_FIRSTACCEPTED}
130.endif 130.endif
131 131
132# 132#
133# Variable assignment for multi-PHP packages 133# Variable assignment for multi-PHP packages
134MULTI+= PHP_VERSION_REQD=${_PHP_VERSION} 134MULTI+= PHP_VERSION_REQD=${_PHP_VERSION}
135 135
136# export some of internal variables 136# export some of internal variables
137PKG_PHP_VERSION:= ${_PHP_VERSION:C/\.[0-9]//} 137PKG_PHP_VERSION:= ${_PHP_VERSION:C/\.[0-9]//}
138PKG_PHP:= PHP${_PHP_VERSION:C/([0-9])([0-9])/\1.\2/} 138PKG_PHP:= PHP${_PHP_VERSION:C/([0-9])([0-9])/\1.\2/}
139 139
140# currently we have only PHP 5.x packages. 140# currently we have only PHP 5.x packages.
141PKG_PHP_MAJOR_VERS:= 5 141PKG_PHP_MAJOR_VERS:= 5
142 142
143# if installed PHP isn't compatible with required PHP, bail out 143# if installed PHP isn't compatible with required PHP, bail out
144.if defined(_PHP_INSTALLED) && !defined(_PHP_VERSION_${_PHP_VERSION}_INSTALLED) 144.if defined(_PHP_INSTALLED) && !defined(_PHP_VERSION_${_PHP_VERSION}_INSTALLED)
145PKG_SKIP_REASON+= "Package accepts ${PKG_PHP}, but different version is installed" 145PKG_SKIP_REASON+= "Package accepts ${PKG_PHP}, but different version is installed"
146.endif 146.endif
147 147
148MESSAGE_SUBST+= PKG_PHP_VERSION=${PKG_PHP_VERSION} \ 148MESSAGE_SUBST+= PKG_PHP_VERSION=${PKG_PHP_VERSION} \
149 PKG_PHP=${PKG_PHP} 149 PKG_PHP=${PKG_PHP}
150PLIST_SUBST+= PKG_PHP_VERSION=${PKG_PHP_VERSION} \ 150PLIST_SUBST+= PKG_PHP_VERSION=${PKG_PHP_VERSION} \
151 PKG_PHP_MAJOR_VERS=${PKG_PHP_MAJOR_VERS} \ 151 PKG_PHP_MAJOR_VERS=${PKG_PHP_MAJOR_VERS} \
152 PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR} 152 PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR}
153 153
154# force the selected PHP version for recursive builds 154# force the selected PHP version for recursive builds
155PHP_VERSION_REQD:= ${PKG_PHP_VERSION} 155PHP_VERSION_REQD:= ${PKG_PHP_VERSION}
156 156
157# 157#
158# set variables for the version we decided to use: 158# set variables for the version we decided to use:
159# 159#
160.if ${_PHP_VERSION} == "53" 160.if ${_PHP_VERSION} == "53"
161PHPPKGSRCDIR= ../../lang/php53 161PHPPKGSRCDIR= ../../lang/php53
162PHP_BASE_VERS= ${PHP53_VERSION} 162PHP_BASE_VERS= ${PHP53_VERSION}
163PHP_PKG_PREFIX= php53 163PHP_PKG_PREFIX= php53
164.elif ${_PHP_VERSION} == "54" 164.elif ${_PHP_VERSION} == "54"
165PHPPKGSRCDIR= ../../lang/php54 165PHPPKGSRCDIR= ../../lang/php54
166PHP_BASE_VERS= ${PHP54_VERSION} 166PHP_BASE_VERS= ${PHP54_VERSION}
167PHP_PKG_PREFIX= php54 167PHP_PKG_PREFIX= php54
168.else 168.else
169# force an error 169# force an error
170PKG_SKIP_REASON+= "${PKG_PHP} is not a valid package" 170PKG_SKIP_REASON+= "${PKG_PHP} is not a valid package"
171.endif 171.endif
172 172
173# 173#
174# check installed version aginst required: 174# check installed version aginst required:
175# 175#
176.if defined(_PHP_VERSION_INSTALLED) 176.if defined(_PHP_VERSION_INSTALLED)
177.if ${_PHP_VERSION} != ${_PHP_VERSION_INSTALLED} 177.if ${_PHP_VERSION} != ${_PHP_VERSION_INSTALLED}
178PKG_SKIP_REASON+= "${PKGBASE} requires ${PKG_PHP}, but php-${_PHP_VERSION_INSTALLED} is already installed." 178PKG_SKIP_REASON+= "${PKGBASE} requires ${PKG_PHP}, but php-${_PHP_VERSION_INSTALLED} is already installed."
179.endif 179.endif
180.endif 180.endif
181 181
182.endif # PHPVERSION_MK 182.endif # PHPVERSION_MK