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
|
|
|
|
# them to CVS yourself.
|
|
|
|
#
|
|
|
|
# $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
|
|
|
#
|
|
|
|
# The port can set these options in its Makefile before bsd.ports.pre.mk:
|
|
|
|
#
|
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.
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
# 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
|
|
|
.if ${PHP_VER} == 5
|
|
|
|
PHP_EXT_INC= pcre spl
|
|
|
|
.endif
|
|
|
|
|
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}
|
|
|
|
.if ${PHP_VER} == 4
|
2004-02-04 04:27:04 +00:00
|
|
|
PHP_EXT_DIR= 20020429
|
2004-07-19 23:25:22 +00:00
|
|
|
.else
|
2010-04-09 09:34:43 +00:00
|
|
|
PHP_EXT_DIR= 20090626
|
|
|
|
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})
|
|
|
|
APACHE_VERSION!= ${HTTPD} -V | ${SED} -ne 's/^Server version: Apache\/\([0-9]\)\.\([0-9]*\).*/\1\2/p'
|
|
|
|
. if ${APACHE_VERSION} > 13
|
2005-11-16 08:14:35 +00:00
|
|
|
APXS?= ${LOCALBASE}/sbin/apxs
|
2004-02-04 04:27:04 +00:00
|
|
|
APACHE_MPM!= ${APXS} -q MPM_NAME
|
2005-12-09 19:41:41 +00:00
|
|
|
. if ${APACHE_MPM} == "worker"
|
2004-02-04 04:27:04 +00:00
|
|
|
PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts
|
2005-12-09 19:41:41 +00:00
|
|
|
. endif
|
|
|
|
. endif
|
|
|
|
.elif defined(APACHE_PORT)
|
|
|
|
APACHE_VERSION!= ${ECHO_CMD} ${APACHE_PORT} | ${SED} -ne 's,.*/apache\([0-9]*\).*,\1,p'
|
|
|
|
. if ${APACHE_VERSION} > 13 && defined(WITH_MPM) && ${WITH_MPM} == "worker"
|
2004-02-04 04:27:04 +00:00
|
|
|
PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts
|
2005-12-09 19:41:41 +00:00
|
|
|
. endif
|
2004-02-04 04:27:04 +00:00
|
|
|
.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
|
|
|
|
* 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
|
|
|
# compatability shim
|
2004-02-04 04:27:04 +00:00
|
|
|
.if defined(BROKEN_WITH_PHP)
|
* 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=${BROKEN_WITH_PHP}
|
|
|
|
.endif
|
|
|
|
.if defined(IGNORE_WITH_PHP)
|
|
|
|
. for VER in ${IGNORE_WITH_PHP}
|
2004-07-19 07:15:24 +00:00
|
|
|
. if ${PHP_VER} == "${VER}"
|
* 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= cannot install: doesn't work with PHP version : ${PHP_VER} (Doesn't support PHP ${IGNORE_WITH_PHP})
|
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}
|
|
|
|
. else
|
2006-05-06 13:26:49 +00:00
|
|
|
. if defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == "" && ${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
|
2004-02-04 04:27:04 +00:00
|
|
|
. endif
|
|
|
|
.else
|
|
|
|
|
|
|
|
.if defined(WANT_PHP_CGI)
|
2006-05-06 13:26:49 +00:00
|
|
|
. if defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == ""
|
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
|
|
|
|
.else
|
|
|
|
|
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
|
|
|
|
.else
|
|
|
|
|
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
|
|
|
|
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.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
|
|
|
|
2004-07-19 07:15:24 +00:00
|
|
|
.if defined(USE_PHPIZE) || defined(USE_PHPEXT)
|
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
|
2008-08-20 00:57:32 +00:00
|
|
|
USE_AUTOTOOLS+= autoconf:262: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
|
|
|
|
|
|
|
|
.if defined(_POSTMKINCLUDED) && defined(USE_PHPEXT)
|
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
|
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
|
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}
|
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}
|
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}
|
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}
|
|
|
|
@${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} ""
|
|
|
|
@${ECHO_CMD} "extension=${PHP_MODNAME}.so"
|
|
|
|
@${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
|
2010-04-09 09:34:43 +00:00
|
|
|
_USE_PHP_ALL= apc bcmath bitset bz2 calendar ctype curl dba \
|
2006-11-06 17:43:11 +00:00
|
|
|
exif fileinfo fribidi ftp gd gettext gmp \
|
2007-02-09 08:29:33 +00:00
|
|
|
hash iconv imap interbase json ldap mbstring mcrypt \
|
2010-04-09 09:34:43 +00:00
|
|
|
memcache mssql mysql odbc \
|
2006-11-22 06:59:37 +00:00
|
|
|
openssl pcntl pcre pdf pgsql posix \
|
2005-03-14 14:37:45 +00:00
|
|
|
pspell radius readline recode session shmop snmp \
|
|
|
|
sockets sybase_ct sysvmsg sysvsem sysvshm \
|
2005-12-09 19:41:41 +00:00
|
|
|
tokenizer wddx xml xmlrpc yaz zip zlib
|
2005-03-14 14:37:45 +00:00
|
|
|
# version specific components
|
2010-04-09 09:34:43 +00:00
|
|
|
_USE_PHP_VER4= ${_USE_PHP_ALL} crack dbase dbx dio domxml filepro mcal mcve \
|
|
|
|
mhash ncurses oracle overload pfpro xslt yp
|
|
|
|
_USE_PHP_VER5= ${_USE_PHP_ALL} dom filter mysqli oci8 pdo \
|
|
|
|
pdo_mysql pdo_pgsql pdo_sqlite \
|
2007-02-09 08:29:33 +00:00
|
|
|
simplexml soap spl sqlite tidy xmlreader xmlwriter xsl
|
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
|
|
|
|
crack_DEPENDS= security/php${PHP_VER}-crack
|
|
|
|
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
|
|
|
|
dbx_DEPENDS= databases/php${PHP_VER}-dbx
|
|
|
|
dio_DEPENDS= devel/php${PHP_VER}-dio
|
|
|
|
dom_DEPENDS= textproc/php${PHP_VER}-dom
|
|
|
|
domxml_DEPENDS= textproc/php${PHP_VER}-domxml
|
|
|
|
exif_DEPENDS= graphics/php${PHP_VER}-exif
|
2004-07-21 09:35:04 +00:00
|
|
|
fileinfo_DEPENDS= sysutils/pecl-fileinfo
|
2004-07-19 07:15:24 +00:00
|
|
|
filepro_DEPENDS=databases/php${PHP_VER}-filepro
|
2008-12-11 09:08:24 +00:00
|
|
|
filter_DEPENDS= security/php${PHP_VER}-filter
|
2004-07-19 07:15:24 +00:00
|
|
|
fribidi_DEPENDS=converters/pecl-fribidi
|
|
|
|
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
|
|
|
|
imap_DEPENDS= mail/php${PHP_VER}-imap
|
|
|
|
interbase_DEPENDS= databases/php${PHP_VER}-interbase
|
|
|
|
ldap_DEPENDS= net/php${PHP_VER}-ldap
|
|
|
|
mbstring_DEPENDS= converters/php${PHP_VER}-mbstring
|
|
|
|
mcal_DEPENDS= misc/php${PHP_VER}-mcal
|
|
|
|
mcrypt_DEPENDS= security/php${PHP_VER}-mcrypt
|
|
|
|
mcve_DEPENDS= devel/php${PHP_VER}-mcve
|
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
|
2007-03-08 07:17:32 +00:00
|
|
|
oci8_DEPENDS= databases/php${PHP_VER}-oci8
|
2004-07-19 07:15:24 +00:00
|
|
|
odbc_DEPENDS= databases/php${PHP_VER}-odbc
|
|
|
|
openssl_DEPENDS=security/php${PHP_VER}-openssl
|
|
|
|
oracle_DEPENDS= databases/php${PHP_VER}-oracle
|
|
|
|
overload_DEPENDS=lang/php${PHP_VER}-overload
|
|
|
|
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
|
2007-12-27 06:52:45 +00:00
|
|
|
pdo_mysql_DEPENDS= databases/php${PHP_VER}-pdo_mysql
|
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
|
2006-01-31 23:00:21 +00:00
|
|
|
pfpro_DEPENDS= finance/php${PHP_VER}-pfpro
|
2004-07-19 07:15:24 +00:00
|
|
|
pgsql_DEPENDS= databases/php${PHP_VER}-pgsql
|
|
|
|
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
|
|
|
|
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
|
|
|
|
xslt_DEPENDS= textproc/php${PHP_VER}-xslt
|
|
|
|
yaz_DEPENDS= net/pecl-yaz
|
|
|
|
yp_DEPENDS= net/php${PHP_VER}-yp
|
|
|
|
zlib_DEPENDS= archivers/php${PHP_VER}-zlib
|
2008-12-11 09:08:24 +00:00
|
|
|
.if ${PHP_VER} == 4
|
|
|
|
hash_DEPENDS= security/pecl-hash
|
|
|
|
json_DEPENDS= devel/pecl-json
|
|
|
|
zip_DEPENDS= archivers/pecl-zip
|
|
|
|
.else
|
|
|
|
hash_DEPENDS= security/php${PHP_VER}-hash
|
|
|
|
json_DEPENDS= devel/php${PHP_VER}-json
|
|
|
|
zip_DEPENDS= archivers/php${PHP_VER}-zip
|
|
|
|
.endif
|
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}
|
|
|
|
. if ${ext} == "mhash" && ${PHP_VER} == 5
|
|
|
|
. 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
|