Sun Dec 15 17:54:58 2019 UTC ()
lang/php: add support for PHP 7.4

Add support for PHP 7.4.


(taca)
diff -r1.277 -r1.278 pkgsrc/lang/php/phpversion.mk

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

--- pkgsrc/lang/php/phpversion.mk 2019/12/09 14:23:45 1.277
+++ pkgsrc/lang/php/phpversion.mk 2019/12/15 17:54:58 1.278
@@ -1,136 +1,141 @@ @@ -1,136 +1,141 @@
1# $NetBSD: phpversion.mk,v 1.277 2019/12/09 14:23:45 taca Exp $ 1# $NetBSD: phpversion.mk,v 1.278 2019/12/15 17:54:58 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: 56 71 72 73 13# Possible: 56 71 72 73 74
14# Default: 73 14# Default: 73
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: 56 71 72 73 30# Possible: 56 71 72 73 74
31# Default: 73 56 71 72 31# Default: 73 56 71 72 74
32# 32#
33# PHP_VERSIONS_INCOMPATIBLE 33# PHP_VERSIONS_INCOMPATIBLE
34# The PHP versions that are not supported by the package. 34# The PHP versions that are not supported by the package.
35# 35#
36# Possible: 56 71 72 73 36# Possible: 56 71 72 73 74
37# Default: (empty) 37# Default: (empty)
38# 38#
39# PHP_CHECK_INSTALLED 39# PHP_CHECK_INSTALLED
40# Check installed version of PHP. Should be used by lang/php56, 40# Check installed version of PHP. Should be used by lang/php56,
41# lang/php71, lang/php72 or lang/php73 only. 41# lang/php71, lang/php72 or lang/php73 only.
42# 42#
43# Possible: Yes No 43# Possible: Yes No
44# Default: Yes 44# Default: Yes
45# 45#
46# === Variables defined by this file === 46# === Variables defined by this file ===
47# 47#
48# PKG_PHP_VERSION 48# PKG_PHP_VERSION
49# The selected PHP version. 49# The selected PHP version.
50# 50#
51# Possible: 56 71 72 73 51# Possible: 56 71 72 73 74
52# Default: ${PHP_VERSION_DEFAULT} 52# Default: ${PHP_VERSION_DEFAULT}
53# 53#
54# PHP_BASE_VERS 54# PHP_BASE_VERS
55# The selected PHP's full version depends on PKG_PHP_VERSION 55# The selected PHP's full version depends on PKG_PHP_VERSION
56# 56#
57# PKG_PHP_MAJOR_VERS 57# PKG_PHP_MAJOR_VERS
58# The selected PHP's major version. 58# The selected PHP's major version.
59# 59#
60# Possible: 5 7 60# Possible: 5 7
61# Default: 7 61# Default: 7
62# 62#
63# PKG_PHP 63# PKG_PHP
64# The same as ${PKG_PHP_VERSION}, prefixed with "php-". 64# The same as ${PKG_PHP_VERSION}, prefixed with "php-".
65# 65#
66# PHPPKGSRCDIR 66# PHPPKGSRCDIR
67# The directory of the PHP implementation, relative to the 67# The directory of the PHP implementation, relative to the
68# package directory. 68# package directory.
69# 69#
70# Example: ../../lang/php73 70# Example: ../../lang/php73
71# 71#
72# PHP_PKG_PREFIX 72# PHP_PKG_PREFIX
73# The prefix that is prepended to the package name. 73# The prefix that is prepended to the package name.
74# 74#
75# Example: php56 php71 php72 php73 75# Example: php56 php71 php72 php73 php74
76# 76#
77# PHP_EXTENSION_DIR 77# PHP_EXTENSION_DIR
78# Relative path to ${PREFIX} for PHP's extensions. It is derived from 78# Relative path to ${PREFIX} for PHP's extensions. It is derived from
79# initial release of major version. 79# initial release of major version.
80# 80#
81# Example: lib/php/20181200 81# Example: lib/php/20181200
82# 82#
83# Keywords: php 83# Keywords: php
84# 84#
85 85
86.if !defined(PHPVERSION_MK) 86.if !defined(PHPVERSION_MK)
87PHPVERSION_MK= defined 87PHPVERSION_MK= defined
88 88
89# Define each PHP's version. 89# Define each PHP's version.
90PHP56_VERSION= 5.6.40 90PHP56_VERSION= 5.6.40
91PHP71_VERSION= 7.1.33 91PHP71_VERSION= 7.1.33
92PHP72_VERSION= 7.2.25 92PHP72_VERSION= 7.2.25
93PHP73_VERSION= 7.3.12 93PHP73_VERSION= 7.3.12
 94PHP74_VERSION= 7.4.0
