summaryrefslogtreecommitdiff
path: root/www/mod_php5/Makefile
diff options
context:
space:
mode:
authorAndreas Klemm <andreas@FreeBSD.org>1998-07-25 11:30:31 +0000
committerAndreas Klemm <andreas@FreeBSD.org>1998-07-25 11:30:31 +0000
commita10f39bb7140c064992165627e119dfefad505b1 (patch)
treecdc9638e1707243e71ccce4d488f4a53d74e4f72 /www/mod_php5/Makefile
parent/usr/X11R6/bin/moc KIllustrator.h -o KIllustrator.moc (diff)
added new port apache3-php3 after repository copy
many thanks to the contributors. Submitted by: Dirk Froemberg <ibex@physik.TU-Berlin.DE> and Stefan Herrmann <sh@webaffairs.de>
Notes
Notes: svn path=/head/; revision=12108
Diffstat (limited to 'www/mod_php5/Makefile')
-rw-r--r--www/mod_php5/Makefile134
1 files changed, 79 insertions, 55 deletions
diff --git a/www/mod_php5/Makefile b/www/mod_php5/Makefile
index 09a291150026..43b3ea5dc85b 100644
--- a/www/mod_php5/Makefile
+++ b/www/mod_php5/Makefile
@@ -1,50 +1,75 @@
-# New ports collection makefile for: apache HTTPD / php
-# Version required: 1.2.6 / 3.0
-# Date created: Wed Sep 3 18:28:20 CEST 1997
-# Whom: Andreas Klemm <andreas@klemm.gtn.com>
+# New ports collection makefile for: apache HTTPD / php3
+# Version required: 1.3.0 / 3.0.2
+# Date created: So 21 Jun 1998 16:09:39 CEST
+# Whom: Stefan Herrmann <stefan@asterix.webaffairs.net>
#
-# $Id: Makefile,v 1.47 1998/07/11 20:52:36 andreas Exp $
+# $Id$
#
-DISTNAME= apache_1.2.6
-PKGNAME= apache-1.2.6-php3.0.2
+DISTNAME= apache_1.3.0
+PKGNAME= apache-php3.0.2-1.3.0
CATEGORIES= www
MASTER_SITES= ftp://www.apache.org/apache/dist/ \
- http://ca.php.net/distributions/
-DISTFILES= apache_1.2.6.tar.gz php-3.0.2.tar.gz
+ http://www.php.net/distributions/
+DISTFILES= apache_1.3.0.tar.gz php-3.0.2.tar.gz
-MAINTAINER= andreas@FreeBSD.ORG
+MAINTAINER= stefan@asterix.webaffairs.net
BUILD_DEPENDS= ${PREFIX}/lib/libgd.a:${PORTSDIR}/graphics/gd \
- gmake:${PORTSDIR}/devel/gmake \
- ${PREFIX}/include/freetype.h:${PORTSDIR}/print/freetype
+ perl5:${PORTSDIR}/lang/perl5
NO_PACKAGE= "Support for different databases via make-variable"
-MAN1= htpasswd.1
-MAN8= httpd.8
-DOCDIR= ${PREFIX}/share/doc/apache
+#
+# Set APACHE_PERF_TUNING env. variable to YES to get maximum performance
+#
+
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= \
+ --sysconfdir=${PREFIX}/etc/apache \
+ --includedir=${PREFIX}/include/apache \
+ --logfiledir=/var/log \
+ --runtimedir=/var/run \
+ --datadir=${PREFIX}/www \
+ --proxycachedir=${PREFIX}/www/proxy \
+ --libexecdir=${PREFIX}/libexec/apache \
+ --enable-shared=remain \
+ --enable-module=most \
+ --enable-module=auth_db \
+ --disable-module=auth_dbm \
+ --with-perl=${PREFIX}/bin/perl5 \
+ --activate-module=src/modules/php3/libphp3.a
-.if defined(PATCH_DEBUG)
-PATCH_DIST_ARGS= -d ${WRKSRC}/src -E ${PATCH_DIST_STRIP}
-.else
-PATCH_DIST_ARGS= -d ${WRKSRC}/src --forward --quiet -E ${PATCH_DIST_STRIP}
+OPTIM=-DHARD_SERVER_LIMIT=512 \
+-DDOCUMENT_LOCATION=\\"${PREFIX}/www/data/\\" \
+-DDEFAULT_PATH=\\"/bin:/usr/bin:${PREFIX}/bin\\"
+
+.if defined(APACHE_PERF_TUNING) && ${APACHE_PERF_TUNING} == YES
+CONFIGURE_ARGS+= --disable-rule=STATUS
+OPTIM+= -DBUFFERED_LOGS
+CFLAGS+= -O6 -fomit-frame-pointer -fexpensive-optimizations
.endif
-# Set it for local-supplied patch, f.e.
-VERS_ID = PHP-3.0.2
+CONFIGURE_ENV= OPTIM='${OPTIM}'
+
+MAN1= ab.1 apachectl.1 dbmmanage.1 htdigest.1 htpasswd.1
+MAN8= apxs.8 httpd.8 logresolve.8 rotatelogs.8
-PHP3_CONF_ARGS= --prefix=${PREFIX} --with-gd=${PREFIX} \
- --with-system-regex --with-apache=${WRKSRC} \
- --with-config-file-path=${PREFIX}/lib --disable-debug \
- --libdir=${PREFIX}/lib --includedir=${PREFIX}/include
+APACHEDOCDIR= ${PREFIX}/share/doc/apache
+PHP3DOCDIR= ${PREFIX}/share/doc/php3
+PHP3_CONF_ARGS= --prefix=${PREFIX} \
+ --with-system-regex \
+ --with-gd \
+ --with-apache=${WRKSRC} \
+ --with-config-file-path=${PREFIX}/lib \
+ --disable-debug
-.if !defined(PHP3_DBTYPE) || ${PHP3_DBTYPE} != msql && ${PHP3_DBTYPE} != mysql && ${PHP3_DBTYPE} != pgsql && ${PHP3_DBTYPE} != dbase
+.if !defined(PHP3_DBTYPE) || ${PHP3_DBTYPE} != msql && ${PHP3_DBTYPE} != mysql && ${PHP3_DBTYPE} != pgsql
pre-fetch:
@ ${ECHO}
@ ${ECHO} "You must set variable PHP3_DBTYPE to msql, mysql or pgsql by typing"
- @ ${ECHO} "make PHP3_DBTYPE=[ dbase | msql | mysql | pgsql ]"
+ @ ${ECHO} "make PHP3_DBTYPE=[ msql | mysql | pgsql ]"
@ ${FALSE}
.elif defined(PHP3_DBTYPE)
.if ${PHP3_DBTYPE} == msql
@@ -56,53 +81,52 @@ PHP3_CONF_ARGS+= --with-mysql=${PREFIX}
.elif ${PHP3_DBTYPE} == pgsql
BUILD_DEPENDS+= ${PREFIX}/pgsql/bin/psql:${PORTSDIR}/databases/postgresql
PHP3_CONF_ARGS+= --with-pgsql=${PREFIX}/pgsql
-.elif ${PHP3_DBTYPE} == dbase
-PHP3_CONF_ARGS+= --with-dbase
.endif
.endif
-.if defined(VERS_ID)
post-patch:
- @cd ${WRKSRC}/src && \
- ${MV} Configuration Configuration.old && \
- ${SED} 's;^#*OPTIM=.*;OPTIM= -DSERVER_SUBVERSION=\\"${VERS_ID}\\";' \
- < Configuration.old > Configuration
-.endif
+ @ ${PATCH} -s -d ${WRKDIR}/php-3.0.2 < ${FILESDIR}/configure.patch
pre-configure:
- ( cd ${WRKDIR}/php-3.0.2 \
- && CC="${CC}" CFLAGS="${CFLAGS}" CPPFLAGS=-I${PREFIX}/include ./configure ${PHP3_CONF_ARGS} \
- && ${GMAKE} install )
- ${ECHO} "Module php3_module mod_php3.o" >> ${WRKSRC}/src/Configuration
+ @( cd ${WRKDIR}/php-3.0.2 \
+ && ${ECHO_MSG} "===> Configuring for PHP-3.0.2" \
+ && CFLAGS= CPPFLAGS="-I${PREFIX}/include -I${PREFIX}/include/gd" LDFLAGS=-L${PREFIX}/lib ./configure ${PHP3_CONF_ARGS} \
+ && ${ECHO_MSG} "===> Building for PHP-3.0.2" \
+ && ${MAKE} install \
+ && ${ECHO_MSG} "===> Configuring for Apache-1.3.0" )
.if defined(PHP3_DBTYPE) && ${PHP3_DBTYPE} == msql
- ${ECHO} "EXTRA_LIBS=-lmd libphp3.a -L${PREFIX}/lib -lmsql -lgd -lm -lttf" >> ${WRKSRC}/src/Configuration
+CONFIGURE_ENV+= LIBS='-lmd -L${PREFIX}/lib -lmsql -lgd -lm'
.elif defined(PHP3_DBTYPE) && ${PHP3_DBTYPE} == mysql
- ${ECHO} "EXTRA_LIBS=-lmd libphp3.a -L${PREFIX}/lib/mysql -lmysqlclient -L${PREFIX}/lib -I${PREFIX}/include/gd -lgd -lm -lttf" >> ${WRKSRC}/src/Configuration
+CONFIGURE_ENV+= LIBS='-L${PREFIX}/lib/mysql -L${PREFIX}/lib -lmysqlclient -lm -lgd'
.elif defined(PHP3_DBTYPE) && ${PHP3_DBTYPE} == pgsql
- ${ECHO} "EXTRA_LIBS=-lmd libphp3.a -L${PREFIX}/pgsql/lib -lpq -L${PREFIX}/lib -lgd -lm -lttf" >> ${WRKSRC}/src/Configuration
-.elif defined(PHP3_DBTYPE) && ${PHP3_DBTYPE} == dbase
- ${ECHO} "EXTRA_LIBS=-lmd libphp3.a libdbf.a -L${PREFIX}/lib -lgd -lm -lttf" >> ${WRKSRC}/src/Configuration
+CONFIGURE_ENV+= LIBS='-lmd -L${PREFIX}/pgsql/lib -lpq -L${PREFIX}/lib -lgd -lm'
.endif
post-install:
@if [ ! -f ${PREFIX}/etc/rc.d/apache.sh ]; then \
${ECHO} "Installing ${PREFIX}/etc/rc.d/apache.sh startup file."; \
- ${SED} 's;PREFIX;${PREFIX};' < ${FILESDIR}/apache.sh.tmpl > \
- ${PREFIX}/etc/rc.d/apache.sh; \
+ ${ECHO} "#!/bin/sh" > ${PREFIX}/etc/rc.d/apache.sh; \
+ ${ECHO} "[ -x ${PREFIX}/sbin/apachectl ] && ${PREFIX}/sbin/apachectl start > /dev/null && ${ECHO} -n ' apache'" >> ${PREFIX}/etc/rc.d/apache.sh; \
chmod 751 ${PREFIX}/etc/rc.d/apache.sh; \
fi
-.for i in ${MAN1}
- ${INSTALL_MAN} ${WRKSRC}/support/$i ${PREFIX}/man/man1
-.endfor
-.for i in ${MAN8}
- ${INSTALL_MAN} ${WRKSRC}/support/$i ${PREFIX}/man/man8
-.endfor
+
.if !defined(NOPORTDOCS)
- ${MKDIR} ${DOCDIR}
+ ${MKDIR} ${APACHEDOCDIR} ${PHP3DOCDIR}
.for i in README LICENSE ABOUT_APACHE
- ${INSTALL_DATA} ${WRKSRC}/$i ${DOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/$i ${APACHEDOCDIR}
+.endfor
+ (cd ${WRKSRC}/htdocs && tar cf - *) |\
+ (cd ${APACHEDOCDIR} && tar xf -); \
+ find ${APACHEDOCDIR} -type d -exec chmod a+rx {} \; ; \
+ find ${APACHEDOCDIR} -type f -exec chmod a+r {} \;
+.for i in apache_pb.gif index.html manual
+ /bin/ln -s ${PREFIX}/share/doc/apache/$i ${PREFIX}/www/data/$i
+.endfor
+.for i in CODING_STANDARDS EXTENSION_STATUS LICENSE
+ ${INSTALL_DATA} ${WRKDIR}/php-3.0.2/$i ${PHP3DOCDIR}
.endfor
- @cd ${WRKSRC}/htdocs; tar cf - . | (cd ${DOCDIR}; tar xf -)
+ @ ${ECHO} "Docs reside in ${APACHEDOCDIR}"
+ @ ${ECHO} "and in ${PHP3DOCDIR}"
.endif
.include <bsd.port.mk>