pkgsrc/lang/php/phpversion.mk

236 lines
6 KiB
Makefile
Raw Normal View History

# $NetBSD: phpversion.mk,v 1.171 2017/01/20 00:44:00 taca Exp $
2007-06-18 09:21:09 +02:00
#
# 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.
2007-06-18 09:21:09 +02:00
#
# === User-settable variables ===
#
# PHP_VERSION_DEFAULT
# The PHP version to choose when more than one is acceptable to
# the package.
2007-06-18 09:21:09 +02:00
#
2016-09-11 19:13:18 +02:00
# Possible: 56 70 71
# Default: 56
2007-06-18 09:21:09 +02:00
#
# === 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}
#
2007-06-18 09:21:09 +02:00
# === Package-settable variables ===
#
# PHP_VERSIONS_ACCEPTED
# The PHP versions that are accepted by the package.
#
2016-09-11 19:13:18 +02:00
# Possible: 56 70 71
# Default: 56
2007-06-18 09:21:09 +02:00
#
# PHP_VERSIONS_INCOMPATIBLE
# The PHP versions that are not supported by the package.
#
2016-09-11 19:13:18 +02:00
# Possible: 56 70 71
# Default: (empty)
#
# PHP_CHECK_INSTALLED
2016-09-11 19:13:18 +02:00
# Check installed version of PHP. Should be used by lang/php56,
# lang/php70, or lang/php71 only.
#
# Possible: Yes No
# Default: Yes
#
2007-06-18 09:21:09 +02:00
# === Variables defined by this file ===
#
# PKG_PHP_VERSION
# The selected PHP version.
#
2016-09-11 19:13:18 +02:00
# Possible: 56 70 71
2007-06-18 09:21:09 +02:00
# 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.
#
2015-12-06 16:13:02 +01:00
# Possible: 5 7
# Default: 5
#
2007-06-18 09:21:09 +02:00
# PKG_PHP
# The same as ${PKG_PHP_VERSION}, prefixed with "php-".
2007-06-18 09:21:09 +02:00
#
# PHPPKGSRCDIR
# The directory of the PHP implementation, relative to the
# package directory.
#
2016-09-11 19:13:18 +02:00
# Example: ../../lang/php56
2007-06-18 09:21:09 +02:00
#
# PHP_PKG_PREFIX
# The prefix that is prepended to the package name.
#
2016-09-11 19:13:18 +02:00
# Example: php56 php70 php71
2007-06-18 09:21:09 +02:00
#
# PHP_EXTENSION_DIR
# Relative path to ${PREFIX} for PHP's extensions. It is derived from
# initial release of major version.
#
2016-09-11 19:13:18 +02:00
# Example: lib/php/20140828
#
2007-06-18 09:21:09 +02:00
# Keywords: php
#
.if !defined(PHPVERSION_MK)
PHPVERSION_MK= defined
# Define each PHP's version.
PHP56_VERSION= 5.6.30
Update php70 to 7.0.15. PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 19 Jan 2017 PHP 7.0.15 - Core: . Fixed bug #73792 (invalid foreach loop hangs script). (Dmitry) . Fixed bug #73663 ("Invalid opcode 65/16/8" occurs with a variable created with list()). (Laruence) . Fixed bug #73585 (Logging of "Internal Zend error - Missing class information" missing class name). (Laruence) . Fixed bug #73753 (unserialized array pointer not advancing). (David Walker) . Fixed bug #73825 (Heap out of bounds read on unserialize in finish_nested_data()). (Stas) . Fixed bug #73831 (NULL Pointer Dereference while unserialize php object). (Stas) . Fixed bug #73832 (Use of uninitialized memory in unserialize()). (Stas) . Fixed bug #73092 (Unserialize use-after-free when resizing object's properties hash table). (Nikita) . Fixed bug #69425 (Use After Free in unserialize()). (Nikita) . Fixed bug #72731 (Type Confusion in Object Deserialization). (Nikita) - COM: . Fixed bug #73679 (DOTNET read access violation using invalid codepage). (Anatol) - DOM: . Fixed bug #67474 (getElementsByTagNameNS filter on default ns). (aboks) - EXIF: . Bug bug #73737 (FPE when parsing a tag format). (Stas) - GD: . Fixed bug #73869 (Signed Integer Overflow gd_io.c). (cmb) . Fixed bug #73868 (DOS vulnerability in gdImageCreateFromGd2Ctx()). (cmb) - GMP: . Fixed bug #70513 (GMP Deserialization Type Confusion Vulnerability). (Nikita) - Mysqli: . Fixed bug #73462 (Persistent connections don't set $connect_errno). (darkain) - Mysqlnd: . Fixed issue with decoding BIT columns when having more than one rows in the result set. 7.0+ problem. (Andrey) . Fixed bug #73800 (sporadic segfault with MYSQLI_OPT_INT_AND_FLOAT_NATIVE). (vanviegen) - PCRE: . Fixed bug #73612 (preg_*() may leak memory). (cmb) - PDO_Firebird: . Fixed bug #72931 (PDO_FIREBIRD with Firebird 3.0 not work on returning statement). (Dorin Marcoci) - Phar: . Fixed bug #73773 (Seg fault when loading hostile phar). (Stas) . Fixed bug #73768 (Memory corruption when loading hostile phar). (Stas) . Fixed bug #73764 (Crash while loading hostile phar archive). (Stas) - Phpdbg: . Fixed bug #73615 (phpdbg without option never load .phpdbginit at startup). (Bob) . Fixed issue getting executable lines from custom wrappers. (Bob) . Fixed bug #73704 (phpdbg shows the wrong line in files with shebang). (Bob) - Reflection: . Fixed bug #46103 (ReflectionObject memory leak). (Nikita) - Streams: . Fixed bug #73586 (php_user_filter::$stream is not set to the stream the filter is working on). (Dmitry) - SQLite3: . Reverted fix for bug #73530 (Unsetting result set may reset other result set). (cmb) - Standard: . Fixed bug #73594 (dns_get_record does not populate $additional out parameter). (Bruce Weirdan) . Fixed bug #70213 (Unserialize context shared on double class lookup). (Taoguang Chen) . Fixed bug #73154 (serialize object with __sleep function crash). (Nikita) . Fixed bug #70490 (get_browser function is very slow). (Nikita) . Fixed bug #73265 (Loading browscap.ini at startup causes high memory usage). (Nikita) . Fixed bug #31875 (get_defined_functions additional param to exclude disabled functions). (willianveiga) - Zlib: . Fixed bug #73373 (deflate_add does not verify that output was not truncated). (Matt Bonneau)
2017-01-19 15:48:49 +01:00
PHP70_VERSION= 7.0.15
Update php71 to 7.1.1. PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 19 Jan 2017, PHP 7.1.1 - Core: . Fixed bug #73792 (invalid foreach loop hangs script). (Dmitry) . Fixed bug #73686 (Adding settype()ed values to ArrayObject results in references). (Nikita, Laruence) . Fixed bug #73663 ("Invalid opcode 65/16/8" occurs with a variable created with list()). (Laruence) . Fixed bug #73727 (ZEND_MM_BITSET_LEN is "undefined symbol" in zend_bitset.h). (Nikita) . Fixed bug #73753 (unserialized array pointer not advancing). (David Walker) . Fixed bug #73783 (SIG_IGN doesn't work when Zend Signals is enabled). (David Walker) . Fixed bug #73825 (Heap out of bounds read on unserialize in finish_nested_data()). (Stas) . Fixed bug #73831 (NULL Pointer Dereference while unserialize php object). (Stas) . Fixed bug #73832 (Use of uninitialized memory in unserialize()). (Stas) - CLI: . Fixed bug #72555 (CLI output(japanese) on Windows). (Anatol) - COM: . Fixed bug #73679 (DOTNET read access violation using invalid codepage). (Anatol) - DOM: . Fixed bug #67474 (getElementsByTagNameNS filter on default ns). (aboks) - EXIF: . Bug bug #73737 (FPE when parsing a tag format). (Stas) - GD: . Fixed bug #73869 (Signed Integer Overflow gd_io.c). (cmb) . Fixed bug #73868 (DOS vulnerability in gdImageCreateFromGd2Ctx()). (cmb) - Mbstring: . Fixed bug #73646 (mb_ereg_search_init null pointer dereference). (Laruence) - Mysqli: . Fixed bug #73462 (Persistent connections don't set $connect_errno). (darkain) - Mysqlnd: . Optimized handling of BIT fields - less memory copies and lower memory usage. (Andrey) . Fixed bug #73800 (sporadic segfault with MYSQLI_OPT_INT_AND_FLOAT_NATIVE). (vanviegen) - Opcache: . Fixed bug #73789 (Strange behavior of class constants in switch/case block). (Laruence) . Fixed bug #73746 (Method that returns string returns UNKNOWN:0 instead). (Laruence) . Fixed bug #73654 (Segmentation fault in zend_call_function). (Nikita) . Fixed bug #73668 ("SIGFPE Arithmetic exception" in opcache when divide by minus 1). (Nikita) . Fixed bug #73847 (Recursion when a variable is redefined as array). (Nikita) - PDO_Firebird: . Fixed bug #72931 (PDO_FIREBIRD with Firebird 3.0 not work on returning statement). (Dorin Marcoci) - Phar: . Fixed bug #73773 (Seg fault when loading hostile phar). (Stas) . Fixed bug #73768 (Memory corruption when loading hostile phar). (Stas) . Fixed bug #73764 (Crash while loading hostile phar archive). (Stas) - phpdbg: . Fixed bug #73794 (Crash (out of memory) when using run and # command separator). (Bob) . Fixed bug #73704 (phpdbg shows the wrong line in files with shebang). (Bob) - SQLite3: . Reverted fix for bug #73530 (Unsetting result set may reset other result set). (cmb) - Standard: . Fixed bug #73594 (dns_get_record does not populate $additional out parameter). (Bruce Weirdan) . Fixed bug #70213 (Unserialize context shared on double class lookup). (Taoguang Chen) . Fixed bug #73154 (serialize object with __sleep function crash). (Nikita) . Fixed bug #70490 (get_browser function is very slow). (Nikita) . Fixed bug #73265 (Loading browscap.ini at startup causes high memory usage). (Nikita) . Add subject to mail log. (tomsommer) . Fixed bug #31875 (get_defined_functions additional param to exclude disabled functions). (willianveiga) - Zlib . Fixed bug #73373 (deflate_add does not verify that output was not truncated). (Matt Bonneau)
2017-01-19 15:43:25 +01:00
PHP71_VERSION= 7.1.1
# Define initial release of major version.
2014-11-24 16:36:05 +01:00
PHP56_RELDATE= 20140828
2015-12-06 16:13:02 +01:00
PHP70_RELDATE= 20151203
2016-08-04 16:01:28 +02:00
PHP71_RELDATE= 20160303
2007-09-20 11:11:07 +02:00
_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
2007-09-20 11:11:07 +02:00
.include "../../mk/bsd.prefs.mk"
PHP_VERSION_DEFAULT?= 56
2016-09-11 19:13:18 +02:00
PHP_VERSIONS_ACCEPTED?= 56 70 71
.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
2016-08-04 16:01:28 +02:00
.if exists(${LOCALBASE}/lib/php/${PHP71_RELDATE})
_PHP_VERSION_71_INSTALLED= yes
_PHP_INSTALLED= yes
.elif exists(${LOCALBASE}/lib/php/${PHP70_RELDATE})
_PHP_VERSION_70_INSTALLED= yes
_PHP_INSTALLED= yes
2016-08-04 16:01:28 +02:00
.elif exists(${LOCALBASE}/lib/php/${PHP56_RELDATE})
2014-11-24 16:36:05 +01:00
_PHP_VERSION_56_INSTALLED= yes
_PHP_INSTALLED= yes
.endif
# if a version is explicitely 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 addon 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 internal variables
PKG_PHP_VERSION:= ${_PHP_VERSION:C/\.[0-9]//}
PKG_PHP:= PHP${_PHP_VERSION:C/([0-9])([0-9])/\1.\2/}
2015-12-06 16:13:02 +01:00
# 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)
2015-01-01 12:51:41 +01:00
PKG_FAIL_REASON+= "Package accepts ${PKG_PHP}, but different version is installed"
.endif
.endif
MESSAGE_SUBST+= PKG_PHP_VERSION=${PKG_PHP_VERSION} \
PKG_PHP=${PKG_PHP}
PLIST_SUBST+= 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:
#
2016-09-11 19:13:18 +02:00
.if ${_PHP_VERSION} == "56"
2014-11-24 16:36:05 +01:00
PHPPKGSRCDIR= ../../lang/php56
PHP_VERSION= ${PHP56_VERSION}
PHP_INITIAL_TEENY= 3
2014-11-24 16:36:05 +01:00
PHP_PKG_PREFIX= php56
PHP_EXTENSION_DIR= lib/php/${PHP56_RELDATE}
2015-12-06 16:13:02 +01:00
.elif ${_PHP_VERSION} == "70"
PHPPKGSRCDIR= ../../lang/php70
PHP_VERSION= ${PHP70_VERSION}
PHP_INITIAL_TEENY= 0
PHP_PKG_PREFIX= php70
PHP_EXTENSION_DIR= lib/php/${PHP70_RELDATE}
2016-08-04 16:01:28 +02:00
.elif ${_PHP_VERSION} == "71"
PHPPKGSRCDIR= ../../lang/php71
PHP_VERSION= ${PHP71_VERSION}
PHP_INITIAL_TEENY= 0
PHP_PKG_PREFIX= php71
PHP_EXTENSION_DIR= lib/php/${PHP71_RELDATE}
.else
# force an error
2015-01-01 12:51:41 +01:00
PKG_FAIL_REASON+= "${PKG_PHP} is not a valid package"
.endif
_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 aginst required:
#
.if !empty(PHP_CHECK_INSTALLED:M[nN][oO])
.if defined(_PHP_VERSION_INSTALLED) && ${_PHP_VERSION} != ${_PHP_VERSION_INSTALLED}
2015-01-01 12:51:41 +01:00
PKG_FAIL_REASON+= "${PKGBASE} requires ${PKG_PHP}, but php-${_PHP_VERSION_INSTALLED} is already installed."
.endif
.endif
.endif # PHPVERSION_MK