pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/php lang/php: add php80 support



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5d4c035fd14e
branches:  trunk
changeset: 448332:5d4c035fd14e
user:      taca <taca%pkgsrc.org@localhost>
date:      Sun Mar 07 13:40:10 2021 +0000

description:
lang/php: add php80 support

Add php80 (PHP 8.0.x) support.

diffstat:

 lang/php/phpversion.mk |  33 +++++++++++++++++++++------------
 1 files changed, 21 insertions(+), 12 deletions(-)

diffs (123 lines):

diff -r 589b4500e732 -r 5d4c035fd14e lang/php/phpversion.mk
--- a/lang/php/phpversion.mk    Sun Mar 07 13:37:28 2021 +0000
+++ b/lang/php/phpversion.mk    Sun Mar 07 13:40:10 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: phpversion.mk,v 1.321 2021/03/06 13:29:02 taca Exp $
+# $NetBSD: phpversion.mk,v 1.322 2021/03/07 13:40:10 taca Exp $
 #
 # This file selects a PHP version, based on the user's preferences and
 # the installed packages. It does not add a dependency on the PHP
@@ -10,7 +10,7 @@
 #      The PHP version to choose when more than one is acceptable to
 #      the package.
 #
-#      Possible: 56 73 74
+#      Possible: 56 73 74 80
 #      Default: 73
 #
 # === Infrastructure variables ===
@@ -27,18 +27,18 @@
 # PHP_VERSIONS_ACCEPTED
 #      The PHP versions that are accepted by the package.
 #
-#      Possible: 56 73 74
-#      Default: 73 56 74
+#      Possible: 56 73 74 80
+#      Default: 73 56 74 80
 #
 # PHP_VERSIONS_INCOMPATIBLE
 #      The PHP versions that are not supported by the package.
 #
-#      Possible: 56 73 74
+#      Possible: 56 73 74 80
 #      Default: (empty)
 #
 # PHP_CHECK_INSTALLED
 #      Check installed version of PHP.  Should be used by lang/php56,
-#      lang/php73 or lang/php74 only.
+#      lang/php73, lang/php74 and lang/php80 only.
 #
 #      Possible: Yes No
 #      Default: Yes
@@ -48,7 +48,7 @@
 # PKG_PHP_VERSION
 #      The selected PHP version.
 #
-#      Possible: 56 73 74
+#      Possible: 56 73 74 80
 #      Default: ${PHP_VERSION_DEFAULT}
 #
 # PHP_BASE_VERS
@@ -57,7 +57,7 @@
 # PKG_PHP_MAJOR_VERS
 #      The selected PHP's major version.
 #
-#      Possible: 5 7
+#      Possible: 5 7 8
 #      Default: 7
 #
 # PKG_PHP
@@ -72,7 +72,7 @@
 # PHP_PKG_PREFIX
 #      The prefix that is prepended to the package name.
 #
-#      Example: php56 php73 php74
+#      Example: php56 php73 php74 php80
 #
 # PHP_EXTENSION_DIR
 #      Relative path to ${PREFIX} for PHP's extensions.  It is derived from
@@ -90,11 +90,13 @@
 PHP56_VERSION= 5.6.40
 PHP73_VERSION= 7.3.27
 PHP74_VERSION= 7.4.16
+PHP80_VERSION= 8.0.3
 
 # Define initial release of major version.
 PHP56_RELDATE= 20140828
 PHP73_RELDATE= 20181200
 PHP74_RELDATE= 20191128
+PHP80_RELDATE= 20201124
 
 _VARGROUPS+=   php
 _USER_VARS.php=        PHP_VERSION_DEFAULT
@@ -105,7 +107,7 @@
 .include "../../mk/bsd.prefs.mk"
 
 PHP_VERSION_DEFAULT?=          73
-PHP_VERSIONS_ACCEPTED?=                73 74 56
+PHP_VERSIONS_ACCEPTED?=                73 74 56 80
 .for pv in ${PHP_VERSIONS_ACCEPTED}
 .  if empty(PHP_VERSIONS_INCOMPATIBLE:M${pv})
 _PHP_VERSIONS_ACCEPTED+=       ${pv}
@@ -118,7 +120,10 @@
 .endfor
 
 # check what is installed
-.if exists(${LOCALBASE}/lib/php/${PHP74_RELDATE})
+.if exists(${LOCALBASE}/lib/php/${PHP80_RELDATE})
+_PHP_VERSION_80_INSTALLED=     yes
+_PHP_INSTALLED=                        yes
+.elif exists(${LOCALBASE}/lib/php/${PHP74_RELDATE})
 _PHP_VERSION_74_INSTALLED=     yes
 _PHP_INSTALLED=                        yes
 .elif exists(${LOCALBASE}/lib/php/${PHP73_RELDATE})
@@ -185,7 +190,8 @@
 
 MESSAGE_SUBST+=                PKG_PHP_VERSION=${PKG_PHP_VERSION} \
                        PKG_PHP=${PKG_PHP}
-PLIST_SUBST+=          PKG_PHP_VERSION=${PKG_PHP_VERSION} \
+PLIST_SUBST+=          PHP_PKG_PREFIX=${PHP_PKG_PREFIX} \
+                       PKG_PHP_VERSION=${PKG_PHP_VERSION} \
                        PKG_PHP_MAJOR_VERS=${PKG_PHP_MAJOR_VERS} \
                        PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR}
 
@@ -205,6 +211,9 @@
 .elif ${_PHP_VERSION} == "74"
 PHP_VERSION=           ${PHP74_VERSION}
 PHP_EXTENSION_DIR=     lib/php/${PHP74_RELDATE}
+.elif ${_PHP_VERSION} == "80"
+PHP_VERSION=           ${PHP80_VERSION}
+PHP_EXTENSION_DIR=     lib/php/${PHP80_RELDATE}
 .else
 # force an error
 PKG_FAIL_REASON+=      "${PKG_PHP} is not a valid package"



Home | Main Index | Thread Index | Old Index