2005-12-03 22:02:58 +00:00
|
|
|
# New ports collection makefile for: apache22
|
2004-12-11 18:06:04 +00:00
|
|
|
# Date created: Dec 11 2004
|
|
|
|
# Whom: Clement Laforet <clement@FreeBSD.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
# For more information, please read Makefile.doc
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= apache
|
2008-12-15 22:05:56 +00:00
|
|
|
PORTVERSION= 2.2.11
|
2009-01-29 23:51:46 +00:00
|
|
|
PORTREVISION?= 3
|
2004-12-11 18:06:04 +00:00
|
|
|
CATEGORIES= www
|
2007-09-23 10:22:07 +00:00
|
|
|
MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD}
|
2005-12-03 22:02:58 +00:00
|
|
|
DISTNAME= httpd-${PORTVERSION}
|
2007-09-16 15:46:10 +00:00
|
|
|
DISTFILES= ${DISTNAME}.tar.bz2
|
2005-12-03 22:02:58 +00:00
|
|
|
DIST_SUBDIR= apache22
|
2004-12-11 18:06:04 +00:00
|
|
|
|
2009-01-09 14:13:05 +00:00
|
|
|
MAINTAINER?= apache@FreeBSD.org
|
2008-08-31 16:51:38 +00:00
|
|
|
COMMENT?= Version 2.2.x of Apache web server with ${WITH_MPM:L} MPM.
|
2004-12-11 18:06:04 +00:00
|
|
|
|
2008-12-15 22:05:56 +00:00
|
|
|
LIB_DEPENDS= expat.6:${PORTSDIR}/textproc/expat2 \
|
|
|
|
pcre.0:${PORTSDIR}/devel/pcre
|
2006-09-24 16:16:40 +00:00
|
|
|
|
2009-01-29 23:51:46 +00:00
|
|
|
LATEST_LINK?= apache22
|
2004-12-11 18:06:04 +00: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-* \
|
2007-06-17 16:59:27 +00:00
|
|
|
ru-apache+mod_ssl-1.* ru-apache-1.* \
|
2005-12-03 22:02:58 +00:00
|
|
|
apache-2.0.* apache-*-2.0.* apache-2.1.* apache-*-2.1.*
|
2004-12-11 18:06:04 +00:00
|
|
|
|
|
|
|
SCRIPTS_ENV+= LIBTOOL=${LIBTOOL} LIBTOOLIZE=${LIBTOOLIZE} \
|
|
|
|
LIBTOOL_VERSION=${LIBTOOL_VERSION} AUTOCONF=${AUTOCONF} \
|
|
|
|
LIBTOOL_M4=${LOCALBASE}/share/aclocal/libtool${LIBTOOL_VERSION}.m4 \
|
|
|
|
AUTOHEADER=${AUTOHEADER}
|
2005-02-23 10:59:45 +00:00
|
|
|
|
2005-12-03 22:02:58 +00:00
|
|
|
USE_APACHE= common22
|
2005-02-23 10:59:45 +00:00
|
|
|
USE_BZIP2= yes
|
2004-12-11 18:06:04 +00:00
|
|
|
USE_ICONV= yes
|
2008-08-20 00:57:32 +00:00
|
|
|
USE_AUTOTOOLS= autoconf:262 libtool:15
|
2004-12-11 18:06:04 +00:00
|
|
|
USE_PERL5= yes
|
2007-07-22 11:03:37 +00:00
|
|
|
USE_RC_SUBR= apache22.sh htcacheclean.sh
|
2008-08-31 23:00:27 +00:00
|
|
|
SUB_LIST+= RC_SUBR_SUFFIX=${RC_SUBR_SUFFIX}
|
2004-12-11 18:06:04 +00:00
|
|
|
LIBTOOLFILES= configure
|
2006-01-15 18:58:38 +00:00
|
|
|
|
2008-09-02 12:26:37 +00:00
|
|
|
MPM_ITK_VERSION?= 20080727-00
|
|
|
|
|
2007-12-11 20:22:16 +00:00
|
|
|
# for slave ports
|
|
|
|
.if !defined(MASTERDIR)
|
|
|
|
APACHEDIR= ${.CURDIR}
|
|
|
|
.else
|
|
|
|
APACHEDIR= ${MASTERDIR}
|
|
|
|
.endif
|
|
|
|
|
2007-09-18 20:03:15 +00:00
|
|
|
.if !defined(WITHOUT_APACHE_OPTIONS)
|
|
|
|
OPTIONS= \
|
|
|
|
APR_FROM_PORTS "Use devel/apr as APR (beware!)" 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 \
|
2007-09-19 21:05:23 +00:00
|
|
|
IPV6 "Enable IPv6 support" On \
|
2009-01-19 19:08:23 +00:00
|
|
|
BDB "Enable BerkeleyDB dbm" Off
|
2007-12-11 20:22:16 +00:00
|
|
|
.include "${APACHEDIR}/Makefile.options"
|
2007-09-18 20:03:15 +00:00
|
|
|
.endif
|
|
|
|
|
2004-12-11 18:06:04 +00:00
|
|
|
CONFIGURE_ARGS= --prefix=${PREFIX_RELDEST} \
|
|
|
|
--enable-layout=FreeBSD \
|
|
|
|
--with-perl=${PERL5} \
|
|
|
|
--with-port=${WITH_HTTP_PORT} \
|
|
|
|
--with-expat=${LOCALBASE} \
|
|
|
|
--with-iconv=${LOCALBASE} \
|
2008-12-15 22:05:56 +00:00
|
|
|
--enable-http \
|
|
|
|
--with-pcre=${LOCALBASE}
|
2004-12-11 18:06:04 +00:00
|
|
|
|
|
|
|
CONFIGURE_ENV= CC="${CC}" CPPFLAGS="${CPPFLAGS}" \
|
|
|
|
CFLAGS="${CFLAGS}" \
|
|
|
|
LDFLAGS="${LDFLAGS}" CONFIG_SHELL="${SH}" \
|
|
|
|
LOCALBASE="${LOCALBASE}"
|
|
|
|
|
|
|
|
PREFIX_RELDEST= ${PREFIX:S,^${DESTDIR},,}
|
|
|
|
|
2007-08-04 11:41:30 +00:00
|
|
|
MAKE_ENV+= EXPR_COMPAT=yes
|
2004-12-11 18:06:04 +00:00
|
|
|
|
2007-09-10 19:15:48 +00:00
|
|
|
WITH_MPM?= prefork # or worker, event, itk
|
2004-12-11 18:06:04 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2006-01-15 08:56:50 +00:00
|
|
|
.include "${APACHEDIR}/Makefile.doc"
|
|
|
|
.include "${APACHEDIR}/Makefile.modules"
|
2006-01-15 18:58:38 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
2008-08-31 16:51:38 +00:00
|
|
|
|
|
|
|
# OPTIONS fixups
|
|
|
|
.if defined (WITH_AUTHNZ_LDAP)
|
|
|
|
WITH_LDAP= yes
|
|
|
|
.endif
|
|
|
|
|
2007-09-23 10:22:07 +00:00
|
|
|
.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
|
2004-12-11 18:06:04 +00:00
|
|
|
|
2004-12-13 10:26:52 +00:00
|
|
|
.if defined(WITH_APR_FROM_PORTS)
|
|
|
|
PLIST_SUB+= APR_PORTS="@comment "
|
2008-08-31 16:51:38 +00:00
|
|
|
APR_PORT?= devel/apr
|
|
|
|
LIB_DEPENDS+= apr-1:${PORTSDIR}/${APR_PORT}
|
2004-12-13 10:26:52 +00:00
|
|
|
CONFIGURE_ARGS+= --with-apr=${LOCALBASE}/bin/apr-1-config \
|
|
|
|
--with-apr-util=${LOCALBASE}/bin/apu-1-config
|
|
|
|
CONFIGURE_ENV+= LTFLAGS="--tag=CXX"
|
|
|
|
.else
|
2007-09-23 10:22:07 +00:00
|
|
|
USE_LDCONFIG= yes
|
2004-12-13 10:26:52 +00:00
|
|
|
PLIST_SUB+= APR_PORTS=""
|
2007-12-11 20:22:16 +00:00
|
|
|
CONFLICTS+= apr-1.* apr-db4[0-9]-1.*
|
2005-12-10 11:53:01 +00:00
|
|
|
CONFIGURE_ENV+= USE_BUNDLED_APR=YES
|
2004-12-11 18:06:04 +00:00
|
|
|
.endif
|
|
|
|
|
2007-09-23 10:22:07 +00:00
|
|
|
# When using apr_mysql_db we _must_ rebuild makefiles
|
2008-12-15 22:05:56 +00:00
|
|
|
.if defined(WITH_FULLBUILD)
|
2007-09-23 10:22:07 +00:00
|
|
|
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
|
|
|
|
|
2006-01-15 18:58:38 +00:00
|
|
|
.if defined(WITH_THREADS)
|
|
|
|
CONFIGURE_ARGS+= --enable-threads
|
2009-01-06 16:53:07 +00:00
|
|
|
. if ${ARCH} == i386
|
2006-01-15 18:58:38 +00:00
|
|
|
CONFIGURE_ARGS+= --enable-nonportable-atomics
|
|
|
|
. endif
|
|
|
|
.endif
|
2004-12-11 18:06:04 +00:00
|
|
|
|
2008-08-21 06:18:49 +00:00
|
|
|
CONFIGURE_ARGS+= --with-mpm=${WITH_MPM:L}
|
2004-12-11 18:06:04 +00:00
|
|
|
|
|
|
|
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} ""
|
|
|
|
|
2006-01-15 18:58:38 +00:00
|
|
|
show-options:
|
|
|
|
@${SED} -ne 's/^##//p' ${APACHEDIR}/Makefile.doc
|
|
|
|
|
2004-12-11 18:06:04 +00:00
|
|
|
post-patch:
|
|
|
|
@${RM} -f ${WRKSRC}/docs/docroot/*.bak
|
|
|
|
@${REINPLACE_CMD} -e 's," PLATFORM ",FreeBSD,' \
|
|
|
|
${WRKSRC}/server/core.c
|
2004-12-18 11:09:00 +00:00
|
|
|
@${REINPLACE_CMD} -e "s,%%OSVERSION%%,${OSVERSION}," \
|
2004-12-11 18:06:04 +00:00
|
|
|
${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" " "` ;\
|
2005-10-30 20:39:05 +00:00
|
|
|
${REINPLACE_CMD} -e "s,%%FTPUSERS%%,$$FTPUSERS," \
|
|
|
|
${WRKSRC}/docs/conf/extra/httpd-userdir.conf
|
2005-12-13 22:26:57 +00:00
|
|
|
@${REINPLACE_CMD} -e "s,%%WWWOWN%%,${WWWOWN}, ; \
|
|
|
|
s,%%WWWGRP%%,${WWWGRP}," \
|
2005-10-30 20:39:05 +00:00
|
|
|
${WRKSRC}/docs/conf/httpd.conf
|
2005-12-13 22:26:57 +00:00
|
|
|
@${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX}," \
|
|
|
|
${WRKSRC}/support/envvars-std
|
2004-12-11 18:06:04 +00:00
|
|
|
|
|
|
|
pre-install:
|
|
|
|
@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
|
|
|
|
2006-09-24 16:16:40 +00:00
|
|
|
post-install:
|
2005-12-03 22:02:58 +00:00
|
|
|
@${MKDIR} ${PREFIX}/etc/apache22/envvars.d
|
|
|
|
@${MKDIR} ${PREFIX}/etc/apache22/Includes
|
2005-12-13 22:26:57 +00:00
|
|
|
@${INSTALL_DATA} ${FILESDIR}/no-accf.conf ${PREFIX}/etc/apache22/Includes
|
2005-12-04 14:59:41 +00:00
|
|
|
.if !defined(NOPORTDOCS)
|
2008-08-31 23:00:27 +00:00
|
|
|
.for dir in style/lang style/xsl/util style/xsl
|
|
|
|
@[ -d ${DOCSDIR}/${dir}/ ] && ${TOUCH} ${DOCSDIR}/${dir}/.keepme
|
|
|
|
.endfor
|
2005-12-04 14:59:41 +00:00
|
|
|
.endif
|
2005-12-13 22:26:57 +00:00
|
|
|
@${CAT} ${PKGMESSAGE}
|
2004-12-11 18:06:04 +00:00
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|