Lines 204-210
_INCLUDE_USES_PHP_POST_MK=yes
Link Here
|
204 |
|
204 |
|
205 |
. if ${php_ARGS:Mext} || ${php_ARGS:Mzend} |
205 |
. if ${php_ARGS:Mext} || ${php_ARGS:Mzend} |
206 |
PHP_MODNAME?= ${PORTNAME} |
206 |
PHP_MODNAME?= ${PORTNAME} |
|
|
207 |
PHP_EXT_PKGMESSAGE= ${WRKDIR}/php-ext-pkg-message |
208 |
PKGMESSAGE+= ${PHP_EXT_PKGMESSAGE} |
207 |
PHP_HEADER_DIRS?= "" |
209 |
PHP_HEADER_DIRS?= "" |
|
|
210 |
# If there is no priority defined, we wing it. |
211 |
. if !defined(PHP_MOD_PRIO) |
212 |
. if defined(USE_PHP) |
213 |
# If an extension needs another, put it after the others. |
214 |
PHP_MOD_PRIO= 30 |
215 |
. else |
216 |
# Otherwise, put it where it with everybody. |
217 |
PHP_MOD_PRIO= 20 |
218 |
. endif |
219 |
. endif |
220 |
INI_FILE= etc/php/ext-${PHP_MOD_PRIO}-${PHP_MODNAME}.ini |
208 |
|
221 |
|
209 |
do-install: |
222 |
do-install: |
210 |
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR} |
223 |
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR} |
Lines 219-226
do-install:
Link Here
|
219 |
@${GREP} "#define \(COMPILE\|HAVE\|USE\)_" ${WRKSRC}/config.h \ |
232 |
@${GREP} "#define \(COMPILE\|HAVE\|USE\)_" ${WRKSRC}/config.h \ |
220 |
> ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h |
233 |
> ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h |
221 |
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/php |
234 |
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/php |
|
|
235 |
. if ${php_ARGS:Mzend} |
236 |
@${ECHO_CMD} "zend_extension=%D/lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so" > ${STAGEDIR}${PREFIX}/${INI_FILE} |
237 |
. else |
238 |
@${ECHO_CMD} "extension=${PHP_MODNAME}.so" > ${STAGEDIR}${PREFIX}/${INI_FILE} |
239 |
. endif |
222 |
|
240 |
|
223 |
add-plist-info: add-plist-phpext |
241 |
_USES_stage+= 899:add-plist-phpext |
224 |
add-plist-phpext: |
242 |
add-plist-phpext: |
225 |
@${ECHO_CMD} "lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so" \ |
243 |
@${ECHO_CMD} "lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so" \ |
226 |
>> ${TMPPLIST} |
244 |
>> ${TMPPLIST} |
Lines 234-277
add-plist-phpext:
Link Here
|
234 |
>> ${TMPPLIST} |
252 |
>> ${TMPPLIST} |
235 |
@${ECHO_CMD} "@unexec rm %D/include/php/ext/php_config.h.orig" \ |
253 |
@${ECHO_CMD} "@unexec rm %D/include/php/ext/php_config.h.orig" \ |
236 |
>> ${TMPPLIST} |
254 |
>> ${TMPPLIST} |
237 |
@${ECHO_CMD} "@dir etc/php" \ |
255 |
@${ECHO_CMD} "${INI_FILE}" \ |
238 |
>> ${TMPPLIST} |
256 |
>> ${TMPPLIST} |
|
|
257 |
@${ECHO_CMD} "****************************************************************************" > ${PHP_EXT_PKGMESSAGE} |
258 |
@${ECHO_CMD} "" >> ${PHP_EXT_PKGMESSAGE} |
259 |
@${ECHO_CMD} "The following line has been added to your ${PREFIX}/${INI_FILE}" >> ${PHP_EXT_PKGMESSAGE} |
260 |
@${ECHO_CMD} "configuration file to automatically load the installed extension:" >> ${PHP_EXT_PKGMESSAGE} |
261 |
@${ECHO_CMD} "" >> ${PHP_EXT_PKGMESSAGE} |
239 |
. if ${php_ARGS:Mzend} |
262 |
. if ${php_ARGS:Mzend} |
240 |
@${ECHO_CMD} "@exec echo zend_extension=%D/lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so >> %D/etc/php/extensions.ini" \ |
263 |
@${ECHO_CMD} "zend_extension=${PREFIX}/lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so" >> ${PHP_EXT_PKGMESSAGE} |
241 |
>> ${TMPPLIST} |
|
|
242 |
. else |
243 |
@${ECHO_CMD} "@exec echo extension=${PHP_MODNAME}.so >> %D/etc/php/extensions.ini" \ |
244 |
>> ${TMPPLIST} |
245 |
. endif |
246 |
@${ECHO_CMD} "@unexec cp %D/etc/php/extensions.ini %D/etc/php/extensions.ini.orig" \ |
247 |
>> ${TMPPLIST} |
248 |
. if ${php_ARGS:Mzend} |
249 |
@${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" \ |
250 |
>> ${TMPPLIST} |
251 |
. else |
252 |
@${ECHO_CMD} "@unexec grep -v extension=${PHP_MODNAME}\\\.so %D/etc/php/extensions.ini.orig > %D/etc/php/extensions.ini || true" \ |
253 |
>> ${TMPPLIST} |
254 |
. endif |
255 |
@${ECHO_CMD} "@unexec rm %D/etc/php/extensions.ini.orig" \ |
256 |
>> ${TMPPLIST} |
257 |
@${ECHO_CMD} "@unexec [ -s %D/etc/php/extensions.ini ] || rm %D/etc/php/extensions.ini" \ |
258 |
>> ${TMPPLIST} |
259 |
|
260 |
package-message: php-ini |
261 |
|
262 |
php-ini: |
263 |
@${ECHO_CMD} "****************************************************************************" |
264 |
@${ECHO_CMD} "" |
265 |
@${ECHO_CMD} "The following line has been added to your ${PREFIX}/etc/php/extensions.ini" |
266 |
@${ECHO_CMD} "configuration file to automatically load the installed extension:" |
267 |
@${ECHO_CMD} "" |
268 |
. if ${php_ARGS:Mzend} |
269 |
@${ECHO_CMD} "zend_extension=${PREFIX}/lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so" |
270 |
. else |
264 |
. else |
271 |
@${ECHO_CMD} "extension=${PHP_MODNAME}.so" |
265 |
@${ECHO_CMD} "extension=${PHP_MODNAME}.so" >> ${PHP_EXT_PKGMESSAGE} |
272 |
. endif |
266 |
. endif |
273 |
@${ECHO_CMD} "" |
267 |
@${ECHO_CMD} "" >> ${PHP_EXT_PKGMESSAGE} |
274 |
@${ECHO_CMD} "****************************************************************************" |
268 |
@${ECHO_CMD} "****************************************************************************" >> ${PHP_EXT_PKGMESSAGE} |
275 |
. endif |
269 |
. endif |
276 |
|
270 |
|
277 |
# Extensions |
271 |
# Extensions |