2016-06-23 13:19:17 +00:00
|
|
|
# $FreeBSD$
|
2004-02-04 04:27:04 +00:00
|
|
|
#
|
2016-06-23 13:19:17 +00:00
|
|
|
# Support for PHP-based ports.
|
2004-02-04 04:27:04 +00:00
|
|
|
#
|
2016-06-23 13:19:17 +00:00
|
|
|
# Feature: php
|
|
|
|
# Usage: USES=php
|
|
|
|
# Valid ARGS: (none)
|
2004-02-04 04:27:04 +00:00
|
|
|
#
|
2004-07-19 07:15:24 +00:00
|
|
|
# If the port requires a predefined set of PHP extensions, they can be
|
|
|
|
# listed in this way:
|
|
|
|
#
|
|
|
|
# USE_PHP= ext1 ext2 ext3
|
2004-02-04 04:27:04 +00:00
|
|
|
#
|
2012-05-27 12:05:18 +00:00
|
|
|
# The port can set these options in its Makefile before bsd.port.pre.mk:
|
2004-02-04 04:27:04 +00:00
|
|
|
#
|
2004-07-19 23:25:22 +00:00
|
|
|
# DEFAULT_PHP_VER=N - Use PHP version N if PHP is not yet installed.
|
* Change all bogus uses of BROKEN to IGNORE. Note: the BROKEN_WITH_*
forms are retained for compatibility but deprecated [1]
* Add sha256 to CHECKSUM_ALGORITHMS [2]
* Remove some whitespace [2]
* Add USE_SCONS and bsd.scons.mk for the Python-based SCons build system [3]
* Fix USE_LDCONFIG with non-default PREFIX [4]
* Add USE_WX and friends, and bsd.wx.mk, for common code for WxWidgets
support [5]
* Add 'make missing' to show missing dependencies [6]
* Fix DESKTOP_ENTRIES processing on 4.x [7]
PR: 92445 [1], 98206 [2], 98731 [3], 99370 [4], 89398 [5],
93601 [6], 98891 [7]
Submitted by: linimon [1], edwin [2], alex at foxybanana dot com [3],
gerald [4], flz [4], alepulver [5], alex at fafula dot com [6],
shaun [7]
2006-07-05 02:18:09 +00:00
|
|
|
# IGNORE_WITH_PHP=N - The port doesn't work with PHP version N.
|
2004-02-04 04:27:04 +00:00
|
|
|
# USE_PHPIZE=yes - Use to build a PHP extension.
|
2004-07-19 07:15:24 +00:00
|
|
|
# USE_PHPEXT=yes - Use to build, install and register a PHP extension.
|
2013-03-07 09:20:22 +00:00
|
|
|
# USE_ZENDEXT=yes - Use to build, install and register a Zend extension.
|
2004-07-19 07:15:24 +00:00
|
|
|
# USE_PHP_BUILD=yes - Set PHP also as a build dependency.
|
2004-02-04 04:27:04 +00:00
|
|
|
# WANT_PHP_CLI=yes - Want the CLI version of PHP.
|
|
|
|
# WANT_PHP_CGI=yes - Want the CGI version of PHP.
|
|
|
|
# WANT_PHP_MOD=yes - Want the Apache Module for PHP.
|
|
|
|
# WANT_PHP_WEB=yes - Want the Apache Module or the CGI version of PHP.
|
2012-05-16 07:36:13 +00:00
|
|
|
# WANT_PHP_EMB=yes - Want the embedded library version of PHP.
|
2004-02-04 04:27:04 +00:00
|
|
|
#
|
|
|
|
# You may combine multiple WANT_PHP_* knobs.
|
|
|
|
# Don't specify any WANT_PHP_* knob if your port will work with every PHP SAPI.
|
|
|
|
#
|
2015-09-27 18:37:34 +00:00
|
|
|
# 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.
|
2004-02-04 04:27:04 +00:00
|
|
|
|
2016-06-23 13:19:17 +00:00
|
|
|
.if !defined(_INCLUDE_USES_PHP_MK)
|
* Refine some comments about Linux emulation [1]
* Fix 'make search' with non-default ${PORTSDIR} [2]
* Fix typo in USE_LDCONFIG32 message [3]
* Allow USE_PHP after inclusion of bsd.port.pre.mk [4]
* Document NO_LDCONFIG_MTREE [5]
* Update/enhance description of INSTALLS_SHLIB and USE_LDCONFIG [6]
* Remove obsolete code in bsd.port.mk dealing with 4.X and other,
even older, releases [7]
* Remove references to obsolete ports from bsd.java.mk [8]
PR: 105883 [1], 105917 [2], 106195 [3], 106557 [4], 108738 [5],
108739 [6], 108782 [7], 103357 [8]
Submitted by: bsam [1], shaun [2], edwin [3], ale [4], gerald [5] [6],
linimon [7], kris [7], gabor [4]
2007-03-06 06:21:46 +00:00
|
|
|
|
2004-02-04 04:27:04 +00:00
|
|
|
PHP_Include_MAINTAINER= ale@FreeBSD.org
|
|
|
|
|
2016-06-23 13:19:17 +00:00
|
|
|
_INCLUDE_USES_PHP_MK= yes
|
* Refine some comments about Linux emulation [1]
* Fix 'make search' with non-default ${PORTSDIR} [2]
* Fix typo in USE_LDCONFIG32 message [3]
* Allow USE_PHP after inclusion of bsd.port.pre.mk [4]
* Document NO_LDCONFIG_MTREE [5]
* Update/enhance description of INSTALLS_SHLIB and USE_LDCONFIG [6]
* Remove obsolete code in bsd.port.mk dealing with 4.X and other,
even older, releases [7]
* Remove references to obsolete ports from bsd.java.mk [8]
PR: 105883 [1], 105917 [2], 106195 [3], 106557 [4], 108738 [5],
108739 [6], 108782 [7], 103357 [8]
Submitted by: bsam [1], shaun [2], edwin [3], ale [4], gerald [5] [6],
linimon [7], kris [7], gabor [4]
2007-03-06 06:21:46 +00:00
|
|
|
|
2014-02-11 17:12:28 +00:00
|
|
|
.include "${PORTSDIR}/Mk/bsd.default-versions.mk"
|
|
|
|
|
2016-06-23 13:19:17 +00:00
|
|
|
. if defined(DEFAULT_PHP_VER)
|
2014-02-11 17:12:28 +00:00
|
|
|
WARNING+= "DEFAULT_PHP_VER is defined, consider using DEFAULT_VERSIONS=php=${DEFAULT_PHP_VER} instead"
|
2016-06-23 13:19:17 +00:00
|
|
|
. endif
|
2014-02-11 17:12:28 +00:00
|
|
|
|
2008-01-21 07:19:24 +00:00
|
|
|
PHPBASE?= ${LOCALBASE}
|
2016-06-23 13:19:17 +00:00
|
|
|
. if exists(${PHPBASE}/etc/php.conf)
|
2008-01-21 07:19:24 +00:00
|
|
|
.include "${PHPBASE}/etc/php.conf"
|
2016-06-23 13:19:17 +00:00
|
|
|
. if !defined(PHP_EXT_DIR)
|
2008-01-21 07:19:24 +00:00
|
|
|
PHP_EXT_DIR!= ${PHPBASE}/bin/php-config --extension-dir | ${SED} -ne 's,^${PHPBASE}/lib/php/\(.*\),\1,p'
|
2016-06-23 13:19:17 +00:00
|
|
|
. endif
|
|
|
|
. else
|
2014-02-11 17:12:28 +00:00
|
|
|
DEFAULT_PHP_VER?= ${PHP_DEFAULT:S/.//}
|
2004-07-19 23:25:22 +00:00
|
|
|
|
2016-04-14 13:34:25 +00:00
|
|
|
# When adding a version, please keep the comment in
|
|
|
|
# Mk/bsd.default-versions.mk in sync.
|
2004-07-19 23:25:22 +00:00
|
|
|
PHP_VER?= ${DEFAULT_PHP_VER}
|
2016-06-23 13:19:17 +00:00
|
|
|
. if ${PHP_VER} == 70
|
2016-02-15 14:34:26 +00:00
|
|
|
PHP_EXT_DIR= 20151012
|
|
|
|
PHP_EXT_INC= pcre spl
|
2016-06-23 13:19:17 +00:00
|
|
|
. elif ${PHP_VER} == 56
|
2014-09-04 14:24:25 +00:00
|
|
|
PHP_EXT_DIR= 20131226
|
|
|
|
PHP_EXT_INC= pcre spl
|
2016-06-23 13:19:17 +00:00
|
|
|
. elif ${PHP_VER} == 55
|
2013-06-24 14:32:11 +00:00
|
|
|
PHP_EXT_DIR= 20121212
|
|
|
|
PHP_EXT_INC= pcre spl
|
2016-06-23 13:19:17 +00:00
|
|
|
. else
|
2016-02-14 19:21:31 +00:00
|
|
|
# (rene) default to DEFAULT_VERSIONS
|
|
|
|
PHP_EXT_DIR= 20131226
|
2012-05-16 07:36:13 +00:00
|
|
|
PHP_EXT_INC= pcre spl
|
2016-06-23 13:19:17 +00:00
|
|
|
. endif
|
2005-12-09 19:41:41 +00:00
|
|
|
|
|
|
|
HTTPD?= ${LOCALBASE}/sbin/httpd
|
2016-06-23 13:19:17 +00:00
|
|
|
. if exists(${HTTPD})
|
2013-05-27 12:32:13 +00:00
|
|
|
APACHE_THR!= ${HTTPD} -V | ${GREP} threaded
|
2016-06-23 13:19:17 +00:00
|
|
|
. if ${APACHE_THR:Myes}
|
2004-02-04 04:27:04 +00:00
|
|
|
PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts
|
2016-06-23 13:19:17 +00:00
|
|
|
. endif
|
|
|
|
. elif defined(APACHE_PORT) && (${APACHE_PORT:M*worker*} != "" || ${APACHE_PORT:M*event*} != "")
|
2012-12-17 13:51:22 +00:00
|
|
|
PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts
|
2016-06-23 13:19:17 +00:00
|
|
|
. elif defined(WITH_MPM) && (${WITH_MPM} == "worker" || ${WITH_MPM} == "event")
|
2004-02-04 04:27:04 +00:00
|
|
|
PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts
|
2016-06-23 13:19:17 +00:00
|
|
|
. endif
|
2005-12-09 19:41:41 +00:00
|
|
|
|
2016-06-23 13:19:17 +00:00
|
|
|
. if defined(WITH_DEBUG)
|
2004-02-04 04:27:04 +00:00
|
|
|
PHP_EXT_DIR:= ${PHP_EXT_DIR}-debug
|
2016-06-23 13:19:17 +00:00
|
|
|
. endif
|
2004-02-04 04:27:04 +00:00
|
|
|
PHP_SAPI?= ""
|
2016-06-23 13:19:17 +00:00
|
|
|
. endif # .if exists(${PHPBASE}/etc/php.conf)
|
2005-03-14 14:37:45 +00:00
|
|
|
PHP_EXT_INC?= ""
|
2004-02-04 04:27:04 +00:00
|
|
|
|
2016-06-23 13:19:17 +00:00
|
|
|
. if defined(IGNORE_WITH_PHP)
|
|
|
|
. for VER in ${IGNORE_WITH_PHP}
|
|
|
|
. if ${PHP_VER} == "${VER}"
|
2012-12-17 13:51:22 +00:00
|
|
|
IGNORE= cannot be installed: doesn't work with lang/php${PHP_VER} port\
|
2016-02-14 19:21:31 +00:00
|
|
|
(doesn't support PHP ${IGNORE_WITH_PHP:C/^5/5./})
|
2016-06-23 13:19:17 +00:00
|
|
|
. endif
|
|
|
|
. endfor
|
|
|
|
. endif
|
2004-02-04 04:27:04 +00:00
|
|
|
|
2016-06-23 13:19:17 +00:00
|
|
|
. if defined(WANT_PHP_WEB)
|
|
|
|
. if defined(WANT_PHP_CGI) || defined(WANT_PHP_MOD)
|
2004-02-04 04:27:04 +00:00
|
|
|
check-makevars::
|
|
|
|
@${ECHO_CMD} "If you define WANT_PHP_WEB you cannot set also WANT_PHP_CGI"
|
|
|
|
@${ECHO_CMD} "or WANT_PHP_MOD. Use only one of them."
|
|
|
|
@${FALSE}
|
2016-06-23 13:19:17 +00:00
|
|
|
. endif
|
|
|
|
. endif
|
2004-02-04 04:27:04 +00:00
|
|
|
|
2016-06-23 13:19:17 +00:00
|
|
|
. if defined(WANT_PHP_CGI)
|
|
|
|
. if defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == "" && ${PHP_SAPI:Mfpm} == ""
|
2004-02-04 04:27:04 +00:00
|
|
|
check-makevars::
|
|
|
|
@${ECHO_CMD} "This port requires the CGI version of PHP, but you have already"
|
2006-05-06 13:26:49 +00:00
|
|
|
@${ECHO_CMD} "installed a PHP port without CGI."
|
2004-02-04 04:27:04 +00:00
|
|
|
@${FALSE}
|
2016-06-23 13:19:17 +00:00
|
|
|
. endif
|
|
|
|
. endif
|
2004-02-04 04:27:04 +00:00
|
|
|
|
2016-06-23 13:19:17 +00:00
|
|
|
. if defined(WANT_PHP_CLI)
|
|
|
|
. if defined(PHP_VERSION) && ${PHP_SAPI:Mcli} == ""
|
2004-02-04 04:27:04 +00:00
|
|
|
check-makevars::
|
|
|
|
@${ECHO_CMD} "This port requires the CLI version of PHP, but you have already"
|
2006-05-06 13:26:49 +00:00
|
|
|
@${ECHO_CMD} "installed a PHP port without CLI."
|
2004-02-04 04:27:04 +00:00
|
|
|
@${FALSE}
|
2016-06-23 13:19:17 +00:00
|
|
|
. endif
|
|
|
|
. endif
|
2004-02-04 04:27:04 +00:00
|
|
|
|
2016-06-23 13:19:17 +00:00
|
|
|
. if defined(WANT_PHP_EMB)
|
|
|
|
. if defined(PHP_VERSION) && ${PHP_SAPI:Membed} == ""
|
2012-05-16 07:36:13 +00:00
|
|
|
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}
|
2016-06-23 13:19:17 +00:00
|
|
|
. endif
|
|
|
|
. endif
|
2004-02-04 04:27:04 +00:00
|
|
|
|
2010-04-09 19:12:15 +00:00
|
|
|
PHP_PORT?= lang/php${PHP_VER}
|
2014-03-27 16:09:37 +00:00
|
|
|
MOD_PHP_PORT?= www/mod_php${PHP_VER}
|
2004-07-19 12:23:13 +00:00
|
|
|
|
2016-06-23 13:19:17 +00:00
|
|
|
. if defined(USE_PHP_BUILD)
|
2016-03-27 01:23:25 +00:00
|
|
|
BUILD_DEPENDS+= ${PHPBASE}/include/php/main/php.h:${PHP_PORT}
|
2016-06-23 13:19:17 +00:00
|
|
|
. endif
|
2016-03-27 01:23:25 +00:00
|
|
|
RUN_DEPENDS+= ${PHPBASE}/include/php/main/php.h:${PHP_PORT}
|
2016-06-23 13:19:17 +00:00
|
|
|
. if defined(WANT_PHP_MOD) || (defined(WANT_PHP_WEB) && defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == "" && ${PHP_SAPI:Mfpm} == "")
|
2014-05-01 10:36:34 +00:00
|
|
|
USE_APACHE_RUN= 22+
|
|
|
|
.include "${PORTSDIR}/Mk/bsd.apache.mk"
|
2016-03-27 01:23:25 +00:00
|
|
|
RUN_DEPENDS+= ${PHPBASE}/${APACHEMODDIR}/libphp5.so:${MOD_PHP_PORT}
|
2016-06-23 13:19:17 +00:00
|
|
|
. endif
|
2004-02-04 04:27:04 +00:00
|
|
|
|
|
|
|
PLIST_SUB+= PHP_EXT_DIR=${PHP_EXT_DIR}
|
2005-11-20 20:35:40 +00:00
|
|
|
SUB_LIST+= PHP_EXT_DIR=${PHP_EXT_DIR}
|
2004-02-04 04:27:04 +00:00
|
|
|
|
2016-06-23 13:19:17 +00:00
|
|
|
. if defined(USE_PHPIZE) || defined(USE_PHPEXT) || defined(USE_ZENDEXT)
|
2016-03-27 01:23:25 +00:00
|
|
|
BUILD_DEPENDS+= ${PHPBASE}/bin/phpize:${PHP_PORT}
|
2008-01-21 07:19:24 +00:00
|
|
|
GNU_CONFIGURE= yes
|
2010-12-04 07:34:27 +00:00
|
|
|
USE_AUTOTOOLS+= autoconf:env
|
2008-01-21 07:19:24 +00:00
|
|
|
CONFIGURE_ARGS+=--with-php-config=${PHPBASE}/bin/php-config
|
2004-02-04 04:27:04 +00:00
|
|
|
|
2004-07-19 07:15:24 +00:00
|
|
|
configure-message: phpize-message do-phpize
|
|
|
|
|
|
|
|
phpize-message:
|
|
|
|
@${ECHO_MSG} "===> PHPizing for ${PKGNAME}"
|
2004-02-04 04:27:04 +00:00
|
|
|
|
2004-07-19 07:15:24 +00:00
|
|
|
do-phpize:
|
2008-01-21 07:19:24 +00:00
|
|
|
@(cd ${WRKSRC}; ${SETENV} ${SCRIPTS_ENV} ${PHPBASE}/bin/phpize)
|
2016-06-23 13:19:17 +00:00
|
|
|
. endif
|
2004-07-19 07:15:24 +00:00
|
|
|
|
2016-06-23 13:19:17 +00:00
|
|
|
_USES_POST+=php
|
2009-03-06 10:08:35 +00:00
|
|
|
.endif
|
|
|
|
|
2016-06-23 13:19:17 +00:00
|
|
|
.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_PHP_POST_MK)
|
|
|
|
|
|
|
|
_INCLUDE_USES_PHP_POST_MK=yes
|
|
|
|
|
|
|
|
. if (defined(USE_PHPEXT) || defined(USE_ZENDEXT))
|
2004-07-19 07:15:24 +00:00
|
|
|
PHP_MODNAME?= ${PORTNAME}
|
|
|
|
PHP_HEADER_DIRS?= ""
|
|
|
|
|
|
|
|
do-install:
|
2013-10-30 13:28:00 +00:00
|
|
|
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR}
|
2015-02-24 15:05:17 +00:00
|
|
|
@${INSTALL_LIB} ${WRKSRC}/modules/${PHP_MODNAME}.so \
|
2013-10-30 13:28:00 +00:00
|
|
|
${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR}
|
2016-06-23 13:19:17 +00:00
|
|
|
. for header in . ${PHP_HEADER_DIRS}
|
2013-10-30 13:28:00 +00:00
|
|
|
@${MKDIR} ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/${header}
|
2004-07-19 07:15:24 +00:00
|
|
|
@${INSTALL_DATA} ${WRKSRC}/${header}/*.h \
|
2013-10-30 13:28:00 +00:00
|
|
|
${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/${header}
|
2016-06-23 13:19:17 +00:00
|
|
|
. endfor
|
2013-10-30 13:28:00 +00:00
|
|
|
@${RM} -f ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h
|
2004-07-19 07:15:24 +00:00
|
|
|
@${GREP} "#define \(COMPILE\|HAVE\|USE\)_" ${WRKSRC}/config.h \
|
2013-10-30 13:28:00 +00:00
|
|
|
> ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h
|
|
|
|
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/php
|
2004-07-19 07:15:24 +00:00
|
|
|
|
|
|
|
add-plist-info: add-plist-phpext
|
|
|
|
add-plist-phpext:
|
|
|
|
@${ECHO_CMD} "lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so" \
|
|
|
|
>> ${TMPPLIST}
|
2013-10-30 13:28:00 +00:00
|
|
|
@${FIND} -P ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME} ! -type d 2>/dev/null | \
|
|
|
|
${SED} -ne 's,^${STAGEDIR}${PREFIX}/,,p' >> ${TMPPLIST}
|
2004-07-19 07:15:24 +00:00
|
|
|
@${ECHO_CMD} "@exec echo \#include \\\"ext/${PHP_MODNAME}/config.h\\\" >> %D/include/php/ext/php_config.h" \
|
|
|
|
>> ${TMPPLIST}
|
|
|
|
@${ECHO_CMD} "@unexec cp %D/include/php/ext/php_config.h %D/include/php/ext/php_config.h.orig" \
|
|
|
|
>> ${TMPPLIST}
|
|
|
|
@${ECHO_CMD} "@unexec 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} "@unexec rm %D/include/php/ext/php_config.h.orig" \
|
|
|
|
>> ${TMPPLIST}
|
2014-11-24 10:30:56 +00:00
|
|
|
@${ECHO_CMD} "@dir etc/php" \
|
2004-07-19 07:15:24 +00:00
|
|
|
>> ${TMPPLIST}
|
2016-06-23 13:19:17 +00:00
|
|
|
. if defined(USE_ZENDEXT)
|
2013-03-07 09:20:22 +00:00
|
|
|
@${ECHO_CMD} "@exec echo zend_extension=%D/lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so >> %D/etc/php/extensions.ini" \
|
|
|
|
>> ${TMPPLIST}
|
2016-06-23 13:19:17 +00:00
|
|
|
. else
|
2004-07-28 08:59:35 +00:00
|
|
|
@${ECHO_CMD} "@exec echo extension=${PHP_MODNAME}.so >> %D/etc/php/extensions.ini" \
|
2004-07-19 07:15:24 +00:00
|
|
|
>> ${TMPPLIST}
|
2016-06-23 13:19:17 +00:00
|
|
|
. endif
|
2004-07-28 08:59:35 +00:00
|
|
|
@${ECHO_CMD} "@unexec cp %D/etc/php/extensions.ini %D/etc/php/extensions.ini.orig" \
|
2004-07-19 07:15:24 +00:00
|
|
|
>> ${TMPPLIST}
|
2016-06-23 13:19:17 +00:00
|
|
|
. if defined(USE_ZENDEXT)
|
2013-03-07 09:20:22 +00:00
|
|
|
@${ECHO_CMD} "@unexec grep -v zend_extension=%D/lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}\\\.so %D/etc/php/extensions.ini.orig > %D/etc/php/extensions.ini || true" \
|
|
|
|
>> ${TMPPLIST}
|
2016-06-23 13:19:17 +00:00
|
|
|
. else
|
2004-09-02 10:08:48 +00:00
|
|
|
@${ECHO_CMD} "@unexec grep -v extension=${PHP_MODNAME}\\\.so %D/etc/php/extensions.ini.orig > %D/etc/php/extensions.ini || true" \
|
2004-07-28 08:59:35 +00:00
|
|
|
>> ${TMPPLIST}
|
2016-06-23 13:19:17 +00:00
|
|
|
. endif
|
2004-07-28 08:59:35 +00:00
|
|
|
@${ECHO_CMD} "@unexec rm %D/etc/php/extensions.ini.orig" \
|
|
|
|
>> ${TMPPLIST}
|
|
|
|
@${ECHO_CMD} "@unexec [ -s %D/etc/php/extensions.ini ] || rm %D/etc/php/extensions.ini" \
|
|
|
|
>> ${TMPPLIST}
|
2004-07-19 07:15:24 +00:00
|
|
|
|
2013-10-30 13:28:00 +00:00
|
|
|
package-message: php-ini
|
2004-07-19 07:15:24 +00:00
|
|
|
|
|
|
|
php-ini:
|
|
|
|
@${ECHO_CMD} "****************************************************************************"
|
|
|
|
@${ECHO_CMD} ""
|
2004-07-28 08:59:35 +00:00
|
|
|
@${ECHO_CMD} "The following line has been added to your ${PREFIX}/etc/php/extensions.ini"
|
2004-07-19 07:15:24 +00:00
|
|
|
@${ECHO_CMD} "configuration file to automatically load the installed extension:"
|
|
|
|
@${ECHO_CMD} ""
|
2016-06-23 13:19:17 +00:00
|
|
|
. if defined(USE_ZENDEXT)
|
2013-03-07 09:20:22 +00:00
|
|
|
@${ECHO_CMD} "zend_extension=${PREFIX}/lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so"
|
2016-06-23 13:19:17 +00:00
|
|
|
. else
|
2004-07-19 07:15:24 +00:00
|
|
|
@${ECHO_CMD} "extension=${PHP_MODNAME}.so"
|
2016-06-23 13:19:17 +00:00
|
|
|
. endif
|
2004-07-19 07:15:24 +00:00
|
|
|
@${ECHO_CMD} ""
|
|
|
|
@${ECHO_CMD} "****************************************************************************"
|
2016-06-23 13:19:17 +00:00
|
|
|
. endif
|
2004-07-19 07:15:24 +00:00
|
|
|
|
|
|
|
# Extensions
|
2016-06-23 13:19:17 +00:00
|
|
|
. if ${USE_PHP:tl} != "yes"
|
2004-07-19 07:15:24 +00:00
|
|
|
# non-version specific components
|
2012-05-16 07:36:13 +00:00
|
|
|
_USE_PHP_ALL= apc bcmath bitset bz2 calendar ctype curl dba dom \
|
|
|
|
exif fileinfo filter ftp gd gettext gmp \
|
2013-03-01 10:42:54 +00:00
|
|
|
hash iconv igbinary imap interbase intl json ldap mbstring mcrypt \
|
2016-02-18 12:05:45 +00:00
|
|
|
memcache mysqli odbc opcache \
|
2012-08-23 14:55:36 +00:00
|
|
|
openssl pcntl pcre pdf pdo pdo_dblib pdo_firebird pdo_mysql \
|
2016-02-18 12:05:45 +00:00
|
|
|
pdo_odbc pdo_pgsql pdo_sqlite phar pgsql posix \
|
2012-05-16 07:36:13 +00:00
|
|
|
pspell radius readline recode session shmop simplexml snmp soap\
|
2016-02-18 12:05:45 +00:00
|
|
|
sockets spl sqlite3 sysvmsg sysvsem sysvshm \
|
2012-05-16 07:36:13 +00:00
|
|
|
tidy tokenizer wddx xml xmlreader xmlrpc xmlwriter xsl zip zlib
|
2005-03-14 14:37:45 +00:00
|
|
|
# version specific components
|
2016-02-18 12:05:45 +00:00
|
|
|
_USE_PHP_VER55= ${_USE_PHP_ALL} mssql mysql sybase_ct
|
|
|
|
_USE_PHP_VER56= ${_USE_PHP_ALL} mssql mysql sybase_ct
|
|
|
|
_USE_PHP_VER70= ${_USE_PHP_ALL}
|
2004-07-19 07:15:24 +00:00
|
|
|
|
2008-07-11 10:57:15 +00:00
|
|
|
apc_DEPENDS= www/pecl-APC
|
2004-07-19 07:15:24 +00:00
|
|
|
bcmath_DEPENDS= math/php${PHP_VER}-bcmath
|
2016-06-23 13:19:17 +00:00
|
|
|
. if ${PHP_VER} == 70
|
2007-07-09 18:37:35 +00:00
|
|
|
bitset_DEPENDS= math/pecl-bitset
|
2016-06-23 13:19:17 +00:00
|
|
|
. else
|
2016-03-07 20:12:14 +00:00
|
|
|
bitset_DEPENDS= math/pecl-bitset2
|
2016-06-23 13:19:17 +00:00
|
|
|
. endif
|
2004-07-19 07:15:24 +00:00
|
|
|
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
|
|
|
|
dbase_DEPENDS= databases/php${PHP_VER}-dbase
|
|
|
|
dom_DEPENDS= textproc/php${PHP_VER}-dom
|
|
|
|
exif_DEPENDS= graphics/php${PHP_VER}-exif
|
2012-05-20 09:09:13 +00:00
|
|
|
fileinfo_DEPENDS= sysutils/php${PHP_VER}-fileinfo
|
2008-12-11 09:08:24 +00:00
|
|
|
filter_DEPENDS= security/php${PHP_VER}-filter
|
2004-07-19 07:15:24 +00:00
|
|
|
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
|
2012-05-20 09:09:13 +00:00
|
|
|
hash_DEPENDS= security/php${PHP_VER}-hash
|
2004-07-19 07:15:24 +00:00
|
|
|
iconv_DEPENDS= converters/php${PHP_VER}-iconv
|
2014-08-01 11:50:42 +00:00
|
|
|
igbinary_DEPENDS= converters/pecl-igbinary
|
2004-07-19 07:15:24 +00:00
|
|
|
imap_DEPENDS= mail/php${PHP_VER}-imap
|
|
|
|
interbase_DEPENDS= databases/php${PHP_VER}-interbase
|
2016-06-23 13:19:17 +00:00
|
|
|
. if ${PHP_VER} == 70
|
2016-02-15 14:34:26 +00:00
|
|
|
intl_DEPENDS= devel/php${PHP_VER}-intl
|
2016-06-23 13:19:17 +00:00
|
|
|
. else
|
2010-11-26 13:34:09 +00:00
|
|
|
intl_DEPENDS= devel/pecl-intl
|
2016-06-23 13:19:17 +00:00
|
|
|
. endif
|
2012-05-20 09:09:13 +00:00
|
|
|
json_DEPENDS= devel/php${PHP_VER}-json
|
2004-07-19 07:15:24 +00:00
|
|
|
ldap_DEPENDS= net/php${PHP_VER}-ldap
|
|
|
|
mbstring_DEPENDS= converters/php${PHP_VER}-mbstring
|
|
|
|
mcrypt_DEPENDS= security/php${PHP_VER}-mcrypt
|
2007-07-09 18:37:35 +00:00
|
|
|
memcache_DEPENDS= databases/pecl-memcache
|
2004-07-19 07:15:24 +00:00
|
|
|
mhash_DEPENDS= security/php${PHP_VER}-mhash
|
|
|
|
mssql_DEPENDS= databases/php${PHP_VER}-mssql
|
|
|
|
mysql_DEPENDS= databases/php${PHP_VER}-mysql
|
2016-02-18 04:54:43 +00:00
|
|
|
mysqli_DEPENDS= databases/php${PHP_VER}-mysqli
|
2004-07-19 07:15:24 +00:00
|
|
|
ncurses_DEPENDS=devel/php${PHP_VER}-ncurses
|
|
|
|
odbc_DEPENDS= databases/php${PHP_VER}-odbc
|
2010-04-23 16:48:53 +00:00
|
|
|
oci8_DEPENDS= databases/php${PHP_VER}-oci8
|
2013-09-28 16:48:34 +00:00
|
|
|
opcache_DEPENDS= www/php${PHP_VER}-opcache
|
2004-07-19 07:15:24 +00:00
|
|
|
openssl_DEPENDS=security/php${PHP_VER}-openssl
|
|
|
|
pcntl_DEPENDS= devel/php${PHP_VER}-pcntl
|
|
|
|
pdf_DEPENDS= print/pecl-pdflib
|
2007-02-09 08:29:33 +00:00
|
|
|
pdo_DEPENDS= databases/php${PHP_VER}-pdo
|
2012-08-23 14:55:36 +00:00
|
|
|
pdo_dblib_DEPENDS= databases/php${PHP_VER}-pdo_dblib
|
|
|
|
pdo_firebird_DEPENDS= databases/php${PHP_VER}-pdo_firebird
|
2007-12-27 06:52:45 +00:00
|
|
|
pdo_mysql_DEPENDS= databases/php${PHP_VER}-pdo_mysql
|
2012-08-23 14:55:36 +00:00
|
|
|
pdo_odbc_DEPENDS= databases/php${PHP_VER}-pdo_odbc
|
2010-04-09 09:34:43 +00:00
|
|
|
pdo_pgsql_DEPENDS= databases/php${PHP_VER}-pdo_pgsql
|
2007-02-09 08:29:33 +00:00
|
|
|
pdo_sqlite_DEPENDS= databases/php${PHP_VER}-pdo_sqlite
|
2004-07-19 07:15:24 +00:00
|
|
|
pgsql_DEPENDS= databases/php${PHP_VER}-pgsql
|
2011-11-25 15:50:11 +00:00
|
|
|
phar_DEPENDS= archivers/php${PHP_VER}-phar
|
2004-07-19 07:15:24 +00:00
|
|
|
posix_DEPENDS= sysutils/php${PHP_VER}-posix
|
|
|
|
pspell_DEPENDS= textproc/php${PHP_VER}-pspell
|
2005-03-11 16:53:44 +00:00
|
|
|
radius_DEPENDS= net/pecl-radius
|
2004-07-19 07:15:24 +00:00
|
|
|
readline_DEPENDS= devel/php${PHP_VER}-readline
|
|
|
|
recode_DEPENDS= converters/php${PHP_VER}-recode
|
|
|
|
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
|
2007-02-09 08:29:33 +00:00
|
|
|
spl_DEPENDS= devel/php${PHP_VER}-spl
|
2004-07-19 07:15:24 +00:00
|
|
|
sqlite_DEPENDS= databases/php${PHP_VER}-sqlite
|
2011-04-15 14:52:14 +00:00
|
|
|
sqlite3_DEPENDS=databases/php${PHP_VER}-sqlite3
|
2004-07-19 07:15:24 +00:00
|
|
|
sybase_ct_DEPENDS= databases/php${PHP_VER}-sybase_ct
|
|
|
|
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
|
|
|
|
wddx_DEPENDS= textproc/php${PHP_VER}-wddx
|
|
|
|
xml_DEPENDS= textproc/php${PHP_VER}-xml
|
2005-12-09 19:41:41 +00:00
|
|
|
xmlreader_DEPENDS= textproc/php${PHP_VER}-xmlreader
|
2004-07-19 07:15:24 +00:00
|
|
|
xmlrpc_DEPENDS= net/php${PHP_VER}-xmlrpc
|
2006-01-16 12:08:20 +00:00
|
|
|
xmlwriter_DEPENDS= textproc/php${PHP_VER}-xmlwriter
|
2004-07-19 07:15:24 +00:00
|
|
|
xsl_DEPENDS= textproc/php${PHP_VER}-xsl
|
2008-12-11 09:08:24 +00:00
|
|
|
zip_DEPENDS= archivers/php${PHP_VER}-zip
|
2012-05-20 09:09:13 +00:00
|
|
|
zlib_DEPENDS= archivers/php${PHP_VER}-zlib
|
2004-07-19 07:15:24 +00:00
|
|
|
|
2016-06-23 13:19:17 +00:00
|
|
|
. for extension in ${USE_PHP}
|
|
|
|
. if ${_USE_PHP_VER${PHP_VER}:M${extension}} != ""
|
|
|
|
. if ${PHP_EXT_INC:M${extension}} == ""
|
|
|
|
. if defined(USE_PHP_BUILD)
|
2016-03-27 01:23:25 +00:00
|
|
|
BUILD_DEPENDS+= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/${extension}.so:${${extension}_DEPENDS}
|
2016-06-23 13:19:17 +00:00
|
|
|
. endif
|
2016-03-27 01:23:25 +00:00
|
|
|
RUN_DEPENDS+= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/${extension}.so:${${extension}_DEPENDS}
|
2016-06-23 13:19:17 +00:00
|
|
|
. endif
|
|
|
|
. else
|
2010-04-09 09:34:43 +00:00
|
|
|
ext= ${extension}
|
2016-06-23 13:19:17 +00:00
|
|
|
. if ${ext} == "mhash"
|
|
|
|
. if defined(USE_PHP_BUILD)
|
2016-03-27 01:23:25 +00:00
|
|
|
BUILD_DEPENDS+= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/hash.so:${hash_DEPENDS}
|
2016-06-23 13:19:17 +00:00
|
|
|
. endif
|
2016-03-27 01:23:25 +00:00
|
|
|
RUN_DEPENDS+= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/hash.so:${hash_DEPENDS}
|
2016-06-23 13:19:17 +00:00
|
|
|
. elif ${ext:tl} != "yes"
|
2004-07-19 07:15:24 +00:00
|
|
|
check-makevars::
|
2010-04-09 09:34:43 +00:00
|
|
|
@${ECHO_CMD} "Unknown extension ${extension} for PHP ${PHP_VER}."
|
|
|
|
@${FALSE}
|
2016-06-23 13:19:17 +00:00
|
|
|
. endif
|
|
|
|
. endif
|
|
|
|
. endfor
|
|
|
|
. endif
|
2004-07-19 07:15:24 +00:00
|
|
|
.endif
|