pkgsrc/lang/php/phpversion.mk
taca 23efe447f5 lang/php81: update to 8.1.26
PHP 8.1.26 (2023-11-23)

- Core:
  . Fixed bug GH-12468 (Double-free of doc_comment when overriding static
    property via trait). (ilutov)
  . Fixed segfault caused by weak references to FFI objects. (sj-i)
  . Fixed max_execution_time: don't delete an unitialized timer. (Kévin Dunglas)

- DOM:
  . Fix registerNodeClass with abstract class crashing. (nielsdos)
  . Add missing NULL pointer error check. (icy17)
  . Fix validation logic of php:function() callbacks. (nielsdos)

- Fiber:
  . Fixed bug GH-11121 (ReflectionFiber segfault). (danog, trowski, bwoebi)

- FPM:
  . Fixed bug GH-9921 (Loading ext in FPM config does not register module
    handlers). (Jakub Zelenka)
  . Fixed bug GH-12232 (FPM: segfault dynamically loading extension without
    opcache). (Jakub Zelenka)

- Intl:
  . Removed the BC break on IntlDateFormatter::construct which threw an
    exception with an invalid locale. (David Carlier)

- Opcache:
  . Added warning when JIT cannot be enabled. (danog)
  . Fixed bug GH-8143 (Crashes in zend_accel_inheritance_cache_find since
    upgrading to 8.1.3 due to corrupt on-disk file cache). (turchanov)

- OpenSSL:
  . Fixed bug GH-12489 (Missing sigbio creation checking in openssl_cms_verify).
    (Jakub Zelenka)

- PCRE:
  . Fixed bug GH-11374 (Backport upstream fix, Different preg_match result
    with -d pcre.jit=0). (mvorisek)

- SOAP:
  . Fixed bug GH-12392 (Segmentation fault on SoapClient::__getTypes).
    (nielsdos)
  . Fixed bug #66150 (SOAP WSDL cache race condition causes Segmentation
    Fault). (nielsdos)
  . Fixed bug #67617 (SOAP leaves incomplete cache file on ENOSPC). (nielsdos)
  . Fix incorrect uri check in SOAP caching. (nielsdos)
  . Fix segfault and assertion failure with refcounted props and arrays.
    (nielsdos)
  . Fix potential crash with an edge case of persistent encoders. (nielsdos)
  . Fixed bug #75306 (Memleak in SoapClient). (nielsdos)

- Streams:
  . Fixed bug #75708 (getimagesize with "&$imageinfo" fails on StreamWrappers).
    (Jakub Zelenka)

- XMLReader:
  . Add missing NULL pointer error check. (icy17)

- XMLWriter:
  . Add missing NULL pointer error check. (icy17)

- XSL:
  . Add missing module dependency. (nielsdos)
  . Fix validation logic of php:function() callbacks. (nielsdos)
2023-11-24 06:03:45 +00:00

250 lines
6.6 KiB
Makefile

