diff options
-rw-r--r-- | Mk/bsd.php.mk | 12 | ||||
-rw-r--r-- | UPDATING | 7 | ||||
-rw-r--r-- | lang/php5-extensions/Makefile | 4 | ||||
-rw-r--r-- | lang/php5/Makefile | 31 | ||||
-rw-r--r-- | lang/php5/pkg-plist | 3 | ||||
-rw-r--r-- | lang/php5/pkg-plist.mod | 3 | ||||
-rw-r--r-- | lang/php55-extensions/Makefile | 4 | ||||
-rw-r--r-- | lang/php55/Makefile | 27 | ||||
-rw-r--r-- | lang/php55/pkg-plist | 3 | ||||
-rw-r--r-- | lang/php55/pkg-plist.mod | 3 | ||||
-rw-r--r-- | www/Makefile | 2 | ||||
-rw-r--r-- | www/mod_php5/Makefile | 15 | ||||
-rw-r--r-- | www/mod_php55/Makefile | 15 |
13 files changed, 93 insertions, 36 deletions
diff --git a/Mk/bsd.php.mk b/Mk/bsd.php.mk index bf3e60e13cc4..0ab78b52cd6e 100644 --- a/Mk/bsd.php.mk +++ b/Mk/bsd.php.mk @@ -105,7 +105,7 @@ 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} -. elif defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == "" && ${PHP_SAPI:Mfpm} == "" && ${PHP_SAPI:Mmod} == "" +. elif defined(PHP_VERSION) && ${PHP_VER} == 53 && ${PHP_SAPI:Mcgi} == "" && ${PHP_SAPI:Mfpm} == "" && ${PHP_SAPI:Mmod} == "" check-makevars:: @${ECHO_CMD} "This port requires the Apache Module or the CGI version of PHP, but you have" @${ECHO_CMD} "already installed a PHP port without them." @@ -132,7 +132,7 @@ check-makevars:: .endif .if defined(WANT_PHP_MOD) -. if defined(PHP_VERSION) && ${PHP_SAPI:Mmod} == "" +. if defined(PHP_VERSION) && ${PHP_VER} == 53 && ${PHP_SAPI:Mmod} == "" check-makevars:: @${ECHO_CMD} "This port requires the Apache Module for PHP, but you have already" @${ECHO_CMD} "installed a PHP port without the Apache Module." @@ -150,11 +150,19 @@ check-makevars:: .endif PHP_PORT?= lang/php${PHP_VER} +.if ${PHP_VER} == 53 +MOD_PHP_PORT?= ${PHP_PORT} +.else +MOD_PHP_PORT?= www/mod_php${PHP_VER} +.endif .if defined(USE_PHP_BUILD) BUILD_DEPENDS+= ${PHPBASE}/include/php/main/php.h:${PORTSDIR}/${PHP_PORT} .endif RUN_DEPENDS+= ${PHPBASE}/include/php/main/php.h:${PORTSDIR}/${PHP_PORT} +.if defined(WANT_PHP_MOD) || (defined(WANT_PHP_WEB) && defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == "" && ${PHP_SAPI:Mfpm} == "") +RUN_DEPENDS+= ${PHPBASE}/${APACHEMODDIR}/libphp5.so:${PORTSDIR}/${MOD_PHP_PORT} +.endif PLIST_SUB+= PHP_EXT_DIR=${PHP_EXT_DIR} SUB_LIST+= PHP_EXT_DIR=${PHP_EXT_DIR} @@ -5,6 +5,13 @@ they are unavoidable. You should get into the habit of checking this file for changes each time you update your ports collection, before attempting any port upgrades. +20140327: + AFFECTS: users of lang/php5 and lang/php55 with Apache module + AUTHOR: ale@FreeBSD.org + + The Apache PHP module has been splitted from main PHP port, so if you + are using it you should install one of www/mod_php5 or www/mod_php55. + 20140322: AFFECTS: users of devel/apr1 AUTHOR: ohauer@FreeBSD.org diff --git a/lang/php5-extensions/Makefile b/lang/php5-extensions/Makefile index a33bdf4bb0c5..c9cf3d5fe95f 100644 --- a/lang/php5-extensions/Makefile +++ b/lang/php5-extensions/Makefile @@ -13,8 +13,8 @@ MAINTAINER= ale@FreeBSD.org COMMENT= A "meta-port" to install PHP extensions USE_PHP= yes -DEFAULT_PHP_VER=5 -IGNORE_WITH_PHP=52 53 +DEFAULT_VERSIONS= php=5 +IGNORE_WITH_PHP=53 55 USE_PHP_BUILD= yes NO_BUILD= yes diff --git a/lang/php5/Makefile b/lang/php5/Makefile index 09cac2ced843..70baf14429f1 100644 --- a/lang/php5/Makefile +++ b/lang/php5/Makefile @@ -16,7 +16,7 @@ LICENSE= PHP301 LATEST_LINK= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX} -USE_BZIP2= yes +USES= tar:bzip2 NO_OPTIONS_SORT=yes .if !defined(PKGNAMESUFFIX) USE_AUTOTOOLS= autoconf @@ -36,15 +36,13 @@ CONFIGURE_ARGS+=--with-layout=GNU \ USE_GNOME= libxml2 -OPTIONS_DEFINE= CLI CGI FPM APACHE AP2FILTER EMBED DEBUG DTRACE IPV6 MAILHEAD LINKTHR ZTS +OPTIONS_DEFINE+=CLI CGI FPM EMBED DEBUG DTRACE IPV6 MAILHEAD LINKTHR ZTS OPTIONS_DEFAULT=CLI CGI FPM IPV6 LINKTHR OPTIONS_SUB= yes CLI_DESC= Build CLI version CGI_DESC= Build CGI version FPM_DESC= Build FPM version -APACHE_DESC= Build Apache module -AP2FILTER_DESC= Use Apache 2.x filter interface (experimental) EMBED_DESC= Build embedded library DEBUG_DESC= Enable debug DTRACE_DESC= Enable DTrace support @@ -53,7 +51,7 @@ MAILHEAD_DESC= Enable mail header patch LINKTHR_DESC= Link thread lib (for threaded extensions) ZTS_DESC= Force Zend Thread Safety (ZTS) build -CONFLICTS= php52-5* php53-5* php55-5* +CONFLICTS= php53-5* php55-5* DESTDIRNAME= INSTALL_ROOT @@ -89,12 +87,10 @@ CONFIGURE_ARGS+=--enable-fpm \ --with-fpm-group=${WWWGRP} .endif -.if ${PORT_OPTIONS:MAPACHE} && ${PORT_OPTIONS:MEMBED} -IGNORE= cannot be built with multiple SAPI (apache and embedded) -.endif - -.if ${PORT_OPTIONS:MAPACHE} -PHP_SAPI+= mod +.if defined(PKGNAMEPREFIX) +USE_PHP= yes +DEFAULT_VERSIONS= php=5 +IGNORE_WITH_PHP=53 55 USE_APACHE= 22+ .include "${PORTSDIR}/Mk/bsd.apache.mk" .if ${PORT_OPTIONS:MAP2FILTER} @@ -102,9 +98,11 @@ CONFIGURE_ARGS+=--with-apxs2filter=${APXS} .else CONFIGURE_ARGS+=--with-apxs2=${APXS} .endif +PLIST= ${PKGDIR}/pkg-plist.mod PKGMESSAGE= ${PKGDIR}/pkg-message.mod -MODULENAME= lib${PORTNAME} -SHORTMODNAME= ${PORTNAME} +MODULENAME= libphp5 +SHORTMODNAME= php5 +WARNING= "!!! If you have a threaded Apache, you must build ${PHP_PORT} with ZTS support to enable thread-safety in extensions !!!" .endif .if ${PORT_OPTIONS:MEMBED} @@ -175,6 +173,7 @@ pre-configure: @${RM} ${WRKSRC}/configure @${CAT} ${WRKSRC}/acinclude.m4 ${WRKSRC}/build/libtool.m4 > ${WRKSRC}/aclocal.m4 +.if !defined(PKGNAMEPREFIX) post-build: @${ECHO_CMD} "PHP_VER=5" > ${WRKDIR}/php.conf @${ECHO_CMD} "PHP_VERSION=${PORTVERSION}" >> ${WRKDIR}/php.conf @@ -187,6 +186,12 @@ test: build post-install: @${INSTALL_DATA} ${WRKSRC}/php.ini-development ${WRKSRC}/php.ini-production \ ${WRKDIR}/php.conf ${STAGEDIR}/${PREFIX}/etc +.else +do-install: + ${MKDIR} ${STAGEDIR}${PREFIX}/${APACHEMODDIR} + ${INSTALL_LIB} ${WRKSRC}/libs/${MODULENAME}.so \ + ${STAGEDIR}${PREFIX}/${APACHEMODDIR} +.endif .else .include "${MASTERDIR}/Makefile.ext" diff --git a/lang/php5/pkg-plist b/lang/php5/pkg-plist index aba12e9c2b83..8700b50c17c4 100644 --- a/lang/php5/pkg-plist +++ b/lang/php5/pkg-plist @@ -235,9 +235,6 @@ lib/php/build/phpize.m4 lib/php/build/run-tests.php lib/php/build/scan_makefile_in.awk lib/php/build/shtool -%%APACHE%%%%APACHEMODDIR%%/%%AP_MODULE%% -%%APACHE%%@exec %D/sbin/apxs -e -a -n %%AP_NAME%% %f -%%APACHE%%@unexec %D/sbin/apxs -e -A -n %%AP_NAME%% %f %%CGI%%man/man1/php-cgi.1.gz man/man1/php-config.1.gz %%CLI%%man/man1/php.1.gz diff --git a/lang/php5/pkg-plist.mod b/lang/php5/pkg-plist.mod new file mode 100644 index 000000000000..a12fa984d65f --- /dev/null +++ b/lang/php5/pkg-plist.mod @@ -0,0 +1,3 @@ +%%APACHEMODDIR%%/%%AP_MODULE%% +@exec %D/sbin/apxs -e -a -n %%AP_NAME%% %f +@unexec %D/sbin/apxs -e -A -n %%AP_NAME%% %f diff --git a/lang/php55-extensions/Makefile b/lang/php55-extensions/Makefile index f25736aaf5d9..686032ccca2b 100644 --- a/lang/php55-extensions/Makefile +++ b/lang/php55-extensions/Makefile @@ -13,8 +13,8 @@ MAINTAINER= ale@FreeBSD.org COMMENT= A "meta-port" to install PHP extensions USE_PHP= yes -DEFAULT_PHP_VER=55 -IGNORE_WITH_PHP=52 53 54 5 +DEFAULT_VERSIONS= php=55 +IGNORE_WITH_PHP=53 54 5 USE_PHP_BUILD= yes NO_BUILD= yes diff --git a/lang/php55/Makefile b/lang/php55/Makefile index f70bf89d3633..d2d452775094 100644 --- a/lang/php55/Makefile +++ b/lang/php55/Makefile @@ -16,7 +16,7 @@ LICENSE= PHP301 LATEST_LINK= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX} -USE_BZIP2= yes +USES= tar:bzip2 NO_OPTIONS_SORT=yes .if !defined(PKGNAMESUFFIX) USE_AUTOTOOLS= autoconf @@ -36,15 +36,13 @@ CONFIGURE_ARGS+=--with-layout=GNU \ USE_GNOME= libxml2 -OPTIONS_DEFINE= CLI CGI FPM APACHE AP2FILTER EMBED DEBUG DTRACE IPV6 MAILHEAD LINKTHR ZTS +OPTIONS_DEFINE+=CLI CGI FPM EMBED DEBUG DTRACE IPV6 MAILHEAD LINKTHR ZTS OPTIONS_DEFAULT=CLI CGI FPM IPV6 LINKTHR OPTIONS_SUB= yes CLI_DESC= Build CLI version CGI_DESC= Build CGI version FPM_DESC= Build FPM version -APACHE_DESC= Build Apache module -AP2FILTER_DESC= Use Apache 2.x filter interface (experimental) EMBED_DESC= Build embedded library DEBUG_DESC= Enable debug DTRACE_DESC= Enable DTrace support @@ -53,7 +51,7 @@ MAILHEAD_DESC= Enable mail header patch LINKTHR_DESC= Link thread lib (for threaded extensions) ZTS_DESC= Force Zend Thread Safety (ZTS) build -CONFLICTS= php52-5* php53-5* php54-5* php5-5* +CONFLICTS= php53-5* php54-5* php5-5* DESTDIRNAME= INSTALL_ROOT @@ -89,12 +87,10 @@ CONFIGURE_ARGS+=--enable-fpm \ --with-fpm-group=${WWWGRP} .endif -.if ${PORT_OPTIONS:MAPACHE} && ${PORT_OPTIONS:MEMBED} -IGNORE= cannot be built with multiple SAPI (apache and embedded) -.endif - -.if ${PORT_OPTIONS:MAPACHE} -PHP_SAPI+= mod +.if defined(PKGNAMEPREFIX) +USE_PHP= yes +DEFAULT_VERSIONS= php=55 +IGNORE_WITH_PHP=53 54 5 USE_APACHE= 22+ .include "${PORTSDIR}/Mk/bsd.apache.mk" .if ${PORT_OPTIONS:MAP2FILTER} @@ -102,9 +98,11 @@ CONFIGURE_ARGS+=--with-apxs2filter=${APXS} .else CONFIGURE_ARGS+=--with-apxs2=${APXS} .endif +PLIST= ${PKGDIR}/pkg-plist.mod PKGMESSAGE= ${PKGDIR}/pkg-message.mod MODULENAME= libphp5 SHORTMODNAME= php5 +WARNING= "!!! If you have a threaded Apache, you must build ${PHP_PORT} with ZTS support to enable thread-safety in extensions !!!" .endif .if ${PORT_OPTIONS:MEMBED} @@ -175,6 +173,7 @@ pre-configure: @${RM} ${WRKSRC}/configure @${CAT} ${WRKSRC}/acinclude.m4 ${WRKSRC}/build/libtool.m4 > ${WRKSRC}/aclocal.m4 +.if !defined(PKGNAMEPREFIX) post-build: @${ECHO_CMD} "PHP_VER=55" > ${WRKDIR}/php.conf @${ECHO_CMD} "PHP_VERSION=${PORTVERSION}" >> ${WRKDIR}/php.conf @@ -187,6 +186,12 @@ test: build post-install: @${INSTALL_DATA} ${WRKSRC}/php.ini-development ${WRKSRC}/php.ini-production \ ${WRKDIR}/php.conf ${STAGEDIR}/${PREFIX}/etc +.else +do-install: + ${MKDIR} ${STAGEDIR}${PREFIX}/${APACHEMODDIR} + ${INSTALL_LIB} ${WRKSRC}/libs/${MODULENAME}.so \ + ${STAGEDIR}${PREFIX}/${APACHEMODDIR} +.endif .else .include "${MASTERDIR}/Makefile.ext" diff --git a/lang/php55/pkg-plist b/lang/php55/pkg-plist index 13b2c98e8129..9d426fc2f7f7 100644 --- a/lang/php55/pkg-plist +++ b/lang/php55/pkg-plist @@ -235,9 +235,6 @@ lib/php/build/phpize.m4 lib/php/build/run-tests.php lib/php/build/scan_makefile_in.awk lib/php/build/shtool -%%APACHE%%%%APACHEMODDIR%%/%%AP_MODULE%% -%%APACHE%%@exec %D/sbin/apxs -e -a -n %%AP_NAME%% %f -%%APACHE%%@unexec %D/sbin/apxs -e -A -n %%AP_NAME%% %f %%CGI%%man/man1/php-cgi.1.gz man/man1/php-config.1.gz %%CLI%%man/man1/php.1.gz diff --git a/lang/php55/pkg-plist.mod b/lang/php55/pkg-plist.mod new file mode 100644 index 000000000000..a12fa984d65f --- /dev/null +++ b/lang/php55/pkg-plist.mod @@ -0,0 +1,3 @@ +%%APACHEMODDIR%%/%%AP_MODULE%% +@exec %D/sbin/apxs -e -a -n %%AP_NAME%% %f +@unexec %D/sbin/apxs -e -A -n %%AP_NAME%% %f diff --git a/www/Makefile b/www/Makefile index 600c9eefacb3..bf222f960c20 100644 --- a/www/Makefile +++ b/www/Makefile @@ -512,6 +512,8 @@ SUBDIR += mod_ntlm2 SUBDIR += mod_pagespeed SUBDIR += mod_perl2 + SUBDIR += mod_php5 + SUBDIR += mod_php55 SUBDIR += mod_proctitle SUBDIR += mod_proxy_html SUBDIR += mod_proxy_uwsgi diff --git a/www/mod_php5/Makefile b/www/mod_php5/Makefile new file mode 100644 index 000000000000..9df10828f554 --- /dev/null +++ b/www/mod_php5/Makefile @@ -0,0 +1,15 @@ +# Created by: marcus@FreeBSD.org +# $FreeBSD$ + +PKGNAMEPREFIX= mod_ + +MAINTAINER= ale@FreeBSD.org + +PHP_PORT= lang/php5 +MASTERDIR= ${.CURDIR}/../../${PHP_PORT} + +OPTIONS_DEFINE= AP2FILTER +AP2FILTER_DESC= Use Apache 2.x filter interface (experimental) +OPTIONS_EXCLUDE= CGI CLI FPM EMBED + +.include "${MASTERDIR}/Makefile" diff --git a/www/mod_php55/Makefile b/www/mod_php55/Makefile new file mode 100644 index 000000000000..b7c47f39c4e4 --- /dev/null +++ b/www/mod_php55/Makefile @@ -0,0 +1,15 @@ +# Created by: marcus@FreeBSD.org +# $FreeBSD$ + +PKGNAMEPREFIX= mod_ + +MAINTAINER= ale@FreeBSD.org + +PHP_PORT= lang/php55 +MASTERDIR= ${.CURDIR}/../../${PHP_PORT} + +OPTIONS_DEFINE= AP2FILTER +AP2FILTER_DESC= Use Apache 2.x filter interface (experimental) +OPTIONS_EXCLUDE= CGI CLI FPM EMBED + +.include "${MASTERDIR}/Makefile" |