1999-08-16 18:41:13 +00:00
|
|
|
# New ports collection makefile for: Apache / PHP
|
1998-11-06 11:02:22 +00:00
|
|
|
# Version required: 1.3* / 3.0*
|
1998-07-25 11:30:31 +00:00
|
|
|
# Date created: So 21 Jun 1998 16:09:39 CEST
|
|
|
|
# Whom: Stefan Herrmann <stefan@asterix.webaffairs.net>
|
1995-08-28 13:28:45 +00:00
|
|
|
#
|
1999-08-31 02:43:35 +00:00
|
|
|
# $FreeBSD$
|
1995-08-28 13:28:45 +00:00
|
|
|
#
|
|
|
|
|
1998-09-30 18:16:08 +00:00
|
|
|
DISTNAME= apache_${VERSION_APACHE}
|
1999-08-16 18:41:13 +00:00
|
|
|
PKGNAME= apache+php-${VERSION_APACHE}+${VERSION_PHP}
|
1996-11-18 11:44:27 +00:00
|
|
|
CATEGORIES= www
|
1999-03-13 17:11:04 +00:00
|
|
|
MASTER_SITES= http://www.apache.org/dist/ \
|
1998-12-05 09:36:59 +00:00
|
|
|
http://www.rge.com/pub/infosystems/apache/dist/ \
|
1999-09-19 14:21:08 +00:00
|
|
|
ftp://ftp.php.net/pub/${PHP_DISTDIR}/ \
|
|
|
|
http://us.php.net/${PHP_DISTDIR}/ \
|
1999-08-19 11:26:48 +00:00
|
|
|
http://www.modssl.org/source/ \
|
|
|
|
ftp://ftp.modssl.org/source/ \
|
1998-12-05 09:36:59 +00:00
|
|
|
http://www.apache.de/dist/ \
|
1999-03-13 17:11:04 +00:00
|
|
|
ftp://ftp.ccs.neu.edu/net/mirrors/ftp.apache.org/apache/dist/ \
|
1999-08-19 11:26:48 +00:00
|
|
|
http://php.he.net/${PHP_DISTDIR}/ \
|
|
|
|
http://www.php3.de/${PHP_DISTDIR}/ \
|
|
|
|
ftp://ftp.ecrc.net/pub/security/mod_ssl/ \
|
|
|
|
ftp://ftp.nvg.ntnu.no/pub/unix/mod_ssl/ \
|
1999-03-13 17:11:04 +00:00
|
|
|
ftp://apache.compuex.com/pub/apache/dist/ \
|
|
|
|
ftp://apache.arctic.org/pub/apache/dist/ \
|
1999-08-19 11:26:48 +00:00
|
|
|
http://au.php.net:81/${PHP_DISTDIR}/ \
|
|
|
|
http://at.php.net/${PHP_DISTDIR}/ \
|
|
|
|
ftp://ftp.ulpgc.es/pub/mod_ssl/ \
|
|
|
|
ftp://glock.missouri.edu/pub/mod_ssl/ \
|
1999-03-13 17:11:04 +00:00
|
|
|
ftp://ftp.epix.net/pub/apache/dist/ \
|
|
|
|
ftp://ftp.ameth.org/pub/mirrors/ftp.apache.org/apache/dist/ \
|
1999-08-19 11:26:48 +00:00
|
|
|
http://br.php.net/${PHP_DISTDIR}/ \
|
|
|
|
http://php.easydns.com/${PHP_DISTDIR}/ \
|
|
|
|
ftp://ftp.infoscience.co.jp/pub/Crypto/SSL/mod_ssl/ \
|
|
|
|
ftp://ftp.uni-trier.de/pub/unix/security/mod_ssl/ \
|
1999-03-13 17:11:04 +00:00
|
|
|
ftp://ftp.connectnet.com/pub/www/apache/ \
|
|
|
|
ftp://apache.technomancer.com/mirrors/apache/dist/ \
|
1999-08-19 11:26:48 +00:00
|
|
|
http://www.php.cz/${PHP_DISTDIR}/ \
|
|
|
|
http://php3.globe.de/${PHP_DISTDIR}/ \
|
|
|
|
ftp://ftp.blatzheim.com/pub/mod_ssl/ \
|
1999-08-19 11:55:29 +00:00
|
|
|
ftp://ftp.fu-berlin.de/unix/security/mod_ssl/
|
1999-08-16 18:41:13 +00:00
|
|
|
DISTFILES= apache_${VERSION_APACHE}.tar.gz php-${VERSION_PHP}.tar.gz
|
1995-08-28 13:28:45 +00:00
|
|
|
|
2000-01-14 23:41:06 +00:00
|
|
|
PATCH_SITES= http://www.physik.TU-Berlin.DE/~ibex/ports/distfiles/
|
|
|
|
PATCHFILES= php_file.c.diff
|
|
|
|
|
1999-08-16 18:41:13 +00:00
|
|
|
MAINTAINER= dirk@FreeBSD.org
|
1997-09-03 18:45:16 +00:00
|
|
|
|
1999-01-13 02:47:33 +00:00
|
|
|
Y2K= http://www.php.net/y2k.php3
|
|
|
|
|
1999-08-19 11:26:48 +00:00
|
|
|
PHP_DISTDIR= distributions
|
|
|
|
|
1999-08-20 19:13:00 +00:00
|
|
|
VERSION_APACHE= 1.3.9
|
2000-01-02 17:24:31 +00:00
|
|
|
VERSION_PHP= 3.0.13
|
1998-09-01 18:38:05 +00:00
|
|
|
|
1999-04-11 15:11:27 +00:00
|
|
|
USE_PERL5= yes
|
1999-03-08 07:28:36 +00:00
|
|
|
HAS_CONFIGURE= yes
|
1999-04-11 15:11:27 +00:00
|
|
|
CONFIGURE_ARGS= --prefix=${PREFIX} \
|
|
|
|
--target=apache \
|
|
|
|
--with-layout=GNU \
|
|
|
|
--with-perl=${PERL} \
|
|
|
|
--bindir=${PREFIX}/bin \
|
|
|
|
--sbindir=${PREFIX}/sbin \
|
|
|
|
--libexecdir=${PREFIX}/libexec/apache \
|
|
|
|
--mandir=${PREFIX}/man \
|
|
|
|
--sysconfdir=${PREFIX}/etc/apache \
|
|
|
|
--datadir=${PREFIX}/share/apache \
|
|
|
|
--includedir=${PREFIX}/include/apache \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--runtimedir=/var/run \
|
|
|
|
--logfiledir=/var/log \
|
|
|
|
--proxycachedir=/var/spool/apache \
|
|
|
|
--without-confadjust \
|
|
|
|
--enable-module=most \
|
|
|
|
--enable-module=auth_db \
|
|
|
|
--disable-module=auth_dbm \
|
|
|
|
--enable-shared=max \
|
|
|
|
--activate-module=src/modules/php3/libphp3.a
|
|
|
|
|
|
|
|
OPTIM= -DHARD_SERVER_LIMIT=512 \
|
|
|
|
-DDEFAULT_PATH=\\"${PREFIX}/bin:/bin:/usr/bin\\"
|
1998-07-25 11:30:31 +00:00
|
|
|
|
|
|
|
.if defined(APACHE_PERF_TUNING) && ${APACHE_PERF_TUNING} == YES
|
1999-04-11 15:11:27 +00:00
|
|
|
OPTIM+= -DBUFFERED_LOGS -DFD_SETSIZE=1024
|
|
|
|
CFLAGS+= -O6 -funroll-loops -fstrength-reduce -fomit-frame-pointer \
|
|
|
|
-fexpensive-optimizations -ffast-math
|
1998-02-22 23:06:17 +00:00
|
|
|
.endif
|
|
|
|
|
1999-04-11 15:11:27 +00:00
|
|
|
CONFIGURE_ENV= OPTIM='${OPTIM}' LIBS='-L${PREFIX}/lib'
|
1999-08-26 21:18:15 +00:00
|
|
|
SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \
|
1999-08-30 10:56:07 +00:00
|
|
|
TOUCH="${TOUCH}" \
|
|
|
|
MKDIR="${MKDIR}"
|
1998-07-25 11:30:31 +00:00
|
|
|
|
1999-04-11 15:11:27 +00:00
|
|
|
INSTALL_TARGET= install-quiet
|
|
|
|
|
|
|
|
MAN1= dbmmanage.1 htdigest.1 htpasswd.1
|
|
|
|
MAN8= ab.8 apache.8 apachectl.8 apxs.8 logresolve.8 rotatelogs.8
|
1998-06-14 09:58:22 +00:00
|
|
|
|
1998-07-25 11:30:31 +00:00
|
|
|
APACHEDOCDIR= ${PREFIX}/share/doc/apache
|
1999-08-16 18:41:13 +00:00
|
|
|
PHPDOCDIR= ${PREFIX}/share/doc/php
|
1998-07-25 06:51:26 +00:00
|
|
|
|
1999-08-16 18:41:13 +00:00
|
|
|
PHP_CONF_ARGS= --prefix=${PREFIX} \
|
1999-04-11 15:11:27 +00:00
|
|
|
${CONFIGURE_TARGET} \
|
1998-07-25 11:30:31 +00:00
|
|
|
--with-system-regex \
|
|
|
|
--with-apache=${WRKSRC} \
|
1999-07-03 09:50:42 +00:00
|
|
|
--with-config-file-path=${PREFIX}/etc \
|
1998-09-30 18:16:08 +00:00
|
|
|
--disable-debug \
|
1999-08-26 21:18:15 +00:00
|
|
|
--enable-track-vars \
|
|
|
|
--without-gd
|
1998-06-14 09:58:22 +00:00
|
|
|
|
1999-06-10 10:24:41 +00:00
|
|
|
pre-fetch:
|
1998-09-01 18:38:05 +00:00
|
|
|
@${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.php
|
1996-05-20 07:37:06 +00:00
|
|
|
|
1999-05-04 14:50:33 +00:00
|
|
|
post-extract:
|
1999-08-16 18:41:13 +00:00
|
|
|
@${LN} -s php-${VERSION_PHP} ${WRKDIR}/php
|
1999-05-04 14:50:33 +00:00
|
|
|
|
1997-09-03 18:45:16 +00:00
|
|
|
pre-configure:
|
1998-09-30 18:16:08 +00:00
|
|
|
@cd ${WRKSRC} \
|
2000-01-02 17:24:31 +00:00
|
|
|
&& CC="${CC}" CFLAGS="${CFLAGS}" ./configure > /dev/null \
|
1999-08-16 18:41:13 +00:00
|
|
|
&& cd ${WRKDIR}/php-${VERSION_PHP} \
|
|
|
|
&& ${ECHO_MSG} "===> Configuring for PHP-${VERSION_PHP}" \
|
1998-12-23 00:44:50 +00:00
|
|
|
&& CC="${CC}" \
|
|
|
|
CFLAGS="${CFLAGS}" \
|
|
|
|
CPPFLAGS="-I${PREFIX}/include -I${PREFIX}/include/gd" \
|
|
|
|
LDFLAGS=-L${PREFIX}/lib \
|
1999-08-16 18:41:13 +00:00
|
|
|
./configure ${PHP_CONF_ARGS} \
|
|
|
|
&& ${ECHO_MSG} "===> Building for PHP-${VERSION_PHP}" \
|
1998-07-25 11:30:31 +00:00
|
|
|
&& ${MAKE} install \
|
1998-09-30 18:16:08 +00:00
|
|
|
&& ${ECHO_MSG} "===> Configuring for Apache-${VERSION_APACHE}"
|
1997-09-03 18:45:16 +00:00
|
|
|
|
1996-06-15 16:58:09 +00:00
|
|
|
post-install:
|
1998-06-14 09:58:22 +00:00
|
|
|
@if [ ! -f ${PREFIX}/etc/rc.d/apache.sh ]; then \
|
1997-10-04 14:53:11 +00:00
|
|
|
${ECHO} "Installing ${PREFIX}/etc/rc.d/apache.sh startup file."; \
|
1998-07-25 11:30:31 +00:00
|
|
|
${ECHO} "#!/bin/sh" > ${PREFIX}/etc/rc.d/apache.sh; \
|
1998-08-27 14:08:20 +00:00
|
|
|
${ECHO} "[ -d ${PREFIX}/pgsql/lib ] && ${LDCONFIG} -m ${PREFIX}/pgsql/lib" >> ${PREFIX}/etc/rc.d/apache.sh; \
|
1998-09-30 18:16:08 +00:00
|
|
|
${ECHO} "[ -x ${PREFIX}/sbin/apachectl ] && ${PREFIX}/sbin/apachectl start${SSL} > /dev/null && ${ECHO} -n ' apache'" >> ${PREFIX}/etc/rc.d/apache.sh; \
|
1999-08-22 19:01:07 +00:00
|
|
|
${CHMOD} 751 ${PREFIX}/etc/rc.d/apache.sh; \
|
1996-06-15 17:51:08 +00:00
|
|
|
fi
|
1999-08-16 18:41:13 +00:00
|
|
|
${INSTALL_DATA} ${WRKDIR}/php-${VERSION_PHP}/php3.ini-dist ${PREFIX}/etc
|
1998-09-30 18:16:08 +00:00
|
|
|
.for i in php2 php3 phpi phps
|
1999-08-16 18:41:13 +00:00
|
|
|
${INSTALL_DATA} ${WRKDIR}/php-${VERSION_PHP}/extra/icons/$i.gif ${PREFIX}/share/apache/icons
|
1998-09-30 18:16:08 +00:00
|
|
|
.endfor
|
1998-07-25 11:30:31 +00:00
|
|
|
|
1998-06-14 09:58:22 +00:00
|
|
|
.if !defined(NOPORTDOCS)
|
1999-08-16 18:41:13 +00:00
|
|
|
${MKDIR} ${APACHEDOCDIR} ${PHPDOCDIR}
|
1998-06-14 09:58:22 +00:00
|
|
|
.for i in README LICENSE ABOUT_APACHE
|
1998-07-25 11:30:31 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/$i ${APACHEDOCDIR}
|
|
|
|
.endfor
|
1999-07-01 11:28:26 +00:00
|
|
|
.for i in CODING_STANDARDS LICENSE
|
1999-08-16 18:41:13 +00:00
|
|
|
${INSTALL_DATA} ${WRKDIR}/php-${VERSION_PHP}/$i ${PHPDOCDIR}
|
1998-06-14 09:58:22 +00:00
|
|
|
.endfor
|
1998-09-01 18:38:05 +00:00
|
|
|
@${ECHO} "Docs reside in ${APACHEDOCDIR}"
|
1999-08-16 18:41:13 +00:00
|
|
|
@${ECHO} "and in ${PHPDOCDIR}"
|
1998-06-14 09:58:22 +00:00
|
|
|
.endif
|
1996-06-15 16:58:09 +00:00
|
|
|
|
1998-09-01 18:38:05 +00:00
|
|
|
# This was copied from bsd.port.mk because a missing post-clean target
|
|
|
|
# is needed
|
|
|
|
clean:
|
|
|
|
.if !defined(NOCLEANDEPENDS)
|
|
|
|
@${MAKE} clean-depends
|
|
|
|
.endif
|
|
|
|
@${ECHO_MSG} "===> Cleaning for ${PKGNAME}"
|
|
|
|
@if [ -d ${WRKDIR} ]; then \
|
|
|
|
if [ -w ${WRKDIR} ]; then \
|
|
|
|
${RM} -rf ${WRKDIR}; \
|
|
|
|
else \
|
|
|
|
${ECHO_MSG} "===> ${WRKDIR} not writable, skipping"; \
|
|
|
|
fi; \
|
|
|
|
fi
|
1998-12-23 00:44:50 +00:00
|
|
|
@${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc
|
1998-09-01 18:38:05 +00:00
|
|
|
|
1998-12-23 00:44:50 +00:00
|
|
|
.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc)
|
|
|
|
.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"
|
1998-09-01 18:38:05 +00:00
|
|
|
.endif
|
1995-08-28 13:28:45 +00:00
|
|
|
.include <bsd.port.mk>
|