2004-02-04 04:27:04 +00: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 00:45:26 +00:00
|
|
|
# them to SVN yourself.
|
2004-02-04 04:27:04 +00:00
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
# Adding 'USE_PHP=yes' to a port includes this Makefile after bsd.ports.pre.mk.
|
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.
|
|
|
|
#
|
|
|
|
|
* 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
|
|
|
.if !defined(_PHPMKINCLUDED)
|
|
|
|
|
2004-02-04 04:27:04 +00: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 06:21:46 +00:00
|
|
|
_PHPMKINCLUDED= yes
|
|
|
|
|
2008-01-21 07:19:24 +00: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 00:26:04 +00:00
|
|
|
|
2005-12-09 19:41:41 +00:00
|
|
|
.else
|
* Update default MySQL version from 4.1 to 5.0 [1]
* Update default PHP version from 4 to 5 [2]
* Update default LDAP version from 2.2 to 2.3 [3]
* Add support for LDAP version 2.4 [4]
* Update default linux_base from '8' (Redhat 8) to 'fc4' (Fedora Core 4) [5]
* Switch default Linux X implementation from XFree86 to xorg to track the
above [5]
* Deprecate INSTALLS_SHLIB and replace it by USE_LDCONFIG. If set to "yes",
the old behavior is preserved. Otherwise, it can be set to a list of
directories to be added to ${PREFIX}/libdata/ldconfig/${UNIQUENAME}.
Note that this directory is used by ldconfig startup script, it is meant
to replace ldconfig scripts installed by some ports as (sometimes
000.${UNQUENAME}.sh) [6]
* Adds USE_LDCONFIG32 which is like USE_LDCONFIG but the target file is
${PREFIX}/libdata/ldconfig32/${UNIQUENAME} instead. (Note: this should
only be used on 64-bit architectures) [6]
* Set the default LANG for tr to be C to avoid some build problems [7]
* Include bsd.java.mk in both pre and post sections [8]
* Get rid of remnants of FORCE_PKG_REGISTER [9]
* Always print options with make showconfig [10]
PR: 92805 [1], 92806 [2], 96793 [3], 97515 [4], 96849 [5],
91933 [6], 91381 [7], 97020 [8], 95841 [9], 97133 [10]
Submitted by: ale [1][2], delphij [3][4], netchild [5], flz [6],
Tsurutani Naoki <turutani at scphys dot kyoto-u dot ac dot jp>
[7], hq [8], sem [9], pav [10]
2006-06-16 04:53:43 +00:00
|
|
|
DEFAULT_PHP_VER?= 5
|
2004-07-19 23:25:22 +00:00
|
|
|
|
|
|
|
PHP_VER?= ${DEFAULT_PHP_VER}
|
2012-05-11 19:52:37 +00:00
|
|
|
.if ${PHP_VER} == 52
|
2010-04-23 16:48:53 +00:00
|
|
|
PHP_EXT_DIR= 20060613
|
2012-05-16 07:36:13 +00:00
|
|
|
.elif ${PHP_VER} == 53
|
2010-04-09 09:34:43 +00:00
|
|
|
PHP_EXT_DIR= 20090626
|
|
|
|
PHP_EXT_INC= pcre spl
|
2013-06-24 14:32:11 +00:00
|
|
|
.elif ${PHP_VER} == 55
|
|
|
|
PHP_EXT_DIR= 20121212
|
|
|
|
PHP_EXT_INC= pcre spl
|
2012-05-16 07:36:13 +00:00
|
|
|
.else
|
2012-05-24 21:01:35 +00:00
|
|
|
PHP_EXT_DIR= 20100525
|
2012-05-16 07:36:13 +00:00
|
|
|
PHP_EXT_INC= pcre spl
|
2004-07-19 23:25:22 +00:00
|
|
|
.endif
|
2005-12-09 19:41:41 +00:00
|
|
|
|
|
|
|
HTTPD?= ${LOCALBASE}/sbin/httpd
|
|
|
|
.if exists(${HTTPD})
|
2013-05-27 12:32:13 +00:00
|
|
|
APACHE_THR!= ${HTTPD} -V | ${GREP} threaded
|
|
|
|
. if ${APACHE_THR:Myes}
|
2004-02-04 04:27:04 +00:00
|
|
|
PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts
|
2005-12-09 19:41:41 +00:00
|
|
|
. endif
|
2012-12-17 13:51:22 +00: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 04:27:04 +00:00
|
|
|
PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts
|
|
|
|
.endif
|
2005-12-09 19:41:41 +00:00
|
|
|
|
2004-02-04 04:27:04 +00:00
|
|
|
.if defined(WITH_DEBUG)
|
|
|
|
PHP_EXT_DIR:= ${PHP_EXT_DIR}-debug
|
|
|
|
.endif
|
|
|
|
PHP_SAPI?= ""
|
2010-04-10 00:26:04 +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
|
|
|
|
2012-12-17 13:51:22 +00: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 02:18:09 +00:00
|
|
|
.if defined(IGNORE_WITH_PHP)
|
|
|
|
. for VER in ${IGNORE_WITH_PHP}
|
2004-07-19 07:15:24 +00:00
|
|
|
. 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\
|
|
|
|
(doesn't support PHP ${IGNORE_WITH_PHP:C/^5$/${PHP5_LAST_VER}/:C/^5/5./})
|
2004-07-19 07:15:24 +00:00
|
|
|
. endif
|
|
|
|
. endfor
|
2004-02-04 04:27:04 +00: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}
|
2012-05-16 07:36:13 +00:00
|
|
|
. elif defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == "" && ${PHP_SAPI:Mfpm} == "" && ${PHP_SAPI:Mmod} == ""
|
2004-02-04 04:27:04 +00:00
|
|
|
check-makevars::
|
|
|
|
@${ECHO_CMD} "This port requires the Apache Module or the CGI version of PHP, but you have"
|
2006-05-06 13:26:49 +00:00
|
|
|
@${ECHO_CMD} "already installed a PHP port without them."
|
2004-07-19 07:15:24 +00:00
|
|
|
@${FALSE}
|
|
|
|
. endif
|
2012-05-16 07:36:13 +00:00
|
|
|
.endif
|
2004-02-04 04:27:04 +00:00
|
|
|
|
|
|
|
.if defined(WANT_PHP_CGI)
|
2010-07-27 15:13:54 +00:00
|
|
|
. 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}
|
|
|
|
. endif
|
2012-05-16 07:36:13 +00:00
|
|
|
.endif
|
2004-02-04 04:27:04 +00:00
|
|
|
|
2004-07-19 07:15:24 +00:00
|
|
|
.if defined(WANT_PHP_CLI)
|
2006-05-06 13:26:49 +00:00
|
|
|
. 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}
|
|
|
|
. endif
|
2012-05-16 07:36:13 +00:00
|
|
|
.endif
|
2004-02-04 04:27:04 +00:00
|
|
|
|
2004-07-19 07:15:24 +00:00
|
|
|
.if defined(WANT_PHP_MOD)
|
2006-05-06 13:26:49 +00:00
|
|
|
. if defined(PHP_VERSION) && ${PHP_SAPI:Mmod} == ""
|
2004-02-04 04:27:04 +00:00
|
|
|
check-makevars::
|
|
|
|
@${ECHO_CMD} "This port requires the Apache Module for PHP, but you have already"
|
2006-05-06 13:26:49 +00:00
|
|
|
@${ECHO_CMD} "installed a PHP port without the Apache Module."
|
2004-02-04 04:27:04 +00:00
|
|
|
@${FALSE}
|
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2012-05-16 07:36:13 +00: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 04:27:04 +00:00
|
|
|
.endif
|
|
|
|
|
2010-04-09 19:12:15 +00:00
|
|
|
PHP_PORT?= lang/php${PHP_VER}
|
2004-07-19 12:23:13 +00:00
|
|
|
|
2004-07-19 07:15:24 +00:00
|
|
|
.if defined(USE_PHP_BUILD)
|
2010-04-09 09:34:43 +00:00
|
|
|
BUILD_DEPENDS+= ${PHPBASE}/include/php/main/php.h:${PORTSDIR}/${PHP_PORT}
|
2004-07-19 07:15:24 +00:00
|
|
|
.endif
|
2010-04-09 09:34:43 +00:00
|
|
|
RUN_DEPENDS+= ${PHPBASE}/include/php/main/php.h:${PORTSDIR}/${PHP_PORT}
|
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
|
|
|
|
2013-03-07 09:20:22 +00:00
|
|
|
.if defined(USE_PHPIZE) || defined(USE_PHPEXT) || defined(USE_ZENDEXT)
|
2010-04-09 09:34:43 +00:00
|
|
|
BUILD_DEPENDS+= ${PHPBASE}/bin/phpize:${PORTSDIR}/${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)
|
2004-02-04 04:27:04 +00:00
|
|
|
.endif
|
2004-07-19 07:15:24 +00:00
|
|
|
|
2009-03-06 10:08:35 +00:00
|
|
|
.endif
|
|
|
|
|
2013-03-07 09:20:22 +00:00
|
|
|
.if defined(_POSTMKINCLUDED) && (defined(USE_PHPEXT) || defined(USE_ZENDEXT))
|
2004-07-19 07:15:24 +00:00
|
|
|
PHP_MODNAME?= ${PORTNAME}
|
|
|
|
PHP_HEADER_DIRS?= ""
|
|
|
|
|
|
|
|
do-install:
|
|
|
|
@${MKDIR} ${PREFIX}/lib/php/${PHP_EXT_DIR}
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/modules/${PHP_MODNAME}.so \
|
|
|
|
${PREFIX}/lib/php/${PHP_EXT_DIR}
|
|
|
|
. for header in . ${PHP_HEADER_DIRS}
|
|
|
|
@${MKDIR} ${PREFIX}/include/php/ext/${PHP_MODNAME}/${header}
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/${header}/*.h \
|
|
|
|
${PREFIX}/include/php/ext/${PHP_MODNAME}/${header}
|
|
|
|
. endfor
|
2006-07-27 06:21:15 +00:00
|
|
|
@${RM} -f ${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h
|
2004-07-19 07:15:24 +00:00
|
|
|
@${GREP} "#define \(COMPILE\|HAVE\|USE\)_" ${WRKSRC}/config.h \
|
|
|
|
> ${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h
|
|
|
|
@${ECHO_CMD} \#include \"ext/${PHP_MODNAME}/config.h\" \
|
|
|
|
>> ${PREFIX}/include/php/ext/php_config.h
|
2004-07-28 08:59:35 +00:00
|
|
|
@${MKDIR} ${PREFIX}/etc/php
|
2013-03-07 09:20:22 +00:00
|
|
|
.if defined(USE_ZENDEXT)
|
|
|
|
@${ECHO_CMD} zend_extension=${PREFIX}/lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so \
|
|
|
|
>> ${PREFIX}/etc/php/extensions.ini
|
|
|
|
.else
|
2004-07-19 07:15:24 +00:00
|
|
|
@${ECHO_CMD} extension=${PHP_MODNAME}.so \
|
2004-07-28 08:59:35 +00:00
|
|
|
>> ${PREFIX}/etc/php/extensions.ini
|
2013-03-07 09:20:22 +00:00
|
|
|
.endif
|
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}
|
|
|
|
@${ECHO_CMD} "@unexec rmdir %D/lib/php/${PHP_EXT_DIR} 2> /dev/null || true" \
|
|
|
|
>> ${TMPPLIST}
|
|
|
|
@${FIND} -P ${PREFIX}/include/php/ext/${PHP_MODNAME} ! -type d 2>/dev/null | \
|
|
|
|
${SED} -ne 's,^${PREFIX}/,,p' >> ${TMPPLIST}
|
|
|
|
@${FIND} -P -d ${PREFIX}/include/php/ext/${PHP_MODNAME} -type d 2>/dev/null | \
|
|
|
|
${SED} -ne 's,^${PREFIX}/,@dirrm ,p' >> ${TMPPLIST}
|
|
|
|
@${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}
|
2004-07-28 08:59:35 +00:00
|
|
|
@${ECHO_CMD} "@exec mkdir -p %D/etc/php" \
|
2004-07-19 07:15:24 +00:00
|
|
|
>> ${TMPPLIST}
|
2013-03-07 09:20:22 +00: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 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}
|
2013-03-07 09:20:22 +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}
|
2013-03-07 09:20:22 +00: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 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}
|
2013-03-07 09:20:22 +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}
|
|
|
|
@${ECHO_CMD} "@unexec rmdir %D/etc/php 2> /dev/null || true" \
|
2004-07-19 07:15:24 +00:00
|
|
|
>> ${TMPPLIST}
|
|
|
|
|
|
|
|
security-check: php-ini
|
|
|
|
|
|
|
|
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} ""
|
2013-03-07 09:20:22 +00:00
|
|
|
.if defined(USE_ZENDEXT)
|
|
|
|
@${ECHO_CMD} "zend_extension=${PREFIX}/lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so"
|
|
|
|
.else
|
2004-07-19 07:15:24 +00:00
|
|
|
@${ECHO_CMD} "extension=${PHP_MODNAME}.so"
|
2013-03-07 09:20:22 +00:00
|
|
|
.endif
|
2004-07-19 07:15:24 +00:00
|
|
|
@${ECHO_CMD} ""
|
|
|
|
@${ECHO_CMD} "****************************************************************************"
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# Extensions
|
* 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
|
|
|
.if defined(_POSTMKINCLUDED) && ${USE_PHP:L} != "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 \
|
2012-05-16 07:36:13 +00:00
|
|
|
memcache mssql mysql mysqli odbc \
|
2012-08-23 14:55:36 +00:00
|
|
|
openssl pcntl pcre pdf pdo pdo_dblib pdo_firebird pdo_mysql \
|
|
|
|
pdo_odbc pdo_pgsql pdo_sqlite pgsql posix \
|
2012-05-16 07:36:13 +00: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 14:37:45 +00:00
|
|
|
# version specific components
|
2012-05-16 07:36:13 +00:00
|
|
|
_USE_PHP_VER5= ${_USE_PHP_ALL} phar sqlite3
|
|
|
|
_USE_PHP_VER52= ${_USE_PHP_ALL} dbase mhash ming ncurses oci8 sqlite
|
|
|
|
_USE_PHP_VER53= ${_USE_PHP_ALL} phar sqlite sqlite3
|
2013-06-24 14:32:11 +00:00
|
|
|
_USE_PHP_VER55= ${_USE_PHP_ALL} phar sqlite3
|
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
|
2007-07-09 18:37:35 +00:00
|
|
|
bitset_DEPENDS= math/pecl-bitset
|
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
|
|
|
.if ${PHP_VER} == 52
|
|
|
|
fileinfo_DEPENDS= sysutils/pecl-fileinfo
|
|
|
|
.else
|
|
|
|
fileinfo_DEPENDS= sysutils/php${PHP_VER}-fileinfo
|
|
|
|
.endif
|
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
|
2013-03-01 10:42:54 +00:00
|
|
|
igbinary_DEPENDS= converters/igbinary
|
2004-07-19 07:15:24 +00:00
|
|
|
imap_DEPENDS= mail/php${PHP_VER}-imap
|
|
|
|
interbase_DEPENDS= databases/php${PHP_VER}-interbase
|
2010-11-26 13:34:09 +00:00
|
|
|
intl_DEPENDS= devel/pecl-intl
|
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
|
|
|
|
mysqli_DEPENDS= databases/php${PHP_VER}-mysqli
|
|
|
|
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
|
2004-07-19 07:15:24 +00: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 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
|
|
|
|
|
|
|
. for extension in ${USE_PHP}
|
2005-03-14 14:37:45 +00:00
|
|
|
. if ${_USE_PHP_VER${PHP_VER}:M${extension}} != ""
|
|
|
|
. if ${PHP_EXT_INC:M${extension}} == ""
|
|
|
|
. if defined(USE_PHP_BUILD)
|
2008-01-21 07:19:24 +00:00
|
|
|
BUILD_DEPENDS+= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/${extension}.so:${PORTSDIR}/${${extension}_DEPENDS}
|
2005-03-14 14:37:45 +00:00
|
|
|
. endif
|
2008-01-21 07:19:24 +00:00
|
|
|
RUN_DEPENDS+= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/${extension}.so:${PORTSDIR}/${${extension}_DEPENDS}
|
2005-03-14 14:37:45 +00:00
|
|
|
. endif
|
2004-07-19 07:15:24 +00:00
|
|
|
. else
|
2010-04-09 09:34:43 +00:00
|
|
|
ext= ${extension}
|
2012-05-16 07:36:13 +00:00
|
|
|
. if ${ext} == "mhash"
|
2010-04-09 09:34:43 +00: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}
|
|
|
|
. elif ${ext:L} != "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}
|
2004-07-19 07:15:24 +00:00
|
|
|
. endif
|
|
|
|
. endif
|
|
|
|
. endfor
|
|
|
|
.endif
|