Add hooks for a standalone php3 slave port.

This commit is contained in:
Dirk Froemberg 2001-03-04 18:27:57 +00:00
parent f1edca2736
commit 2a530cacec
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=39048
5 changed files with 46 additions and 13 deletions

View File

@ -5,9 +5,9 @@
# $FreeBSD$
#
PORTNAME= mod_php3
PORTNAME?= mod_php3
PORTVERSION= 3.0.18
CATEGORIES= www
CATEGORIES?= www
MASTER_SITES= ftp://ftp.php.net/pub/${PHP_DISTDIR}/ \
http://us.php.net/${PHP_DISTDIR}/ \
http://php.he.net/${PHP_DISTDIR}/ \
@ -22,23 +22,35 @@ 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/php3
GNU_CONFIGURE= 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
SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \
TOUCH="${TOUCH}" \
MKDIR="${MKDIR}"
MKDIR="${MKDIR}" \
CAT="${CAT}" \
REALCURDIR="${.CURDIR}"
AP_LIBEXEC= ${PREFIX}/libexec/apache
@ -50,9 +62,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}/php3.ini-dist ${PREFIX}/etc
.else
@${MKDIR} ${PREFIX}/etc/php.standalone
@${INSTALL_DATA} ${WRKSRC}/php3.ini-dist ${PREFIX}/etc/php.standalone
.endif
.if !defined(NOPORTDOCS)
@${MKDIR} ${PHPDOCDIR}
@ -60,6 +77,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.php3 is part of your DirectoryIndex."
@ -72,6 +91,7 @@ post-install:
@${ECHO} "AddType application/x-httpd-php3-source .php3s"
@${ECHO} "[...]"
@${ECHO} "*****************************************************************************"
.endif
post-clean:
@${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc

View File

@ -1,5 +1,5 @@
--- configure.orig Fri Oct 20 21:05:17 2000
+++ configure Wed Jan 31 01:00:13 2001
+++ configure Mon Feb 26 13:09:58 2001
@@ -1626,7 +1626,7 @@
;;
*)
@ -9,6 +9,15 @@
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
@@ -4634,7 +4634,7 @@
echo "$ac_t""no" 1>&6
BINNAME=php
- INSTALL_IT="cp $BINNAME \$(bindir)"
+ INSTALL_IT="cp $BINNAME \$(bindir)/php3"
fi
@@ -5157,8 +5157,8 @@
fi
if test "$withval" != "no" && test "$withval" != "yes"; then

View File

@ -0,0 +1 @@
PHP3 commandline interpreter

View File

@ -0,0 +1,3 @@
bin/php3
etc/php.standalone/php3.ini-dist
@unexec rmdir %D/etc/php.standalone 2>/dev/null || true

View File

@ -1,7 +1,7 @@
#!/bin/sh
# $FreeBSD$
if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then
if [ -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc ]; then
exit
fi
@ -49,8 +49,8 @@ YP "YP/NIS 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
@ -110,7 +110,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
@ -120,7 +120,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
@ -158,7 +158,7 @@ while [ "$1" ]; do
;;
*)
echo "Invalid option(s): $*" > /dev/stderr
rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc
exit 1
;;
esac
@ -166,5 +166,5 @@ while [ "$1" ]; do
done
if [ "${LIBS}" ]; then
echo "CONFIGURE_ENV+= LIBS='${LIBS}'"
echo "CONFIGURE_ENV+= LIBS='${LIBS}'"
fi