1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-22 08:58:47 +00:00

Add hooks for a standalone php4 slave port.

Based upon work by:	Alastair D'Silva <deece@familyhealth.com.au>
This commit is contained in:
Dirk Froemberg 2001-02-25 21:22:04 +00:00
parent ac6018bd20
commit 24c9b53080
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=38709
8 changed files with 68 additions and 22 deletions

View File

@ -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

View File

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

View File

@ -0,0 +1,3 @@
bin/php
etc/php.standalone/php.ini-dist
@dirrm etc/php.standalone

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
@ -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

View File

@ -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

View File

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

View File

@ -0,0 +1,3 @@
bin/php
etc/php.standalone/php.ini-dist
@dirrm etc/php.standalone

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
@ -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