Welcome the new mod_php ports, in order to have default packages for
Apache PHP modules. Submitted by: marcus Reworked by: ale (me) Requested by: many, too many
This commit is contained in:
parent
75779ff8c6
commit
a4cffdad1a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=349342
13 changed files with 93 additions and 36 deletions
|
@ -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}
|
||||
|
|
7
UPDATING
7
UPDATING
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
3
lang/php5/pkg-plist.mod
Normal file
3
lang/php5/pkg-plist.mod
Normal file
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
3
lang/php55/pkg-plist.mod
Normal file
3
lang/php55/pkg-plist.mod
Normal file
|
@ -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
|
|
@ -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
|
||||
|
|
15
www/mod_php5/Makefile
Normal file
15
www/mod_php5/Makefile
Normal file
|
@ -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"
|
15
www/mod_php55/Makefile
Normal file
15
www/mod_php55/Makefile
Normal file
|
@ -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"
|
Loading…
Reference in a new issue