2004-02-03 23:27:04 -05: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 03:15:24 -04: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-03 23:27:04 -05:00
|
|
|
#
|
|
|
|
# The port can set these options in its Makefile before bsd.ports.pre.mk:
|
|
|
|
#
|
2004-07-19 19:25:22 -04: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-04 22:18:09 -04:00
|
|
|
# IGNORE_WITH_PHP=N - The port doesn't work with PHP version N.
|
2004-02-03 23:27:04 -05:00
|
|
|
# USE_PHPIZE=yes - Use to build a PHP extension.
|
2004-07-19 03:15:24 -04: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-03 23:27:04 -05: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 01:21:46 -05:00
|
|
|
.if !defined(_PHPMKINCLUDED)
|
|
|
|
|
2004-02-03 23:27:04 -05: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 01:21:46 -05:00
|
|
|
_PHPMKINCLUDED= yes
|
|
|
|
|
2008-01-21 02:19:24 -05: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'
|
2005-12-09 14:41:41 -05: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 00:53:43 -04:00
|
|
|
DEFAULT_PHP_VER?= 5
|
2004-07-19 19:25:22 -04:00
|
|
|
|
|
|
|
PHP_VER?= ${DEFAULT_PHP_VER}
|
|
|
|
.if ${PHP_VER} == 4
|
2004-02-03 23:27:04 -05:00
|
|
|
PHP_EXT_DIR= 20020429
|
2004-07-19 19:25:22 -04:00
|
|
|
.else
|
2006-11-06 12:43:11 -05:00
|
|
|
PHP_EXT_DIR= 20060613
|
2004-07-19 19:25:22 -04:00
|
|
|
.endif
|
2005-12-09 14:41:41 -05: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 03:14:35 -05:00
|
|
|
APXS?= ${LOCALBASE}/sbin/apxs
|
2004-02-03 23:27:04 -05:00
|
|
|
APACHE_MPM!= ${APXS} -q MPM_NAME
|
2005-12-09 14:41:41 -05:00
|
|
|
. if ${APACHE_MPM} == "worker"
|
2004-02-03 23:27:04 -05:00
|
|
|
PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts
|
2005-12-09 14:41:41 -05: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-03 23:27:04 -05:00
|
|
|
PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts
|
2005-12-09 14:41:41 -05:00
|
|
|
. endif
|
2004-02-03 23:27:04 -05:00
|
|
|
.endif
|
2005-12-09 14:41:41 -05:00
|
|
|
|
2004-02-03 23:27:04 -05:00
|
|
|
.if defined(WITH_DEBUG)
|
|
|
|
PHP_EXT_DIR:= ${PHP_EXT_DIR}-debug
|
|
|
|
.endif
|
|
|
|
PHP_SAPI?= ""
|
2005-12-09 14:41:41 -05:00
|
|
|
.endif
|
2005-03-14 09:37:45 -05:00
|
|
|
PHP_EXT_INC?= ""
|
2004-02-03 23:27:04 -05: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-04 22:18:09 -04:00
|
|
|
# compatability shim
|
2004-02-03 23:27:04 -05: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-04 22:18:09 -04:00
|
|
|
IGNORE_WITH_PHP=${BROKEN_WITH_PHP}
|
|
|
|
.endif
|
|
|
|
.if defined(IGNORE_WITH_PHP)
|
|
|
|
. for VER in ${IGNORE_WITH_PHP}
|
2004-07-19 03:15:24 -04: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-04 22:18:09 -04:00
|
|
|
IGNORE= cannot install: doesn't work with PHP version : ${PHP_VER} (Doesn't support PHP ${IGNORE_WITH_PHP})
|
2004-07-19 03:15:24 -04:00
|
|
|
. endif
|
|
|
|
. endfor
|
2004-02-03 23:27:04 -05: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 09:26:49 -04:00
|
|
|
. if defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == "" && ${PHP_SAPI:Mmod} == ""
|
2004-02-03 23:27:04 -05:00
|
|
|
check-makevars::
|
|
|
|
@${ECHO_CMD} "This port requires the Apache Module or the CGI version of PHP, but you have"
|
2006-05-06 09:26:49 -04:00
|
|
|
@${ECHO_CMD} "already installed a PHP port without them."
|
2004-07-19 03:15:24 -04:00
|
|
|
@${FALSE}
|
|
|
|
. endif
|
2004-02-03 23:27:04 -05:00
|
|
|
. endif
|
|
|
|
.else
|
|
|
|
|
|
|
|
.if defined(WANT_PHP_CGI)
|
2006-05-06 09:26:49 -04:00
|
|
|
. if defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == ""
|
2004-02-03 23:27:04 -05:00
|
|
|
check-makevars::
|
|
|
|
@${ECHO_CMD} "This port requires the CGI version of PHP, but you have already"
|
2006-05-06 09:26:49 -04:00
|
|
|
@${ECHO_CMD} "installed a PHP port without CGI."
|
2004-02-03 23:27:04 -05:00
|
|
|
@${FALSE}
|
|
|
|
. endif
|
|
|
|
.else
|
|
|
|
|
2004-07-19 03:15:24 -04:00
|
|
|
.if defined(WANT_PHP_CLI)
|
2006-05-06 09:26:49 -04:00
|
|
|
. if defined(PHP_VERSION) && ${PHP_SAPI:Mcli} == ""
|
2004-02-03 23:27:04 -05:00
|
|
|
check-makevars::
|
|
|
|
@${ECHO_CMD} "This port requires the CLI version of PHP, but you have already"
|
2006-05-06 09:26:49 -04:00
|
|
|
@${ECHO_CMD} "installed a PHP port without CLI."
|
2004-02-03 23:27:04 -05:00
|
|
|
@${FALSE}
|
|
|
|
. endif
|
|
|
|
.else
|
|
|
|
|
2004-07-19 03:15:24 -04:00
|
|
|
.if defined(WANT_PHP_MOD)
|
2006-05-06 09:26:49 -04:00
|
|
|
. if defined(PHP_VERSION) && ${PHP_SAPI:Mmod} == ""
|
2004-02-03 23:27:04 -05:00
|
|
|
check-makevars::
|
|
|
|
@${ECHO_CMD} "This port requires the Apache Module for PHP, but you have already"
|
2006-05-06 09:26:49 -04:00
|
|
|
@${ECHO_CMD} "installed a PHP port without the Apache Module."
|
2004-02-03 23:27:04 -05:00
|
|
|
@${FALSE}
|
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.endif
|
|
|
|
|
2006-05-06 09:26:49 -04:00
|
|
|
PHP_PORT= ${PORTSDIR}/lang/php${PHP_VER}
|
2004-07-19 08:23:13 -04:00
|
|
|
|
2004-07-19 03:15:24 -04:00
|
|
|
.if defined(USE_PHP_BUILD)
|
2008-01-21 02:19:24 -05:00
|
|
|
BUILD_DEPENDS+= ${PHPBASE}/include/php/main/php.h:${PHP_PORT}
|
2004-07-19 03:15:24 -04:00
|
|
|
.endif
|
2008-01-21 02:19:24 -05:00
|
|
|
RUN_DEPENDS+= ${PHPBASE}/include/php/main/php.h:${PHP_PORT}
|
2004-02-03 23:27:04 -05:00
|
|
|
|
|
|
|
PLIST_SUB+= PHP_EXT_DIR=${PHP_EXT_DIR}
|
2005-11-20 15:35:40 -05:00
|
|
|
SUB_LIST+= PHP_EXT_DIR=${PHP_EXT_DIR}
|
2004-02-03 23:27:04 -05:00
|
|
|
|
2004-07-19 03:15:24 -04:00
|
|
|
.if defined(USE_PHPIZE) || defined(USE_PHPEXT)
|
2008-01-21 02:19:24 -05:00
|
|
|
BUILD_DEPENDS+= ${PHPBASE}/bin/phpize:${PHP_PORT}
|
|
|
|
GNU_CONFIGURE= yes
|
2008-08-19 20:57:32 -04:00
|
|
|
USE_AUTOTOOLS+= autoconf:262:env
|
2008-01-21 02:19:24 -05:00
|
|
|
CONFIGURE_ARGS+=--with-php-config=${PHPBASE}/bin/php-config
|
2004-02-03 23:27:04 -05:00
|
|
|
|
2004-07-19 03:15:24 -04:00
|
|
|
configure-message: phpize-message do-phpize
|
|
|
|
|
|
|
|
phpize-message:
|
|
|
|
@${ECHO_MSG} "===> PHPizing for ${PKGNAME}"
|
2004-02-03 23:27:04 -05:00
|
|
|
|
2004-07-19 03:15:24 -04:00
|
|
|
do-phpize:
|
2008-01-21 02:19:24 -05:00
|
|
|
@(cd ${WRKSRC}; ${SETENV} ${SCRIPTS_ENV} ${PHPBASE}/bin/phpize)
|
2004-02-03 23:27:04 -05:00
|
|
|
.endif
|
2004-07-19 03:15:24 -04:00
|
|
|
|
2009-03-06 05:08:35 -05:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(_POSTMKINCLUDED) && defined(USE_PHPEXT)
|
2004-07-19 03:15:24 -04: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 02:21:15 -04:00
|
|
|
@${RM} -f ${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h
|
2004-07-19 03:15:24 -04: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 04:59:35 -04:00
|
|
|
@${MKDIR} ${PREFIX}/etc/php
|
2004-07-19 03:15:24 -04:00
|
|
|
@${ECHO_CMD} extension=${PHP_MODNAME}.so \
|
2004-07-28 04:59:35 -04:00
|
|
|
>> ${PREFIX}/etc/php/extensions.ini
|
2004-07-19 03:15:24 -04: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 04:59:35 -04:00
|
|
|
@${ECHO_CMD} "@exec mkdir -p %D/etc/php" \
|
2004-07-19 03:15:24 -04:00
|
|
|
>> ${TMPPLIST}
|
2004-07-28 04:59:35 -04:00
|
|
|
@${ECHO_CMD} "@exec echo extension=${PHP_MODNAME}.so >> %D/etc/php/extensions.ini" \
|
2004-07-19 03:15:24 -04:00
|
|
|
>> ${TMPPLIST}
|
2004-07-28 04:59:35 -04:00
|
|
|
@${ECHO_CMD} "@unexec cp %D/etc/php/extensions.ini %D/etc/php/extensions.ini.orig" \
|
2004-07-19 03:15:24 -04:00
|
|
|
>> ${TMPPLIST}
|
2004-09-02 06:08:48 -04: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 04:59:35 -04: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 03:15:24 -04:00
|
|
|
>> ${TMPPLIST}
|
|
|
|
|
|
|
|
security-check: php-ini
|
|
|
|
|
|
|
|
php-ini:
|
|
|
|
@${ECHO_CMD} "****************************************************************************"
|
|
|
|
@${ECHO_CMD} ""
|
2004-07-28 04:59:35 -04:00
|
|
|
@${ECHO_CMD} "The following line has been added to your ${PREFIX}/etc/php/extensions.ini"
|
2004-07-19 03:15:24 -04: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 01:21:46 -05:00
|
|
|
.if defined(_POSTMKINCLUDED) && ${USE_PHP:L} != "yes"
|
2004-07-19 03:15:24 -04:00
|
|
|
# non-version specific components
|
2008-07-11 06:57:15 -04:00
|
|
|
_USE_PHP_ALL= apc bcmath bitset bz2 calendar ctype curl dba dbase \
|
2006-11-06 12:43:11 -05:00
|
|
|
exif fileinfo fribidi ftp gd gettext gmp \
|
2007-02-09 03:29:33 -05:00
|
|
|
hash iconv imap interbase json ldap mbstring mcrypt \
|
2007-07-09 14:37:35 -04:00
|
|
|
memcache mhash mssql mysql ncurses odbc \
|
2006-11-22 01:59:37 -05:00
|
|
|
openssl pcntl pcre pdf pgsql posix \
|
2005-03-14 09:37:45 -05:00
|
|
|
pspell radius readline recode session shmop snmp \
|
|
|
|
sockets sybase_ct sysvmsg sysvsem sysvshm \
|
2005-12-09 14:41:41 -05:00
|
|
|
tokenizer wddx xml xmlrpc yaz zip zlib
|
2005-03-14 09:37:45 -05:00
|
|
|
# version specific components
|
2006-11-06 12:43:11 -05:00
|
|
|
_USE_PHP_VER4= ${_USE_PHP_ALL} crack dbx dio domxml filepro mcal mcve \
|
2006-02-01 02:18:47 -05:00
|
|
|
mnogosearch oracle overload pfpro xslt yp
|
2007-12-27 01:52:45 -05:00
|
|
|
_USE_PHP_VER5= ${_USE_PHP_ALL} dom filter ming mysqli oci8 pdo \
|
|
|
|
pdo_mysql pdo_sqlite \
|
2007-02-09 03:29:33 -05:00
|
|
|
simplexml soap spl sqlite tidy xmlreader xmlwriter xsl
|
2004-07-19 03:15:24 -04:00
|
|
|
|
2008-07-11 06:57:15 -04:00
|
|
|
apc_DEPENDS= www/pecl-APC
|
2004-07-19 03:15:24 -04:00
|
|
|
bcmath_DEPENDS= math/php${PHP_VER}-bcmath
|
2007-07-09 14:37:35 -04:00
|
|
|
bitset_DEPENDS= math/pecl-bitset
|
2004-07-19 03:15:24 -04: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 05:35:04 -04:00
|
|
|
fileinfo_DEPENDS= sysutils/pecl-fileinfo
|
2004-07-19 03:15:24 -04:00
|
|
|
filepro_DEPENDS=databases/php${PHP_VER}-filepro
|
2008-12-11 04:08:24 -05:00
|
|
|
filter_DEPENDS= security/php${PHP_VER}-filter
|
2004-07-19 03:15:24 -04: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 14:37:35 -04:00
|
|
|
memcache_DEPENDS= databases/pecl-memcache
|
2004-07-19 03:15:24 -04:00
|
|
|
mhash_DEPENDS= security/php${PHP_VER}-mhash
|
|
|
|
ming_DEPENDS= graphics/php${PHP_VER}-ming
|
|
|
|
mnogosearch_DEPENDS= www/php${PHP_VER}-mnogosearch
|
|
|
|
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 02:17:32 -05:00
|
|
|
oci8_DEPENDS= databases/php${PHP_VER}-oci8
|
2004-07-19 03:15:24 -04: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 03:29:33 -05:00
|
|
|
pdo_DEPENDS= databases/php${PHP_VER}-pdo
|
2007-12-27 01:52:45 -05:00
|
|
|
pdo_mysql_DEPENDS= databases/php${PHP_VER}-pdo_mysql
|
2007-02-09 03:29:33 -05:00
|
|
|
pdo_sqlite_DEPENDS= databases/php${PHP_VER}-pdo_sqlite
|
2006-01-31 18:00:21 -05:00
|
|
|
pfpro_DEPENDS= finance/php${PHP_VER}-pfpro
|
2004-07-19 03:15:24 -04: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 11:53:44 -05:00
|
|
|
radius_DEPENDS= net/pecl-radius
|
2004-07-19 03:15:24 -04: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 03:29:33 -05:00
|
|
|
spl_DEPENDS= devel/php${PHP_VER}-spl
|
2004-07-19 03:15:24 -04: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 14:41:41 -05:00
|
|
|
xmlreader_DEPENDS= textproc/php${PHP_VER}-xmlreader
|
2004-07-19 03:15:24 -04:00
|
|
|
xmlrpc_DEPENDS= net/php${PHP_VER}-xmlrpc
|
2006-01-16 07:08:20 -05:00
|
|
|
xmlwriter_DEPENDS= textproc/php${PHP_VER}-xmlwriter
|
2004-07-19 03:15:24 -04: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 04:08:24 -05: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 03:15:24 -04:00
|
|
|
|
|
|
|
. for extension in ${USE_PHP}
|
2005-03-14 09:37:45 -05:00
|
|
|
. if ${_USE_PHP_VER${PHP_VER}:M${extension}} != ""
|
|
|
|
. if ${PHP_EXT_INC:M${extension}} == ""
|
|
|
|
. if defined(USE_PHP_BUILD)
|
2008-01-21 02:19:24 -05:00
|
|
|
BUILD_DEPENDS+= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/${extension}.so:${PORTSDIR}/${${extension}_DEPENDS}
|
2005-03-14 09:37:45 -05:00
|
|
|
. endif
|
2008-01-21 02:19:24 -05:00
|
|
|
RUN_DEPENDS+= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/${extension}.so:${PORTSDIR}/${${extension}_DEPENDS}
|
2005-03-14 09:37:45 -05:00
|
|
|
. endif
|
2004-07-19 03:15:24 -04:00
|
|
|
. else
|
|
|
|
isyes= ${extension}
|
|
|
|
. if ${isyes:L} != "yes"
|
|
|
|
check-makevars::
|
2005-03-14 09:37:45 -05:00
|
|
|
@${ECHO_CMD} "Unknown extension ${extension} for PHP ${PHP_VER}."
|
2004-07-19 03:15:24 -04:00
|
|
|
@${FALSE}
|
|
|
|
. endif
|
|
|
|
. endif
|
|
|
|
. endfor
|
|
|
|
.endif
|