94 95
95# Define initial release of major version. 96# Define initial release of major version.
96PHP56_RELDATE= 20140828 97PHP56_RELDATE= 20140828
97PHP71_RELDATE= 20160303 98PHP71_RELDATE= 20160303
98PHP72_RELDATE= 20170718 99PHP72_RELDATE= 20170718
99PHP73_RELDATE= 20181200 100PHP73_RELDATE= 20181200
 101PHP74_RELDATE= 20191128
100 102
101_VARGROUPS+= php 103_VARGROUPS+= php
102_USER_VARS.php= PHP_VERSION_DEFAULT 104_USER_VARS.php= PHP_VERSION_DEFAULT
103_PKG_VARS.php= PHP_VERSIONS_ACCEPTED PHP_VERSION_REQD 105_PKG_VARS.php= PHP_VERSIONS_ACCEPTED PHP_VERSION_REQD
104_SYS_VARS.php= PKG_PHP_VERSION PKG_PHP PHPPKGSRCDIR PHP_PKG_PREFIX \ 106_SYS_VARS.php= PKG_PHP_VERSION PKG_PHP PHPPKGSRCDIR PHP_PKG_PREFIX \
105 PKG_PHP_MAJOR_VERS 107 PKG_PHP_MAJOR_VERS
106 108
107.include "../../mk/bsd.prefs.mk" 109.include "../../mk/bsd.prefs.mk"
108 110
109PHP_VERSION_DEFAULT?= 73 111PHP_VERSION_DEFAULT?= 73
110PHP_VERSIONS_ACCEPTED?= 73 56 71 72 112PHP_VERSIONS_ACCEPTED?= 73 56 71 72 74
111.for pv in ${PHP_VERSIONS_ACCEPTED} 113.for pv in ${PHP_VERSIONS_ACCEPTED}
112. if empty(PHP_VERSIONS_INCOMPATIBLE:M${pv}) 114. if empty(PHP_VERSIONS_INCOMPATIBLE:M${pv})
113_PHP_VERSIONS_ACCEPTED+= ${pv} 115_PHP_VERSIONS_ACCEPTED+= ${pv}
114. endif 116. endif
115.endfor 117.endfor
116 118
117# transform the list into individual variables 119# transform the list into individual variables
118.for pv in ${_PHP_VERSIONS_ACCEPTED} 120.for pv in ${_PHP_VERSIONS_ACCEPTED}
119_PHP_VERSION_${pv}_OK= yes 121_PHP_VERSION_${pv}_OK= yes
120.endfor 122.endfor
121 123
122# check what is installed 124# check what is installed
123.if exists(${LOCALBASE}/lib/php/${PHP73_RELDATE}) 125.if exists(${LOCALBASE}/lib/php/${PHP74_RELDATE})
 126_PHP_VERSION_74_INSTALLED= yes
 127_PHP_INSTALLED= yes
 128.elif exists(${LOCALBASE}/lib/php/${PHP73_RELDATE})
