svn commit: r332106 - head/Mk
Alex Dupre
ale at FreeBSD.org
Wed Oct 30 13:28:01 UTC 2013
Author: ale
Date: Wed Oct 30 13:28:00 2013
New Revision: 332106
URL: http://svnweb.freebsd.org/changeset/ports/332106
Log:
Add support for staging PHP extensions.
Submitted by: antoine
Modified:
head/Mk/bsd.php.mk
Modified: head/Mk/bsd.php.mk
==============================================================================
--- head/Mk/bsd.php.mk Wed Oct 30 13:12:08 2013 (r332105)
+++ head/Mk/bsd.php.mk Wed Oct 30 13:28:00 2013 (r332106)
@@ -173,20 +173,21 @@ PHP_MODNAME?= ${PORTNAME}
PHP_HEADER_DIRS?= ""
do-install:
- @${MKDIR} ${PREFIX}/lib/php/${PHP_EXT_DIR}
+ @${MKDIR} ${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR}
@${INSTALL_DATA} ${WRKSRC}/modules/${PHP_MODNAME}.so \
- ${PREFIX}/lib/php/${PHP_EXT_DIR}
+ ${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR}
. for header in . ${PHP_HEADER_DIRS}
- @${MKDIR} ${PREFIX}/include/php/ext/${PHP_MODNAME}/${header}
+ @${MKDIR} ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/${header}
@${INSTALL_DATA} ${WRKSRC}/${header}/*.h \
- ${PREFIX}/include/php/ext/${PHP_MODNAME}/${header}
+ ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/${header}
. endfor
- @${RM} -f ${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h
+ @${RM} -f ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h
@${GREP} "#define \(COMPILE\|HAVE\|USE\)_" ${WRKSRC}/config.h \
- > ${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h
+ > ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h
+ @${MKDIR} ${STAGEDIR}${PREFIX}/etc/php
+.if defined(NO_STAGE)
@${ECHO_CMD} \#include \"ext/${PHP_MODNAME}/config.h\" \
>> ${PREFIX}/include/php/ext/php_config.h
- @${MKDIR} ${PREFIX}/etc/php
.if defined(USE_ZENDEXT)
@${ECHO_CMD} zend_extension=${PREFIX}/lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so \
>> ${PREFIX}/etc/php/extensions.ini
@@ -194,6 +195,7 @@ do-install:
@${ECHO_CMD} extension=${PHP_MODNAME}.so \
>> ${PREFIX}/etc/php/extensions.ini
.endif
+.endif
add-plist-info: add-plist-phpext
add-plist-phpext:
@@ -201,10 +203,10 @@ add-plist-phpext:
>> ${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}/, at dirrm ,p' >> ${TMPPLIST}
+ @${FIND} -P ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME} ! -type d 2>/dev/null | \
+ ${SED} -ne 's,^${STAGEDIR}${PREFIX}/,,p' >> ${TMPPLIST}
+ @${FIND} -P -d ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME} -type d 2>/dev/null | \
+ ${SED} -ne 's,^${STAGEDIR}${PREFIX}/, at 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" \
@@ -238,7 +240,7 @@ add-plist-phpext:
@${ECHO_CMD} "@unexec rmdir %D/etc/php 2> /dev/null || true" \
>> ${TMPPLIST}
-security-check: php-ini
+package-message: php-ini
php-ini:
@${ECHO_CMD} "****************************************************************************"
More information about the svn-ports-all
mailing list