# $NetBSD: phpversion.mk,v 1.415 2023/11/24 06:03:45 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
# package.
#
# === User-settable variables ===
#
# PHP_VERSION_DEFAULT
# The PHP version to choose when more than one is acceptable to
# the package.
#
# Possible: 56 74 80 81 82
# Default: 81
#
# === Infrastructure variables ===
#
# PHP_VERSION_REQD
# PHP version to use. This variable should not be set in
# packages. Normally it is used by bulk build tools.
#
# Possible: ${PHP_VERSIONS_ACCEPTED}
# Default: ${PHP_VERSION_DEFAULT}
#
# === Package-settable variables ===
#
# PHP_VERSIONS_ACCEPTED
# The PHP versions that are accepted by the package.
#
# Possible: 56 74 80 81 82
# Default: 81 82 74 56 80
#
# PHP_VERSIONS_INCOMPATIBLE
# The PHP versions that are not supported by the package.
#
# Possible: 56 74 80 81 82
# Default: (empty)
#
# PHP_CHECK_INSTALLED
# Check installed version of PHP. Should be used by lang/php56,
# lang/php74, lang/php80, and lang/php81 only.
#
# Possible: Yes No
# Default: Yes
#
# === Variables defined by this file ===
#
# PKG_PHP_VERSION
# The selected PHP version.
#
# Possible: 56 74 80 81 82
# Default: ${PHP_VERSION_DEFAULT}
#
# PHP_BASE_VERS
# The selected PHP's full version depends on PKG_PHP_VERSION
#
# PKG_PHP_MAJOR_VERS
# The selected PHP's major version.
#
# Possible: 5 7 8
# Default: 8
#
# PKG_PHP
# The same as ${PKG_PHP_VERSION}, prefixed with "php-".
#
# PHPPKGSRCDIR
# The directory of the PHP implementation, relative to the
# package directory.
#
# Example: ../../lang/php81
#
# PHP_PKG_PREFIX
# The prefix that is prepended to the package name.
#
# Example: php56 php74 php80 php81
#
# PHP_EXTENSION_DIR
# Relative path to ${PREFIX} for PHP's extensions. It is derived from
# initial release of major version.
#
# Example: lib/php/20181200
#
# Keywords: php
#
.if !defined(PHPVERSION_MK)
PHPVERSION_MK= defined
# Define each PHP's version.
PHP56_VERSION= 5.6.40
PHP74_VERSION= 7.4.33
PHP80_VERSION= 8.0.30
PHP81_VERSION= 8.1.26
PHP82_VERSION= 8.2.13
# Define API version or initial release of major version.
PHP56_RELDATE= 20140828
PHP74_RELDATE= 20191128
PHP80_RELDATE= 20201124
PHP81_RELDATE= 20211125
PHP82_RELDATE= 20220829
_VARGROUPS+= php
_USER_VARS.php= PHP_VERSION_DEFAULT
_PKG_VARS.php= PHP_VERSIONS_ACCEPTED PHP_VERSION_REQD
_SYS_VARS.php= PKG_PHP_VERSION PKG_PHP PHPPKGSRCDIR PHP_PKG_PREFIX \
PKG_PHP_MAJOR_VERS
.include "../../mk/bsd.prefs.mk"
PHP_VERSION_DEFAULT?= 81
PHP_VERSIONS_ACCEPTED?= 81 82 74 56 80
.for pv in ${PHP_VERSIONS_ACCEPTED}
. if empty(PHP_VERSIONS_INCOMPATIBLE:M${pv})
_PHP_VERSIONS_ACCEPTED+= ${pv}
. endif
.endfor
# transform the list into individual variables
.for pv in ${_PHP_VERSIONS_ACCEPTED}
_PHP_VERSION_${pv}_OK= yes
.endfor
# check what is installed
.if exists(${LOCALBASE}/lib/php/${PHP82_RELDATE})
_PHP_VERSION_82_INSTALLED= yes
_PHP_INSTALLED= yes
.elif exists(${LOCALBASE}/lib/php/${PHP81_RELDATE})
_PHP_VERSION_81_INSTALLED= yes
_PHP_INSTALLED= yes
.elif 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/${PHP56_RELDATE})
_PHP_VERSION_56_INSTALLED= yes
_PHP_INSTALLED= yes
.endif
# if a version is explicitly required, take it
.if defined(PHP_VERSION_REQD)
_PHP_VERSION= ${PHP_VERSION_REQD}
.endif
# if the default is already installed, it is first choice
.if !defined(_PHP_VERSION)
.if defined(_PHP_VERSION_${PHP_VERSION_DEFAULT}_OK)
.if defined(_PHP_VERSION_${PHP_VERSION_DEFAULT}_INSTALLED)
_PHP_VERSION= ${PHP_VERSION_DEFAULT}
.endif
.endif
.endif
# prefer an already installed version, in order of "accepted"
.if !defined(_PHP_VERSION)
.for pv in ${_PHP_VERSIONS_ACCEPTED}
.if defined(_PHP_VERSION_${pv}_INSTALLED)
_PHP_VERSION?= ${pv}
.else
# keep information as last resort - see below
_PHP_VERSION_FIRSTACCEPTED?= ${pv}
.endif
.endfor
.endif
# if the default is OK for the add-on pkg, take this
.if !defined(_PHP_VERSION)
.if defined(_PHP_VERSION_${PHP_VERSION_DEFAULT}_OK)
_PHP_VERSION= ${PHP_VERSION_DEFAULT}
.endif
.endif
# take the first one accepted by the package
.if !defined(_PHP_VERSION)
_PHP_VERSION= ${_PHP_VERSION_FIRSTACCEPTED}
.endif
#
# Variable assignment for multi-PHP packages
MULTI+= PHP_VERSION_REQD=${_PHP_VERSION}
# export some of the internal variables
PKG_PHP_VERSION:= ${_PHP_VERSION:C/\.[0-9]//}
PKG_PHP:= PHP${_PHP_VERSION:C/([0-9])([0-9])/\1.\2/}
# Major version
PKG_PHP_MAJOR_VERS:= ${_PHP_VERSION:C/^([0-9]).*/\1/}
PHP_CHECK_INSTALLED?= Yes
# if installed PHP isn't compatible with required PHP, bail out
.if empty(PHP_CHECK_INSTALLED:M[nN][oO])
.if defined(_PHP_INSTALLED) && !defined(_PHP_VERSION_${_PHP_VERSION}_INSTALLED)
PKG_FAIL_REASON+= "Package accepts ${PKG_PHP}, but a different version is installed"
.endif
.endif
MESSAGE_SUBST+= PKG_PHP_VERSION=${PKG_PHP_VERSION} \
PKG_PHP=${PKG_PHP}
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}
# force the selected PHP version for recursive builds
PHP_VERSION_REQD:= ${PKG_PHP_VERSION}
#
# set variables for the version we decided to use:
#
.if ${_PHP_VERSION} == "56"
PHP_VERSION= ${PHP56_VERSION}
PHP_INITIAL_TEENY= 3
PHP_EXTENSION_DIR= lib/php/${PHP56_RELDATE}
.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}
.elif ${_PHP_VERSION} == "81"
PHP_VERSION= ${PHP81_VERSION}
PHP_EXTENSION_DIR= lib/php/${PHP81_RELDATE}
.elif ${_PHP_VERSION} == "82"
PHP_VERSION= ${PHP82_VERSION}
PHP_EXTENSION_DIR= lib/php/${PHP82_RELDATE}
.else
# force an error
PKG_FAIL_REASON+= "${PKG_PHP} is not a valid package"
.endif
PHP_INITIAL_TEENY?= 0
PHPPKGSRCDIR= ../../lang/php${PKG_PHP_VERSION}
PHP_PKG_PREFIX= php${PKG_PHP_VERSION}
_PHP_VER_MAJOR= ${PHP_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\1/}
_PHP_VER_MINOR= ${PHP_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\2/}
PHP_BASE_VERS= ${_PHP_VER_MAJOR}.${_PHP_VER_MINOR}.${PHP_INITIAL_TEENY}
#
# check installed version against required:
#
.if !empty(PHP_CHECK_INSTALLED:M[nN][oO])
.if defined(_PHP_VERSION_INSTALLED) && ${_PHP_VERSION} != ${_PHP_VERSION_INSTALLED}
PKG_FAIL_REASON+= "${PKGBASE} requires ${PKG_PHP}, but php-${_PHP_VERSION_INSTALLED} is already installed."
.endif
.endif
MAKEFLAGS+= PHP_VERSION_REQD=${PHP_VERSION_REQD}
.endif # PHPVERSION_MK