freebsd-ports/www/apache2/Makefile

215 lines
6.2 KiB
Makefile
Raw Normal View History

# New ports collection makefile for: apache2
# Date created: 7 April 2001
# Whom: Hye-Shik Chang <perky@fallin.lv>
#
1999-08-31 04:43:35 +02:00
# $FreeBSD$
#
# For more information, please read Makefile.doc
#
PORTNAME= apache
- Update to 2.0.50 Important changes: *) SECURITY: CAN-2004-0493 (cve.mitre.org) Close a denial of service vulnerability identified by Georgi Guninski which could lead to memory exhaustion with certain input data. [Jeff Trawick] *) SECURITY: CAN-2004-0488 (cve.mitre.org) mod_ssl: Fix a buffer overflow in the FakeBasicAuth code for a (trusted) client certificate subject DN which exceeds 6K in length. [Joe Orton] Details can be found here: http://www.apache.org/dist/httpd/CHANGES_2.0 - Use autoconf 2.59 - Add add SUEXEC_LOGFILE tunable to set suexec logfile [1] - Silently ignore removal of libexec/apache2 directory - Import latest version of apr_reslit.c from apr CVS which adds timeout feature to apr_reslist_acquire(). This is required for future mod_logio-st. - Add explicit dependency on libiconv (so nowwe support libiconv) - Move Windows Update fix from MASTER_SITE_LOCAL to ports tree - add WITH_EXPERIMENTAL_PATCHES knobs: These patches are backports from apache CVS HEAD or apr CVS HEAD. They have positive impacts on apache responsiveness but can be instable and are NOT currently supported by apache/apr teams. * exp-http-ready.patch: add "httpready" support for ACCEPT_FILTER (currently apache 2 only support "dataready") * exp-apr-kqueue.patch: add support for kqueue in apr_poll(). This patch greatly improves apache network performance (up to 18% according to the author, on my test box, between 13% and 21%) Test and feedback on -STABLE are welcome ;) For more details, please see: http://marc.theaimsgroup.com/?t=108650227500001&r=1&w=2 Submitted by: knu [1] NOTE: Please set MASTER_SITE_APACHE_HTTPD to closest mirrors. you can easily find them from: http://www.apache.org/dyn/closer.cgi/httpd/ Thanks :
2004-07-01 07:54:56 +02:00
PORTVERSION= 2.0.50
CATEGORIES= www ipv6
MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD} \
http://sheepkiller.nerim.net/ports/${PORTNAME}/:powerlogo
DISTNAME= httpd-${PORTVERSION}
DISTFILES= ${DISTNAME}.tar.gz powerlogo.gif:powerlogo
DIST_SUBDIR= apache2
EXTRACT_ONLY= ${DISTNAME}.tar.gz
MAINTAINER?= clement@FreeBSD.org
COMMENT?= Version 2 of Apache web server with ${WITH_MPM:L} MPM.
2001-02-12 17:19:19 +01:00
LIB_DEPENDS= expat.5:${PORTSDIR}/textproc/expat2
LATEST_LINK= apache2
2004-03-18 21:50:09 +01:00
CONFLICTS= apache+mod_ssl-1.* apache+mod_ssl+ipv6-1.* apache+mod_ssl+modsnmp-1.* \
apache+mod_ssl+mod_snmp+ipv6-1.* apache+mod_ssl+mod_accel-1.* \
apache+mod_ssl+mod_snmp+mod_accel-1.* \
apache+ipv6-1.* apache+ssl-1.* apache-1.* apache_fp-1.* \
caudium-devel-1.* caudium10-1.* caudium12-* \
ru-apache+mod_ssl-1.* ru-apache-1.* thttpd-2.*
# patch files
.if defined (WITH_WINDOWSUPDATEFIX)
- Update to 2.0.50 Important changes: *) SECURITY: CAN-2004-0493 (cve.mitre.org) Close a denial of service vulnerability identified by Georgi Guninski which could lead to memory exhaustion with certain input data. [Jeff Trawick] *) SECURITY: CAN-2004-0488 (cve.mitre.org) mod_ssl: Fix a buffer overflow in the FakeBasicAuth code for a (trusted) client certificate subject DN which exceeds 6K in length. [Joe Orton] Details can be found here: http://www.apache.org/dist/httpd/CHANGES_2.0 - Use autoconf 2.59 - Add add SUEXEC_LOGFILE tunable to set suexec logfile [1] - Silently ignore removal of libexec/apache2 directory - Import latest version of apr_reslit.c from apr CVS which adds timeout feature to apr_reslist_acquire(). This is required for future mod_logio-st. - Add explicit dependency on libiconv (so nowwe support libiconv) - Move Windows Update fix from MASTER_SITE_LOCAL to ports tree - add WITH_EXPERIMENTAL_PATCHES knobs: These patches are backports from apache CVS HEAD or apr CVS HEAD. They have positive impacts on apache responsiveness but can be instable and are NOT currently supported by apache/apr teams. * exp-http-ready.patch: add "httpready" support for ACCEPT_FILTER (currently apache 2 only support "dataready") * exp-apr-kqueue.patch: add support for kqueue in apr_poll(). This patch greatly improves apache network performance (up to 18% according to the author, on my test box, between 13% and 21%) Test and feedback on -STABLE are welcome ;) For more details, please see: http://marc.theaimsgroup.com/?t=108650227500001&r=1&w=2 Submitted by: knu [1] NOTE: Please set MASTER_SITE_APACHE_HTTPD to closest mirrors. you can easily find them from: http://www.apache.org/dyn/closer.cgi/httpd/ Thanks :
2004-07-01 07:54:56 +02:00
EXTRA_PATCHES+= ${FILESDIR}/exp-windowsupdate.patch
.endif
.if defined(WITH_EXPERIMENTAL_PATCHES)
EXTRA_PATCHES+= ${FILESDIR}/exp-apr-kqueue.patch \
${FILESDIR}/exp-http-ready.patch
.endif
SCRIPTS_ENV+= LIBTOOL=${LIBTOOL} LIBTOOLIZE=${LIBTOOLIZE} \
LIBTOOL_VERSION=${LIBTOOL_VERSION} AUTOCONF=${AUTOCONF} \
LIBTOOL_M4=${LOCALBASE}/share/aclocal/libtool${LIBTOOL_VERSION}.m4 \
AUTOHEADER=${AUTOHEADER}
- Update to 2.0.50 Important changes: *) SECURITY: CAN-2004-0493 (cve.mitre.org) Close a denial of service vulnerability identified by Georgi Guninski which could lead to memory exhaustion with certain input data. [Jeff Trawick] *) SECURITY: CAN-2004-0488 (cve.mitre.org) mod_ssl: Fix a buffer overflow in the FakeBasicAuth code for a (trusted) client certificate subject DN which exceeds 6K in length. [Joe Orton] Details can be found here: http://www.apache.org/dist/httpd/CHANGES_2.0 - Use autoconf 2.59 - Add add SUEXEC_LOGFILE tunable to set suexec logfile [1] - Silently ignore removal of libexec/apache2 directory - Import latest version of apr_reslit.c from apr CVS which adds timeout feature to apr_reslist_acquire(). This is required for future mod_logio-st. - Add explicit dependency on libiconv (so nowwe support libiconv) - Move Windows Update fix from MASTER_SITE_LOCAL to ports tree - add WITH_EXPERIMENTAL_PATCHES knobs: These patches are backports from apache CVS HEAD or apr CVS HEAD. They have positive impacts on apache responsiveness but can be instable and are NOT currently supported by apache/apr teams. * exp-http-ready.patch: add "httpready" support for ACCEPT_FILTER (currently apache 2 only support "dataready") * exp-apr-kqueue.patch: add support for kqueue in apr_poll(). This patch greatly improves apache network performance (up to 18% according to the author, on my test box, between 13% and 21%) Test and feedback on -STABLE are welcome ;) For more details, please see: http://marc.theaimsgroup.com/?t=108650227500001&r=1&w=2 Submitted by: knu [1] NOTE: Please set MASTER_SITE_APACHE_HTTPD to closest mirrors. you can easily find them from: http://www.apache.org/dyn/closer.cgi/httpd/ Thanks :
2004-07-01 07:54:56 +02:00
USE_ICONV= yes
USE_AUTOCONF_VER= 259
USE_LIBTOOL_VER= 15
USE_PERL5= yes
USE_RC_SUBR= yes
USE_REINPLACE= yes
LIBTOOLFILES= configure
CONFIGURE_ARGS= --prefix=${PREFIX_RELDEST} \
--enable-layout=FreeBSD \
--with-perl=${PERL5} \
--with-port=${WITH_HTTP_PORT} \
--with-expat=${LOCALBASE} \
- Update to 2.0.50 Important changes: *) SECURITY: CAN-2004-0493 (cve.mitre.org) Close a denial of service vulnerability identified by Georgi Guninski which could lead to memory exhaustion with certain input data. [Jeff Trawick] *) SECURITY: CAN-2004-0488 (cve.mitre.org) mod_ssl: Fix a buffer overflow in the FakeBasicAuth code for a (trusted) client certificate subject DN which exceeds 6K in length. [Joe Orton] Details can be found here: http://www.apache.org/dist/httpd/CHANGES_2.0 - Use autoconf 2.59 - Add add SUEXEC_LOGFILE tunable to set suexec logfile [1] - Silently ignore removal of libexec/apache2 directory - Import latest version of apr_reslit.c from apr CVS which adds timeout feature to apr_reslist_acquire(). This is required for future mod_logio-st. - Add explicit dependency on libiconv (so nowwe support libiconv) - Move Windows Update fix from MASTER_SITE_LOCAL to ports tree - add WITH_EXPERIMENTAL_PATCHES knobs: These patches are backports from apache CVS HEAD or apr CVS HEAD. They have positive impacts on apache responsiveness but can be instable and are NOT currently supported by apache/apr teams. * exp-http-ready.patch: add "httpready" support for ACCEPT_FILTER (currently apache 2 only support "dataready") * exp-apr-kqueue.patch: add support for kqueue in apr_poll(). This patch greatly improves apache network performance (up to 18% according to the author, on my test box, between 13% and 21%) Test and feedback on -STABLE are welcome ;) For more details, please see: http://marc.theaimsgroup.com/?t=108650227500001&r=1&w=2 Submitted by: knu [1] NOTE: Please set MASTER_SITE_APACHE_HTTPD to closest mirrors. you can easily find them from: http://www.apache.org/dyn/closer.cgi/httpd/ Thanks :
2004-07-01 07:54:56 +02:00
--with-iconv=${LOCALBASE} \
--libdir=${PREFIX_RELDEST}/lib/apache2 \
--includedir=${PREFIX_RELDEST}/include/apache2
CONFIGURE_ENV= CC="${CC}" CPPFLAGS="${CPPFLAGS}" \
CFLAGS="${CFLAGS}" \
LDFLAGS="${LDFLAGS}" CONFIG_SHELL="${SH}" \
LOCALBASE="${LOCALBASE}"
PREFIX_RELDEST= ${PREFIX:S,^${DESTDIR},,}
RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
MAKE_ENV+= DESTDIR=${DESTDIR} EXPR_COMPAT=yes
- Update to 2.0.50 Important changes: *) SECURITY: CAN-2004-0493 (cve.mitre.org) Close a denial of service vulnerability identified by Georgi Guninski which could lead to memory exhaustion with certain input data. [Jeff Trawick] *) SECURITY: CAN-2004-0488 (cve.mitre.org) mod_ssl: Fix a buffer overflow in the FakeBasicAuth code for a (trusted) client certificate subject DN which exceeds 6K in length. [Joe Orton] Details can be found here: http://www.apache.org/dist/httpd/CHANGES_2.0 - Use autoconf 2.59 - Add add SUEXEC_LOGFILE tunable to set suexec logfile [1] - Silently ignore removal of libexec/apache2 directory - Import latest version of apr_reslit.c from apr CVS which adds timeout feature to apr_reslist_acquire(). This is required for future mod_logio-st. - Add explicit dependency on libiconv (so nowwe support libiconv) - Move Windows Update fix from MASTER_SITE_LOCAL to ports tree - add WITH_EXPERIMENTAL_PATCHES knobs: These patches are backports from apache CVS HEAD or apr CVS HEAD. They have positive impacts on apache responsiveness but can be instable and are NOT currently supported by apache/apr teams. * exp-http-ready.patch: add "httpready" support for ACCEPT_FILTER (currently apache 2 only support "dataready") * exp-apr-kqueue.patch: add support for kqueue in apr_poll(). This patch greatly improves apache network performance (up to 18% according to the author, on my test box, between 13% and 21%) Test and feedback on -STABLE are welcome ;) For more details, please see: http://marc.theaimsgroup.com/?t=108650227500001&r=1&w=2 Submitted by: knu [1] NOTE: Please set MASTER_SITE_APACHE_HTTPD to closest mirrors. you can easily find them from: http://www.apache.org/dyn/closer.cgi/httpd/ Thanks :
2004-07-01 07:54:56 +02:00
WITH_MPM?= prefork # or worker, perchild, threadpool
WITH_HTTP_PORT?= 80
.if defined(WITHOUT_IPV6)
CONFIGURE_ARGS+= --disable-ipv6
.elif defined(WITH_IPV6_V6ONLY) && defined(WITHOUT_V4MAPPED)
CONFIGURE_ARGS+= --disable-v4-mapped
.else
CONFIGURE_ARGS+= --enable-v4-mapped
.endif
2002-08-10 02:56:52 +02:00
.if !defined(WITHOUT_SSL)
USE_OPENSSL= yes
.endif
.if defined(WITH_STATIC_SUPPORT)
CONFIGURE_ARGS+= --enable-static-support
.endif
.if defined(WITH_SSL_EXPERIMENTAL_ENGINE)
CFLAGS+= -DSSL_EXPERIMENTAL_ENGINE
.endif
# debug overrides CFLAGS
.if defined(WITH_DEBUG) || defined (DEBUG_FLAGS)
DEBUG_FLAGS?= -O0 -g -ggdb3
CFLAGS= ${DEBUG_FLAGS}
CONFIGURE_ARGS+= --enable-maintainer-mode
.endif
# for slave ports
.if !defined(MASTERDIR)
APACHEDIR= ${.CURDIR}
.else
APACHEDIR= ${MASTERDIR}
.endif
.if defined (WITH_LDAP)
USE_OPENLDAP= YES
CONFIGURE_ARGS+= --with-ldap \
--with-ldap-lib="${LOCALBASE}/lib" \
--with-ldap-include="${LOCALBASE}/include"
.endif
.include <bsd.port.pre.mk>
# Untested and may fail !
.if defined(WITH_APR_FROM_PORTS)
. if defined (WITH_BDB) || defined(WITH_BERKELEYDB)
2004-05-30 00:07:37 +02:00
IGNORE= "You can't set WITH_BDB or WITH_BERKELEYDB when WITH_APR_FROM_PORTS is defined"
. endif
LIB_DEPENDS+= apr-0.9:${PORTSDIR}/devel/apr
CONFIGURE_ARGS+= --with-apr=${LOCALBASE}/bin/apr-config \
--with-apr-util=${LOCALBASE}/bin/apu-config
CONFIGURE_ENV+= LTFLAGS="--tag=CXX"
PLIST_SUB+= PORTS_APR="@comment "
.else
. if exists(${LOCALBASE}/lib/libapr-0.so)
IGNORE= apr is installed and may conflict with apache one\
(if you want to use apr port define WITH_APR_FROM_PORTS,\
at your own risk)
. endif
PLIST_SUB+= PORTS_APR=""
INSTALLS_SHLIB= yes
LDCONFIG_DIRS= %%PREFIX%%/lib/apache2
.endif
WITH_PTHREAD_LIBS?= ${PTHREAD_LIBS:S/-l//}
WITH_PTHREAD_CFLAGS?= ${PTHREAD_CFLAGS}
.include "${APACHEDIR}/Makefile.doc"
.include "${APACHEDIR}/Makefile.modules"
WANT_APACHE= common2
.include "${APACHEDIR}/Makefile.modules.3rd"
CONFIGURE_ARGS+= --with-mpm=${WITH_MPM:L} ${CONFIGURE_TARGET}
show-options:
@${SED} -ne 's/^##//p' ${APACHEDIR}/Makefile.doc
show-modules:
@for module in ${AVAILABLE_MODULES} ; do \
${ECHO_MSG} -n "$${module}: ";\
if ${ECHO_CMD} ${APACHE_MODULES} | ${GREP} -wq $${module} 2> /dev/null ; then \
${ECHO_CMD} -n "enabled "; \
if ${ECHO_CMD} ${WITH_STATIC_MODULES} | ${GREP} -wq $${module} 2> /dev/null ; then \
${ECHO_CMD} "(static)" ; \
else \
${ECHO_CMD} "(shared)" ;\
fi;\
else\
${ECHO_CMD} disabled ;\
fi;\
done
pre-everything::
@${ECHO_MSG} ""
@${ECHO_MSG} " To see all available knobs, type make show-options"
@${ECHO_MSG} " You can check your modules configuration by using show-modules"
@${ECHO_MSG} ""
post-extract:
@${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/powerlogo.gif ${WRKSRC}/docs/icons/freebsd.gif
post-patch:
@cd ${WRKSRC}/docs/docroot && \
for f in index.html.*; do (\
${REINPLACE_CMD} -e 's,apache_pb,icons/freebsd.gif"\
ALT="[Powered by FreeBSD]"><IMG SRC="apache_pb2_ani,g' $$f \
); done
2002-08-10 02:56:52 +02:00
@${RM} -f ${WRKSRC}/docs/docroot/*.bak
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${FILESDIR}/apache.sh > ${WRKDIR}/apache2.sh
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${FILESDIR}/apache2libs.sh > ${WRKDIR}/apache2libs.sh
@${RM} -f ${WRKSRC}/docs/manual/index.html.ko.euc-kr
@${REINPLACE_CMD} -e 's," PLATFORM ",FreeBSD,' \
${WRKSRC}/server/core.c
@${INSTALL_DATA} ${WRKSRC}/NOTICE ${WRKSRC}/docs/manual
pre-configure:
@cd ${WRKSRC}; ${SETENV} ${SCRIPTS_ENV} ./buildconf
post-configure:
@FTPUSERS=`${EGREP} -v '^#' /etc/ftpusers| ${TR} -s "\n" " "` ;\
${REINPLACE_CMD} -e "s,%%FTPUSERS%%,$$FTPUSERS," \
${WRKSRC}/docs/conf/httpd-std.conf
pre-install:
@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
post-install:
@${MKDIR} ${PREFIX}/etc/apache2/Includes
@${ECHO_CMD} "Installing ${PREFIX}/etc/rc.d/apache2.sh startup file."
@${INSTALL_SCRIPT} -m 751 ${WRKDIR}/apache2.sh ${PREFIX}/etc/rc.d/apache2.sh
@${ECHO_CMD} "Installing ${PREFIX}/etc/rc.d/000.apache2libs.sh startup file."
@${INSTALL_SCRIPT} -m 751 ${WRKDIR}/apache2libs.sh ${PREFIX}/etc/rc.d/000.apache2libs.sh
@@${CAT} ${PKGMESSAGE}
2002-08-10 02:56:52 +02:00
.include <bsd.port.post.mk>