Index: Mk/Scripts/create-manifest.sh =================================================================== --- Mk/Scripts/create-manifest.sh +++ Mk/Scripts/create-manifest.sh @@ -104,7 +104,9 @@ exec >${dp_METADIR}/+DISPLAY -[ -f ${dp_PKGMESSAGE} ] && cat ${dp_PKGMESSAGE} +for message in ${dp_PKGMESSAGE}; do + [ -f "${message}" ] && cat "${message}" +done # Try and keep these messages in sync with check-deprecated if [ ${dp_MAINTAINER} = "ports@FreeBSD.org" ]; then Index: Mk/Uses/php.mk =================================================================== --- Mk/Uses/php.mk +++ Mk/Uses/php.mk @@ -204,7 +204,20 @@ . if ${php_ARGS:Mext} || ${php_ARGS:Mzend} PHP_MODNAME?= ${PORTNAME} +PHP_EXT_PKGMESSAGE= ${WRKDIR}/php-ext-pkg-message +PKGMESSAGE+= ${PHP_EXT_PKGMESSAGE} PHP_HEADER_DIRS?= "" +# If there is no priority defined, we wing it. +. if !defined(PHP_MOD_PRIO) +. if defined(USE_PHP) +# If an extension needs another, put it after the others. +PHP_MOD_PRIO= 30 +. else +# Otherwise, put it where it with everybody. +PHP_MOD_PRIO= 20 +. endif +. endif +INI_FILE= etc/php/ext-${PHP_MOD_PRIO}-${PHP_MODNAME}.ini do-install: @${MKDIR} ${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR} @@ -219,8 +232,13 @@ @${GREP} "#define \(COMPILE\|HAVE\|USE\)_" ${WRKSRC}/config.h \ > ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h @${MKDIR} ${STAGEDIR}${PREFIX}/etc/php +. if ${php_ARGS:Mzend} + @${ECHO_CMD} "zend_extension=%D/lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so" > ${STAGEDIR}${PREFIX}/${INI_FILE} +. else + @${ECHO_CMD} "extension=${PHP_MODNAME}.so" > ${STAGEDIR}${PREFIX}/${INI_FILE} +. endif -add-plist-info: add-plist-phpext +_USES_stage+= 899:add-plist-phpext add-plist-phpext: @${ECHO_CMD} "lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so" \ >> ${TMPPLIST} @@ -234,44 +252,20 @@ >> ${TMPPLIST} @${ECHO_CMD} "@unexec rm %D/include/php/ext/php_config.h.orig" \ >> ${TMPPLIST} - @${ECHO_CMD} "@dir etc/php" \ + @${ECHO_CMD} "${INI_FILE}" \ >> ${TMPPLIST} + @${ECHO_CMD} "****************************************************************************" > ${PHP_EXT_PKGMESSAGE} + @${ECHO_CMD} "" >> ${PHP_EXT_PKGMESSAGE} + @${ECHO_CMD} "The following line has been added to your ${PREFIX}/${INI_FILE}" >> ${PHP_EXT_PKGMESSAGE} + @${ECHO_CMD} "configuration file to automatically load the installed extension:" >> ${PHP_EXT_PKGMESSAGE} + @${ECHO_CMD} "" >> ${PHP_EXT_PKGMESSAGE} . if ${php_ARGS:Mzend} - @${ECHO_CMD} "@exec echo zend_extension=%D/lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so >> %D/etc/php/extensions.ini" \ - >> ${TMPPLIST} -. else - @${ECHO_CMD} "@exec echo extension=${PHP_MODNAME}.so >> %D/etc/php/extensions.ini" \ - >> ${TMPPLIST} -. endif - @${ECHO_CMD} "@unexec cp %D/etc/php/extensions.ini %D/etc/php/extensions.ini.orig" \ - >> ${TMPPLIST} -. if ${php_ARGS:Mzend} - @${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" \ - >> ${TMPPLIST} -. else - @${ECHO_CMD} "@unexec grep -v extension=${PHP_MODNAME}\\\.so %D/etc/php/extensions.ini.orig > %D/etc/php/extensions.ini || true" \ - >> ${TMPPLIST} -. endif - @${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} - -package-message: php-ini - -php-ini: - @${ECHO_CMD} "****************************************************************************" - @${ECHO_CMD} "" - @${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} "" -. if ${php_ARGS:Mzend} - @${ECHO_CMD} "zend_extension=${PREFIX}/lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so" + @${ECHO_CMD} "zend_extension=${PREFIX}/lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so" >> ${PHP_EXT_PKGMESSAGE} . else - @${ECHO_CMD} "extension=${PHP_MODNAME}.so" + @${ECHO_CMD} "extension=${PHP_MODNAME}.so" >> ${PHP_EXT_PKGMESSAGE} . endif - @${ECHO_CMD} "" - @${ECHO_CMD} "****************************************************************************" + @${ECHO_CMD} "" >> ${PHP_EXT_PKGMESSAGE} + @${ECHO_CMD} "****************************************************************************" >> ${PHP_EXT_PKGMESSAGE} . endif # Extensions Index: databases/php-adodb-ext/Makefile =================================================================== --- databases/php-adodb-ext/Makefile +++ databases/php-adodb-ext/Makefile @@ -16,8 +16,7 @@ USES= dos2unix php:ext zip IGNORE_WITH_PHP=56 70 - -SUB_FILES= pkg-message +PHP_MODNAME= adodb .include Index: databases/php-adodb-ext/files/pkg-message.in =================================================================== --- databases/php-adodb-ext/files/pkg-message.in +++ /dev/null @@ -1,13 +0,0 @@ -***************************************************************************** -The ADOdb extension has been installed successful. -Add a line containing - - extension=adodb.so - -to your %%LOCALBASE%%/etc/php/extensions.ini to load it. -If you have the Zend Optimizer installed, add the line - - zend_extension=%%PREFIX%%/lib/php/%%PHP_EXT_DIR%%/adodb.so - -to your [zend] section in the php.ini file, too. -***************************************************************************** Index: devel/ioncube/Makefile =================================================================== --- devel/ioncube/Makefile +++ devel/ioncube/Makefile @@ -31,5 +31,10 @@ ${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR}/ioncube/ioncube_loader.so ${INSTALL_DATA} ${WRKSRC}/ioncube_loader_fre_${PHP_INSTVER}_ts.so \ ${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR}/ioncube/ioncube_loader_ts.so +# Put it before opcache, like the previous pkg-message was saying + @${MKDIR} ${STAGEDIR}${PREFIX}/etc/php + @${ECHO_CMD} "[Zend]" > ${STAGEDIR}${PREFIX}/etc/php/ext-05-ioncube.ini + @${ECHO_CMD} "zend_extension=${PREFIX}/lib/php/${PHP_EXT_DIR}/ioncube/ioncube_loader.so" >> ${STAGEDIR}${PREFIX}/etc/php/ext-05-ioncube.ini + @${ECHO_CMD} "zend_extension_ts=${PREFIX}/lib/php/${PHP_EXT_DIR}/ioncube/ioncube_loader_ts.so" >> ${STAGEDIR}${PREFIX}/etc/php/ext-05-ioncube.ini .include Index: devel/ioncube/files/pkg-message.in =================================================================== --- devel/ioncube/files/pkg-message.in +++ devel/ioncube/files/pkg-message.in @@ -1,14 +1,8 @@ - You have installed the ionCube loader package. -Edit %%LOCALBASE%%/etc/php.ini or %%LOCALBASE%%/etc/php/extensions.ini -and add this three lines: +The following lines have been added to %%PREFIX%%/etc/php/ext-05-ioncube.ini so +that the extension has been automatically activated. --------------------------------------------------------------------------------- [Zend] -zend_extension="%%PREFIX%%/lib/php/%%PHP_EXT_DIR%%/ioncube/ioncube_loader.so" -zend_extension_ts="%%PREFIX%%/lib/php/%%PHP_EXT_DIR%%/ioncube/ioncube_loader_ts.so" --------------------------------------------------------------------------------- - -NOTE: If you have any Zend Extension already installed - you need put this before -existing zend_extension lines. +zend_extension=%%PREFIX%%/lib/php/%%PHP_EXT_DIR%%/ioncube/ioncube_loader.so +zend_extension_ts=%%PREFIX%%/lib/php/%%PHP_EXT_DIR%%/ioncube/ioncube_loader_ts.so Index: devel/ioncube/pkg-plist =================================================================== --- devel/ioncube/pkg-plist +++ devel/ioncube/pkg-plist @@ -1,2 +1,3 @@ +etc/php/ext-05-ioncube.ini lib/php/%%PHP_EXT_DIR%%/ioncube/ioncube_loader.so lib/php/%%PHP_EXT_DIR%%/ioncube/ioncube_loader_ts.so Index: devel/php5-ice/Makefile =================================================================== --- devel/php5-ice/Makefile +++ devel/php5-ice/Makefile @@ -34,27 +34,12 @@ post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR}/*.so @${MKDIR} ${STAGEDIR}${PREFIX}/etc/php - -add-plist-info: - @${ECHO_CMD} "@exec mkdir -p %D/etc/php" \ - >> ${TMPPLIST} - @${ECHO_CMD} "@exec echo extension=${PHP_MODNAME}.so >> %D/etc/php/extensions.ini" \ - >> ${TMPPLIST} - @${ECHO_CMD} "@unexec cp %D/etc/php/extensions.ini %D/etc/php/extensions.ini.orig" \ - >> ${TMPPLIST} - @${ECHO_CMD} "@unexec grep -v extension=${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} + @${ECHO_CMD} "extension=${PHP_MODNAME}.so" > ${STAGEDIR}${PREFIX}/etc/php/ext-20-ice.ini security-check: @${ECHO_CMD} "****************************************************************************" @${ECHO_CMD} "" - @${ECHO_CMD} "The following line has been added to your ${PREFIX}/etc/php/extensions.ini" + @${ECHO_CMD} "The following line has been added to your ${PREFIX}/etc/php/ext-20-ice.ini" @${ECHO_CMD} "configuration file to automatically load the installed extension:" @${ECHO_CMD} "" @${ECHO_CMD} "extension=${PHP_MODNAME}.so" Index: devel/php5-ice/pkg-plist =================================================================== --- devel/php5-ice/pkg-plist +++ devel/php5-ice/pkg-plist @@ -1,3 +1,4 @@ +etc/php/ext-20-ice.ini lib/php/%%PHP_EXT_DIR%%/IcePHP.so share/pear/Glacier2.php share/pear/Glacier2/Metrics.php Index: graphics/mapserver/Makefile =================================================================== --- graphics/mapserver/Makefile +++ graphics/mapserver/Makefile @@ -125,11 +125,9 @@ .endif .if ${PORT_OPTIONS:MPHP} -BUILD_DEPENDS+= ${LOCALBASE}/bin/php-config:lang/php56 -RUN_BUILDS+= ${LOCALBASE}/bin/php-config:lang/php56 -PHP_EXTENSION_DIR!= ${LOCALBASE}/bin/php-config --extension-dir | ${SED} -e "s,/usr/local/,," +USES+= php:build +IGNORE_WITH_PHP= 55 70 CMAKE_ARGS+= -DWITH_PHP=1 -PLIST_SUB+= PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR} PLIST_SUB+= PHP="" .else CMAKE_ARGS+= -DWITH_PHP=0 @@ -188,23 +186,21 @@ .endfor ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/libmapserver.so.${PORTVERSION} ${STAGEDIR}${PREFIX}/lib -.if ${PORT_OPTIONS:MPHP} - @${MKDIR} ${STAGEDIR}${PREFIX}/${PHP_EXTENSION_DIR} +do-install-PHP-on: + @${MKDIR} ${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR} ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/mapscript/php/php_mapscript.so \ - ${STAGEDIR}${PREFIX}/${PHP_EXTENSION_DIR}/ -.endif + ${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR}/ -.if ${PORT_OPTIONS:MPYTHON} +do-install-PYTHON-on: @${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}/ (cd ${BUILD_WRKSRC}/mapscript/python && ${CP} mapscript.py _mapscript.so ${STAGEDIR}${PYTHON_SITELIBDIR}/) -.endif post-install: @${LN} -s ${PREFIX}/lib/libmapserver.so.7.0.1 ${STAGEDIR}${PREFIX}/lib/libmapserver.so.2 @${LN} -s ${PREFIX}/lib/libmapserver.so.2 ${STAGEDIR}${PREFIX}/lib/libmapserver.so -.if ${PORT_OPTIONS:MPHP} - @${ECHO_MSG} "Please add the line extension=php_mapscript.so to ${PREFIX}/etc/php/extensions.ini" -.endif +post-install-PHP-on: + @${MKDIR} ${STAGEDIR}${PREFIX}/etc/php + @${ECHO_CMD} "extension=php_mapscript.so" > ${STAGEDIR}${PREFIX}/etc/php/ext-20-php_mapscript.ini .include Index: graphics/mapserver/pkg-plist =================================================================== --- graphics/mapserver/pkg-plist +++ graphics/mapserver/pkg-plist @@ -8,9 +8,10 @@ bin/shptreevis bin/sortshp bin/tile4ms +%%PHP%%etc/php/ext-20-php_mapscript.ini lib/libmapserver.so lib/libmapserver.so.2 lib/libmapserver.so.7.0.1 -%%PHP%%%%PHP_EXTENSION_DIR%%/php_mapscript.so +%%PHP%%lib/php/%%PHP_EXT_DIR%%/php_mapscript.so %%PYTHON%%%%PYTHON_SITELIBDIR%%/mapscript.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/_mapscript.so Index: lang/php55/Makefile.ext =================================================================== --- lang/php55/Makefile.ext +++ lang/php55/Makefile.ext @@ -217,6 +217,8 @@ .endif .if ${PHP_MODNAME} == "opcache" +# This is needed by Zend extensions, keep before everything. +PHP_MOD_PRIO= 10 CONFIGURE_ARGS+=--enable-opcache .endif Index: lang/php56/Makefile.ext =================================================================== --- lang/php56/Makefile.ext +++ lang/php56/Makefile.ext @@ -217,6 +217,8 @@ .endif .if ${PHP_MODNAME} == "opcache" +# This is needed by Zend extensions, keep before everything. +PHP_MOD_PRIO= 10 CONFIGURE_ARGS+=--enable-opcache .endif Index: lang/php70/Makefile.ext =================================================================== --- lang/php70/Makefile.ext +++ lang/php70/Makefile.ext @@ -209,6 +209,8 @@ .endif .if ${PHP_MODNAME} == "opcache" +# This is needed by Zend extensions, keep before everything. +PHP_MOD_PRIO= 10 CONFIGURE_ARGS+=--enable-opcache USES+= localbase .endif