124_PHP_VERSION_73_INSTALLED= yes 129_PHP_VERSION_73_INSTALLED= yes
125_PHP_INSTALLED= yes 130_PHP_INSTALLED= yes
126.elif exists(${LOCALBASE}/lib/php/${PHP72_RELDATE}) 131.elif exists(${LOCALBASE}/lib/php/${PHP72_RELDATE})
127_PHP_VERSION_72_INSTALLED= yes 132_PHP_VERSION_72_INSTALLED= yes
128_PHP_INSTALLED= yes 133_PHP_INSTALLED= yes
129.elif exists(${LOCALBASE}/lib/php/${PHP71_RELDATE}) 134.elif exists(${LOCALBASE}/lib/php/${PHP71_RELDATE})
130_PHP_VERSION_71_INSTALLED= yes 135_PHP_VERSION_71_INSTALLED= yes
131_PHP_INSTALLED= yes 136_PHP_INSTALLED= yes
132.elif exists(${LOCALBASE}/lib/php/${PHP56_RELDATE}) 137.elif exists(${LOCALBASE}/lib/php/${PHP56_RELDATE})
133_PHP_VERSION_56_INSTALLED= yes 138_PHP_VERSION_56_INSTALLED= yes
134_PHP_INSTALLED= yes 139_PHP_INSTALLED= yes
135.endif 140.endif
136 141
@@ -214,26 +219,32 @@ PHP_PKG_PREFIX= php71 @@ -214,26 +219,32 @@ PHP_PKG_PREFIX= php71
214PHP_EXTENSION_DIR= lib/php/${PHP71_RELDATE} 219PHP_EXTENSION_DIR= lib/php/${PHP71_RELDATE}
215.elif ${_PHP_VERSION} == "72" 220.elif ${_PHP_VERSION} == "72"
216PHPPKGSRCDIR= ../../lang/php72 221PHPPKGSRCDIR= ../../lang/php72
217PHP_VERSION= ${PHP72_VERSION} 222PHP_VERSION= ${PHP72_VERSION}
218PHP_INITIAL_TEENY= 0 223PHP_INITIAL_TEENY= 0
219PHP_PKG_PREFIX= php72 224PHP_PKG_PREFIX= php72
220PHP_EXTENSION_DIR= lib/php/${PHP72_RELDATE} 225PHP_EXTENSION_DIR= lib/php/${PHP72_RELDATE}
221.elif ${_PHP_VERSION} == "73" 226.elif ${_PHP_VERSION} == "73"
222PHPPKGSRCDIR= ../../lang/php73 227PHPPKGSRCDIR= ../../lang/php73
223PHP_VERSION= ${PHP73_VERSION} 228PHP_VERSION= ${PHP73_VERSION}
224PHP_INITIAL_TEENY= 0 229PHP_INITIAL_TEENY= 0
225PHP_PKG_PREFIX= php73 230PHP_PKG_PREFIX= php73
226PHP_EXTENSION_DIR= lib/php/${PHP73_RELDATE} 231PHP_EXTENSION_DIR= lib/php/${PHP73_RELDATE}
 232.elif ${_PHP_VERSION} == "74"
 233PHPPKGSRCDIR= ../../lang/php74
 234PHP_VERSION= ${PHP74_VERSION}
 235PHP_INITIAL_TEENY= 0
 236PHP_PKG_PREFIX= php74
 237PHP_EXTENSION_DIR= lib/php/${PHP74_RELDATE}
227.else 238.else
228# force an error 239# force an error
229PKG_FAIL_REASON+= "${PKG_PHP} is not a valid package" 240PKG_FAIL_REASON+= "${PKG_PHP} is not a valid package"
230.endif 241.endif
231 242
232_PHP_VER_MAJOR= ${PHP_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\1/} 243_PHP_VER_MAJOR= ${PHP_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\1/}
233_PHP_VER_MINOR= ${PHP_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\2/} 244_PHP_VER_MINOR= ${PHP_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\2/}
234 245
235PHP_BASE_VERS= ${_PHP_VER_MAJOR}.${_PHP_VER_MINOR}.${PHP_INITIAL_TEENY} 246PHP_BASE_VERS= ${_PHP_VER_MAJOR}.${_PHP_VER_MINOR}.${PHP_INITIAL_TEENY}
236 247
237# 248#
238# check installed version aginst required: 249# check installed version aginst required:
239# 250#