Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Mar 2014 16:09:37 +0000 (UTC)
From:      Alex Dupre <ale@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r349342 - in head: . Mk lang/php5 lang/php5-extensions lang/php55 lang/php55-extensions www www/mod_php5 www/mod_php55
Message-ID:  <201403271609.s2RG9b12057277@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ale
Date: Thu Mar 27 16:09:37 2014
New Revision: 349342
URL: http://svnweb.freebsd.org/changeset/ports/349342
QAT: https://qat.redports.org/buildarchive/r349342/

Log:
  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

Added:
  head/lang/php5/pkg-plist.mod   (contents, props changed)
  head/lang/php55/pkg-plist.mod   (contents, props changed)
  head/www/mod_php5/
  head/www/mod_php5/Makefile   (contents, props changed)
  head/www/mod_php55/
  head/www/mod_php55/Makefile   (contents, props changed)
Modified:
  head/Mk/bsd.php.mk
  head/UPDATING
  head/lang/php5-extensions/Makefile
  head/lang/php5/Makefile
  head/lang/php5/pkg-plist
  head/lang/php55-extensions/Makefile
  head/lang/php55/Makefile
  head/lang/php55/pkg-plist
  head/www/Makefile

Modified: head/Mk/bsd.php.mk
==============================================================================
--- head/Mk/bsd.php.mk	Thu Mar 27 15:31:46 2014	(r349341)
+++ head/Mk/bsd.php.mk	Thu Mar 27 16:09:37 2014	(r349342)
@@ -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}

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Thu Mar 27 15:31:46 2014	(r349341)
+++ head/UPDATING	Thu Mar 27 16:09:37 2014	(r349342)
@@ -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

Modified: head/lang/php5-extensions/Makefile
==============================================================================
--- head/lang/php5-extensions/Makefile	Thu Mar 27 15:31:46 2014	(r349341)
+++ head/lang/php5-extensions/Makefile	Thu Mar 27 16:09:37 2014	(r349342)
@@ -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

Modified: head/lang/php5/Makefile
==============================================================================
--- head/lang/php5/Makefile	Thu Mar 27 15:31:46 2014	(r349341)
+++ head/lang/php5/Makefile	Thu Mar 27 16:09:37 2014	(r349342)
@@ -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=${APX
 .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"

Modified: head/lang/php5/pkg-plist
==============================================================================
--- head/lang/php5/pkg-plist	Thu Mar 27 15:31:46 2014	(r349341)
+++ head/lang/php5/pkg-plist	Thu Mar 27 16:09:37 2014	(r349342)
@@ -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

Added: head/lang/php5/pkg-plist.mod
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/php5/pkg-plist.mod	Thu Mar 27 16:09:37 2014	(r349342)
@@ -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

Modified: head/lang/php55-extensions/Makefile
==============================================================================
--- head/lang/php55-extensions/Makefile	Thu Mar 27 15:31:46 2014	(r349341)
+++ head/lang/php55-extensions/Makefile	Thu Mar 27 16:09:37 2014	(r349342)
@@ -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

Modified: head/lang/php55/Makefile
==============================================================================
--- head/lang/php55/Makefile	Thu Mar 27 15:31:46 2014	(r349341)
+++ head/lang/php55/Makefile	Thu Mar 27 16:09:37 2014	(r349342)
@@ -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=${APX
 .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"

Modified: head/lang/php55/pkg-plist
==============================================================================
--- head/lang/php55/pkg-plist	Thu Mar 27 15:31:46 2014	(r349341)
+++ head/lang/php55/pkg-plist	Thu Mar 27 16:09:37 2014	(r349342)
@@ -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

Added: head/lang/php55/pkg-plist.mod
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/php55/pkg-plist.mod	Thu Mar 27 16:09:37 2014	(r349342)
@@ -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

Modified: head/www/Makefile
==============================================================================
--- head/www/Makefile	Thu Mar 27 15:31:46 2014	(r349341)
+++ head/www/Makefile	Thu Mar 27 16:09:37 2014	(r349342)
@@ -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

Added: head/www/mod_php5/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/mod_php5/Makefile	Thu Mar 27 16:09:37 2014	(r349342)
@@ -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"

Added: head/www/mod_php55/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/mod_php55/Makefile	Thu Mar 27 16:09:37 2014	(r349342)
@@ -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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403271609.s2RG9b12057277>