diff --git a/Mk/Uses/php.mk b/Mk/Uses/php.mk index c1f8a0061abd..3f2c1f3da1f2 100644 --- a/Mk/Uses/php.mk +++ b/Mk/Uses/php.mk @@ -1,489 +1,489 @@ # Support for PHP-based ports. # # Feature: php # Usage: USES=php # Valid ARGS: (none), phpize, ext, zend, build, cli, cgi, mod, web, embed, # pecl, flavors, noflavors # # - phpize : Use to build a PHP extension. # - ext : Use to build, install and register a PHP extension. # - zend : Use to build, install and register a Zend extension. # - build : Set PHP also as a build dependency. # - cli : Want the CLI version of PHP. # - cgi : Want the CGI version of PHP. # - mod : Want the Apache Module for PHP. # - web : Want the Apache Module or the CGI version of PHP. # - embed : Want the embedded library version of PHP. # - pecl : Fetches from PECL. # - flavors : Generates flavors for supported versions. # (implied by phpize,ext,zend,pecl) # - noflavors: Prevents generation of flavor. # # If the port requires a predefined set of PHP extensions, they can be # listed in this way: # # USE_PHP= ext1 ext2 ext3 # # PHP and Zend extensions built with :ext and :zend are automatically enabled # when the port is installed. Each port creates a PHP_EXT_INI_FILE file and # registers the extension in it. # # The PHP_EXT_INI_FILE file has a priority number embeded into its name so that # extensions are loaded in the right order. The priority is defined by # PHP_MOD_PRIO and is a number between 00 and 99. # # For extensions that do not depend on any extension, the priority is # automatically set to 20, for extensions that depend on another extension, the # priority is automatically set to 30. Some extensions may need to be loaded # before everyone else (for example opcache), or after an extension with a # priotity of 30, in that case, add PHP_MOD_PRIO=XX in the port's Makefile. # For example: # # USES= php:ext # USE_PHP= xml # PHP_MOD_PRIO= 40 # # The port can set these options in its Makefile before bsd.port.pre.mk: # # IGNORE_WITH_PHP=N - The port doesn't work with PHP version N. # # BUILD_ONLY_DEFAULT_PHP_FLAVOR - explicitely marks non-default ignored (use in make.conf) # # You may combine multiple php:* arguments. # Don't specify any php:* argument if your port will work with every PHP SAPI. # # If you are building PHP-based ports in poudriere(8) with ZTS enabled, # add WITH_MPM=event to /etc/make.conf to prevent build failures. .if !defined(_INCLUDE_USES_PHP_MK) PHP_Include_MAINTAINER= ale@FreeBSD.org _INCLUDE_USES_PHP_MK= yes _PHP_VALID_ARGS= build cgi cli embed ext flavors mod noflavors pecl \ phpize web zend _PHP_UNKNOWN_ARGS= . for arg in ${php_ARGS} . if empty(_PHP_VALID_ARGS:M${arg}) _PHP_UNKNOWN_ARGS+= ${arg} . endif . endfor . if !empty(_PHP_UNKNOWN_ARGS) IGNORE= has unknown USES=php arguments: ${_PHP_UNKNOWN_ARGS} . endif . if ${php_ARGS:Mbuild} && ( ${php_ARGS:Mphpize} || ${php_ARGS:Mext} || ${php_ARGS:Mzend} ) DEV_WARNING+= "USES=php:build is included in USES=php:phpize, USES=php:ext, and USES=php:zend, so it is not needed" . endif . if ${php_ARGS:Mflavors} && ( ${php_ARGS:Mphpize} || ${php_ARGS:Mext} || ${php_ARGS:Mzend} || ${php_ARGS:Mpecl} ) DEV_WARNING+= "USES=php:flavors is included in phpize, ext, zend and pecl, so it is not needed." . endif . if ${php_ARGS:Mphpize} && ( ${php_ARGS:Mext} || ${php_ARGS:Mzend} ) DEV_WARNING+= "USES=php:phpize is included in USES=php:ext and USES=php:zend, so it is not needed" . endif . if ${php_ARGS:Mext} && ${php_ARGS:Mzend} DEV_WARNING+= "USES=php:ext is included in USES=php:zend, so it is not needed" . endif . if ${php_ARGS:Mext} && ${php_ARGS:Mpecl} DEV_WARNING+= "USES=php:ext is included in USES=php:pecl, so it is not needed" . endif . if ( ${php_ARGS:Mphpize} || ${php_ARGS:Mext} || ${php_ARGS:Mzend} || ${php_ARGS:Mpecl} ) && !${php_ARGS:Mnoflavors} php_ARGS+= flavors . endif . if ${php_ARGS:Mnoflavors} && ${php_ARGS:Mflavors} php_ARGS:= ${php_ARGS:Nflavors} . endif . if ${php_ARGS:Mpecl} php_ARGS+= ext . if !defined(USE_GITHUB) EXTRACT_SUFX= .tgz MASTER_SITES= https://pecl.php.net/get/ \ http://pecl.php.net/get/ . endif PKGNAMEPREFIX= ${PECL_PKGNAMEPREFIX} DIST_SUBDIR= PECL . endif PHPBASE?= ${LOCALBASE} _ALL_PHP_VERSIONS= 81 82 83 84 85 # Make the already installed PHP the default one. . if exists(${PHPBASE}/etc/php.conf) .include "${PHPBASE}/etc/php.conf" . if !defined(PHP_EXT_DIR) PHP_EXT_DIR!= ${PHPBASE}/bin/php-config --extension-dir | ${SED} -ne 's,^${PHPBASE}/lib/php/\(.*\),\1,p' . endif _INSTALLED_PHP_VER:= ${PHP_VER} # If we have an installed version of PHP, and this does not support it, set # IGNORE to fail early as you cannot install two different versions of PHP at # the same time anyway. . if defined(IGNORE_WITH_PHP) && ${IGNORE_WITH_PHP:M${_INSTALLED_PHP_VER}} IGNORE= does not work with PHP versions "${IGNORE_WITH_PHP}" and "${_INSTALLED_PHP_VER}" is installed. . endif . else PHP_VER?= ${PHP_DEFAULT:S/.//} . endif # .if exists(${PHPBASE}/etc/php.conf) . if defined(BUILD_ONLY_DEFAULT_PHP_FLAVOR) # Only build php ports of the default flavor _ALL_FLAVOR_VERSIONS= ${PHP_VER} . else # Use the "default" php version as the first version for flavors, so that it # gets to be the default flavor. _ALL_FLAVOR_VERSIONS= ${PHP_VER} ${_ALL_PHP_VERSIONS:N${PHP_VER}} . endif # If we want flavors, fill in FLAVORS with the allowed PHP versions, if some # cannot be used, or all of them if they all can. # Then if there is no flavor set, use the first one as the default. . if ${php_ARGS:Mflavors} . if empty(FLAVORS) . if defined(IGNORE_WITH_PHP) . for _v in ${_ALL_FLAVOR_VERSIONS} . if empty(IGNORE_WITH_PHP:M${_v}) # Avoid a leading space in FLAVORS. . if empty(FLAVORS) FLAVORS:= php${_v} . else FLAVORS:= ${FLAVORS} php${_v} . endif . endif . endfor . else # defined(IGNORE_WITH_PHP) FLAVORS:= ${_ALL_FLAVOR_VERSIONS:S/^/php/} . endif # defined(IGNORE_WITH_PHP) . endif . if empty(FLAVOR) FLAVOR= ${FLAVORS:[1]} . endif . endif # This variable is for dependencies lines, so you write: # ${PHP_PKGNAMEPREFIX}foo:devel/php-foo@${PHP_FLAVOR} PHP_FLAVOR= php${PHP_VER} # So, we have PHP flavors, set PHP_VER accordingly. . if ${FLAVOR:Mphp[0-9][0-9]} PHP_VER= ${FLAVOR:S/^php//} . endif # If lang/php is not installed, or if we have a php flavor but want a non # default one, we need to overwrite those. . if empty(PHP_EXT_DIR) || empty(PHP_EXT_INC) || \ (${FLAVOR:Mphp[0-9][0-9]} && ${FLAVOR} != ${FLAVORS:[1]}) # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. . if ${PHP_VER} == 85 -PHP_EXT_DIR= 20240925 +PHP_EXT_DIR= 20250925 PHP_EXT_INC= hash json opcache openssl pcre random spl . elif ${PHP_VER} == 84 PHP_EXT_DIR= 20240924 PHP_EXT_INC= hash json openssl pcre random spl . elif ${PHP_VER} == 83 PHP_EXT_DIR= 20230831 PHP_EXT_INC= hash json openssl pcre random spl . elif ${PHP_VER} == 82 PHP_EXT_DIR= 20220829 PHP_EXT_INC= hash json openssl pcre random spl . elif ${PHP_VER} == 81 PHP_EXT_DIR= 20210902 PHP_EXT_INC= hash json openssl pcre spl . else # (rene) default to DEFAULT_VERSIONS PHP_EXT_DIR= 20230831 PHP_EXT_INC= hash json openssl pcre random spl . endif # Try to figure out what the PHP_EXT_DIR should be WRT the # installed Apache port. HTTPD?= ${LOCALBASE}/sbin/httpd . if exists(${HTTPD}) APACHE_THR!= ${HTTPD} -V | ${AWK} '/threaded/ {print $2}' . if ${APACHE_THR:Myes} PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts . endif . elif defined(APACHE_PORT) && (${APACHE_PORT:M*worker*} != "" || ${APACHE_PORT:M*event*} != "") PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts . elif defined(WITH_MPM) && (${WITH_MPM} == "worker" || ${WITH_MPM} == "event") PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts . endif . if defined(WITH_DEBUG) PHP_EXT_DIR:= ${PHP_EXT_DIR}-debug . endif PHP_SAPI?= "" . endif # empty(PHP_EXT_DIR) || empty(PHP_EXT_INC) || (${FLAVOR:Mphp[0-9][0-9]} && ${FLAVOR} != ${FLAVORS:[1]}) # Set a few PKGNAME(PRE|SUF)FIX to be used in ports. PHP_PKGNAMEPREFIX= php${PHP_VER}- PHP_PKGNAMESUFFIX= -php${PHP_VER} PECL_PKGNAMEPREFIX= php${PHP_VER}-pecl- . if defined(IGNORE_WITH_PHP) . for VER in ${IGNORE_WITH_PHP} . if ${PHP_VER} == "${VER}" _IGNORE_PHP_SET= IGNORE= cannot be installed: doesn't work with lang/php${PHP_VER} port\ (doesn't support PHP ${IGNORE_WITH_PHP:C/^(8)/\1./}) . endif . endfor . endif . if ${php_ARGS:Mweb} . if ${php_ARGS:Mcgi} || ${php_ARGS:Mmod} check-makevars:: @${ECHO_CMD} "If you use :web you cannot also use :cgi" @${ECHO_CMD} "or :mod. Use only one of them." @${FALSE} . endif . endif . if ${php_ARGS:Mcgi} . if defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == "" && ${PHP_SAPI:Mfpm} == "" check-makevars:: @${ECHO_CMD} "This port requires the CGI version of PHP, but you have already" @${ECHO_CMD} "installed a PHP port without CGI." @${FALSE} . endif . endif . if ${php_ARGS:Mcli} . if defined(PHP_VERSION) && ${PHP_SAPI:Mcli} == "" check-makevars:: @${ECHO_CMD} "This port requires the CLI version of PHP, but you have already" @${ECHO_CMD} "installed a PHP port without CLI." @${FALSE} . endif . endif . if ${php_ARGS:Membed} . if defined(PHP_VERSION) && ${PHP_SAPI:Membed} == "" check-makevars:: @${ECHO_CMD} "This port requires the embedded library version of PHP, but you have already" @${ECHO_CMD} "installed a PHP port without the embedded library." @${FALSE} . endif . endif PHP_PORT?= lang/php${PHP_VER} MOD_PHP_PORT?= www/mod_php${PHP_VER} . if ${php_ARGS:Mbuild} BUILD_DEPENDS+= ${PHPBASE}/include/php/main/php.h:${PHP_PORT} . endif RUN_DEPENDS+= ${PHPBASE}/include/php/main/php.h:${PHP_PORT} . if ${php_ARGS:Mmod} || (${php_ARGS:Mweb} && defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == "" && ${PHP_SAPI:Mfpm} == "") apache_ARGS?=run .include "${USESDIR}/apache.mk" RUN_DEPENDS+= ${PHPBASE}/${APACHEMODDIR}/libphp.so:${MOD_PHP_PORT} . endif PLIST_SUB+= PHP_EXT_DIR=${PHP_EXT_DIR} SUB_LIST+= PHP_EXT_DIR=${PHP_EXT_DIR} . if ${php_ARGS:Mphpize} || ${php_ARGS:Mext} || ${php_ARGS:Mzend} BUILD_DEPENDS+= ${PHPBASE}/bin/phpize:${PHP_PORT} \ autoconf>0:devel/autoconf GNU_CONFIGURE= yes CONFIGURE_ARGS+=--with-php-config=${PHPBASE}/bin/php-config _USES_configure+= 190:phpize-message 250:do-phpize phpize-message: @${ECHO_MSG} "===> PHPizing for ${PKGNAME}" do-phpize: @(cd ${WRKSRC}; ${SETENV} ${SCRIPTS_ENV} ${PHPBASE}/bin/phpize) . endif _USES_POST+=php .endif .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_PHP_POST_MK) _INCLUDE_USES_PHP_POST_MK=yes . if ${php_ARGS:Mext} || ${php_ARGS:Mzend} PHP_MODNAME?= ${PORTNAME} PHP_EXT_PKGMESSAGE= ${WRKDIR}/php-ext-pkg-message _PKGMESSAGES+= ${PHP_EXT_PKGMESSAGE} PHP_HEADER_DIRS+= . # If there is no priority defined, we wing it. . if !defined(PHP_MOD_PRIO) . if defined(USE_PHP) # If an extension needs another, put it after the others. PHP_MOD_PRIO= 30 . else # Otherwise, put it where it with everybody. PHP_MOD_PRIO= 20 . endif . endif PHP_EXT_INI_FILE= etc/php/ext-${PHP_MOD_PRIO}-${PHP_MODNAME}.ini.sample do-install: @${MKDIR} ${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR} @${INSTALL_LIB} ${WRKSRC}/modules/${PHP_MODNAME}.so \ ${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR} . for header in ${PHP_HEADER_DIRS} @${MKDIR} ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/${header} @${INSTALL_DATA} ${WRKSRC}/${header}/*.h \ ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/${header} . endfor @${RM} ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h @${EGREP} "#define (COMPILE|HAVE|USE)_" ${WRKSRC}/config.h \ > ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h @${MKDIR} ${STAGEDIR}${PREFIX}/etc/php . if ${php_ARGS:Mzend} @${ECHO_CMD} "zend_extension=${PHP_MODNAME}.so" > ${STAGEDIR}${PREFIX}/${PHP_EXT_INI_FILE} . else @${ECHO_CMD} "extension=${PHP_MODNAME}.so" > ${STAGEDIR}${PREFIX}/${PHP_EXT_INI_FILE} . endif _USES_stage+= 899:add-plist-phpext add-plist-phpext: @${ECHO_CMD} "lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so" \ >> ${TMPPLIST} @${FIND} -P ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME} ! -type d 2>/dev/null | \ ${SED} -ne 's,^${STAGEDIR}${PREFIX}/,,p' >> ${TMPPLIST} @${ECHO_CMD} "@postexec echo \#include \\\"ext/${PHP_MODNAME}/config.h\\\" >> %D/include/php/ext/php_config.h" \ >> ${TMPPLIST} @${ECHO_CMD} "@preunexec cp %D/include/php/ext/php_config.h %D/include/php/ext/php_config.h.orig" \ >> ${TMPPLIST} @${ECHO_CMD} "@preunexec grep -v ext/${PHP_MODNAME}/config.h %D/include/php/ext/php_config.h.orig > %D/include/php/ext/php_config.h || true" \ >> ${TMPPLIST} @${ECHO_CMD} "@preunexec ${RM} %D/include/php/ext/php_config.h.orig" \ >> ${TMPPLIST} @${ECHO_CMD} "@sample ${PHP_EXT_INI_FILE}" \ >> ${TMPPLIST} @${ECHO_CMD} "[" > ${PHP_EXT_PKGMESSAGE} @${ECHO_CMD} "{" >> ${PHP_EXT_PKGMESSAGE} @${ECHO_CMD} " message: <> ${PHP_EXT_PKGMESSAGE} @${ECHO_CMD} "This file has been added to automatically load the installed extension:" >> ${PHP_EXT_PKGMESSAGE} @${ECHO_CMD} "${PREFIX}/${PHP_EXT_INI_FILE}" >> ${PHP_EXT_PKGMESSAGE} @${ECHO_CMD} "EOD" >> ${PHP_EXT_PKGMESSAGE} @${ECHO_CMD} " type: install" >> ${PHP_EXT_PKGMESSAGE} @${ECHO_CMD} "}" >> ${PHP_EXT_PKGMESSAGE} @${ECHO_CMD} "]" >> ${PHP_EXT_PKGMESSAGE} . endif # Extensions . if defined(USE_PHP) && ${USE_PHP:tl} != "yes" # non-version specific components _USE_PHP_ALL= bcmath bitset bz2 calendar ctype curl dba dom \ enchant exif ffi fileinfo filter ftp gd gettext gmp \ hash iconv igbinary imap intl json ldap mbstring mcrypt \ memcache memcached mysqli odbc \ openssl pcntl pcre pdo pdo_dblib pdo_firebird pdo_mysql \ pdo_odbc pdo_pgsql pdo_sqlite phar pgsql posix \ pspell radius random readline redis session shmop simplexml snmp \ soap sockets sodium spl sqlite3 sysvmsg sysvsem sysvshm \ tidy tokenizer xml xmlreader xmlrpc xmlwriter xsl zephir_parser \ zip zlib # version specific components _USE_PHP_VER81= ${_USE_PHP_ALL} opcache _USE_PHP_VER82= ${_USE_PHP_ALL} opcache _USE_PHP_VER83= ${_USE_PHP_ALL} opcache _USE_PHP_VER84= ${_USE_PHP_ALL} opcache _USE_PHP_VER85= ${_USE_PHP_ALL} bcmath_DEPENDS= math/php${PHP_VER}-bcmath bitset_DEPENDS= math/pecl-bitset@${PHP_FLAVOR} bz2_DEPENDS= archivers/php${PHP_VER}-bz2 calendar_DEPENDS= misc/php${PHP_VER}-calendar ctype_DEPENDS= textproc/php${PHP_VER}-ctype curl_DEPENDS= ftp/php${PHP_VER}-curl dba_DEPENDS= databases/php${PHP_VER}-dba dom_DEPENDS= textproc/php${PHP_VER}-dom enchant_DEPENDS= textproc/php${PHP_VER}-enchant exif_DEPENDS= graphics/php${PHP_VER}-exif ffi_DEPENDS= devel/php${PHP_VER}-ffi fileinfo_DEPENDS= sysutils/php${PHP_VER}-fileinfo filter_DEPENDS= security/php${PHP_VER}-filter ftp_DEPENDS= ftp/php${PHP_VER}-ftp gd_DEPENDS= graphics/php${PHP_VER}-gd gettext_DEPENDS=devel/php${PHP_VER}-gettext gmp_DEPENDS= math/php${PHP_VER}-gmp iconv_DEPENDS= converters/php${PHP_VER}-iconv igbinary_DEPENDS= converters/pecl-igbinary@${PHP_FLAVOR} . if ${PHP_VER} <= 83 imap_DEPENDS= mail/php${PHP_VER}-imap . else imap_DEPENDS= mail/pecl-imap@${PHP_FLAVOR} . endif intl_DEPENDS= devel/php${PHP_VER}-intl ldap_DEPENDS= net/php${PHP_VER}-ldap mbstring_DEPENDS= converters/php${PHP_VER}-mbstring mcrypt_DEPENDS= security/pecl-mcrypt@${PHP_FLAVOR} memcache_DEPENDS= databases/pecl-memcache@${PHP_FLAVOR} memcached_DEPENDS= databases/pecl-memcached@${PHP_FLAVOR} mysqli_DEPENDS= databases/php${PHP_VER}-mysqli odbc_DEPENDS= databases/php${PHP_VER}-odbc opcache_DEPENDS= www/php${PHP_VER}-opcache pcntl_DEPENDS= devel/php${PHP_VER}-pcntl pdo_DEPENDS= databases/php${PHP_VER}-pdo pdo_dblib_DEPENDS= databases/php${PHP_VER}-pdo_dblib pdo_firebird_DEPENDS= databases/php${PHP_VER}-pdo_firebird pdo_mysql_DEPENDS= databases/php${PHP_VER}-pdo_mysql pdo_odbc_DEPENDS= databases/php${PHP_VER}-pdo_odbc pdo_pgsql_DEPENDS= databases/php${PHP_VER}-pdo_pgsql pdo_sqlite_DEPENDS= databases/php${PHP_VER}-pdo_sqlite pgsql_DEPENDS= databases/php${PHP_VER}-pgsql phar_DEPENDS= archivers/php${PHP_VER}-phar posix_DEPENDS= sysutils/php${PHP_VER}-posix . if ${PHP_VER} <= 83 pspell_DEPENDS= textproc/php${PHP_VER}-pspell . else pspell_DEPENDS= textproc/pecl-pspell@${PHP_FLAVOR} . endif radius_DEPENDS= net/pecl-radius@${PHP_FLAVOR} readline_DEPENDS= devel/php${PHP_VER}-readline redis_DEPENDS= databases/pecl-redis@${PHP_FLAVOR} session_DEPENDS=www/php${PHP_VER}-session shmop_DEPENDS= devel/php${PHP_VER}-shmop simplexml_DEPENDS= textproc/php${PHP_VER}-simplexml snmp_DEPENDS= net-mgmt/php${PHP_VER}-snmp soap_DEPENDS= net/php${PHP_VER}-soap sockets_DEPENDS=net/php${PHP_VER}-sockets sodium_DEPENDS= security/php${PHP_VER}-sodium sqlite3_DEPENDS=databases/php${PHP_VER}-sqlite3 sysvmsg_DEPENDS=devel/php${PHP_VER}-sysvmsg sysvsem_DEPENDS=devel/php${PHP_VER}-sysvsem sysvshm_DEPENDS=devel/php${PHP_VER}-sysvshm tidy_DEPENDS= www/php${PHP_VER}-tidy tokenizer_DEPENDS= devel/php${PHP_VER}-tokenizer xml_DEPENDS= textproc/php${PHP_VER}-xml xmlreader_DEPENDS= textproc/php${PHP_VER}-xmlreader xmlrpc_DEPENDS= net/pecl-xmlrpc@${PHP_FLAVOR} xmlwriter_DEPENDS= textproc/php${PHP_VER}-xmlwriter xsl_DEPENDS= textproc/php${PHP_VER}-xsl zephir_parser_DEPENDS= textproc/pecl-zephir_parser@${PHP_FLAVOR} zip_DEPENDS= archivers/php${PHP_VER}-zip zlib_DEPENDS= archivers/php${PHP_VER}-zlib . for extension in ${USE_PHP} ext= ${extension} . if !empty(_USE_PHP_VER${PHP_VER}:M${extension:S/:build//}) . if empty(PHP_EXT_INC:M${extension:S/:build//}) . if !empty(php_ARGS:Mbuild) || !empty(ext:M*\:build) BUILD_DEPENDS+= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/${extension:S/:build//}.so:${${extension:S/:build//}_DEPENDS} . endif RUN_DEPENDS+= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/${extension:S/:build//}.so:${${extension:S/:build//}_DEPENDS} . endif . else . if ${ext:tl} != "yes" && !defined(_IGNORE_PHP_SET) . if empty(PHP_EXT_INC:M${extension:S/:build//}) check-makevars:: @${ECHO_CMD} "Unknown extension ${extension:S/:build//} for PHP ${PHP_VER}." @${FALSE} . endif . endif . endif . endfor . endif .endif diff --git a/lang/php85/Makefile b/lang/php85/Makefile index 0eda46df0e6d..f6636f57df2f 100644 --- a/lang/php85/Makefile +++ b/lang/php85/Makefile @@ -1,607 +1,607 @@ PORTNAME= php85 -DISTVERSION= 8.5.0beta3 +DISTVERSION= 8.5.0RC1 PORTREVISION?= 0 CATEGORIES?= lang devel www MASTER_SITES= https://downloads.php.net/~edorian/ \ https://downloads.php.net/~daniels/ DISTNAME= php-${DISTVERSION} MAINTAINER= bofh@FreeBSD.org COMMENT= PHP Scripting Language (8.5.X branch) WWW= https://www.php.net/ LICENSE= PHP301 USES+= compiler:c11 cpe gnome localbase pkgconfig #tar:xz CPE_PRODUCT= php PHP_VER= 85 CONFLICTS_INSTALL?= php[0-9][0-9]${PKGNAMESUFFIX} .if !defined(PKGNAMESUFFIX) LIB_DEPENDS= libargon2.so:security/libargon2 \ libcapstone.so:devel/capstone \ libpcre2-8.so:devel/pcre2 GNU_CONFIGURE= yes CONFIGURE_ARGS+= \ --disable-all \ --program-prefix="" \ --with-config-file-scan-dir=${PREFIX}/etc/php \ --with-layout=GNU \ --with-libxml \ --with-openssl \ --with-password-argon2=${LOCALBASE} USES+= autoreconf:build bison ssl USE_GNOME= libxml2 LDFLAGS+= -L${OPENSSLLIB} -lcrypto -lssl # PR230207 Allow relocations against read-only segments (override lld default) LDFLAGS_i386= -Wl,-z,notext OPTIONS_DEFINE+=CGI CLI DEBUG DTRACE EMBED FPM IPV6 LINKTHR \ MYSQLND NOASLR PCRE PHPDBG ZTS OPTIONS_DEFAULT= CGI CLI DTRACE EMBED FPM LINKTHR MYSQLND PCRE OPTIONS_EXCLUDE_DragonFly= DTRACE # ld(1) fails to link probes: Relocations in generic ELF (EM: 0) OPTIONS_EXCLUDE_aarch64= DTRACE # dt_modtext:opensolaris/ib/libdtrace/common/dt_link.c: arm not impemented OPTIONS_EXCLUDE_armv6= DTRACE OPTIONS_EXCLUDE_armv7= DTRACE # Bug 197128: No ASM code for MIPS/MIPS64, disable FPM OPTIONS_EXCLUDE_mips= DTRACE FPM OPTIONS_EXCLUDE_mips64= DTRACE FPM OPTIONS_EXCLUDE_riscv64= DTRACE NO_OPTIONS_SORT= yes OPTIONS_SUB= yes CGI_DESC= Build CGI version CLI_DESC= Build CLI version EMBED_DESC= Build embedded library FPM_DESC= Build FPM version LINKTHR_DESC= Link thread lib (for threaded extensions) MYSQLND_DESC= Build with MySQL Native Driver PCRE_DESC= Use system pcre instead of bundled one PHPDBG_DESC= Interactive PHP debugger ZTS_DESC= Force Zend Thread Safety (ZTS) build CGI_CONFIGURE_OFF= --disable-cgi CGI_VARS= PHP_SAPI+=cgi CLI_CONFIGURE_OFF= --disable-cli CLI_VARS= PHP_SAPI+=cli DEBUG_CONFIGURE_ON= --enable-debug DTRACE_CONFIGURE_ON= --enable-dtrace EMBED_CONFIGURE_ON= --enable-embed EMBED_VARS= PHP_SAPI+=embed FPM_CONFIGURE_ON= --enable-fpm \ --with-fpm-group=${WWWGRP} \ --with-fpm-user=${WWWOWN} FPM_VARS= PHP_SAPI+=fpm \ USE_RC_SUBR+=php_fpm IPV6_CONFIGURE_OFF= --disable-ipv6 LINKTHR_LIBS= -lpthread NOASLR_USES= elfctl MYSQLND_CONFIGURE_ON= --enable-mysqlnd PCRE_BUILD_DEPENDS= re2c>0:devel/re2c PCRE_CONFIGURE_ON= --with-external-pcre=${LOCALBASE} PCRE_PLIST_SUB= BUNDLED_PCRE="@comment " PCRE_PLIST_SUB_OFF= BUNDLED_PCRE="" PHPDBG_CONFIGURE_ON= --enable-phpdbg PHPDBG_VARS= PHP_SAPI+=phpdbg ZTS_CONFIGURE_ON= --enable-zts ZTS_CONFIGURE_ENV= pthreads_working="yes" DESTDIRNAME= INSTALL_ROOT . if defined(PKGNAMEPREFIX) USES+= apache PLIST= ${PKGDIR}/pkg-plist.mod PKGMESSAGE= ${PKGDIR}/pkg-message.mod MODULENAME= libphp SHORTMODNAME= php WARNING= "!!! If you have a threaded Apache, you must build ${PHP_PORT} with ZTS support to enable thread-safety in extensions !!!" WARNING+= "!!! Consider switching to php-fpm and mod_proxy_fcgi as per Apache httpd recommendations !!!" . endif .include . if ${PORT_OPTIONS:MNOASLR} . if ${PORT_OPTIONS:MCLI} ELF_FEATURES+=+noaslr:sapi/cli/php . endif . if ${PORT_OPTIONS:MCGI} ELF_FEATURES+=+noaslr:sapi/cgi/php-cgi . endif . if ${PORT_OPTIONS:MPHPDBG} ELF_FEATURES+=+noaslr:sapi/phpdbg/phpdbg . endif . if ${PORT_OPTIONS:MFPM} ELF_FEATURES+=+noaslr:sapi/fpm/php-fpm . endif . endif .include . if ${ARCH} == riscv64 CONFIGURE_ARGS+= --without-pcre-jit . endif . if ${PORT_OPTIONS:MPHPDBG} && ${PORT_OPTIONS:MDEBUG} CONFIGURE_ARGS+= --enable-phpdbg-debug . endif . if ${PORT_OPTIONS:MCLI} || ${PORT_OPTIONS:MEMBED} PLIST_SUB+= SAPI_INC="" . else PLIST_SUB+= SAPI_INC="@comment " . endif CONFIGURE_ENV+= ac_cv_decimal_fp_supported="no" \ lt_cv_path_SED="sed" \ OPENSSL_CFLAGS="-I${OPENSSLINC}" \ OPENSSL_LIBS="-L${OPENSSLLIB} -lssl -lcrypto" \ PHP_OPENSSL=yes post-patch: @${TOUCH} ${WRKSRC}/ext/php_config.h post-patch-FPM-on: @${REINPLACE_CMD} -e "s|^;\(pid\)|\1|;s|^;\(pm\.[a-z_]*_servers\)|\1|" \ ${WRKSRC}/sapi/fpm/php-fpm.conf.in pre-configure: @(cd ${WRKSRC} && ${SETENV} MAKE=${MAKE_CMD} ./buildconf --force) . if !defined(PKGNAMEPREFIX) post-build: @${ECHO_CMD} "PHP_VER=${PHP_VER}" > ${WRKDIR}/php.conf @${ECHO_CMD} "PHP_VERSION=${PORTVERSION}" >> ${WRKDIR}/php.conf @${ECHO_CMD} "PHP_SAPI=${PHP_SAPI}" >> ${WRKDIR}/php.conf @${ECHO_CMD} -n "PHP_EXT_DIR=" >> ${WRKDIR}/php.conf @${SH} ${WRKSRC}/scripts/php-config --extension-dir | ${SED} -ne 's,^${PREFIX}/lib/php/,,p' >> ${WRKDIR}/php.conf @${ECHO_CMD} "PHP_EXT_INC=hash json opcache openssl pcre random spl" >> ${WRKDIR}/php.conf test: build @(cd ${WRKSRC} && ${MAKE} test) post-install: ${INSTALL_DATA} ${WRKSRC}/php.ini-development ${WRKSRC}/php.ini-production \ ${WRKDIR}/php.conf ${STAGEDIR}/${PREFIX}/etc ${INSTALL_DATA} ${WRKSRC}/Zend/zend_property_hooks.h ${STAGEDIR}${PREFIX}/include/php/Zend ${INSTALL_DATA} ${WRKSRC}/Zend/zend_lazy_objects.h ${STAGEDIR}${PREFIX}/include/php/Zend (cd ${WRKSRC}/ext/lexbor && \ ${COPYTREE_SHARE} lexbor ${STAGEDIR}${PREFIX}/include/php/ext "-name *\.h") post-install-CGI-on: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/php-cgi post-install-CLI-on: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/php post-install-EMBED-on: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libphp.so post-install-FPM-on: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/php-fpm post-install-PHPDBG-on: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/phpdbg . else do-install: ${MKDIR} ${STAGEDIR}${PREFIX}/${APACHEMODDIR} ${INSTALL_LIB} ${WRKSRC}/libs/${MODULENAME}.so \ ${STAGEDIR}${PREFIX}/${APACHEMODDIR} . endif .else COMMENT= The ${PHP_MODNAME} shared extension for php USES+= php:ext,noflavors PHP_MODNAME= ${PKGNAMESUFFIX:S/-//} PHP_VER= 85 IGNORE_WITH_PHP= 81 82 83 84 EXTSUBDIR= ${DISTNAME}/ext/${PHP_MODNAME} WRKSRC= ${WRKDIR}/${EXTSUBDIR} PATCHDIR= ${.CURDIR}/files PLIST= ${NONEXISTENT} EXTRACT_AFTER_ARGS?= ${EXTSUBDIR} TEST_TARGET= test . if ${PHP_MODNAME} == "bcmath" CONFIGURE_ARGS+= --enable-bcmath PHP_HEADER_DIRS= libbcmath/src . endif . if ${PHP_MODNAME} == "bz2" CONFIGURE_ARGS+= --with-bz2=/usr . endif . if ${PHP_MODNAME} == "calendar" CONFIGURE_ARGS+= --enable-calendar . endif . if ${PHP_MODNAME} == "ctype" CONFIGURE_ARGS+= --enable-ctype . endif . if ${PHP_MODNAME} == "curl" LIB_DEPENDS+= libcurl.so:ftp/curl CONFIGURE_ARGS+= --with-curl=${LOCALBASE} USES+= pkgconfig . endif . if ${PHP_MODNAME} == "dba" CONFIGURE_ARGS+= --enable-dba OPTIONS_DEFINE= CDB DB4 FLATFILE GDBM INIFILE LMDB QDBM TOKYO OPTIONS_DEFAULT= CDB FLATFILE INIFILE CDB_DESC= cdb database support DB4_DESC= Berkeley DB4 support FLATFILE_DESC= flatfile support GDBM_DESC= GDBM database support INIFILE_DESC= INI file support LMDB_DESC= LMDB database support QDBM_DESC= QDBM database support TOKYO_DESC= Tokyo Cabinet database support CDB_CONFIGURE_OFF= --without-cdb DB4_CONFIGURE_ON= --with-db4=${LOCALBASE} DB4_USES= bdb DB4_VARS= WITH_BDB_HIGHEST=yes FLATFILE_CONFIGURE_ON= --disable-flatfile GDBM_LIB_DEPENDS= libgdbm.so:databases/gdbm GDBM_CONFIGURE_ARGS= --with-gdbm=${LOCALBASE} INIFILE_CONFIGURE_OFF= --disable-inifile LMDB_LIB_DEPENDS= liblmdb.so:databases/lmdb LMDB_CONFIGURE_ARGS= --with-lmdb=${LOCALBASE} QDBM_LIB_DEPENDS= libqdbm.so:databases/qdbm QDBM_CONFIGURE_ARGS= --with-qdbm=${LOCALBASE} TOKYO_LIB_DEPENDS= libtokyocabinet.so:databases/tokyocabinet TOKYO_CONFIGURE_ON= --with-tcadb=${LOCALBASE} PHP_HEADER_DIRS= libcdb libflatfile libinifile . endif . if ${PHP_MODNAME} == "dom" CONFIGURE_ARGS+= --enable-dom USES+= pkgconfig USE_GNOME= libxml2 . endif . if ${PHP_MODNAME} == "enchant" LIB_DEPENDS+= libenchant-2.so:textproc/enchant2 CONFIGURE_ARGS+=--with-enchant=${LOCALBASE} USES+= pkgconfig . endif . if ${PHP_MODNAME} == "exif" CONFIGURE_ARGS+= --enable-exif . endif . if ${PHP_MODNAME} == "ffi" LIB_DEPENDS= libffi.so:devel/libffi CONFIGURE_ARGS+= --with-ffi . endif . if ${PHP_MODNAME} == "fileinfo" CONFIGURE_ARGS+= --enable-fileinfo PHP_HEADER_DIRS= libmagic . endif . if ${PHP_MODNAME} == "filter" CONFIGURE_ARGS+= --enable-filter . endif . if ${PHP_MODNAME} == "ftp" CONFIGURE_ARGS+= --enable-ftp CONFIGURE_ENV+= OPENSSL_CFLAGS="-I${OPENSSLINC}" \ OPENSSL_LIBS="-L${OPENSSLLIB} -lssl -lcrypto" \ PHP_OPENSSL=yes LDFLAGS+= -L${OPENSSLLIB} -lcrypto -lssl USES+= pkgconfig ssl . endif . if ${PHP_MODNAME} == "gd" LIB_DEPENDS= libfreetype.so:print/freetype2 \ libgd.so:graphics/gd \ libpng.so:graphics/png USES+= jpeg CONFIGURE_ARGS+= --enable-gd \ --with-external-gd EXTRACT_AFTER_ARGS= --no-same-owner --no-same-permissions --exclude libgd \ php-${DISTVERSION}/ext/gd OPTIONS_DEFINE= JIS WEBP X11 JIS_DESC= Enable JIS-mapped Japanese font support WEBP_DESC= Enable WebP image format support X11_DESC= Enable XPM support JIS_CONFIGURE_ON= --enable-gd-jis-conv WEBP_CONFIGURE_ON= --with-webp WEBP_LIB_DEPENDS= libwebp.so:graphics/webp X11_CONFIGURE_ON= --with-xpm X11_USE= XORG=xpm X11_USES= xorg . endif . if ${PHP_MODNAME} == "gettext" CONFIGURE_ARGS+= --with-gettext=${LOCALBASE} USES+= gettext . endif . if ${PHP_MODNAME} == "gmp" LIB_DEPENDS+= libgmp.so:math/gmp CONFIGURE_ARGS+= --with-gmp=${LOCALBASE} . endif . if ${PHP_MODNAME} == "iconv" CONFIGURE_ARGS+= --with-iconv=${LOCALBASE} USES+= iconv:translit . endif . if ${PHP_MODNAME} == "intl" LIB_DEPENDS= libicui18n.so:devel/icu USES+= pkgconfig CPPFLAGS+= -DU_USING_ICU_NAMESPACE=1 . endif . if ${PHP_MODNAME} == "ldap" LIB_DEPENDS+=libsasl2.so:security/cyrus-sasl2 CONFIGURE_ARGS+=--with-ldap=${LOCALBASE} --with-ldap-sasl=${LOCALBASE} USES+= ldap . endif . if ${PHP_MODNAME} == "mbstring" CONFIGURE_ARGS+= --enable-mbstring OPTIONS_DEFINE= REGEX OPTIONS_DEFAULT= REGEX REGEX_DESC= Enable multibyte regex support REGEX_LIB_DEPENDS= libonig.so:devel/oniguruma REGEX_CONFIGURE_OFF= --disable-mbregex PHP_HEADER_DIRS= libmbfl libmbfl/filters libmbfl/mbfl libmbfl/nls . endif . if ${PHP_MODNAME} == "mysqli" CONFIGURE_ARGS+= --with-mysqli . endif . if ${PHP_MODNAME} == "odbc" LIB_DEPENDS+= libodbc.so:databases/unixODBC CONFIGURE_ARGS+= --with-unixODBC=${LOCALBASE} . endif . if ${PHP_MODNAME} == "pcntl" CONFIGURE_ARGS+= --enable-pcntl . endif . if ${PHP_MODNAME} == "pdo" CONFIGURE_ARGS+= --enable-pdo . endif . if ${PHP_MODNAME} == "pdo_dblib" CONFIGURE_ARGS+= --with-pdo-dblib=${LOCALBASE} USE_PHP= pdo:build OPTIONS_DEFINE= MSSQL MSSQL_DESC= Enable Microsoft SQL Server support MSSQL_LIB_DEPENDS= libsybdb.so:databases/freetds MSSQL_LIB_DEPENDS_OFF= libct.so:databases/freetds . endif . if ${PHP_MODNAME} == "pdo_firebird" CONFIGURE_ARGS+= --with-pdo-firebird=${LOCALBASE} USES+= firebird USE_PHP= pdo:build . endif . if ${PHP_MODNAME} == "pdo_odbc" LIB_DEPENDS+= libodbc.so:databases/unixODBC CONFIGURE_ARGS+= --with-pdo-odbc=unixODBC,${LOCALBASE} USE_PHP= pdo:build . endif . if ${PHP_MODNAME} == "pdo_mysql" OPTIONS_DEFINE= MYSQLND OPTIONS_DEFAULT= MYSQLND MYSQLND_DESC= Use MySQL Native Driver MYSQLND_CONFIGURE_ON= --with-pdo-mysql=mysqlnd MYSQLND_CONFIGURE_OFF= --with-pdo-mysql=${LOCALBASE} \ --with-zlib-dir=/usr MYSQLND_USES_OFF= mysql USE_PHP= pdo:build . endif . if ${PHP_MODNAME} == "pdo_pgsql" USES+= pgsql CONFIGURE_ARGS+= --with-pdo-pgsql=${LOCALBASE} USE_PHP= pdo:build . endif . if ${PHP_MODNAME} == "pdo_sqlite" USES+= localbase sqlite CONFIGURE_ARGS+= --with-pdo-sqlite=${LOCALBASE} USE_PHP= pdo:build . endif . if ${PHP_MODNAME} == "pgsql" USES+= pgsql CONFIGURE_ARGS+= --with-pgsql=${LOCALBASE} . endif . if ${PHP_MODNAME} == "phar" CONFIGURE_ARGS+= --enable-phar . endif . if ${PHP_MODNAME} == "posix" CONFIGURE_ARGS+= --enable-posix . endif . if ${PHP_MODNAME} == "readline" CONFIGURE_ARGS+=--with-libedit USES+= libedit . endif . if ${PHP_MODNAME} == "session" CONFIGURE_ARGS+= --enable-session PHP_MOD_PRIO= 18 . endif . if ${PHP_MODNAME} == "shmop" CONFIGURE_ARGS+= --enable-shmop . endif . if ${PHP_MODNAME} == "simplexml" CONFIGURE_ARGS+= --enable-simplexml USES+= pkgconfig USE_GNOME= libxml2 . endif . if ${PHP_MODNAME} == "snmp" CONFIGURE_ARGS+= --with-snmp=${LOCALBASE} CONFIGURE_ENV+= ac_cv_buggy_snprint_value="no" LIB_DEPENDS+= libnetsnmp.so:net-mgmt/net-snmp LDFLAGS+= -L${OPENSSLLIB} -lcrypto -lssl USES+= ssl . endif . if ${PHP_MODNAME} == "soap" CONFIGURE_ARGS+= --enable-soap USES+= pkgconfig USE_GNOME= libxml2 . endif . if ${PHP_MODNAME} == "sockets" CONFIGURE_ARGS+= --enable-sockets CONFIGURE_ENV+= LOCAL_CREDS_PERSISTENT=yes . endif . if ${PHP_MODNAME} == "sodium" CONFIGURE_ARGS+= --with-sodium=${LOCALBASE} LIB_DEPENDS+= libsodium.so:security/libsodium . endif . if ${PHP_MODNAME} == "sqlite3" USES+= localbase pkgconfig sqlite CONFIGURE_ARGS+= --with-sqlite3=${LOCALBASE} . endif . if ${PHP_MODNAME} == "sysvmsg" CONFIGURE_ARGS+= --enable-sysvmsg . endif . if ${PHP_MODNAME} == "sysvsem" CONFIGURE_ARGS+= --enable-sysvsem . endif . if ${PHP_MODNAME} == "sysvshm" CONFIGURE_ARGS+= --enable-sysvshm . endif . if ${PHP_MODNAME} == "tidy" CONFIGURE_ARGS+= --with-tidy=${LOCALBASE} LIB_DEPENDS+= libtidy5.so:www/tidy-html5 . endif . if ${PHP_MODNAME} == "tokenizer" CONFIGURE_ARGS+= --enable-tokenizer . endif . if ${PHP_MODNAME} == "xml" CONFIGURE_ARGS+= --enable-xml USES+= pkgconfig USE_GNOME= libxml2 . endif . if ${PHP_MODNAME} == "xmlreader" CONFIGURE_ARGS+= --enable-xmlreader USE_GNOME= libxml2 USE_PHP= dom:build . endif . if ${PHP_MODNAME} == "xmlwriter" CONFIGURE_ARGS+= --enable-xmlwriter USES+= pkgconfig USE_GNOME= libxml2 . endif . if ${PHP_MODNAME} == "xsl" CONFIGURE_ARGS+= --with-xsl=${LOCALBASE} USE_GNOME= libxslt USE_PHP= dom:build xml:build . endif . if ${PHP_MODNAME} == "zip" LIB_DEPENDS+= libzip.so:archivers/libzip CONFIGURE_ARGS+= --with-zip USES+= pkgconfig . endif . if ${PHP_MODNAME} == "zlib" CONFIGURE_ARGS+= --with-zlib=/usr USES+= pkgconfig . endif .include . if ${PHP_MODNAME} == "soap" post-extract: @${MKDIR} ${WRKSRC}/ext/session @${CP} ${FILESDIR}/php_session.h ${WRKSRC}/ext/session . endif . if ${PHP_MODNAME} == "sqlite3" || ${PHP_MODNAME} == "zlib" post-extract: @${MV} ${WRKSRC}/config0.m4 ${WRKSRC}/config.m4 . endif . if ${PHP_MODNAME} == "xml" post-extract: @${MKDIR} ${WRKSRC}/ext/xml @${CP} ${WRKSRC}/expat_compat.h ${WRKSRC}/ext/xml . endif .endif .include diff --git a/lang/php85/distinfo b/lang/php85/distinfo index 01a1f63a7dc1..bc97e81f4ded 100644 --- a/lang/php85/distinfo +++ b/lang/php85/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1757678817 -SHA256 (php-8.5.0beta3.tar.gz) = ff3f5a8c73c4b84883ef0e3870543c078d324c46ccef2eb85c66cb88124e7a55 -SIZE (php-8.5.0beta3.tar.gz) = 24092865 +TIMESTAMP = 1759582579 +SHA256 (php-8.5.0RC1.tar.gz) = 0ea5059a387117fe6ed9a72cdc20945dbff6acc072df936e97d35a9cb26420e0 +SIZE (php-8.5.0RC1.tar.gz) = 24117073