freebsd-ports/www/apache22/Makefile

233 lines
6.3 KiB
Makefile
Raw Normal View History

# New ports collection makefile for: apache22
# Date created: Dec 11 2004
# Whom: Clement Laforet <clement@FreeBSD.org>
#
# $FreeBSD$
#
# For more information, please read Makefile.doc
#
PORTNAME= apache
- Update to 2.2.14 - With hat apache@ Note: The 3 CVE's are a no-op for the FreeBSD port -- date: 2009/08/25 05:33:03; author: kuriyama; state: Exp; lines: +0 -0 (Forced commit) - 2.2.13 (acutally 2.2.12) includes fixes for several CVEs. [1] but in our ports tree, APR related ones (CVE-2009-0023, CVE-2009-1955, CVE-2009-1956) were already backported in 2.2.11_5. References: http://www.apache.org/dist/httpd/CHANGES_2.2.12 [1] Changes: --------- *) SECURITY: CVE-2009-2699 (cve.mitre.org) Fixed in APR 1.3.9. Faulty error handling in the Solaris pollset support (Event Port backend) which could trigger hangs in the prefork and event MPMs on that platform. PR 47645. [Jeff Trawick] *) SECURITY: CVE-2009-3095 (cve.mitre.org) mod_proxy_ftp: sanity check authn credentials. [Stefan Fritsch <sf fritsch.de>, Joe Orton] *) SECURITY: CVE-2009-3094 (cve.mitre.org) mod_proxy_ftp: NULL pointer dereference on error paths. [Stefan Fritsch <sf fritsch.de>, Joe Orton] *) mod_proxy_scgi: Backport from trunk. [André Malo] *) mod_ldap: Don't try to resolve file-based user ids to a DN when AuthLDAPURL has been defined at a very high level. PR 45946. [Eric Covener] *) htcacheclean: 19 ways to fail, 1 error message. Fixed. [Graham Leggett] *) mod_ldap: Bring the LDAPCacheEntries and LDAPOpCacheEntries usage() in synch with the manual and the implementation (0 and -1 both disable the cache). [Eric Covener] *) mod_ssl: The error message when SSLCertificateFile is missing should at least give the name or position of the problematic virtual host definition. [Stefan Fritsch sf sfritsch.de] *) htdbm: Fix possible buffer overflow if dbm database has very long values. PR 30586 [Dan Poirier] *) Add support for HTTP PUT to ab. [Jeff Barnes <jbarnesweb yahoo.com>] *) mod_ssl: Fix SSL_*_DN_UID variables to use the 'userID' attribute type. PR 45107. [Michael Ströder <michael stroeder.com>, Peter Sylvester <peter.sylvester edelweb.fr>] *) mod_cache: Add CacheIgnoreURLSessionIdentifiers directive to ignore defined session identifiers encoded in the URL when caching. [Ruediger Pluem] *) mod_mem_cache: fix seg fault under load due to pool concurrency problem PR: 47672 [Dan Poirier <poirier pobox.com>] *) mod_autoindex: Correctly create an empty cell if the description for a file is missing. PR 47682 [Peter Poeml <poeml suse.de>]
2009-12-10 00:48:01 +01:00
PORTVERSION= 2.2.14
PORTREVISION= 5
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD}
DISTNAME= httpd-${PORTVERSION}
DISTFILES= ${DISTNAME}.tar.bz2
DIST_SUBDIR= apache22
MAINTAINER?= apache@FreeBSD.org
COMMENT?= Version 2.2.x of Apache web server with ${WITH_MPM:L} MPM.
LIB_DEPENDS= expat.6:${PORTSDIR}/textproc/expat2 \
pcre.0:${PORTSDIR}/devel/pcre
2009-12-12 00:56:52 +01:00
MAKE_JOBS_SAFE= yes
LATEST_LINK?= apache22
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.* \
apache-2.0.* apache-*-2.0.* apache-2.1.* apache-*-2.1.*
SCRIPTS_ENV+= LIBTOOL=${LIBTOOL} LIBTOOLIZE=${LIBTOOLIZE} \
LIBTOOL_VERSION=${LIBTOOL_VERSION} AUTOCONF=${AUTOCONF} \
LIBTOOL_M4=${LIBTOOL_M4} \
AUTOHEADER=${AUTOHEADER}
USE_APACHE= common22
USE_BZIP2= yes
USE_ICONV= yes
USE_AUTOTOOLS= autoconf:262 libtool:22
USE_PERL5= yes
USE_RC_SUBR= apache22 htcacheclean
LIBTOOLFILES= configure
MPM_ITK_VERSION?= 20090414-00
# for slave ports
.if !defined(MASTERDIR)
APACHEDIR= ${.CURDIR}
.else
APACHEDIR= ${MASTERDIR}
.endif
.if !defined(WITHOUT_APACHE_OPTIONS)
2009-12-12 00:56:52 +01:00
OPTIONS= \
APR_FROM_PORTS "Use devel/apr as APR (preferred)" Off \
THREADS "Enable threads support in APR" Off \
MYSQL "Enable MySQL support for apr-dbd" Off \
PGSQL "Enable PostgreSQL support for apr-dbd" Off \
SQLITE "Enable SQLite support for apr-dbd" Off \
IPV6 "Enable IPv6 support" On \
2009-01-19 20:08:23 +01:00
BDB "Enable BerkeleyDB dbm" Off
.include "${APACHEDIR}/Makefile.options"
.endif
CONFIGURE_ARGS= --prefix=${PREFIX_RELDEST} \
--enable-layout=FreeBSD \
--with-perl=${PERL5} \
--with-port=${WITH_HTTP_PORT} \
--with-expat=${LOCALBASE} \
--with-iconv=${LOCALBASE} \
--enable-http \
--with-pcre=${LOCALBASE}
CONFIGURE_ENV= CC="${CC}" CPPFLAGS="${CPPFLAGS}" \
CFLAGS="${CFLAGS}" \
LDFLAGS="${LDFLAGS}" CONFIG_SHELL="${SH}" \
LOCALBASE="${LOCALBASE}"
PREFIX_RELDEST= ${PREFIX:S,^${DESTDIR},,}
MAKE_ENV+= EXPR_COMPAT=yes
WITH_MPM?= prefork # or worker, event, itk
WITH_HTTP_PORT?= 80
.if defined(WITH_STATIC_SUPPORT)
CONFIGURE_ARGS+= --enable-static-support
.endif
# debug overrides CFLAGS
.if defined(WITH_DEBUG)
DEBUG_FLAGS?= -O0 -g -ggdb3
CFLAGS= ${DEBUG_FLAGS}
CONFIGURE_ARGS+= --enable-maintainer-mode
WITH_EXCEPTION_HOOK= YES
.endif
.if defined(WITH_EXCEPTION_HOOK)
CONFIGURE_ARGS+= --enable-exception-hook
.endif
.include "${APACHEDIR}/Makefile.doc"
.include "${APACHEDIR}/Makefile.modules"
.include <bsd.port.pre.mk>
# OPTIONS fixups
.if defined (WITH_AUTHNZ_LDAP)
WITH_LDAP= yes
.endif
.include "${APACHEDIR}/Makefile.modules"
.if (defined(WITH_SSL)|| !defined(WITHOUT_SSL_MODULES))
.include "${PORTSDIR}/Mk/bsd.openssl.mk"
CFLAGS+= -I${OPENSSLINC}
LDFLAGS+= -L${OPENSSLLIB}
.endif
.if defined(WITH_APR_FROM_PORTS)
PLIST_SUB+= APR_PORTS="@comment "
2009-12-12 00:56:52 +01:00
APR_PORT?= devel/apr
LIB_DEPENDS+= apr-1:${PORTSDIR}/${APR_PORT}
CONFIGURE_ARGS+= --with-apr=${LOCALBASE}/bin/apr-1-config \
--with-apr-util=${LOCALBASE}/bin/apu-1-config
CONFIGURE_ENV+= LTFLAGS="--tag=CXX"
.else
USE_LDCONFIG= yes
PLIST_SUB+= APR_PORTS=""
CONFLICTS+= apr-1.* apr-db4[0-9]-1.*
CONFIGURE_ENV+= USE_BUNDLED_APR=YES
.endif
# When using apr_mysql_db we _must_ rebuild makefiles
.if defined(WITH_FULLBUILD)
BUILD_DEPENDS= python:${PORTSDIR}/lang/python
SCRIPTS_ENV+= FULLBUILD=on
.endif
.if defined (WITH_LDAP) || defined (WITH_LDAP_MODULES)
USE_OPENLDAP= YES
CONFIGURE_ARGS+= --with-ldap \
--with-ldap-lib="${LOCALBASE}/lib" \
--with-ldap-include="${LOCALBASE}/include"
.endif
.if defined(WITHOUT_IPV6)
CONFIGURE_ARGS+= --disable-ipv6
.else
CATEGORIES+= ipv6
. if defined(WITH_IPV6_V6ONLY) || defined(WITHOUT_V4MAPPED)
CONFIGURE_ARGS+= --disable-v4-mapped
. else
CONFIGURE_ARGS+= --enable-v4-mapped
. endif
.endif
.if defined(WITH_THREADS)
CONFIGURE_ARGS+= --enable-threads
. if ${ARCH} == i386
CONFIGURE_ARGS+= --enable-nonportable-atomics
. endif
.endif
2008-08-21 08:18:49 +02:00
CONFIGURE_ARGS+= --with-mpm=${WITH_MPM:L}
pre-everything::
@${ECHO_MSG} ""
@${ECHO_MSG} " To enable a module category: WITH_<CATEGORY>_MODULES"
@${ECHO_MSG} " To disable a module category: WITHOUT_<CATEGORY>_MODULES"
@${ECHO_MSG} ""
@${ECHO_MSG} " Per default categories are:"
@${ECHO_MSG} " ${DEFAULT_MODULES_CATEGORIES}"
@${ECHO_MSG} " Categories available:"
@${ECHO_MSG} " ${ALL_MODULES_CATEGORIES}"
@${ECHO_MSG} ""
@${ECHO_MSG} " To see all available knobs, type make show-options"
@${ECHO_MSG} " To see all modules in different categories, type make show-categories"
@${ECHO_MSG} " You can check your modules configuration by using make show-modules"
@${ECHO_MSG} ""
show-options:
@${SED} -ne 's/^##//p' ${APACHEDIR}/Makefile.doc
#optionally enable mod_proxy_connect patch
.if defined(WITH_PATCH_PROXY_CONNECT)
2009-12-12 00:56:52 +01:00
EXTRA_PATCHES+= ${FILESDIR}/opt-patch-modules:proxy:mod_proxy_connect.c
.endif
post-patch:
@${RM} -f ${WRKSRC}/docs/docroot/*.bak
@${REINPLACE_CMD} -e 's," PLATFORM ",FreeBSD,' \
${WRKSRC}/server/core.c
@${REINPLACE_CMD} -e "s,%%OSVERSION%%,${OSVERSION}," \
${WRKSRC}/srclib/apr/build/apr_hints.m4
@${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/extra/httpd-userdir.conf
@${REINPLACE_CMD} -e "s,%%WWWOWN%%,${WWWOWN}, ; \
s,%%WWWGRP%%,${WWWGRP}," \
${WRKSRC}/docs/conf/httpd.conf
@${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX}," \
${WRKSRC}/support/envvars-std
pre-install:
@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
post-install:
@${MKDIR} ${PREFIX}/etc/apache22/envvars.d
@${MKDIR} ${PREFIX}/etc/apache22/Includes
@${INSTALL_DATA} ${FILESDIR}/no-accf.conf ${PREFIX}/etc/apache22/Includes
.if !defined(NOPORTDOCS)
.for dir in style/lang style/xsl/util style/xsl
@[ -d ${DOCSDIR}/${dir}/ ] && ${TOUCH} ${DOCSDIR}/${dir}/.keepme
.endfor
.endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>