Sat Jun 16 15:18:13 2012 UTC ()
Remove support for php5 (PHP 5.2.x).


(taca)
diff -r1.18 -r1.19 pkgsrc/lang/php/phpversion.mk

cvs diff -r1.18 -r1.19 pkgsrc/lang/php/phpversion.mk (expand / switch to unified diff)

--- pkgsrc/lang/php/phpversion.mk 2012/06/16 02:47:51 1.18
+++ pkgsrc/lang/php/phpversion.mk 2012/06/16 15:18:13 1.19
@@ -1,110 +1,106 @@ @@ -1,110 +1,106 @@
1# $NetBSD: phpversion.mk,v 1.18 2012/06/16 02:47:51 taca Exp $ 1# $NetBSD: phpversion.mk,v 1.19 2012/06/16 15:18: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: 52 53 54 13# Possible: 53 54
14# Default: 53 14# Default: 53
15# 15#
16# === Package-settable variables === 16# === Package-settable variables ===
17# 17#
18# PHP_VERSIONS_ACCEPTED 18# PHP_VERSIONS_ACCEPTED
19# The PHP versions that are accepted by the package. 19# The PHP versions that are accepted by the package.
20# 20#
21# Possible: 52 53 54 21# Possible: 53 54
22# Default: 52 53 54 22# Default: 53 54
23# 23#
24# PHP_VERSION_REQD 24# PHP_VERSION_REQD
25# If the package works only with a specific PHP version, this 25# If the package works only with a specific PHP version, this
26# variable can be used to force it. 26# variable can be used to force it.
27# 27#
28# Possible: (undefined) 52 53 54 28# Possible: (undefined) 53 54
29# Default: (undefined) 29# Default: (undefined)
30# 30#
31# === Variables defined by this file === 31# === Variables defined by this file ===
32# 32#
33# PKG_PHP_VERSION 33# PKG_PHP_VERSION
34# The selected PHP version. 34# The selected PHP version.
35# 35#
36# Possible: 52 53 54 36# Possible: 53 54
37# Default: ${PHP_VERSION_DEFAULT} 37# Default: ${PHP_VERSION_DEFAULT}
38# 38#
39# PHP_BASE_VERS 39# PHP_BASE_VERS
40# The selected PHP's full version depends on PKG_PHP_VERSION 40# The selected PHP's full version depends on PKG_PHP_VERSION
41# 41#
42# PKG_PHP_MAJOR_VERS 42# PKG_PHP_MAJOR_VERS
43# The selected PHP's major version. 43# The selected PHP's major version.
44# 44#
45# Possible: 5 45# Possible: 5
46# Default: 5 46# Default: 5
47# 47#
48# PKG_PHP 48# PKG_PHP
49# The same as ${PKG_PHP_VERSION}, prefixed with "php-". 49# The same as ${PKG_PHP_VERSION}, prefixed with "php-".
50# 50#
51# PHPPKGSRCDIR 51# PHPPKGSRCDIR
52# The directory of the PHP implementation, relative to the 52# The directory of the PHP implementation, relative to the
53# package directory. 53# package directory.
54# 54#
55# Example: ../../lang/php5 55# Example: ../../lang/php5
56# 56#
57# PHP_PKG_PREFIX 57# PHP_PKG_PREFIX
58# The prefix that is prepended to the package name. 58# The prefix that is prepended to the package name.
59# 59#
60# Example: php5, php53, php54 60# Example: php53, php54
61# 61#
62# Keywords: php 62# Keywords: php
63# 63#
64 64
65.if !defined(PHPVERSION_MK) 65.if !defined(PHPVERSION_MK)
66PHPVERSION_MK= defined 66PHPVERSION_MK= defined
67 67
68_VARGROUPS+= php 68_VARGROUPS+= php
69_USER_VARS.php= PHP_VERSION_DEFAULT 69_USER_VARS.php= PHP_VERSION_DEFAULT
70_PKG_VARS.php= PHP_VERSIONS_ACCEPTED PHP_VERSION_REQD 70_PKG_VARS.php= PHP_VERSIONS_ACCEPTED PHP_VERSION_REQD
71_SYS_VARS.php= PKG_PHP_VERSION PKG_PHP PHPPKGSRCDIR PHP_PKG_PREFIX \ 71_SYS_VARS.php= PKG_PHP_VERSION PKG_PHP PHPPKGSRCDIR PHP_PKG_PREFIX \
72 PKG_PHP_MAJOR_VERS 72 PKG_PHP_MAJOR_VERS
73 73
74.include "../../mk/bsd.prefs.mk" 74.include "../../mk/bsd.prefs.mk"
75 75
76PHP52_VERSION= 5.2.17 
77PHP53_VERSION= 5.3.14 76PHP53_VERSION= 5.3.14
78PHP54_VERSION= 5.4.4 77PHP54_VERSION= 5.4.4
79 78
80PHP_VERSION_DEFAULT?= 53 79PHP_VERSION_DEFAULT?= 53
81PHP_VERSIONS_ACCEPTED?= 52 53 54 80PHP_VERSIONS_ACCEPTED?= 53 54
82 81
83# transform the list into individual variables 82# transform the list into individual variables
84.for pv in ${PHP_VERSIONS_ACCEPTED} 83.for pv in ${PHP_VERSIONS_ACCEPTED}
85_PHP_VERSION_${pv}_OK= yes 84_PHP_VERSION_${pv}_OK= yes
86.endfor 85.endfor
87 86
88# check what is installed 87# check what is installed
89.if exists(${LOCALBASE}/lib/php/20120301) 88.if exists(${LOCALBASE}/lib/php/20120301)
90_PHP_VERSION_54_INSTALLED= yes 89_PHP_VERSION_54_INSTALLED= yes
91_PHP_INSTALLED= yes 90_PHP_INSTALLED= yes
92.elif exists(${LOCALBASE}/lib/php/20090626) || exists(${LOCALBASE}/include/php/Zend/zend_gc.h) 91.elif exists(${LOCALBASE}/lib/php/20090626) || exists(${LOCALBASE}/include/php/Zend/zend_gc.h)
93_PHP_VERSION_53_INSTALLED= yes 92_PHP_VERSION_53_INSTALLED= yes
94_PHP_INSTALLED= yes 93_PHP_INSTALLED= yes
95.elif exists(${LOCALBASE}/lib/php/20040412) 
96_PHP_VERSION_52_INSTALLED= yes 
97_PHP_INSTALLED= yes 
98.endif 94.endif
99 95
100# if a version is explicitely required, take it 96# if a version is explicitely required, take it
101.if defined(PHP_VERSION_REQD) 97.if defined(PHP_VERSION_REQD)
102_PHP_VERSION= ${PHP_VERSION_REQD} 98_PHP_VERSION= ${PHP_VERSION_REQD}
103.endif 99.endif
104# if the default is already installed, it is first choice 100# if the default is already installed, it is first choice
105.if !defined(_PHP_VERSION) 101.if !defined(_PHP_VERSION)
106.if defined(_PHP_VERSION_${PHP_VERSION_DEFAULT}_OK) 102.if defined(_PHP_VERSION_${PHP_VERSION_DEFAULT}_OK)
107.if defined(_PHP_VERSION_${PHP_VERSION_DEFAULT}_INSTALLED) 103.if defined(_PHP_VERSION_${PHP_VERSION_DEFAULT}_INSTALLED)
108_PHP_VERSION= ${PHP_VERSION_DEFAULT} 104_PHP_VERSION= ${PHP_VERSION_DEFAULT}
109.endif 105.endif
110.endif 106.endif
@@ -149,31 +145,27 @@ PKG_SKIP_REASON+= "Package accepts ${PKG @@ -149,31 +145,27 @@ PKG_SKIP_REASON+= "Package accepts ${PKG
149 145
150MESSAGE_SUBST+= PKG_PHP_VERSION=${PKG_PHP_VERSION} \ 146MESSAGE_SUBST+= PKG_PHP_VERSION=${PKG_PHP_VERSION} \
151 PKG_PHP=${PKG_PHP} 147 PKG_PHP=${PKG_PHP}
152PLIST_SUBST+= PKG_PHP_VERSION=${PKG_PHP_VERSION} \ 148PLIST_SUBST+= PKG_PHP_VERSION=${PKG_PHP_VERSION} \
153 PKG_PHP_MAJOR_VERS=${PKG_PHP_MAJOR_VERS} \ 149 PKG_PHP_MAJOR_VERS=${PKG_PHP_MAJOR_VERS} \
154 PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR} 150 PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR}
155 151
156# force the selected PHP version for recursive builds 152# force the selected PHP version for recursive builds
157PHP_VERSION_REQD:= ${PKG_PHP_VERSION} 153PHP_VERSION_REQD:= ${PKG_PHP_VERSION}
158 154
159# 155#
160# set variables for the version we decided to use: 156# set variables for the version we decided to use:
161# 157#
162.if ${_PHP_VERSION} == "52" 158.if ${_PHP_VERSION} == "53"
163PHPPKGSRCDIR= ../../lang/php5 
164PHP_BASE_VERS= ${PHP52_VERSION} 
165PHP_PKG_PREFIX= php5 
166.elif ${_PHP_VERSION} == "53" 
167PHPPKGSRCDIR= ../../lang/php53 159PHPPKGSRCDIR= ../../lang/php53
168PHP_BASE_VERS= ${PHP53_VERSION} 160PHP_BASE_VERS= ${PHP53_VERSION}
169PHP_PKG_PREFIX= php53 161PHP_PKG_PREFIX= php53
170.elif ${_PHP_VERSION} == "54" 162.elif ${_PHP_VERSION} == "54"
171PHPPKGSRCDIR= ../../lang/php54 163PHPPKGSRCDIR= ../../lang/php54
172PHP_BASE_VERS= ${PHP54_VERSION} 164PHP_BASE_VERS= ${PHP54_VERSION}
173PHP_PKG_PREFIX= php54 165PHP_PKG_PREFIX= php54
174.else 166.else
175# force an error 167# force an error
176PKG_SKIP_REASON+= "${PKG_PHP} is not a valid package" 168PKG_SKIP_REASON+= "${PKG_PHP} is not a valid package"
177.endif 169.endif
178 170
179# 171#