aboutsummaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorAlex Dupre <ale@FreeBSD.org>2004-07-28 08:59:35 +0000
committerAlex Dupre <ale@FreeBSD.org>2004-07-28 08:59:35 +0000
commit6d0b9e61ce8c7cc8b540123f8af9d2e08a1cf847 (patch)
tree50077926d78b3d96758f1aa79f17775e30185b9e /Mk
parent17b081e986632242371a72e82414a97d83ba2cdc (diff)
downloadports-6d0b9e61ce8c7cc8b540123f8af9d2e08a1cf847.tar.gz
ports-6d0b9e61ce8c7cc8b540123f8af9d2e08a1cf847.zip
Notes
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.php.mk19
1 files changed, 13 insertions, 6 deletions
diff --git a/Mk/bsd.php.mk b/Mk/bsd.php.mk
index dda8b27c3010..39978ea48094 100644
--- a/Mk/bsd.php.mk
+++ b/Mk/bsd.php.mk
@@ -197,8 +197,9 @@ do-install:
> ${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h
@${ECHO_CMD} \#include \"ext/${PHP_MODNAME}/config.h\" \
>> ${PREFIX}/include/php/ext/php_config.h
+ @${MKDIR} ${PREFIX}/etc/php
@${ECHO_CMD} extension=${PHP_MODNAME}.so \
- >> ${PREFIX}/etc/php.ini
+ >> ${PREFIX}/etc/php/extensions.ini
add-plist-info: add-plist-phpext
add-plist-phpext:
@@ -218,13 +219,19 @@ add-plist-phpext:
>> ${TMPPLIST}
@${ECHO_CMD} "@unexec rm %D/include/php/ext/php_config.h.orig" \
>> ${TMPPLIST}
- @${ECHO_CMD} "@exec echo extension=${PHP_MODNAME}.so >> %D/etc/php.ini" \
+ @${ECHO_CMD} "@exec mkdir -p %D/etc/php" \
>> ${TMPPLIST}
- @${ECHO_CMD} "@unexec cp %D/etc/php.ini %D/etc/php.ini.orig" \
+ @${ECHO_CMD} "@exec echo extension=${PHP_MODNAME}.so >> %D/etc/php/extensions.ini" \
>> ${TMPPLIST}
- @${ECHO_CMD} "@unexec grep -v ${PHP_MODNAME}\\\.so %D/etc/php.ini.orig > %D/etc/php.ini || true" \
+ @${ECHO_CMD} "@unexec cp %D/etc/php/extensions.ini %D/etc/php/extensions.ini.orig" \
>> ${TMPPLIST}
- @${ECHO_CMD} "@unexec rm %D/etc/php.ini.orig" \
+ @${ECHO_CMD} "@unexec grep -v ${PHP_MODNAME}\\\.so %D/etc/php/extensions.ini.orig > %D/etc/php/extensions.ini || true" \
+ >> ${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" \
>> ${TMPPLIST}
security-check: php-ini
@@ -232,7 +239,7 @@ security-check: php-ini
php-ini:
@${ECHO_CMD} "****************************************************************************"
@${ECHO_CMD} ""
- @${ECHO_CMD} "The following line has been added to your ${PREFIX}/etc/php.ini"
+ @${ECHO_CMD} "The following line has been added to your ${PREFIX}/etc/php/extensions.ini"
@${ECHO_CMD} "configuration file to automatically load the installed extension:"
@${ECHO_CMD} ""
@${ECHO_CMD} "extension=${PHP_MODNAME}.so"