diff options
author | dirk <dirk@FreeBSD.org> | 2001-03-05 02:27:57 +0800 |
---|---|---|
committer | dirk <dirk@FreeBSD.org> | 2001-03-05 02:27:57 +0800 |
commit | 00b6f48f525b28ad0c983c1e99ab50d59e984a9d (patch) | |
tree | 49d10c639731429a26a1a377966d2f1646402ae5 | |
parent | 629b20c24ac35ea132b50e9c8dcf740c7fac06f6 (diff) | |
download | freebsd-ports-graphics-00b6f48f525b28ad0c983c1e99ab50d59e984a9d.tar.gz freebsd-ports-graphics-00b6f48f525b28ad0c983c1e99ab50d59e984a9d.tar.zst freebsd-ports-graphics-00b6f48f525b28ad0c983c1e99ab50d59e984a9d.zip |
Add hooks for a standalone php3 slave port.
-rw-r--r-- | www/mod_php3/Makefile | 30 | ||||
-rw-r--r-- | www/mod_php3/files/patch-aq | 11 | ||||
-rw-r--r-- | www/mod_php3/pkg-comment.standalone | 1 | ||||
-rw-r--r-- | www/mod_php3/pkg-plist.standalone | 3 | ||||
-rw-r--r-- | www/mod_php3/scripts/configure.php | 14 |
5 files changed, 46 insertions, 13 deletions
diff --git a/www/mod_php3/Makefile b/www/mod_php3/Makefile index 731c13d41ab..51375fc6d36 100644 --- a/www/mod_php3/Makefile +++ b/www/mod_php3/Makefile @@ -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 diff --git a/www/mod_php3/files/patch-aq b/www/mod_php3/files/patch-aq index 6bd84e9ca6f..3c155a0847d 100644 --- a/www/mod_php3/files/patch-aq +++ b/www/mod_php3/files/patch-aq @@ -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 diff --git a/www/mod_php3/pkg-comment.standalone b/www/mod_php3/pkg-comment.standalone new file mode 100644 index 00000000000..7a6bc18966f --- /dev/null +++ b/www/mod_php3/pkg-comment.standalone @@ -0,0 +1 @@ +PHP3 commandline interpreter diff --git a/www/mod_php3/pkg-plist.standalone b/www/mod_php3/pkg-plist.standalone new file mode 100644 index 00000000000..051d2ac5d3b --- /dev/null +++ b/www/mod_php3/pkg-plist.standalone @@ -0,0 +1,3 @@ +bin/php3 +etc/php.standalone/php3.ini-dist +@unexec rmdir %D/etc/php.standalone 2>/dev/null || true diff --git a/www/mod_php3/scripts/configure.php b/www/mod_php3/scripts/configure.php index c9c1aa0f0b1..cc5ee2ae22a 100644 --- a/www/mod_php3/scripts/configure.php +++ b/www/mod_php3/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 @@ -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 |