summaryrefslogtreecommitdiffstats
path: root/www/mod_php5
diff options
context:
space:
mode:
authordirk <dirk@FreeBSD.org>2001-02-25 21:22:04 +0000
committerdirk <dirk@FreeBSD.org>2001-02-25 21:22:04 +0000
commit31bc3cfe03cf03b3445fe9acce200e5694c275f3 (patch)
treeced06b221524d817cca52fb8a7421b6483d776c7 /www/mod_php5
parent41ab0107e7cbba91dcbd28c446c308b8386960c3 (diff)
downloadFreeBSD-ports-31bc3cfe03cf03b3445fe9acce200e5694c275f3.zip
FreeBSD-ports-31bc3cfe03cf03b3445fe9acce200e5694c275f3.tar.gz
Add hooks for a standalone php4 slave port.
Based upon work by: Alastair D'Silva <deece@familyhealth.com.au>
Diffstat (limited to 'www/mod_php5')
-rw-r--r--www/mod_php5/Makefile29
-rw-r--r--www/mod_php5/pkg-comment.standalone1
-rw-r--r--www/mod_php5/pkg-plist.standalone3
-rw-r--r--www/mod_php5/scripts/configure.php12
4 files changed, 34 insertions, 11 deletions
diff --git a/www/mod_php5/Makefile b/www/mod_php5/Makefile
index ed43ee9..376210d 100644
--- a/www/mod_php5/Makefile
+++ b/www/mod_php5/Makefile
@@ -5,9 +5,9 @@
# $FreeBSD$
#
-PORTNAME= mod_php4
+PORTNAME?= mod_php4
PORTVERSION= 4.0.4pl1
-CATEGORIES= www
+CATEGORIES?= www
MASTER_SITES= http://us.php.net/${PHP_DISTDIR}/ \
http://php.he.net/${PHP_DISTDIR}/ \
http://www.php3.de/${PHP_DISTDIR}/ \
@@ -21,16 +21,26 @@ DISTNAME= php-${PORTVERSION}
MAINTAINER= dirk@FreeBSD.org
+.if !defined(STANDALONE)
BUILD_DEPENDS= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache13
RUN_DEPENDS= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache13
+.endif
PHP_DISTDIR= distributions
+SLAVEDIRS= lang/php4
+
USE_LIBTOOL= yes
+
+.if defined(STANDALONE)
+CONFIGURE_ARGS= --with-config-file-path=${PREFIX}/etc/php.standalone
+.else
CONFIGURE_ARGS= --with-apxs=${PREFIX}/sbin/apxs \
- --enable-versioning \
+ --with-config-file-path=${PREFIX}/etc
+.endif
+
+CONFIGURE_ARGS+=--enable-versioning \
--with-system-regex \
- --with-config-file-path=${PREFIX}/etc \
--disable-debug \
--enable-track-vars \
--without-gd \
@@ -40,7 +50,8 @@ CONFIGURE_ARGS= --with-apxs=${PREFIX}/sbin/apxs \
SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \
TOUCH="${TOUCH}" \
MKDIR="${MKDIR}" \
- CAT="${CAT}"
+ CAT="${CAT}" \
+ REALCURDIR="${.CURDIR}"
AP_LIBEXEC= ${PREFIX}/libexec/apache
@@ -52,9 +63,14 @@ pre-fetch:
@${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.php
post-install:
+.if !defined(STANDALONE)
@${ECHO} "Restarting Apache..."
@${PREFIX}/sbin/apachectl restart
@${INSTALL_DATA} ${WRKSRC}/php.ini-dist ${PREFIX}/etc
+.else
+ @${MKDIR} ${PREFIX}/etc/php.standalone
+ @${INSTALL_DATA} ${WRKSRC}/php.ini-dist ${PREFIX}/etc/php.standalone/php.ini-dist
+.endif
.if !defined(NOPORTDOCS)
@${MKDIR} ${PHPDOCDIR}
@@ -62,6 +78,8 @@ post-install:
@${INSTALL_DATA} ${WRKSRC}/$i ${PHPDOCDIR}
.endfor
.endif
+
+.if !defined(STANDALONE)
@${ECHO} "*****************************************************************************"
@${ECHO} "Make sure the mime.types are connected to the php module properly and"
@${ECHO} "index.php is part of your DirectoryIndex."
@@ -74,6 +92,7 @@ post-install:
@${ECHO} "AddType application/x-httpd-php-source .phps"
@${ECHO} "[...]"
@${ECHO} "*****************************************************************************"
+.endif
post-clean:
@${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc
diff --git a/www/mod_php5/pkg-comment.standalone b/www/mod_php5/pkg-comment.standalone
new file mode 100644
index 0000000..7707317
--- /dev/null
+++ b/www/mod_php5/pkg-comment.standalone
@@ -0,0 +1 @@
+PHP4 commandline interpreter
diff --git a/www/mod_php5/pkg-plist.standalone b/www/mod_php5/pkg-plist.standalone
new file mode 100644
index 0000000..7155bb6
--- /dev/null
+++ b/www/mod_php5/pkg-plist.standalone
@@ -0,0 +1,3 @@
+bin/php
+etc/php.standalone/php.ini-dist
+@dirrm etc/php.standalone
diff --git a/www/mod_php5/scripts/configure.php b/www/mod_php5/scripts/configure.php
index 71bfa77..b1a1853 100644
--- a/www/mod_php5/scripts/configure.php
+++ b/www/mod_php5/scripts/configure.php
@@ -1,7 +1,7 @@
#!/bin/sh
# $FreeBSD$
-if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then
+if [ -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc ]; then
exit
fi
@@ -51,8 +51,8 @@ BCMath "BCMath support" OFF \
esac
fi
-${MKDIR} ${WRKDIRPREFIX}${CURDIR}
-exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
+${MKDIR} ${WRKDIRPREFIX}${REALCURDIR}
+exec > ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc
while [ "$1" ]; do
case $1 in
@@ -115,7 +115,7 @@ while [ "$1" ]; do
echo "CONFIGURE_ARGS+=--with-sybase=\${PREFIX}"
if [ "$SYBASECT" ]; then
echo "SybaseDB and SybaseCT are mutually exclusive." > /dev/stderr
- rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
+ rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc
exit 1
fi
SYBASEDB=1
@@ -125,7 +125,7 @@ while [ "$1" ]; do
echo "CONFIGURE_ARGS+=--with-sybase-ct=\${PREFIX}"
if [ "$SYBASEDB" ]; then
echo "SybaseDB and SybaseCT are mutually exclusive." > /dev/stderr
- rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
+ rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc
exit 1
fi
SYBASECT=1
@@ -185,7 +185,7 @@ EOF
;;
*)
echo "Invalid option(s): $*" > /dev/stderr
- rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
+ rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc
exit 1
;;
esac
OpenPOWER on IntegriCloud