Changeset View
Changeset View
Standalone View
Standalone View
Mk/Uses/php.mk
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | |||||
PHP_Include_MAINTAINER= ale@FreeBSD.org | PHP_Include_MAINTAINER= ale@FreeBSD.org | ||||
_INCLUDE_USES_PHP_MK= yes | _INCLUDE_USES_PHP_MK= yes | ||||
_PHP_VALID_ARGS= build cgi cli embed ext flavors mod noflavors pecl \ | _PHP_VALID_ARGS= build cgi cli embed ext flavors mod noflavors pecl \ | ||||
phpize web zend | phpize web zend | ||||
_PHP_UNKNOWN_ARGS= | _PHP_UNKNOWN_ARGS= | ||||
.for arg in ${php_ARGS} | . for arg in ${php_ARGS} | ||||
. if empty(_PHP_VALID_ARGS:M${arg}) | . if empty(_PHP_VALID_ARGS:M${arg}) | ||||
_PHP_UNKNOWN_ARGS+= ${arg} | _PHP_UNKNOWN_ARGS+= ${arg} | ||||
. endif | . endif | ||||
.endfor | . endfor | ||||
.if !empty(_PHP_UNKNOWN_ARGS) | . if !empty(_PHP_UNKNOWN_ARGS) | ||||
IGNORE= has unknown USES=php arguments: ${_PHP_UNKNOWN_ARGS} | IGNORE= has unknown USES=php arguments: ${_PHP_UNKNOWN_ARGS} | ||||
.endif | . endif | ||||
. if ${php_ARGS:Mbuild} && ( ${php_ARGS:Mphpize} || ${php_ARGS:Mext} || ${php_ARGS:Mzend} ) | . 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" | DEV_WARNING+= "USES=php:build is included in USES=php:phpize, USES=php:ext, and USES=php:zend, so it is not needed" | ||||
. endif | . endif | ||||
. if ${php_ARGS:Mflavors} && ( ${php_ARGS:Mphpize} || ${php_ARGS:Mext} || ${php_ARGS:Mzend} || ${php_ARGS:Mpecl} ) | . 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." | DEV_WARNING+= "USES=php:flavors is included in phpize, ext, zend and pecl, so it is not needed." | ||||
. endif | . endif | ||||
. if ${php_ARGS:Mphpize} && ( ${php_ARGS:Mext} || ${php_ARGS:Mzend} ) | . if ${php_ARGS:Mphpize} && ( ${php_ARGS:Mext} || ${php_ARGS:Mzend} ) | ||||
▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
. if defined(IGNORE_WITH_PHP) && ${IGNORE_WITH_PHP:M${_INSTALLED_PHP_VER}} | . 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. | IGNORE= does not work with PHP versions "${IGNORE_WITH_PHP}" and "${_INSTALLED_PHP_VER}" is installed. | ||||
. endif | . endif | ||||
. else | . else | ||||
PHP_VER?= ${PHP_DEFAULT:S/.//} | PHP_VER?= ${PHP_DEFAULT:S/.//} | ||||
. endif # .if exists(${PHPBASE}/etc/php.conf) | . endif # .if exists(${PHPBASE}/etc/php.conf) | ||||
.if defined(BUILD_ONLY_DEFAULT_PHP_FLAVOR) | . if defined(BUILD_ONLY_DEFAULT_PHP_FLAVOR) | ||||
# Only build php ports of the default flavor | # Only build php ports of the default flavor | ||||
_ALL_FLAVOR_VERSIONS= ${PHP_VER} | _ALL_FLAVOR_VERSIONS= ${PHP_VER} | ||||
.else | . else | ||||
# Use the "default" php version as the first version for flavors, so that it | # Use the "default" php version as the first version for flavors, so that it | ||||
# gets to be the default flavor. | # gets to be the default flavor. | ||||
_ALL_FLAVOR_VERSIONS= ${PHP_VER} ${_ALL_PHP_VERSIONS:N${PHP_VER}} | _ALL_FLAVOR_VERSIONS= ${PHP_VER} ${_ALL_PHP_VERSIONS:N${PHP_VER}} | ||||
.endif | . endif | ||||
# If we want flavors, fill in FLAVORS with the allowed PHP versions, if some | # 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. | # 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. | # Then if there is no flavor set, use the first one as the default. | ||||
. if ${php_ARGS:Mflavors} | . if ${php_ARGS:Mflavors} | ||||
. if empty(FLAVORS) | . if empty(FLAVORS) | ||||
. if defined(IGNORE_WITH_PHP) | . if defined(IGNORE_WITH_PHP) | ||||
. for _v in ${_ALL_FLAVOR_VERSIONS} | . for _v in ${_ALL_FLAVOR_VERSIONS} | ||||
Show All 10 Lines | |||||
FLAVORS:= ${_ALL_FLAVOR_VERSIONS:S/^/php/} | FLAVORS:= ${_ALL_FLAVOR_VERSIONS:S/^/php/} | ||||
. endif # defined(IGNORE_WITH_PHP) | . endif # defined(IGNORE_WITH_PHP) | ||||
. endif | . endif | ||||
. if empty(FLAVOR) | . if empty(FLAVOR) | ||||
FLAVOR= ${FLAVORS:[1]} | FLAVOR= ${FLAVORS:[1]} | ||||
. endif | . endif | ||||
. endif | . endif | ||||
.if ${PHP_VER} == 74 && (${ARCH:Mmips*} || (${ARCH:Mpowerpc*} && !exists(/usr/bin/clang)) || ${ARCH} == sparc64) | . if ${PHP_VER} == 74 && (${ARCH:Mmips*} || (${ARCH:Mpowerpc*} && !exists(/usr/bin/clang)) || ${ARCH} == sparc64) | ||||
USE_GCC= yes | USE_GCC= yes | ||||
.endif | . endif | ||||
# This variable is for dependencies lines, so you write: | # This variable is for dependencies lines, so you write: | ||||
# ${PHP_PKGNAMEPREFIX}foo:devel/php-foo@${PHP_FLAVOR} | # ${PHP_PKGNAMEPREFIX}foo:devel/php-foo@${PHP_FLAVOR} | ||||
PHP_FLAVOR= php${PHP_VER} | PHP_FLAVOR= php${PHP_VER} | ||||
# So, we have PHP flavors, set PHP_VER accordingly. | # So, we have PHP flavors, set PHP_VER accordingly. | ||||
. if ${FLAVOR:Mphp[0-9][0-9]} | . if ${FLAVOR:Mphp[0-9][0-9]} | ||||
PHP_VER= ${FLAVOR:S/^php//} | PHP_VER= ${FLAVOR:S/^php//} | ||||
▲ Show 20 Lines • Show All 230 Lines • ▼ Show 20 Lines | |||||
ftp_DEPENDS= ftp/php${PHP_VER}-ftp | ftp_DEPENDS= ftp/php${PHP_VER}-ftp | ||||
gd_DEPENDS= graphics/php${PHP_VER}-gd | gd_DEPENDS= graphics/php${PHP_VER}-gd | ||||
gettext_DEPENDS=devel/php${PHP_VER}-gettext | gettext_DEPENDS=devel/php${PHP_VER}-gettext | ||||
gmp_DEPENDS= math/php${PHP_VER}-gmp | gmp_DEPENDS= math/php${PHP_VER}-gmp | ||||
iconv_DEPENDS= converters/php${PHP_VER}-iconv | iconv_DEPENDS= converters/php${PHP_VER}-iconv | ||||
igbinary_DEPENDS= converters/pecl-igbinary@${PHP_FLAVOR} | igbinary_DEPENDS= converters/pecl-igbinary@${PHP_FLAVOR} | ||||
imap_DEPENDS= mail/php${PHP_VER}-imap | imap_DEPENDS= mail/php${PHP_VER}-imap | ||||
intl_DEPENDS= devel/php${PHP_VER}-intl | intl_DEPENDS= devel/php${PHP_VER}-intl | ||||
.if ${PHP_VER} < 80 | . if ${PHP_VER} < 80 | ||||
json_DEPENDS= devel/php${PHP_VER}-json | json_DEPENDS= devel/php${PHP_VER}-json | ||||
.endif | . endif | ||||
ldap_DEPENDS= net/php${PHP_VER}-ldap | ldap_DEPENDS= net/php${PHP_VER}-ldap | ||||
mbstring_DEPENDS= converters/php${PHP_VER}-mbstring | mbstring_DEPENDS= converters/php${PHP_VER}-mbstring | ||||
mcrypt_DEPENDS= security/pecl-mcrypt@${PHP_FLAVOR} | mcrypt_DEPENDS= security/pecl-mcrypt@${PHP_FLAVOR} | ||||
memcache_DEPENDS= databases/pecl-memcache@${PHP_FLAVOR} | memcache_DEPENDS= databases/pecl-memcache@${PHP_FLAVOR} | ||||
memcached_DEPENDS= databases/pecl-memcached@${PHP_FLAVOR} | memcached_DEPENDS= databases/pecl-memcached@${PHP_FLAVOR} | ||||
mysqli_DEPENDS= databases/php${PHP_VER}-mysqli | mysqli_DEPENDS= databases/php${PHP_VER}-mysqli | ||||
odbc_DEPENDS= databases/php${PHP_VER}-odbc | odbc_DEPENDS= databases/php${PHP_VER}-odbc | ||||
opcache_DEPENDS= www/php${PHP_VER}-opcache | opcache_DEPENDS= www/php${PHP_VER}-opcache | ||||
.if ${PHP_VER} < 80 | . if ${PHP_VER} < 80 | ||||
openssl_DEPENDS=security/php${PHP_VER}-openssl | openssl_DEPENDS=security/php${PHP_VER}-openssl | ||||
.endif | . endif | ||||
pcntl_DEPENDS= devel/php${PHP_VER}-pcntl | pcntl_DEPENDS= devel/php${PHP_VER}-pcntl | ||||
pdf_DEPENDS= print/pecl-pdflib@${PHP_FLAVOR} | pdf_DEPENDS= print/pecl-pdflib@${PHP_FLAVOR} | ||||
pdo_DEPENDS= databases/php${PHP_VER}-pdo | pdo_DEPENDS= databases/php${PHP_VER}-pdo | ||||
pdo_dblib_DEPENDS= databases/php${PHP_VER}-pdo_dblib | pdo_dblib_DEPENDS= databases/php${PHP_VER}-pdo_dblib | ||||
pdo_firebird_DEPENDS= databases/php${PHP_VER}-pdo_firebird | pdo_firebird_DEPENDS= databases/php${PHP_VER}-pdo_firebird | ||||
pdo_mysql_DEPENDS= databases/php${PHP_VER}-pdo_mysql | pdo_mysql_DEPENDS= databases/php${PHP_VER}-pdo_mysql | ||||
pdo_odbc_DEPENDS= databases/php${PHP_VER}-pdo_odbc | pdo_odbc_DEPENDS= databases/php${PHP_VER}-pdo_odbc | ||||
pdo_pgsql_DEPENDS= databases/php${PHP_VER}-pdo_pgsql | pdo_pgsql_DEPENDS= databases/php${PHP_VER}-pdo_pgsql | ||||
Show All 15 Lines | |||||
sqlite3_DEPENDS=databases/php${PHP_VER}-sqlite3 | sqlite3_DEPENDS=databases/php${PHP_VER}-sqlite3 | ||||
sysvmsg_DEPENDS=devel/php${PHP_VER}-sysvmsg | sysvmsg_DEPENDS=devel/php${PHP_VER}-sysvmsg | ||||
sysvsem_DEPENDS=devel/php${PHP_VER}-sysvsem | sysvsem_DEPENDS=devel/php${PHP_VER}-sysvsem | ||||
sysvshm_DEPENDS=devel/php${PHP_VER}-sysvshm | sysvshm_DEPENDS=devel/php${PHP_VER}-sysvshm | ||||
tidy_DEPENDS= www/php${PHP_VER}-tidy | tidy_DEPENDS= www/php${PHP_VER}-tidy | ||||
tokenizer_DEPENDS= devel/php${PHP_VER}-tokenizer | tokenizer_DEPENDS= devel/php${PHP_VER}-tokenizer | ||||
xml_DEPENDS= textproc/php${PHP_VER}-xml | xml_DEPENDS= textproc/php${PHP_VER}-xml | ||||
xmlreader_DEPENDS= textproc/php${PHP_VER}-xmlreader | xmlreader_DEPENDS= textproc/php${PHP_VER}-xmlreader | ||||
.if ${PHP_VER} >= 80 | . if ${PHP_VER} >= 80 | ||||
xmlrpc_DEPENDS= net/pecl-xmlrpc@${PHP_FLAVOR} | xmlrpc_DEPENDS= net/pecl-xmlrpc@${PHP_FLAVOR} | ||||
.else | . else | ||||
xmlrpc_DEPENDS= net/php${PHP_VER}-xmlrpc | xmlrpc_DEPENDS= net/php${PHP_VER}-xmlrpc | ||||
.endif | . endif | ||||
xmlwriter_DEPENDS= textproc/php${PHP_VER}-xmlwriter | xmlwriter_DEPENDS= textproc/php${PHP_VER}-xmlwriter | ||||
xsl_DEPENDS= textproc/php${PHP_VER}-xsl | xsl_DEPENDS= textproc/php${PHP_VER}-xsl | ||||
zip_DEPENDS= archivers/php${PHP_VER}-zip | zip_DEPENDS= archivers/php${PHP_VER}-zip | ||||
zlib_DEPENDS= archivers/php${PHP_VER}-zlib | zlib_DEPENDS= archivers/php${PHP_VER}-zlib | ||||
. for extension in ${USE_PHP} | . for extension in ${USE_PHP} | ||||
ext= ${extension} | ext= ${extension} | ||||
. if !empty(_USE_PHP_VER${PHP_VER}:M${extension:S/:build//}) | . if !empty(_USE_PHP_VER${PHP_VER}:M${extension:S/:build//}) | ||||
Show All 16 Lines |