summaryrefslogtreecommitdiff
path: root/www/mod_php5
diff options
context:
space:
mode:
authorDirk Froemberg <dirk@FreeBSD.org>2002-05-01 10:56:02 +0000
committerDirk Froemberg <dirk@FreeBSD.org>2002-05-01 10:56:02 +0000
commitb39a88a3f73baabce030008927d39002ddd9d25f (patch)
tree1f5f19140481fce4ab661c7a88d5a00b6fe59050 /www/mod_php5
parent${ECHO} -> ${ECHO_CMD} (diff)
Add hook for building mod_php4 as an apache2 module (WITH_APACHE2).
Notes
Notes: svn path=/head/; revision=58407
Diffstat (limited to 'www/mod_php5')
-rw-r--r--www/mod_php5/Makefile21
-rw-r--r--www/mod_php5/pkg-plist2
2 files changed, 20 insertions, 3 deletions
diff --git a/www/mod_php5/Makefile b/www/mod_php5/Makefile
index 74c53305a22b..25f07b0ceed1 100644
--- a/www/mod_php5/Makefile
+++ b/www/mod_php5/Makefile
@@ -23,9 +23,15 @@ DISTNAME= php-${PORTVERSION}
MAINTAINER= dirk@FreeBSD.org
.if !defined(STANDALONE)
+.if defined(WITH_APACHE2)
+BUILD_DEPENDS= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache2
+RUN_DEPENDS= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache2
+LIB_DEPENDS= pth.14:${PORTSDIR}/devel/pth
+.else
BUILD_DEPENDS= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache13
RUN_DEPENDS= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache13
.endif
+.endif
PHP_DISTDIR= distributions
@@ -46,8 +52,15 @@ CONFIGURE_ARGS= --with-config-file-path=${PREFIX}/etc/php.standalone \
MAKE_ENV= STANDALONE="${STANDALONE}"
.else
-CONFIGURE_ARGS= --with-apxs=${PREFIX}/sbin/apxs \
- --with-config-file-path=${PREFIX}/etc
+.if defined(WITH_APACHE2)
+CONFIGURE_ARGS= --with-apxs2=${PREFIX}/sbin/apxs \
+ --with-tsrm-pth
+PLIST_SUB= MOD_DIR=libexec/apache2
+.else
+CONFIGURE_ARGS= --with-apxs=${PREFIX}/sbin/apxs
+.endif
+CONFIGURE_ARGS+=--with-config-file-path=${PREFIX}/etc
+PLIST_SUB= MOD_DIR=libexec/apache
.endif
CONFIGURE_ARGS+=--enable-versioning \
@@ -70,6 +83,10 @@ PLIST_SUB= AP_LIBEXEC=${AP_LIBEXEC:S/^${PREFIX}\///}
pre-fetch:
@${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.php
+.if !defined(STANDALONE) && !defined(WITH_APACHE2)
+ @${ECHO_CMD} "Define WITH_APACHE2 to build mod_php4 as an apache2 module."
+ @${ECHO_CMD} ""
+.endif
post-install:
.if !defined(STANDALONE)
diff --git a/www/mod_php5/pkg-plist b/www/mod_php5/pkg-plist
index 194f12a3dc55..f0b897bbdbf1 100644
--- a/www/mod_php5/pkg-plist
+++ b/www/mod_php5/pkg-plist
@@ -239,7 +239,7 @@ lib/php/build/rules.mk
lib/php/build/rules_common.mk
lib/php/build/rules_pear.mk
lib/php/build/shtool
-libexec/apache/libphp4.so
+%%MOD_DIR%%/libphp4.so
@exec %D/sbin/apxs -e -a -n php4 %f
@unexec %D/sbin/apxs -e -A -n php4 %f
@dirrm include/php/TSRM