2004-02-04 05:27:04 +01:00
|
|
|
#
|
|
|
|
# bsd.php.mk - Support for PHP-based ports.
|
|
|
|
#
|
|
|
|
# Created by: Alex Dupre <ale@FreeBSD.org>
|
|
|
|
#
|
|
|
|
# For FreeBSD committers:
|
|
|
|
# Please send all suggested changes to the maintainer instead of committing
|
2013-05-20 02:45:26 +02:00
|
|
|
# them to SVN yourself.
|
2004-02-04 05:27:04 +01:00
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
# Adding 'USE_PHP=yes' to a port includes this Makefile after bsd.ports.pre.mk.
|
2004-07-19 09:15:24 +02: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 05:27:04 +01:00
|
|
|
#
|
2012-05-27 14:05:18 +02:00
|
|
|
# The port can set these options in its Makefile before bsd.port.pre.mk:
|
2004-02-04 05:27:04 +01:00
|
|
|
#
|
2004-07-20 01:25:22 +02: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 04:18:09 +02:00
|
|
|
# IGNORE_WITH_PHP=N - The port doesn't work with PHP version N.
|
2004-02-04 05:27:04 +01:00
|
|
|
# USE_PHPIZE=yes - Use to build a PHP extension.
|
2004-07-19 09:15:24 +02:00
|
|
|
# USE_PHPEXT=yes - Use to build, install and register a PHP extension.
|
2013-03-07 10:20:22 +01:00
|
|
|
# USE_ZENDEXT=yes - Use to build, install and register a Zend extension.
|
2004-07-19 09:15:24 +02:00
|
|
|
# USE_PHP_BUILD=yes - Set PHP also as a build dependency.
|
2004-02-04 05:27:04 +01: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 09:36:13 +02:00
|
|
|
# WANT_PHP_EMB=yes - Want the embedded library version of PHP.
|
2004-02-04 05:27:04 +01: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 20:37:34 +02: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 05:27:04 +01:00
|
|
|
|
* 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 07:21:46 +01:00
|
|
|
.if !defined(_PHPMKINCLUDED)
|
|
|
|
|
2004-02-04 05:27:04 +01:00
|
|
|
PHP_Include_MAINTAINER= ale@FreeBSD.org
|
|
|
|
|
* 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 07:21:46 +01:00
|
|
|
_PHPMKINCLUDED= yes
|
|
|
|
|
2014-02-11 18:12:28 +01:00
|
|
|
.include "${PORTSDIR}/Mk/bsd.default-versions.mk"
|
|
|
|
|
|
|
|
.if defined(DEFAULT_PHP_VER)
|
|
|
|
WARNING+= "DEFAULT_PHP_VER is defined, consider using DEFAULT_VERSIONS=php=${DEFAULT_PHP_VER} instead"
|
|
|
|
.endif
|
|
|
|
|
2008-01-21 08:19:24 +01:00
|
|
|
PHPBASE?= ${LOCALBASE}
|
|
|
|
.if exists(${PHPBASE}/etc/php.conf)
|
|
|
|
.include "${PHPBASE}/etc/php.conf"
|
|
|
|
PHP_EXT_DIR!= ${PHPBASE}/bin/php-config --extension-dir | ${SED} -ne 's,^${PHPBASE}/lib/php/\(.*\),\1,p'
|
2010-04-10 02:26:04 +02:00
|
|
|
|
2005-12-09 20:41:41 +01:00
|
|
|
.else
|
2014-02-11 18:12:28 +01:00
|
|
|
DEFAULT_PHP_VER?= ${PHP_DEFAULT:S/.//}
|
2004-07-20 01:25:22 +02:00
|
|
|
|
|
|
|
PHP_VER?= ${DEFAULT_PHP_VER}
|
2014-03-01 01:06:29 +01:00
|
|
|
.if ${PHP_VER} == 53
|
2010-04-09 11:34:43 +02:00
|
|
|
PHP_EXT_DIR= 20090626
|
|
|
|
PHP_EXT_INC= pcre spl
|
2014-09-04 16:24:25 +02:00
|
|
|
.elif ${PHP_VER} == 56
|
|
|
|
PHP_EXT_DIR= 20131226
|
|
|
|
PHP_EXT_INC= pcre spl
|
2013-06-24 16:32:11 +02:00
|
|
|
.elif ${PHP_VER} == 55
|
|
|
|
PHP_EXT_DIR= 20121212
|
|
|
|
PHP_EXT_INC= pcre spl
|
2014-02-11 18:12:28 +01:00
|
|
|
.elif ${PHP_VER} == 54
|
|
|
|
PHP_VER= 5
|
|
|
|
PHP_EXT_DIR= 20100525
|
|
|
|
PHP_EXT_INC= pcre spl
|
2012-05-16 09:36:13 +02:00
|
|
|
.else
|
2012-05-24 23:01:35 +02:00
|
|
|
PHP_EXT_DIR= 20100525
|
2012-05-16 09:36:13 +02:00
|
|
|
PHP_EXT_INC= pcre spl
|
2004-07-20 01:25:22 +02:00
|
|
|
.endif
|
2005-12-09 20:41:41 +01:00
|
|
|
|
|
|
|
HTTPD?= ${LOCALBASE}/sbin/httpd
|
|
|
|
.if exists(${HTTPD})
|
2013-05-27 14:32:13 +02:00
|
|
|
APACHE_THR!= ${HTTPD} -V | ${GREP} threaded
|
|
|
|
. if ${APACHE_THR:Myes}
|
2004-02-04 05:27:04 +01:00
|
|
|
PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts
|
2005-12-09 20:41:41 +01:00
|
|
|
. endif
|
2012-12-17 14:51:22 +01:00
|
|
|
.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")
|
2004-02-04 05:27:04 +01:00
|
|
|
PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts
|
|
|
|
.endif
|
2005-12-09 20:41:41 +01:00
|
|
|
|
2004-02-04 05:27:04 +01:00
|
|
|
.if defined(WITH_DEBUG)
|
|
|
|
PHP_EXT_DIR:= ${PHP_EXT_DIR}-debug
|
|
|
|
.endif
|
|
|
|
PHP_SAPI?= ""
|
2010-04-10 02:26:04 +02:00
|
|
|
.endif # .if exists(${PHPBASE}/etc/php.conf)
|
2005-03-14 15:37:45 +01:00
|
|
|
PHP_EXT_INC?= ""
|
2004-02-04 05:27:04 +01:00
|
|
|
|
2012-12-17 14:51:22 +01:00
|
|
|
PHP5_LAST_VER= 54
|
|
|
|
|
* 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 04:18:09 +02:00
|
|
|
.if defined(IGNORE_WITH_PHP)
|
|
|
|
. for VER in ${IGNORE_WITH_PHP}
|
2004-07-19 09:15:24 +02:00
|
|
|
. if ${PHP_VER} == "${VER}"
|
2012-12-17 14:51:22 +01:00
|
|
|
IGNORE= cannot be installed: doesn't work with lang/php${PHP_VER} port\
|
|
|
|
(doesn't support PHP ${IGNORE_WITH_PHP:C/^5$/${PHP5_LAST_VER}/:C/^5/5./})
|
2004-07-19 09:15:24 +02:00
|
|
|
. endif
|
|
|
|
. endfor
|
2004-02-04 05:27:04 +01:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WANT_PHP_WEB)
|
|
|
|
. if defined(WANT_PHP_CGI) || defined(WANT_PHP_MOD)
|
|
|
|
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}
|
2014-03-27 17:09:37 +01:00
|
|
|
. elif defined(PHP_VERSION) && ${PHP_VER} == 53 && ${PHP_SAPI:Mcgi} == "" && ${PHP_SAPI:Mfpm} == "" && ${PHP_SAPI:Mmod} == ""
|
2004-02-04 05:27:04 +01:00
|
|
|
check-makevars::
|
|
|
|
@${ECHO_CMD} "This port requires the Apache Module or the CGI version of PHP, but you have"
|
2006-05-06 15:26:49 +02:00
|
|
|
@${ECHO_CMD} "already installed a PHP port without them."
|
2004-07-19 09:15:24 +02:00
|
|
|
@${FALSE}
|
|
|
|
. endif
|
2012-05-16 09:36:13 +02:00
|
|
|
.endif
|
2004-02-04 05:27:04 +01:00
|
|
|
|
|
|
|
.if defined(WANT_PHP_CGI)
|
2010-07-27 17:13:54 +02:00
|
|
|
. if defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == "" && ${PHP_SAPI:Mfpm} == ""
|
2004-02-04 05:27:04 +01:00
|
|
|
check-makevars::
|
|
|
|
@${ECHO_CMD} "This port requires the CGI version of PHP, but you have already"
|
2006-05-06 15:26:49 +02:00
|
|
|
@${ECHO_CMD} "installed a PHP port without CGI."
|
2004-02-04 05:27:04 +01:00
|
|
|
@${FALSE}
|
|
|
|
. endif
|
2012-05-16 09:36:13 +02:00
|
|
|
.endif
|
2004-02-04 05:27:04 +01:00
|
|
|
|
2004-07-19 09:15:24 +02:00
|
|
|
.if defined(WANT_PHP_CLI)
|
2006-05-06 15:26:49 +02:00
|
|
|
. if defined(PHP_VERSION) && ${PHP_SAPI:Mcli} == ""
|
2004-02-04 05:27:04 +01:00
|
|
|
check-makevars::
|
|
|
|
@${ECHO_CMD} "This port requires the CLI version of PHP, but you have already"
|
2006-05-06 15:26:49 +02:00
|
|
|
@${ECHO_CMD} "installed a PHP port without CLI."
|
2004-02-04 05:27:04 +01:00
|
|
|
@${FALSE}
|
|
|
|
. endif
|
2012-05-16 09:36:13 +02:00
|
|
|
.endif
|
2004-02-04 05:27:04 +01:00
|
|
|
|
2004-07-19 09:15:24 +02:00
|
|
|
.if defined(WANT_PHP_MOD)
|
2014-03-27 17:09:37 +01:00
|
|
|
. if defined(PHP_VERSION) && ${PHP_VER} == 53 && ${PHP_SAPI:Mmod} == ""
|
2004-02-04 05:27:04 +01:00
|
|
|
check-makevars::
|
|
|
|
@${ECHO_CMD} "This port requires the Apache Module for PHP, but you have already"
|
2006-05-06 15:26:49 +02:00
|
|
|
@${ECHO_CMD} "installed a PHP port without the Apache Module."
|
2004-02-04 05:27:04 +01:00
|
|
|
@${FALSE}
|
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2012-05-16 09:36:13 +02:00
|
|
|
.if defined(WANT_PHP_EMB)
|
|
|
|
. 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
|
2004-02-04 05:27:04 +01:00
|
|
|
.endif
|
|
|
|
|
2010-04-09 21:12:15 +02:00
|
|
|
PHP_PORT?= lang/php${PHP_VER}
|
2014-03-27 17:09:37 +01:00
|
|
|
.if ${PHP_VER} == 53
|
|
|
|
MOD_PHP_PORT?= ${PHP_PORT}
|
|
|
|
.else
|
|
|
|
MOD_PHP_PORT?= www/mod_php${PHP_VER}
|
|
|
|
.endif
|
2004-07-19 14:23:13 +02:00
|
|
|
|
2004-07-19 09:15:24 +02:00
|
|
|
.if defined(USE_PHP_BUILD)
|
2010-04-09 11:34:43 +02:00
|
|
|
BUILD_DEPENDS+= ${PHPBASE}/include/php/main/php.h:${PORTSDIR}/${PHP_PORT}
|
2004-07-19 09:15:24 +02:00
|
|
|
.endif
|
2010-04-09 11:34:43 +02:00
|
|
|
RUN_DEPENDS+= ${PHPBASE}/include/php/main/php.h:${PORTSDIR}/${PHP_PORT}
|
2014-03-27 17:09:37 +01:00
|
|
|
.if defined(WANT_PHP_MOD) || (defined(WANT_PHP_WEB) && defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == "" && ${PHP_SAPI:Mfpm} == "")
|
2014-05-01 12:36:34 +02:00
|
|
|
USE_APACHE_RUN= 22+
|
|
|
|
.include "${PORTSDIR}/Mk/bsd.apache.mk"
|
2014-03-27 17:09:37 +01:00
|
|
|
RUN_DEPENDS+= ${PHPBASE}/${APACHEMODDIR}/libphp5.so:${PORTSDIR}/${MOD_PHP_PORT}
|
|
|
|
.endif
|
2004-02-04 05:27:04 +01:00
|
|
|
|
|
|
|
PLIST_SUB+= PHP_EXT_DIR=${PHP_EXT_DIR}
|
2005-11-20 21:35:40 +01:00
|
|
|
SUB_LIST+= PHP_EXT_DIR=${PHP_EXT_DIR}
|
2004-02-04 05:27:04 +01:00
|
|
|
|
2013-03-07 10:20:22 +01:00
|
|
|
.if defined(USE_PHPIZE) || defined(USE_PHPEXT) || defined(USE_ZENDEXT)
|
2010-04-09 11:34:43 +02:00
|
|
|
BUILD_DEPENDS+= ${PHPBASE}/bin/phpize:${PORTSDIR}/${PHP_PORT}
|
2008-01-21 08:19:24 +01:00
|
|
|
GNU_CONFIGURE= yes
|
2010-12-04 08:34:27 +01:00
|
|
|
USE_AUTOTOOLS+= autoconf:env
|
2008-01-21 08:19:24 +01:00
|
|
|
CONFIGURE_ARGS+=--with-php-config=${PHPBASE}/bin/php-config
|
2004-02-04 05:27:04 +01:00
|
|
|
|
2004-07-19 09:15:24 +02:00
|
|
|
configure-message: phpize-message do-phpize
|
|
|
|
|
|
|
|
phpize-message:
|
|
|
|
@${ECHO_MSG} "===> PHPizing for ${PKGNAME}"
|
2004-02-04 05:27:04 +01:00
|
|
|
|
2004-07-19 09:15:24 +02:00
|
|
|
do-phpize:
|
2008-01-21 08:19:24 +01:00
|
|
|
@(cd ${WRKSRC}; ${SETENV} ${SCRIPTS_ENV} ${PHPBASE}/bin/phpize)
|
2004-02-04 05:27:04 +01:00
|
|
|
.endif
|
2004-07-19 09:15:24 +02:00
|
|
|
|
2009-03-06 11:08:35 +01:00
|
|
|
.endif
|
|
|
|
|
2013-03-07 10:20:22 +01:00
|
|
|
.if defined(_POSTMKINCLUDED) && (defined(USE_PHPEXT) || defined(USE_ZENDEXT))
|
2004-07-19 09:15:24 +02:00
|
|
|
PHP_MODNAME?= ${PORTNAME}
|
|
|
|
PHP_HEADER_DIRS?= ""
|
|
|
|
|
|
|
|
do-install:
|
2013-10-30 14:28:00 +01:00
|
|
|
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR}
|
2015-02-24 16:05:17 +01:00
|
|
|
@${INSTALL_LIB} ${WRKSRC}/modules/${PHP_MODNAME}.so \
|
2013-10-30 14:28:00 +01:00
|
|
|
${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR}
|
2004-07-19 09:15:24 +02:00
|
|
|
. for header in . ${PHP_HEADER_DIRS}
|
2013-10-30 14:28:00 +01:00
|
|
|
@${MKDIR} ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/${header}
|
2004-07-19 09:15:24 +02:00
|
|
|
@${INSTALL_DATA} ${WRKSRC}/${header}/*.h \
|
2013-10-30 14:28:00 +01:00
|
|
|
${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/${header}
|
2004-07-19 09:15:24 +02:00
|
|
|
. endfor
|
2013-10-30 14:28:00 +01:00
|
|
|
@${RM} -f ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h
|
2004-07-19 09:15:24 +02:00
|
|
|
@${GREP} "#define \(COMPILE\|HAVE\|USE\)_" ${WRKSRC}/config.h \
|
2013-10-30 14:28:00 +01:00
|
|
|
> ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h
|
|
|
|
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/php
|
2004-07-19 09:15:24 +02:00
|
|
|
|
|
|
|
add-plist-info: add-plist-phpext
|
|
|
|
add-plist-phpext:
|
|
|
|
@${ECHO_CMD} "lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so" \
|
|
|
|
>> ${TMPPLIST}
|
2013-10-30 14:28:00 +01: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 09:15:24 +02: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 11:30:56 +01:00
|
|
|
@${ECHO_CMD} "@dir etc/php" \
|
2004-07-19 09:15:24 +02:00
|
|
|
>> ${TMPPLIST}
|
2013-03-07 10:20:22 +01:00
|
|
|
.if defined(USE_ZENDEXT)
|
|
|
|
@${ECHO_CMD} "@exec echo zend_extension=%D/lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so >> %D/etc/php/extensions.ini" \
|
|
|
|
>> ${TMPPLIST}
|
|
|
|
.else
|
2004-07-28 10:59:35 +02:00
|
|
|
@${ECHO_CMD} "@exec echo extension=${PHP_MODNAME}.so >> %D/etc/php/extensions.ini" \
|
2004-07-19 09:15:24 +02:00
|
|
|
>> ${TMPPLIST}
|
2013-03-07 10:20:22 +01:00
|
|
|
.endif
|
2004-07-28 10:59:35 +02:00
|
|
|
@${ECHO_CMD} "@unexec cp %D/etc/php/extensions.ini %D/etc/php/extensions.ini.orig" \
|
2004-07-19 09:15:24 +02:00
|
|
|
>> ${TMPPLIST}
|
2013-03-07 10:20:22 +01:00
|
|
|
.if defined(USE_ZENDEXT)
|
|
|
|
@${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}
|
|
|
|
.else
|
2004-09-02 12:08:48 +02: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 10:59:35 +02:00
|
|
|
>> ${TMPPLIST}
|
2013-03-07 10:20:22 +01:00
|
|
|
.endif
|
2004-07-28 10:59:35 +02: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 09:15:24 +02:00
|
|
|
|
2013-10-30 14:28:00 +01:00
|
|
|
package-message: php-ini
|
2004-07-19 09:15:24 +02:00
|
|
|
|
|
|
|
php-ini:
|
|
|
|
@${ECHO_CMD} "****************************************************************************"
|
|
|
|
@${ECHO_CMD} ""
|
2004-07-28 10:59:35 +02:00
|
|
|
@${ECHO_CMD} "The following line has been added to your ${PREFIX}/etc/php/extensions.ini"
|
2004-07-19 09:15:24 +02:00
|
|
|
@${ECHO_CMD} "configuration file to automatically load the installed extension:"
|
|
|
|
@${ECHO_CMD} ""
|
2013-03-07 10:20:22 +01:00
|
|
|
.if defined(USE_ZENDEXT)
|
|
|
|
@${ECHO_CMD} "zend_extension=${PREFIX}/lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so"
|
|
|
|
.else
|
2004-07-19 09:15:24 +02:00
|
|
|
@${ECHO_CMD} "extension=${PHP_MODNAME}.so"
|
2013-03-07 10:20:22 +01:00
|
|
|
.endif
|
2004-07-19 09:15:24 +02:00
|
|
|
@${ECHO_CMD} ""
|
|
|
|
@${ECHO_CMD} "****************************************************************************"
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# Extensions
|
2014-05-05 11:45:36 +02:00
|
|
|
.if defined(_POSTMKINCLUDED) && ${USE_PHP:tl} != "yes"
|
2004-07-19 09:15:24 +02:00
|
|
|
# non-version specific components
|
2012-05-16 09:36:13 +02:00
|
|
|
_USE_PHP_ALL= apc bcmath bitset bz2 calendar ctype curl dba dom \
|
|
|
|
exif fileinfo filter ftp gd gettext gmp \
|
2013-03-01 11:42:54 +01:00
|
|
|
hash iconv igbinary imap interbase intl json ldap mbstring mcrypt \
|
2013-09-28 18:48:34 +02:00
|
|
|
memcache mssql mysql mysqli odbc opcache \
|
2012-08-23 16:55:36 +02:00
|
|
|
openssl pcntl pcre pdf pdo pdo_dblib pdo_firebird pdo_mysql \
|
|
|
|
pdo_odbc pdo_pgsql pdo_sqlite pgsql posix \
|
2012-05-16 09:36:13 +02:00
|
|
|
pspell radius readline recode session shmop simplexml snmp soap\
|
|
|
|
sockets spl sybase_ct sysvmsg sysvsem sysvshm \
|
|
|
|
tidy tokenizer wddx xml xmlreader xmlrpc xmlwriter xsl zip zlib
|
2005-03-14 15:37:45 +01:00
|
|
|
# version specific components
|
2012-05-16 09:36:13 +02:00
|
|
|
_USE_PHP_VER5= ${_USE_PHP_ALL} phar sqlite3
|
|
|
|
_USE_PHP_VER53= ${_USE_PHP_ALL} phar sqlite sqlite3
|
2013-06-24 16:32:11 +02:00
|
|
|
_USE_PHP_VER55= ${_USE_PHP_ALL} phar sqlite3
|
2014-09-04 16:24:25 +02:00
|
|
|
_USE_PHP_VER56= ${_USE_PHP_ALL} phar sqlite3
|
2004-07-19 09:15:24 +02:00
|
|
|
|
2008-07-11 12:57:15 +02:00
|
|
|
apc_DEPENDS= www/pecl-APC
|
2004-07-19 09:15:24 +02:00
|
|
|
bcmath_DEPENDS= math/php${PHP_VER}-bcmath
|
2007-07-09 20:37:35 +02:00
|
|
|
bitset_DEPENDS= math/pecl-bitset
|
2004-07-19 09:15:24 +02: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 11:09:13 +02:00
|
|
|
fileinfo_DEPENDS= sysutils/php${PHP_VER}-fileinfo
|
2008-12-11 10:08:24 +01:00
|
|
|
filter_DEPENDS= security/php${PHP_VER}-filter
|
2004-07-19 09:15:24 +02: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 11:09:13 +02:00
|
|
|
hash_DEPENDS= security/php${PHP_VER}-hash
|
2004-07-19 09:15:24 +02:00
|
|
|
iconv_DEPENDS= converters/php${PHP_VER}-iconv
|
2014-08-01 13:50:42 +02:00
|
|
|
igbinary_DEPENDS= converters/pecl-igbinary
|
2004-07-19 09:15:24 +02:00
|
|
|
imap_DEPENDS= mail/php${PHP_VER}-imap
|
|
|
|
interbase_DEPENDS= databases/php${PHP_VER}-interbase
|
2010-11-26 14:34:09 +01:00
|
|
|
intl_DEPENDS= devel/pecl-intl
|
2012-05-20 11:09:13 +02:00
|
|
|
json_DEPENDS= devel/php${PHP_VER}-json
|
2004-07-19 09:15:24 +02: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 20:37:35 +02:00
|
|
|
memcache_DEPENDS= databases/pecl-memcache
|
2004-07-19 09:15:24 +02:00
|
|
|
mhash_DEPENDS= security/php${PHP_VER}-mhash
|
|
|
|
mssql_DEPENDS= databases/php${PHP_VER}-mssql
|
|
|
|
mysql_DEPENDS= databases/php${PHP_VER}-mysql
|
|
|
|
mysqli_DEPENDS= databases/php${PHP_VER}-mysqli
|
|
|
|
ncurses_DEPENDS=devel/php${PHP_VER}-ncurses
|
|
|
|
odbc_DEPENDS= databases/php${PHP_VER}-odbc
|
2010-04-23 18:48:53 +02:00
|
|
|
oci8_DEPENDS= databases/php${PHP_VER}-oci8
|
2014-09-04 16:24:25 +02:00
|
|
|
.if ${PHP_VER} == 55 || ${PHP_VER} == 56
|
2013-09-28 18:48:34 +02:00
|
|
|
opcache_DEPENDS= www/php${PHP_VER}-opcache
|
|
|
|
.else
|
|
|
|
opcache_DEPENDS= www/pecl-zendopcache
|
|
|
|
.endif
|
2004-07-19 09:15:24 +02:00
|
|
|
openssl_DEPENDS=security/php${PHP_VER}-openssl
|
|
|
|
pcntl_DEPENDS= devel/php${PHP_VER}-pcntl
|
|
|
|
pcre_DEPENDS= devel/php${PHP_VER}-pcre
|
|
|
|
pdf_DEPENDS= print/pecl-pdflib
|
2007-02-09 09:29:33 +01:00
|
|
|
pdo_DEPENDS= databases/php${PHP_VER}-pdo
|
2012-08-23 16:55:36 +02:00
|
|
|
pdo_dblib_DEPENDS= databases/php${PHP_VER}-pdo_dblib
|
|
|
|
pdo_firebird_DEPENDS= databases/php${PHP_VER}-pdo_firebird
|
2007-12-27 07:52:45 +01:00
|
|
|
pdo_mysql_DEPENDS= databases/php${PHP_VER}-pdo_mysql
|
2012-08-23 16:55:36 +02:00
|
|
|
pdo_odbc_DEPENDS= databases/php${PHP_VER}-pdo_odbc
|
2010-04-09 11:34:43 +02:00
|
|
|
pdo_pgsql_DEPENDS= databases/php${PHP_VER}-pdo_pgsql
|
2007-02-09 09:29:33 +01:00
|
|
|
pdo_sqlite_DEPENDS= databases/php${PHP_VER}-pdo_sqlite
|
2004-07-19 09:15:24 +02:00
|
|
|
pgsql_DEPENDS= databases/php${PHP_VER}-pgsql
|
2011-11-25 16:50:11 +01:00
|
|
|
phar_DEPENDS= archivers/php${PHP_VER}-phar
|
2004-07-19 09:15:24 +02:00
|
|
|
posix_DEPENDS= sysutils/php${PHP_VER}-posix
|
|
|
|
pspell_DEPENDS= textproc/php${PHP_VER}-pspell
|
2005-03-11 17:53:44 +01:00
|
|
|
radius_DEPENDS= net/pecl-radius
|
2004-07-19 09:15:24 +02: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 09:29:33 +01:00
|
|
|
spl_DEPENDS= devel/php${PHP_VER}-spl
|
2004-07-19 09:15:24 +02:00
|
|
|
sqlite_DEPENDS= databases/php${PHP_VER}-sqlite
|
2011-04-15 16:52:14 +02:00
|
|
|
sqlite3_DEPENDS=databases/php${PHP_VER}-sqlite3
|
2004-07-19 09:15:24 +02: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 20:41:41 +01:00
|
|
|
xmlreader_DEPENDS= textproc/php${PHP_VER}-xmlreader
|
2004-07-19 09:15:24 +02:00
|
|
|
xmlrpc_DEPENDS= net/php${PHP_VER}-xmlrpc
|
2006-01-16 13:08:20 +01:00
|
|
|
xmlwriter_DEPENDS= textproc/php${PHP_VER}-xmlwriter
|
2004-07-19 09:15:24 +02:00
|
|
|
xsl_DEPENDS= textproc/php${PHP_VER}-xsl
|
2008-12-11 10:08:24 +01:00
|
|
|
zip_DEPENDS= archivers/php${PHP_VER}-zip
|
2012-05-20 11:09:13 +02:00
|
|
|
zlib_DEPENDS= archivers/php${PHP_VER}-zlib
|
2004-07-19 09:15:24 +02:00
|
|
|
|
|
|
|
. for extension in ${USE_PHP}
|
2005-03-14 15:37:45 +01:00
|
|
|
. if ${_USE_PHP_VER${PHP_VER}:M${extension}} != ""
|
|
|
|
. if ${PHP_EXT_INC:M${extension}} == ""
|
|
|
|
. if defined(USE_PHP_BUILD)
|
2008-01-21 08:19:24 +01:00
|
|
|
BUILD_DEPENDS+= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/${extension}.so:${PORTSDIR}/${${extension}_DEPENDS}
|
2005-03-14 15:37:45 +01:00
|
|
|
. endif
|
2008-01-21 08:19:24 +01:00
|
|
|
RUN_DEPENDS+= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/${extension}.so:${PORTSDIR}/${${extension}_DEPENDS}
|
2005-03-14 15:37:45 +01:00
|
|
|
. endif
|
2004-07-19 09:15:24 +02:00
|
|
|
. else
|
2010-04-09 11:34:43 +02:00
|
|
|
ext= ${extension}
|
2012-05-16 09:36:13 +02:00
|
|
|
. if ${ext} == "mhash"
|
2010-04-09 11:34:43 +02:00
|
|
|
. if defined(USE_PHP_BUILD)
|
|
|
|
BUILD_DEPENDS+= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/hash.so:${PORTSDIR}/${hash_DEPENDS}
|
|
|
|
. endif
|
|
|
|
RUN_DEPENDS+= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/hash.so:${PORTSDIR}/${hash_DEPENDS}
|
2014-05-05 11:45:36 +02:00
|
|
|
. elif ${ext:tl} != "yes"
|
2004-07-19 09:15:24 +02:00
|
|
|
check-makevars::
|
2010-04-09 11:34:43 +02:00
|
|
|
@${ECHO_CMD} "Unknown extension ${extension} for PHP ${PHP_VER}."
|
|
|
|
@${FALSE}
|
2004-07-19 09:15:24 +02:00
|
|
|
. endif
|
|
|
|
. endif
|
|
|
|
. endfor
|
|
|
|
.endif
|