FreeBSD Bugzilla – Attachment 171675 Details for
Bug 210323
USES=php
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch-v3
php.diff (text/plain), 14.10 KB, created by
Mathieu Arnold
on 2016-06-22 14:09:27 UTC
(
hide
)
Description:
patch-v3
Filename:
MIME Type:
Creator:
Mathieu Arnold
Created:
2016-06-22 14:09:27 UTC
Size:
14.10 KB
patch
obsolete
>diff --git Mk/bsd.php.mk Mk/Uses/php.mk >similarity index 82% >rename from Mk/bsd.php.mk >rename to Mk/Uses/php.mk >index 408c08f2..68625e4 100644 >--- Mk/bsd.php.mk >+++ Mk/Uses/php.mk >@@ -1,15 +1,11 @@ >-# >-# 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 SVN yourself. >-# > # $FreeBSD$ > # >-# Adding 'USE_PHP=yes' to a port includes this Makefile after bsd.ports.pre.mk. >+# Support for PHP-based ports. >+# >+# Feature: php >+# Usage: USES=php >+# Valid ARGS: (none) >+# > # If the port requires a predefined set of PHP extensions, they can be > # listed in this way: > # >@@ -35,125 +31,126 @@ > # If you are building PHP-based ports in poudriere(8) with ZTS enabled, > # add WITH_MPM=event to /etc/make.conf to prevent build failures. > >-.if !defined(_PHPMKINCLUDED) >+.if !defined(_INCLUDE_USES_PHP_MK) > > PHP_Include_MAINTAINER= ale@FreeBSD.org > >-_PHPMKINCLUDED= yes >+_INCLUDE_USES_PHP_MK= yes > > .include "${PORTSDIR}/Mk/bsd.default-versions.mk" > >-.if defined(DEFAULT_PHP_VER) >+. if defined(DEFAULT_PHP_VER) > WARNING+= "DEFAULT_PHP_VER is defined, consider using DEFAULT_VERSIONS=php=${DEFAULT_PHP_VER} instead" >-.endif >+. endif > > PHPBASE?= ${LOCALBASE} >-.if exists(${PHPBASE}/etc/php.conf) >+. if exists(${PHPBASE}/etc/php.conf) > .include "${PHPBASE}/etc/php.conf" >+. if !defined(PHP_EXT_DIR) > PHP_EXT_DIR!= ${PHPBASE}/bin/php-config --extension-dir | ${SED} -ne 's,^${PHPBASE}/lib/php/\(.*\),\1,p' >- >-.else >+. endif >+. else > DEFAULT_PHP_VER?= ${PHP_DEFAULT:S/.//} > > # When adding a version, please keep the comment in > # Mk/bsd.default-versions.mk in sync. > PHP_VER?= ${DEFAULT_PHP_VER} >-.if ${PHP_VER} == 70 >+. if ${PHP_VER} == 70 > PHP_EXT_DIR= 20151012 > PHP_EXT_INC= pcre spl >-.elif ${PHP_VER} == 56 >+. elif ${PHP_VER} == 56 > PHP_EXT_DIR= 20131226 > PHP_EXT_INC= pcre spl >-.elif ${PHP_VER} == 55 >+. elif ${PHP_VER} == 55 > PHP_EXT_DIR= 20121212 > PHP_EXT_INC= pcre spl >-.else >+. else > # (rene) default to DEFAULT_VERSIONS > PHP_EXT_DIR= 20131226 > PHP_EXT_INC= pcre spl >-.endif >+. endif > > HTTPD?= ${LOCALBASE}/sbin/httpd >-.if exists(${HTTPD}) >+. if exists(${HTTPD}) > APACHE_THR!= ${HTTPD} -V | ${GREP} threaded >-. if ${APACHE_THR:Myes} >+. if ${APACHE_THR:Myes} > PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts >-. endif >-.elif defined(APACHE_PORT) && (${APACHE_PORT:M*worker*} != "" || ${APACHE_PORT:M*event*} != "") >+. endif >+. elif defined(APACHE_PORT) && (${APACHE_PORT:M*worker*} != "" || ${APACHE_PORT:M*event*} != "") > PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts >-.elif defined(WITH_MPM) && (${WITH_MPM} == "worker" || ${WITH_MPM} == "event") >+. elif defined(WITH_MPM) && (${WITH_MPM} == "worker" || ${WITH_MPM} == "event") > PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts >-.endif >+. endif > >-.if defined(WITH_DEBUG) >+. if defined(WITH_DEBUG) > PHP_EXT_DIR:= ${PHP_EXT_DIR}-debug >-.endif >+. endif > PHP_SAPI?= "" >-.endif # .if exists(${PHPBASE}/etc/php.conf) >+. endif # .if exists(${PHPBASE}/etc/php.conf) > PHP_EXT_INC?= "" > >-.if defined(IGNORE_WITH_PHP) >-. for VER in ${IGNORE_WITH_PHP} >-. if ${PHP_VER} == "${VER}" >+. if defined(IGNORE_WITH_PHP) >+. for VER in ${IGNORE_WITH_PHP} >+. if ${PHP_VER} == "${VER}" > IGNORE= cannot be installed: doesn't work with lang/php${PHP_VER} port\ > (doesn't support PHP ${IGNORE_WITH_PHP:C/^5/5./}) >-. endif >-. endfor >-.endif >+. endif >+. endfor >+. endif > >-.if defined(WANT_PHP_WEB) >-. if defined(WANT_PHP_CGI) || defined(WANT_PHP_MOD) >+. 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} >-. endif >-.endif >+. endif >+. endif > >-.if defined(WANT_PHP_CGI) >-. if defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == "" && ${PHP_SAPI:Mfpm} == "" >+. if defined(WANT_PHP_CGI) >+. if defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == "" && ${PHP_SAPI:Mfpm} == "" > check-makevars:: > @${ECHO_CMD} "This port requires the CGI version of PHP, but you have already" > @${ECHO_CMD} "installed a PHP port without CGI." > @${FALSE} >-. endif >-.endif >+. endif >+. endif > >-.if defined(WANT_PHP_CLI) >-. if defined(PHP_VERSION) && ${PHP_SAPI:Mcli} == "" >+. if defined(WANT_PHP_CLI) >+. if defined(PHP_VERSION) && ${PHP_SAPI:Mcli} == "" > check-makevars:: > @${ECHO_CMD} "This port requires the CLI version of PHP, but you have already" > @${ECHO_CMD} "installed a PHP port without CLI." > @${FALSE} >-. endif >-.endif >+. endif >+. endif > >-.if defined(WANT_PHP_EMB) >-. if defined(PHP_VERSION) && ${PHP_SAPI:Membed} == "" >+. if defined(WANT_PHP_EMB) >+. if defined(PHP_VERSION) && ${PHP_SAPI:Membed} == "" > check-makevars:: > @${ECHO_CMD} "This port requires the embedded library version of PHP, but you have already" > @${ECHO_CMD} "installed a PHP port without the embedded library." > @${FALSE} >-. endif >-.endif >+. endif >+. endif > > PHP_PORT?= lang/php${PHP_VER} > MOD_PHP_PORT?= www/mod_php${PHP_VER} > >-.if defined(USE_PHP_BUILD) >+. if defined(USE_PHP_BUILD) > BUILD_DEPENDS+= ${PHPBASE}/include/php/main/php.h:${PHP_PORT} >-.endif >+. endif > RUN_DEPENDS+= ${PHPBASE}/include/php/main/php.h:${PHP_PORT} >-.if defined(WANT_PHP_MOD) || (defined(WANT_PHP_WEB) && defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == "" && ${PHP_SAPI:Mfpm} == "") >+. if defined(WANT_PHP_MOD) || (defined(WANT_PHP_WEB) && defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == "" && ${PHP_SAPI:Mfpm} == "") > USE_APACHE_RUN= 22+ > .include "${PORTSDIR}/Mk/bsd.apache.mk" > RUN_DEPENDS+= ${PHPBASE}/${APACHEMODDIR}/libphp5.so:${MOD_PHP_PORT} >-.endif >+. endif > > PLIST_SUB+= PHP_EXT_DIR=${PHP_EXT_DIR} > SUB_LIST+= PHP_EXT_DIR=${PHP_EXT_DIR} > >-.if defined(USE_PHPIZE) || defined(USE_PHPEXT) || defined(USE_ZENDEXT) >+. if defined(USE_PHPIZE) || defined(USE_PHPEXT) || defined(USE_ZENDEXT) > BUILD_DEPENDS+= ${PHPBASE}/bin/phpize:${PHP_PORT} > GNU_CONFIGURE= yes > USE_AUTOTOOLS+= autoconf:env >@@ -166,11 +163,16 @@ phpize-message: > > do-phpize: > @(cd ${WRKSRC}; ${SETENV} ${SCRIPTS_ENV} ${PHPBASE}/bin/phpize) >-.endif >+. endif > >+_USES_POST+=php > .endif > >-.if defined(_POSTMKINCLUDED) && (defined(USE_PHPEXT) || defined(USE_ZENDEXT)) >+.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_PHP_POST_MK) >+ >+_INCLUDE_USES_PHP_POST_MK=yes >+ >+. if (defined(USE_PHPEXT) || defined(USE_ZENDEXT)) > PHP_MODNAME?= ${PORTNAME} > PHP_HEADER_DIRS?= "" > >@@ -178,11 +180,11 @@ do-install: > @${MKDIR} ${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR} > @${INSTALL_LIB} ${WRKSRC}/modules/${PHP_MODNAME}.so \ > ${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR} >-. for header in . ${PHP_HEADER_DIRS} >+. for header in . ${PHP_HEADER_DIRS} > @${MKDIR} ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/${header} > @${INSTALL_DATA} ${WRKSRC}/${header}/*.h \ > ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/${header} >-. endfor >+. endfor > @${RM} -f ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h > @${GREP} "#define \(COMPILE\|HAVE\|USE\)_" ${WRKSRC}/config.h \ > > ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h >@@ -204,22 +206,22 @@ add-plist-phpext: > >> ${TMPPLIST} > @${ECHO_CMD} "@dir etc/php" \ > >> ${TMPPLIST} >-.if defined(USE_ZENDEXT) >+. if defined(USE_ZENDEXT) > @${ECHO_CMD} "@exec echo zend_extension=%D/lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so >> %D/etc/php/extensions.ini" \ > >> ${TMPPLIST} >-.else >+. else > @${ECHO_CMD} "@exec echo extension=${PHP_MODNAME}.so >> %D/etc/php/extensions.ini" \ > >> ${TMPPLIST} >-.endif >+. endif > @${ECHO_CMD} "@unexec cp %D/etc/php/extensions.ini %D/etc/php/extensions.ini.orig" \ > >> ${TMPPLIST} >-.if defined(USE_ZENDEXT) >+. if defined(USE_ZENDEXT) > @${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 >+. else > @${ECHO_CMD} "@unexec grep -v extension=${PHP_MODNAME}\\\.so %D/etc/php/extensions.ini.orig > %D/etc/php/extensions.ini || true" \ > >> ${TMPPLIST} >-.endif >+. 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" \ >@@ -233,17 +235,17 @@ 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} "" >-.if defined(USE_ZENDEXT) >+. if defined(USE_ZENDEXT) > @${ECHO_CMD} "zend_extension=${PREFIX}/lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so" >-.else >+. else > @${ECHO_CMD} "extension=${PHP_MODNAME}.so" >-.endif >+. endif > @${ECHO_CMD} "" > @${ECHO_CMD} "****************************************************************************" >-.endif >+. endif > > # Extensions >-.if defined(_POSTMKINCLUDED) && ${USE_PHP:tl} != "yes" >+. if ${USE_PHP:tl} != "yes" > # non-version specific components > _USE_PHP_ALL= apc bcmath bitset bz2 calendar ctype curl dba dom \ > exif fileinfo filter ftp gd gettext gmp \ >@@ -261,11 +263,11 @@ _USE_PHP_VER70= ${_USE_PHP_ALL} > > apc_DEPENDS= www/pecl-APC > bcmath_DEPENDS= math/php${PHP_VER}-bcmath >-.if ${PHP_VER} == 70 >+. if ${PHP_VER} == 70 > bitset_DEPENDS= math/pecl-bitset >-.else >+. else > bitset_DEPENDS= math/pecl-bitset2 >-.endif >+. endif > bz2_DEPENDS= archivers/php${PHP_VER}-bz2 > calendar_DEPENDS= misc/php${PHP_VER}-calendar > ctype_DEPENDS= textproc/php${PHP_VER}-ctype >@@ -285,11 +287,11 @@ iconv_DEPENDS= converters/php${PHP_VER}-iconv > igbinary_DEPENDS= converters/pecl-igbinary > imap_DEPENDS= mail/php${PHP_VER}-imap > interbase_DEPENDS= databases/php${PHP_VER}-interbase >-.if ${PHP_VER} == 70 >+. if ${PHP_VER} == 70 > intl_DEPENDS= devel/php${PHP_VER}-intl >-.else >+. else > intl_DEPENDS= devel/pecl-intl >-.endif >+. endif > json_DEPENDS= devel/php${PHP_VER}-json > ldap_DEPENDS= net/php${PHP_VER}-ldap > mbstring_DEPENDS= converters/php${PHP_VER}-mbstring >@@ -344,26 +346,27 @@ xsl_DEPENDS= textproc/php${PHP_VER}-xsl > zip_DEPENDS= archivers/php${PHP_VER}-zip > zlib_DEPENDS= archivers/php${PHP_VER}-zlib > >-. for extension in ${USE_PHP} >-. if ${_USE_PHP_VER${PHP_VER}:M${extension}} != "" >-. if ${PHP_EXT_INC:M${extension}} == "" >-. if defined(USE_PHP_BUILD) >+. for extension in ${USE_PHP} >+. if ${_USE_PHP_VER${PHP_VER}:M${extension}} != "" >+. if ${PHP_EXT_INC:M${extension}} == "" >+. if defined(USE_PHP_BUILD) > BUILD_DEPENDS+= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/${extension}.so:${${extension}_DEPENDS} >-. endif >+. endif > RUN_DEPENDS+= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/${extension}.so:${${extension}_DEPENDS} >-. endif >-. else >+. endif >+. else > ext= ${extension} >-. if ${ext} == "mhash" >-. if defined(USE_PHP_BUILD) >+. if ${ext} == "mhash" >+. if defined(USE_PHP_BUILD) > BUILD_DEPENDS+= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/hash.so:${hash_DEPENDS} >-. endif >+. endif > RUN_DEPENDS+= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/hash.so:${hash_DEPENDS} >-. elif ${ext:tl} != "yes" >+. elif ${ext:tl} != "yes" > check-makevars:: > @${ECHO_CMD} "Unknown extension ${extension} for PHP ${PHP_VER}." > @${FALSE} >-. endif >-. endif >-. endfor >+. endif >+. endif >+. endfor >+. endif > .endif >diff --git Mk/bsd.port.mk Mk/bsd.port.mk >index 0f08760..3f6871b 100644 >--- Mk/bsd.port.mk >+++ Mk/bsd.port.mk >@@ -1359,8 +1359,9 @@ PKGCOMPATDIR?= ${LOCALBASE}/lib/compat/pkg > .include "${PORTSDIR}/Mk/bsd.emacs.mk" > .endif > >-.if defined(USE_PHP) >-.include "${PORTSDIR}/Mk/bsd.php.mk" >+.if defined(USE_PHP) && !${USES:Mphp} >+DEV_WARNING+= "Using USE_PHP alone is deprecated, please use USES=php" >+USES+= php > .endif > > .if defined(USE_FPC) || defined(WANT_FPC_BASE) || defined(WANT_FPC_ALL) >@@ -1919,8 +1920,9 @@ _FORCE_POST_PATTERNS= rmdir kldxref mkfontscale mkfontdir fc-cache \ > .include "${PORTSDIR}/Mk/bsd.sdl.mk" > .endif > >-.if defined(USE_PHP) >-.include "${PORTSDIR}/Mk/bsd.php.mk" >+.if defined(USE_PHP) && !${USES:Mphp} >+DEV_WARNING+= "Using USE_PHP alone is deprecated, please use USES=php" >+_USES_POST+= php > .endif > > .if defined(USE_WX) || defined(USE_WX_NOT) >diff --git lang/php55/Makefile lang/php55/Makefile >index 1f23b4f..3a6d922 100644 >--- lang/php55/Makefile >+++ lang/php55/Makefile >@@ -185,6 +185,8 @@ post-build: > @${ECHO_CMD} "PHP_VERSION=${PORTVERSION}" >> ${WRKDIR}/php.conf > @${ECHO_CMD} "PHP_SAPI=${PHP_SAPI}" >> ${WRKDIR}/php.conf > @${ECHO_CMD} "PHP_EXT_INC=pcre spl" >> ${WRKDIR}/php.conf >+ @${ECHO_CMD} -n "PHP_EXT_DIR=" >> ${WRKDIR}/php.conf >+ @${SH} ${WRKSRC}/scripts/php-config --extension-dir | sed -ne 's,^${PREFIX}/lib/php/,,p' >> ${WRKDIR}/php.conf > > test: build > @(cd ${WRKSRC} && ${MAKE} test) >diff --git lang/php56/Makefile lang/php56/Makefile >index dce1658..41705c1 100644 >--- lang/php56/Makefile >+++ lang/php56/Makefile >@@ -188,6 +188,8 @@ post-build: > @${ECHO_CMD} "PHP_VERSION=${PORTVERSION}" >> ${WRKDIR}/php.conf > @${ECHO_CMD} "PHP_SAPI=${PHP_SAPI}" >> ${WRKDIR}/php.conf > @${ECHO_CMD} "PHP_EXT_INC=pcre spl" >> ${WRKDIR}/php.conf >+ @${ECHO_CMD} -n "PHP_EXT_DIR=" >> ${WRKDIR}/php.conf >+ @${SH} ${WRKSRC}/scripts/php-config --extension-dir | sed -ne 's,^${PREFIX}/lib/php/,,p' >> ${WRKDIR}/php.conf > > test: build > @(cd ${WRKSRC} && ${MAKE} test) >diff --git lang/php70/Makefile lang/php70/Makefile >index 5b2684c..f0c01f8 100644 >--- lang/php70/Makefile >+++ lang/php70/Makefile >@@ -169,19 +169,21 @@ post-patch: > ${WRKSRC}/sapi/fpm/php-fpm.conf.in > .endif > >+# Work around issues with newer (>=2.64) autoconf > pre-configure: > @${REINPLACE_CMD} -E 's:^((m4_)?divert)[(]([0-9]*)[)]:\1(600\3):' \ > ${WRKSRC}/configure.in `${FIND} ${WRKSRC} -name '*.m4'` > @${RM} ${WRKSRC}/configure > @${CAT} ${WRKSRC}/acinclude.m4 ${WRKSRC}/build/libtool.m4 > ${WRKSRC}/aclocal.m4 > >- > .if !defined(PKGNAMEPREFIX) > post-build: > @${ECHO_CMD} "PHP_VER=70" > ${WRKDIR}/php.conf > @${ECHO_CMD} "PHP_VERSION=${PORTVERSION}" >> ${WRKDIR}/php.conf > @${ECHO_CMD} "PHP_SAPI=${PHP_SAPI}" >> ${WRKDIR}/php.conf > @${ECHO_CMD} "PHP_EXT_INC=pcre spl" >> ${WRKDIR}/php.conf >+ @${ECHO_CMD} -n "PHP_EXT_DIR=" >> ${WRKDIR}/php.conf >+ @${SH} ${WRKSRC}/scripts/php-config --extension-dir | sed -ne 's,^${PREFIX}/lib/php/,,p' >> ${WRKDIR}/php.conf > > test: build > @(cd ${WRKSRC} && ${MAKE} test)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 210323
:
171486
|
171674
|
171675
|
171676
|
171677