diff --git a/Mk/bsd.apache.mk b/Mk/bsd.apache.mk index 3c62a49349d4..36ede056a62d 100644 --- a/Mk/bsd.apache.mk +++ b/Mk/bsd.apache.mk @@ -1,522 +1,524 @@ #-*- tab-width: 4; -*- # ex:ts=4 # # $FreeBSD$ # # bsd.apache.mk - Apache related macros. # Author: Clement Laforet # Author: Olli Hauer # # Please view me with 4 column tabs! # ========================================================================= # Parameter APACHE_PORT (user controlled): # # The parameter APACHE_PORT can be used in /etc/make.conf to # overwrite the default apache port. # # This parameter should never be used in the Makefile of a port! # # Example entry in /etc/make.conf: # APACHE_PORT= www/apache22 # # To get a list of "possible" valid values execute the command: # $> egrep 'apache[12]' ports/www/Makefile | awk '{print "www/" $3}' # # ========================================================================= # # This script will be included if one of the following parameter # is defined in the Makefile of the port # # USE_APACHE - Set apache and apxs as build and run dependency # USE_APACHE_BUILD - Set apache and apxs as build dependency # USE_APACHE_RUN - Set apache and apxs as run dependency # # The following example is representative of all three possible # parameters to use. # # Examples: # USE_APACHE= 22 # specify exact version # USE_APACHE= 20+ # specify [min] version, no [max] version # USE_APACHE= 20-22 # specify [min]-[max] range # USE_APACHE= -22 # specify [max] version, no [min] version # # Note: # - If "+" is specified and no apache is installed, then # ${DEFAULT_APACHE_VERSION} will be used. # # - Valid version numbers are specified in the variable # APACHE_SUPPORTED_VERSION below # # - The following values for USE_APACHE are reserverd and only valid # in apache-server ports! # USE_APACHE= common20, and common22 # # # The following variables can be used (ro) in ports Makefile # ========================================================================= # - APACHE_VERSION # - APACHEETCDIR # - APACHEINCLUDEDIR # - APACHEMODDIR # - DEFAULT_APACHE_VERSION # # # Parameters for building third party apache modules: # ========================================================================= # - AP_FAST_BUILD # automatic module build # # - AP_GENPLIST # automatic PLIST generation plus add # # the module disabled into httpd.conf # # (only if no pkg-plist exist) # # - MODULENAME # default: ${PORTNAME} # - SHORTMODNAME # default: ${MODULENAME:S/mod_//} # - SRC_FILE # default: ${MODULENAME}.c # # .if !defined(Apache_Pre_Include) Apache_Pre_Include= bsd.apache.mk DEFAULT_APACHE_VERSION= 22 APACHE_SUPPORTED_VERSION= 22 20 # preferred version first # Print warnings _ERROR_MSG= : Error from bsd.apache.mk. # Important Note: # Keep apache version in ascending order! # The "+" sign is only valid as last sign, not between # two versions or in combination with range! .if defined(USE_APACHE) && !empty(USE_APACHE) . if ${USE_APACHE:Mcommon*} != "" -AP_PORT_IS_SERVER= YES +AP_PORT_IS_SERVER= yes . elif ${USE_APACHE:C/\-//:S/^20//:S/^22//:C/\+$//} == "" -AP_PORT_IS_MODULE= YES +AP_PORT_IS_MODULE= yes . if ${USE_APACHE:C/\-//:S/^20//:S/^22//} == "+" AP_PLUS= yes . endif . else IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE ( ${USE_APACHE} ) . endif # Catch unknown apache versions and silly USE_APACHE constructs . if empty(AP_PORT_IS_SERVER) && empty(AP_PORT_IS_MODULE) IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE ( ${USE_APACHE} ) . endif # Catch USE_APACHE [min]-[max]+ . if defined(AP_PLUS) && ${USE_APACHE:C/[.+0-9]//g} == "-" IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE ( ${USE_APACHE} ) . endif .elif defined(USE_APACHE) IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE ( no version specified ) .endif # defined(USE_APACHE) # =============================================================== .if defined(AP_PORT_IS_SERVER) +# MFC TODO: remove this check +# used only in apache22-peruser-mpm, remved in rev. 253708 +# http://svnweb.freebsd.org/ports?view=revision&revision=253708 # For slave ports: .if defined(SLAVE_DESIGNED_FOR) && ${PORTVERSION} != ${SLAVE_DESIGNED_FOR} IGNORE= Sorry, ${SLAVENAME} and ${PORTNAME} versions are out of sync ${PORTVERSION} != ${SLAVE_DESIGNED_FOR} .endif -# used by www/cakeph* ports +# MFC TODO: remove this check +# used only by www/cakephp* ports .if defined(SLAVE_PORT_MODULES) DEFAULT_MODULES_CATEGORIES+= SLAVE_PORT ALL_MODULES_CATEGORIES+= SLAVE_PORT .endif # Module selection .for category in ${DEFAULT_MODULES_CATEGORIES} DEFAULT_MODULES+= ${${category}_MODULES} -WITH_${category}_MODULES= YES +WITH_${category}_MODULES= yes .endfor .for category in ${ALL_MODULES_CATEGORIES} AVAILABLE_MODULES+= ${${category}_MODULES} .endfor +# == start convert param to UPPERCASE +# detect lowercase params in make.conf, users should them to UPPERCASE +# In near future we will throw an IGNORE message +#_ERROR_DLCM= ... detected (make.conf), please convert apache releated params to UPPERCASE +.if defined(WITH_MODULES) && ${WITH_MODULES:M[a-z]*} +#IGNNORE= lowercase WITH_MODULES= ${_ERROR_DLCM} +WITH_MODULES:=${WITH_MODULES:U} +.endif +.if defined(WITHOUT_MODULES) && ${WITHOUT_MODULES:M[a-z]*} +#IGNORE= lowercase WITHOUT_MODULES= ${_ERROR_DLCM} +WITHOUT_MODULES:=${WITHOUT_MODULES:U} +.endif +.if defined(WITH_STATIC_MODULES) && ${WITH_STATIC_MODULES:M[a-z]*} +#IGNORE= lowercase WITH_STATIC_MODULES= ${_ERROR_DLCM} +WITH_STATIC_MODULES:=${WITH_STATIC_MODULES:U} +.endif +# == end convert param to UPPERCASE + # Setting "@comment " as default. -.for module in ${AVAILABLE_MODULES} -${module}_PLIST_SUB= "@comment " +.for module in ${AVAILABLE_MODULES:O} +${module}_PLIST_SUB= "@comment " +_DISABLE_MODULES+= --disable-${module:L} .endfor # Configure # dirty hacks to make sure all modules are disabled before we select them -.if ${USE_APACHE} == common20 -CONFIGURE_ARGS+= --disable-access --disable-auth \ - --disable-charset-lite --disable-include \ - --disable-log-config --disable-env --disable-setenvif \ - --disable-mime --disable-status --disable-autoindex \ - --disable-asis --disable-cgid --disable-cgi \ - --disable-negotiation --disable-dir --disable-imap \ - --disable-actions --disable-userdir --disable-alias -.elif ${USE_APACHE} == common22 -CONFIGURE_ARGS+= --disable-authn-file --disable-authn-default \ - --disable-authz-host --disable-authz-groupfile \ - --disable-authz-user --disable-authz-default \ - --disable-auth-basic --disable-charset-lite \ - --disable-include --disable-log-config --disable-env \ - --disable-setenvif --disable-mime --disable-status \ - --disable-autoindex --disable-asis --disable-cgid \ - --disable-cgi --disable-negotiation --disable-dir \ - --disable-imagemap --disable-actions --disable-userdir \ - --disable-alias --disable-filter --disable-substitute \ - --disable-proxy --disable-proxy-connect \ - --disable-proxy-ftp --disable-proxy-http \ - --disable-proxy-ajp --disable-proxy-balancer \ - --disable-proxy-scgi --disable-reqtimeout -.endif - -.if defined(OPTIONS) && !(make(make-options-list)) +.if ${USE_APACHE:Mcommon2*} +CONFIGURE_ARGS+= ${_DISABLE_MODULES:O:u} +.endif + +.if ( defined(OPTIONS) || defined(OPTIONS_DEFINE) ) && !(make(make-options-list)) .for module in ${AVAILABLE_MODULES} -. if defined(WITH_${module:U}) +. if defined(WITH_${module}) _APACHE_MODULES+= ${module} . endif -. if defined(WITHOUT_${module:U}) +. if defined(WITHOUT_${module}) WITHOUT_MODULES+= ${module} . endif .endfor + +# MFC TODO: remove together with apache20 .elif defined(WITH_MODULES) _APACHE_MODULES+= ${WITH_MODULES} .else +# MFC TODO: remove together with apache20 .for category in ${ALL_MODULES_CATEGORIES} . if defined (WITHOUT_${category}_MODULES) || defined (WITH_CUSTOM_${category}) . if defined(WITH_${category}_MODULES}) . undef WITH_${category}_MODULES . endif . if defined (WITH_CUSTOM_${category}) -_APACHE_MODULES+= ${WITH_CUSTOM_${category}} +_APACHE_MODULES+= ${WITH_CUSTOM_${category}:U} . endif . elif defined(WITH_${category}_MODULES) -_APACHE_MODULES+= ${${category}_MODULES} +_APACHE_MODULES+= ${${category}_MODULES:U} . endif .endfor +# MFC TODO: remove this check +# last usage of WITH_EXTRA_MODULES in apache22/Makefile.modules +# http://www.freebsd.org/cgi/cvsweb.cgi/ports/www/apache22/Makefile.modules.diff?r1=text&tr1=1.1&r2=text&tr2=1.3 .if defined(WITH_EXTRA_MODULES) -_APACHE_MODULES+= ${WITH_EXTRA_MODULES} +_APACHE_MODULES+= ${WITH_EXTRA_MODULES:U} .endif .endif .if !defined(WITH_STATIC_APACHE) . if ${USE_APACHE:Mcommon2*} != "" # FYI #DYNAMIC_MODULES= so CONFIGURE_ARGS+= --enable-so . endif .else . if ${USE_APACHE:Mcommon2*} != "" CONFIGURE_ARGS+= --disable-so . endif -WITH_ALL_STATIC_MODULES= YES +WITH_ALL_STATIC_MODULES= yes .endif .if defined(WITH_SUEXEC) || defined(WITH_SUEXEC_MODULES) . if ${USE_APACHE:Mcommon2*} != "" _APACHE_MODULES+= ${SUEXEC_MODULES} SUEXEC_CONFARGS= with-suexec . endif # From now we're defaulting to apache 2.* SUEXEC_DOCROOT?= ${PREFIX}/www/data SUEXEC_USERDIR?= public_html SUEXEC_SAFEPATH?= ${PREFIX}/bin:${LOCALBASE}/bin:/usr/bin:/bin SUEXEC_LOGFILE?= /var/log/httpd-suexec.log SUEXEC_UIDMIN?= 1000 SUEXEC_GIDMIN?= 1000 SUEXEC_CALLER?= ${WWWOWN} CONFIGURE_ARGS+= --${SUEXEC_CONFARGS}-caller=${SUEXEC_CALLER} \ --${SUEXEC_CONFARGS}-uidmin=${SUEXEC_UIDMIN} \ --${SUEXEC_CONFARGS}-gidmin=${SUEXEC_GIDMIN} \ --${SUEXEC_CONFARGS}-userdir="${SUEXEC_USERDIR}" \ --${SUEXEC_CONFARGS}-docroot="${SUEXEC_DOCROOT}" \ --${SUEXEC_CONFARGS}-safepath="${SUEXEC_SAFEPATH}" \ --${SUEXEC_CONFARGS}-logfile="${SUEXEC_LOGFILE}" . if ${USE_APACHE:Mcommon2*} != "" CONFIGURE_ARGS+= --${SUEXEC_CONFARGS}-bin="${PREFIX}/sbin/suexec" . endif . if defined(WITH_SUEXEC_UMASK) CONFIGURE_ARGS+= --${SUEXEC_CONFARGS}-umask=${SUEXEC_UMASK} . endif .endif .if !defined(WITHOUT_MODULES) APACHE_MODULES= ${_APACHE_MODULES} .else -APACHE_MODULES!= \ - for module in ${_APACHE_MODULES}; do \ - ${ECHO_CMD} ${WITHOUT_MODULES} | ${GREP} -wq $${module} 2> /dev/null || \ - ${ECHO_CMD} $${module}; \ - done +.for module in ${_APACHE_MODULES:O:u} +. if !${WITHOUT_MODULES:M${module}} +APACHE_MODULES+= ${module} +. endif +.endfor .endif .if defined(WITH_STATIC_MODULES) -STATIC_MODULE_CONFARG= --enable-$${module} -DSO_MODULE_CONFARG= --enable-$${module}=shared -_CONFIGURE_ARGS!= \ - for module in ${APACHE_MODULES} ; do \ - ${ECHO_CMD} ${WITH_STATIC_MODULES} | \ - ${GREP} -wq $${module} 2> /dev/null ; \ - if [ "$${?}" = "0" ] ; then \ - ${ECHO_CMD} "${STATIC_MODULE_CONFARG}"; \ - else \ - ${ECHO_CMD} "${DSO_MODULE_CONFARG}"; \ - fi; done -CONFIGURE_ARGS+= ${_CONFIGURE_ARGS} +. for module in ${APACHE_MODULES} +. if ${WITH_STATIC_MODULES:M${module}} +_CONFIGURE_ARGS+= --enable-${module:L} +. else +_CONFIGURE_ARGS+= --enable-${module:L}=shared +. endif +. endfor +CONFIGURE_ARGS+= ${_CONFIGURE_ARGS:O} .elif defined(WITH_STATIC_APACHE) || defined(WITH_ALL_STATIC_MODULES) WITH_STATIC_MODULES= ${APACHE_MODULES} -CONFIGURE_ARGS+= --enable-modules="${APACHE_MODULES}" +CONFIGURE_ARGS+= --enable-modules="${APACHE_MODULES:O:L}" .else -CONFIGURE_ARGS+= --enable-mods-shared="${APACHE_MODULES}" +CONFIGURE_ARGS+= --enable-mods-shared="${APACHE_MODULES:O:L}" .endif .if defined(WITH_STATIC_MODULES) -_SHARED_MODULES!= \ - for module in ${APACHE_MODULES} ; do \ - ${ECHO_CMD} ${WITH_STATIC_MODULES} | ${GREP} -wq $${module} 2> /dev/null || \ - ${ECHO_CMD} $${module}; \ - done +.for module in ${APACHE_MODULES} +. if !${WITH_STATIC_MODULES:M${module}} +_SHARED_MODULES+= ${module} +. endif +.endfor + SHARED_MODULES= ${_SHARED_MODULES} .elif !defined(WITH_ALL_STATIC_MODULES) SHARED_MODULES= ${APACHE_MODULES} .endif .for module in ${SHARED_MODULES} ${module}_PLIST_SUB= "" .endfor -.for module in ${AVAILABLE_MODULES} -PLIST_SUB+= MOD_${module:U}=${${module}_PLIST_SUB} +.for module in ${AVAILABLE_MODULES:O:u} +PLIST_SUB+= MOD_${module}=${${module}_PLIST_SUB} .endfor #### End of AP_PORT_IS_SERVER #### # =============================================================== .elif defined(AP_PORT_IS_MODULE) || defined(USE_APACHE_RUN) || defined(USE_APACHE_BUILD) APXS?= ${LOCALBASE}/sbin/apxs HTTPD?= ${LOCALBASE}/sbin/httpd MODULENAME?= ${PORTNAME} SHORTMODNAME?= ${MODULENAME:S/mod_//} SRC_FILE?= ${MODULENAME}.c .if exists(${HTTPD}) _APACHE_VERSION!= ${HTTPD} -V | ${SED} -ne 's/^Server version: Apache\/\([0-9]\)\.\([0-9]*\).*/\1\2/p' +# XXX see mod_perl-2.0.6/Changes # Apache 2.4 and onwards doesn't require linking the MPM module # directly in the httpd binary anymore. APXS lost the MPM_NAME query, # so we can't assume a given MPM anymore. . if ${_APACHE_VERSION} <= 22 APACHE_MPM!= ${APXS} -q MPM_NAME . endif .elif defined(APACHE_PORT) _APACHE_VERSION!= ${ECHO_CMD} ${APACHE_PORT} | ${SED} -ne 's,.*/apache\([0-9]*\).*,\1,p' .endif .if defined(USE_APACHE) _USE_APACHE:= ${USE_APACHE} .elif defined(USE_APACHE_BUILD) _USE_APACHE:= ${USE_APACHE_BUILD} .elif defined(USE_APACHE_RUN) _USE_APACHE:= ${USE_APACHE_RUN} .endif _APACHE_VERSION_CHECK:= ${_USE_APACHE:C/^([1-9][0-9])$/\1-\1/} _APACHE_VERSION_MINIMUM_TMP:= ${_APACHE_VERSION_CHECK:C/([1-9][0-9])[-+].*/\1/} _APACHE_VERSION_MINIMUM:= ${_APACHE_VERSION_MINIMUM_TMP:M[1-9][0-9]} _APACHE_VERSION_MAXIMUM_TMP:= ${_APACHE_VERSION_CHECK:C/.*-([1-9][0-9])/\1/} _APACHE_VERSION_MAXIMUM:= ${_APACHE_VERSION_MAXIMUM_TMP:M[1-9][0-9]} .if defined(_APACHE_VERSION) # Validate Apache version whether it meets USE_APACHE version restriction. . if !empty(_APACHE_VERSION_MINIMUM) && (${_APACHE_VERSION} < ${_APACHE_VERSION_MINIMUM}) _APACHE_VERSION_NONSUPPORTED= ${_APACHE_VERSION_MINIMUM} at least . elif !empty(_APACHE_VERSION_MAXIMUM) && (${_APACHE_VERSION} > ${_APACHE_VERSION_MAXIMUM}) _APACHE_VERSION_NONSUPPORTED= ${_APACHE_VERSION_MAXIMUM} at most . endif . if defined(_APACHE_VERSION_NONSUPPORTED) && !defined(AP_IGNORE_VERSION_CHECK) IGNORE= ${_ERROR_MSG} apache${_APACHE_VERSION} is installed (or APACHE_PORT is defined) and port requires apache${_APACHE_VERSION_NONSUPPORTED} . endif .else # defined(_APACHE_VERSION) . for ver in ${APACHE_SUPPORTED_VERSION} __VER= ${ver} . if !defined(_APACHE_VERSION) && \ !(!empty(_APACHE_VERSION_MINIMUM) && ( ${__VER} < ${_APACHE_VERSION_MINIMUM} )) && \ !(!empty(_APACHE_VERSION_MAXIMUM) && ( ${__VER} > ${_APACHE_VERSION_MAXIMUM} )) _APACHE_VERSION= ${ver} . endif . endfor .endif # defined(_APACHE_VERSION) APACHE_VERSION:= ${_APACHE_VERSION} .if exists(${APXS}) APXS_PREFIX!= ${APXS} -q prefix 2> /dev/null || echo NULL . if ${APXS_PREFIX} == NULL IGNORE= : Your apache does not support DSO modules . endif . if defined(AP_GENPLIST) && ${APXS_PREFIX} != ${PREFIX} IGNORE?= PREFIX must be equal to APXS_PREFIX. . endif .endif .if ${APACHE_VERSION} == 20 AP_BUILDEXT= la APACHEMODDIR= libexec/apache2 APACHEINCLUDEDIR=include/apache2 APACHEETCDIR= etc/apache2 APACHE_PORT?= www/apache${APACHE_VERSION} .elif ${APACHE_VERSION} >= 22 AP_BUILDEXT= la APACHEMODDIR= libexec/apache${APACHE_VERSION} APACHEINCLUDEDIR=include/apache${APACHE_VERSION} APACHEETCDIR= etc/apache${APACHE_VERSION} APACHE_PORT?= www/apache${APACHE_VERSION} .endif PLIST_SUB+= APACHEMODDIR="${APACHEMODDIR}" \ APACHEINCLUDEDIR="${APACHEINCLUDEDIR}" \ APACHEETCDIR="${APACHEETCDIR}" APACHE_PKGNAMEPREFIX= ap${APACHE_VERSION}- .if defined(AP_FAST_BUILD) PKGNAMEPREFIX?= ${APACHE_PKGNAMEPREFIX} .endif .if defined(USE_APACHE) || defined(USE_APACHE_BUILD) BUILD_DEPENDS+= ${APXS}:${PORTSDIR}/${APACHE_PORT} .endif .if defined(USE_APACHE) || defined(USE_APACHE_RUN) RUN_DEPENDS+= ${APXS}:${PORTSDIR}/${APACHE_PORT} .endif PLIST_SUB+= AP_NAME="${SHORTMODNAME}" PLIST_SUB+= AP_MODULE="${MODULENAME}.so" .if defined(AP_GENPLIST) PLIST?= ${WRKDIR}/ap-plist .endif .if defined(AP_INC) AP_EXTRAS+= -I ${AP_INC} .endif .if defined(AP_LIB) AP_EXTRAS+= -L ${AP_LIB} .endif .endif # End of AP_PORT_IS_SERVER / AP_PORT_IS_MOULE .endif # End of !Apache_Pre_Include # =============================================================== .if defined(_POSTMKINCLUDED) && !defined(Apache_Post_Include) Apache_Post_Include= bsd.apache.mk .if defined(USE_APACHE_RUN) && !empty(USE_APACHE_RUN) . if ${USE_APACHE_RUN:C/\-//:S/^20//:S/^22//:C/\+$//} != "" IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE_RUN ( ${USE_APACHE_RUN} ) . endif .elif defined(USE_APACHE_RUN) IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE_RUN ( no valid version specified ) .endif .if defined(USE_APACHE_BUILD) && !empty(USE_APACHE_BUILD) . if ${USE_APACHE_BUILD:C/\-//:S/^20//:S/^22//:C/\+$//} != "" IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE_BUILD ( ${USE_APACHE_BUILD} ) . endif .elif defined(USE_APACHE_BUILD) IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE_BUILD ( no valid version specified ) .endif # Check if USE_APACHE(_BUILD|_RUN) are mixed together .if defined(USE_APACHE) && ( defined(USE_APACHE_BUILD) || defined(USE_APACHE_RUN) ) IGNORE= ${_ERROR_MSG} specify only one of: USE_APACHE USE_APACHE_BUILD USE_APACHE_RUN .elif defined(USE_APACHE_BUILD) && defined(USE_APACHE_RUN) IGNORE= ${_ERROR_MSG} use USE_APACHE instead of USE_APACHE_BUILD and USE_APACHE_RUN together .endif .if defined(AP_PORT_IS_SERVER) .if !target(print-closest-mirrors) print-closest-mirrors: @${ECHO_MSG} -n "Fetching list of nearest mirror: " >&2 @MIRRORS=`${FETCH_CMD} -T 30 -qo - http://www.apache.org/dyn/closer.cgi/httpd/ 2> /dev/null\ | ${GREP} /httpd/ | ${SED} 's/.*href="\(.*\)">&2; if [ "x$$MIRRORS" != "x" ]; then \ ${ECHO_MSG} -n "MASTER_SITE_APACHE_HTTPD?= ";\ ${ECHO_MSG} $$MIRRORS; else \ ${ECHO_MSG} "No mirrors found!">&2 ; fi .endif .if !target(show-categories) show-categories: .for category in ${ALL_MODULES_CATEGORIES} @${ECHO_MSG} "${category} contains these modules:" @${ECHO_MSG} " ${${category}_MODULES}" .endfor .endif .if !target(show-modules) 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 +.for module in ${AVAILABLE_MODULES} + @${PRINTF} "%-20s : " ${module} +. if ${APACHE_MODULES:M${module}} + @${ECHO} -n "enabled " +. if !empty(WITH_STATIC_MODULES) && ${WITH_STATIC_MODULES:M${module}} + @${ECHO_CMD} " (static)" +. else + @${ECHO_CMD} "(shared)" +. endif +. else + @${ECHO_CMD} disabled +. endif +.endfor .endif +# MFC TODO: remove this target it's useless with options NG .if !target(make-options-list) make-options-list: @${ECHO_CMD} OPTIONS+= \\; - @for module in ${AVAILABLE_MODULES} ; do \ - if ${ECHO_CMD} ${APACHE_MODULES} | ${GREP} -wq $${module} 2> /dev/null ; \ - then \ - ${PRINTF} "\t `${ECHO_CMD} $${module} | ${TR} '[:lower:]' '[:upper:]'` \"Enable mod_$${module}\" ON \\"; \ - ${ECHO_CMD}; \ - else \ - ${PRINTF} "\t `${ECHO_CMD} $${module} | ${TR} '[:lower:]' '[:upper:]'` \"Enable mod_$${module}\" OFF \\";\ - ${ECHO_CMD}; \ - fi;\ - done; \ - ${ECHO_CMD}; +.for module in ${AVAILABLE_MODULES} +. if ${APACHE_MODULES:M${module}} + @${ECHO} -e "\t ${module} \"mod_${module:L}\" on \\" +. else + @${ECHO} -e "\t ${module} \"mod_${module:L}\" off \\" +. endif +.endfor .endif .elif defined(AP_PORT_IS_MODULE) .if defined(AP_FAST_BUILD) .if !target(ap-gen-plist) ap-gen-plist: .if defined(AP_GENPLIST) . if !exists(${PLIST}) @${ECHO} "===> Generating apache plist" # apache22/20 @${ECHO} "@unexec ${SED} -i '' -E '/LoadModule[[:blank:]]+%%AP_NAME%%_module/d' %D/%%APACHEETCDIR%%/httpd.conf" >> ${PLIST} @${ECHO} "%%APACHEMODDIR%%/%%AP_MODULE%%" >> ${PLIST} @${ECHO} "@exec %D/sbin/apxs -e -A -n %%AP_NAME%% %D/%F" >> ${PLIST} @${ECHO} "@unexec echo \"Don't forget to remove all ${MODULENAME}-related directives in your httpd.conf\"">> ${PLIST} . endif .else @${DO_NADA} .endif .endif .if !target(do-build) do-build: ap-gen-plist @cd ${WRKSRC} && ${APXS} -c ${AP_EXTRAS} -o ${MODULENAME}.${AP_BUILDEXT} ${SRC_FILE} .endif .if !target(do-install) do-install: @${APXS} -i -A -n ${SHORTMODNAME} ${WRKSRC}/${MODULENAME}.${AP_BUILDEXT} .endif .endif .endif .endif # defined(_POSTMKINCLUDED) && !defined(Apache_Post_Include) diff --git a/www/apache20/Makefile b/www/apache20/Makefile index 35621fc528e7..7b99379b9406 100644 --- a/www/apache20/Makefile +++ b/www/apache20/Makefile @@ -1,231 +1,231 @@ # New ports collection makefile for: apache2 # Date created: 7 April 2001 # Whom: Hye-Shik Chang # # $FreeBSD$ # # For more information, please read Makefile.doc # PORTNAME= apache PORTVERSION= 2.0.64 PORTREVISION= 3 CATEGORIES= www MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD} \ ${MASTER_SITE_LOCAL:S/$/:powerlogo/} MASTER_SITE_SUBDIR= clement/:powerlogo DISTNAME= httpd-${PORTVERSION} DISTFILES= ${DISTNAME}.tar.bz2 powerlogo.gif:powerlogo DIST_SUBDIR= apache2 EXTRACT_ONLY= ${DISTNAME}.tar.bz2 MAINTAINER?= apache@FreeBSD.org COMMENT?= Version 2.0.x of Apache web server with ${WITH_MPM:L} MPM. LIB_DEPENDS= expat:${PORTSDIR}/textproc/expat2 \ pcre:${PORTSDIR}/devel/pcre \ apr-0:${PORTSDIR}/devel/apr0 USERS= www GROUPS= www MAKE_JOBS_SAFE= yes DEPRECATED= will be unsupported by ASF when 2.4.0 is release, migrate to 2.2.x+ now EXPIRATION_DATE= 2012-01-01 LATEST_LINK= apache20 CONFLICTS= apache-2.2.* apache-*-2.2.* \ caudium14-1.* ## XXX: Every possible option for things in Makefile.modules needs to be ## XXX: in OPTIONS too, or its not passed to make. #OPTIONS= \ # IPV6 "Enable IPv6 support" On \ # BDB "Enable BerkeleyDB dbm" Off \ # KQUEUE_SUPPORT "Enable kqueue in bundled apr" Off \ # SSL "Enable SSL support" On \ # SSL_EXPERIMENTAL_ENGINE "Use Experimental SSL engine" Off \ # DEBUG "Enable debugging" Off \ # EXCEPTION_HOOK "Enable Exception Hook" On \ # LDAP "Enable LDAP Support" Off \ # THREADS "Enable threads in apr" Off USE_ICONV= yes USE_AUTOTOOLS= autoconf libtool USE_PERL5= yes USE_RC_SUBR= apache2 USE_APACHE= common20 LIBTOOLFILES= configure.in USE_BZIP2= yes MPM_ITK_VERSION?= 20061030-01 .if defined(WITH_SUEXEC_RSRCLIMIT) EXTRA_PATCHES+= ${FILESDIR}/extra-patch-suexec_rsrclimit .if !defined(WITH_SUEXEC) IGNORE= suEXEC resource limit patch requires mod_suexec.\ Please add 'WITH_SUEXEC=YES' to you /etc/make.conf .endif .endif CONFIGURE_ARGS= --prefix=${PREFIX_RELDEST} \ --enable-layout=FreeBSD \ --with-perl=${PERL5} \ --with-port=${WITH_HTTP_PORT} \ --with-expat=${LOCALBASE} \ --with-iconv=${LOCALBASE} \ --with-apr=${LOCALBASE}/bin/apr-config \ --with-apr-util=${LOCALBASE}/bin/apu-config \ --libdir=${PREFIX_RELDEST}/lib/apache2 \ --includedir=${PREFIX_RELDEST}/include/apache2 CONFIGURE_ENV= \ CONFIG_SHELL="${SH}" \ LOCALBASE="${LOCALBASE}" PREFIX_RELDEST= ${PREFIX:S,^${DESTDIR},,} MAKE_ENV+= EXPR_COMPAT=yes WITH_MPM?= prefork # or worker, perchild, threadpool WITH_HTTP_PORT?= 80 .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 #backward compatibility .if defined(WITHOUT_SSL) WITHOUT_SSL_MODULES= YES .endif .if !defined(WITHOUT_SSL_MODULES) 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) 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 # for slave ports .if !defined(MASTERDIR) APACHEDIR= ${.CURDIR} .else APACHEDIR= ${MASTERDIR} .endif .if defined (WITH_LDAP) || defined (WITH_LDAP_MODULES) USE_OPENLDAP= YES CONFIGURE_ARGS+= --enable-ldap=shared --enable-auth-ldap=shared --with-ldap \ --with-ldap-lib="${LOCALBASE}/lib" \ --with-ldap-include="${LOCALBASE}/include" .endif .include "${APACHEDIR}/Makefile.doc" .include "${APACHEDIR}/Makefile.modules" .include .if defined(WITH_OPENSSL_PORT) EXTRA_PATCHES+= ${FILESDIR}/extra-openssl-9.8up.patch .endif .if ${OSVERSION} < 700014 && ${ARCH} == i386 USE_PKGCONFIG= yes .endif .if defined(WITH_THREADS) CONFIGURE_ARGS+= --enable-threads . if ${ARCH} == i386 CONFIGURE_ARGS+= --enable-nonportable-atomics . endif .endif CONFIGURE_ARGS+= --with-mpm=${WITH_MPM:L} show-options: @${SED} -ne 's/^##//p' ${APACHEDIR}/Makefile.doc pre-everything:: @${ECHO_MSG} "" @${ECHO_MSG} " To enable a module category: WITH__MODULES" @${ECHO_MSG} " To disable a module category: WITHOUT__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} "" @${ECHO_MSG} "To save apache.org bandwidth, please use the closest" - @${ECHO_MSG} "mirror. Hit Ctrl+C now and do a "make print-closest-mirrors." + @${ECHO_MSG} "mirror. Hit Ctrl+C now and do a \"make print-closest-mirrors\"." @${ECHO_MSG} "To automatically update /etc/make.conf do:" @${ECHO_MSG} "make print-closest-mirrors >> /etc/make.conf" @${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]"> diff --git a/www/apache20/Makefile.doc b/www/apache20/Makefile.doc index b01c7250cb82..622f94389e7d 100644 --- a/www/apache20/Makefile.doc +++ b/www/apache20/Makefile.doc @@ -1,150 +1,150 @@ # Makefile.doc # Author: Clement Laforet # # This files contains: # - make options output # - apache2 man/docs routines # # $FreeBSD$ # ## Available knobs: ## By default, modules are compiled as dynamically loadable (DSO) modules. ## ## Modules knobs philosophy: ## Modules are split in categories, "make show-categories" shows you ## which modules they contain. You can enable/disable/customize a category: ## - To enable a category: WITH__MODULES=yes ## [WITH_PROXY_MODULES=yes] ## - To disable a category: WITHOUT__MODULES=yes ## [WITHOUT_DAV_MODULES=yes] ## - To customize a category: WITH_CUSTOM_ ## [WITH_CUSTOM_PROXY="proxy proxy_http"] ## ## Apache-related ## WITH_MPM: prefork (default) ## worker ## perchild (deprecated) ## threadpool (testing purpose only) ## WITH_HTTP_PORT: default: 80 ## WITH_LDAP: Enable LDAP support (mod_auth_ldap) (implies WITH_LDAP_MODULES) ## WITHOUT_V4MAPPED ## WITH_IPV6_V6ONLY: Don't allow IPv6 sockets to handle IPv4 ## connections ## WITHOUT_SSL: Disable SSL support ## WITH_THREADS: Enable threads support !! USE IT WITH CARE !! ## WITH_DBM: Choose your DBM: bdb (Berkeley DB), gdbm or ## ndbm (default) ## WITH_BDB: Define to select bdb via bsd.database.mk ## desired version may be set with ## WITH_BDB_VER or APACHE22_WITH_BDB_VER ## WITH_BDB_BASE: Define to use bdb from base (1.85) ## WITH_STATIC_SUPPORT: Build statically linked support binaries ## WITH_STATIC_APACHE: Build a static version of httpd (implies ## WITH_STATIC_MODULES) ## WITH_ALL_STATIC_MODULES: All modules will be statically linked. ## WITH_STATIC_MODULES: List of modules to build modules statics ## (usefull for slave ports) ## (They must be already enabled (i.e. ## WITH_MODULES or with default configuration ## use 'make show-modules', to check if they are ## enabled) ## WITH_MODULES: List of modules you choose ## WITHOUT_MODULES: Disable selected modules ## WITH_SUEXEC: Enable suExec support ## SUEXEC_DOCROOT: SuExec root directory ## SUEXEC_USERDIR: User subdirectory (default public_html) ## SUEXEC_SAFEPATH: Set the safepath ## SUEXEC_LOGFILE: Set log file for suexec (default: /var/log/httpd-suexec.log) ## SUEXEC_UIDMIN: Minimal allowed UID (default 1000) ## SUEXEC_GIDMIN: Minimal allowed GID (default 1000) ## SUEXEC_CALLER: User allowed to call SuExec (default ## ${WWWOWN} (www)) ## SUEXEC_UMASK: Defines umask for suexec'd process(default: ## unset) ## WITH_DEBUG: Build a debug versoin of apache (set CFLAGS ## to "-O0 -g -ggdb3" or ${DEBUG_FLAGS} and ## defines WITH_EXCEPTION_HOOK too) ## WITH_EXCEPTION_HOOK: Enable fatal exception hook ## ## Port-related: ## WITHOUT_WWW: Implies NO_CGI, NO_WWWDATA, NO_ICONS and ## NO_ERROR ## WITH_CUSTOM_WWW: Let you choose your ${PREFIX}/www components ## [cgi|errordocs|icons|wwwdata] ## ## Available make targets: ## show-options: prints this message ## show-modules: prints list of available modules ## show-categories: prints list of modules sorted by category ## ## Examples: -## make WITH_STATIC_MODULES="ssl rewrite include" WITH_EXPERIMENTAL_MODULES=yes \ -## WITH_CUSTOM_AUTH="auth auth_dbm" -## make WITHOUT_MODULES="access speling status" WITH_PROXY_MODULES=yes -## make WITH_MODULES="include rewrite auth" +## make WITH_STATIC_MODULES="SSL REWRITE INCLUDE" WITH_EXPERIMENTAL_MODULES=yes \ +## WITH_CUSTOM_AUTH="AUTH AUTH_DBM" +## make WITHOUT_MODULES="ACCESS SPELING STATUS" WITH_PROXY_MODULES=yes +## make WITH_MODULES="INCLUDE REWRITE AUTH" ## ## Note: If you define your custom options in /etc/make.conf, don't forget ## to do not use quotes. ## DOCSDIR= ${PREFIX}/share/doc/apache2 EXAMPLESDIR= ${PREFIX}/share/examples/apache2 MAKE_ENV+= EXAMPLESDIR=${EXAMPLESDIR} .if defined(NOPORTDOCS) MAKE_ENV+= NOPORTDOCS=yes .endif MAN1= dbmmanage.1 htdigest.1 htpasswd.1 htdbm.1 MAN8= ab.8 apachectl.8 apxs.8 httpd.8 logresolve.8 rotatelogs.8 suexec.8 .if defined(WITHOUT_WWW) NO_CGI= YES NO_WWWDATA= YES NO_ICONS= YES NO_ERROR= YES .elif defined(WITH_CUSTOM_WWW) . if ${WITH_CUSTOM_WWW:Mcgi} == "" NO_CGI= YES . endif . if ${WITH_CUSTOM_WWW:Mwwwdata} == "" NO_WWWDATA= YES . endif . if ${WITH_CUSTOM_WWW:Merrordocs} == "" NO_ERROR= YES . endif . if ${WITH_CUSTOM_WWW:Micons} == "" NO_ICONS= YES . endif .endif .if defined(NO_CGI) MAKE_ENV+= NO_CGI=yes PLIST_SUB+= CGI="@comment " .else PLIST_SUB+= CGI="" .endif .if defined(NO_ICONS) MAKE_ENV+= NO_ICONS=yes PLIST_SUB+= ICONS="@comment " .else PLIST_SUB+= ICONS="" .endif .if defined(NO_WWWDATA) MAKE_ENV+= NO_WWWDATA=yes PLIST_SUB+= WWWDATA="@comment " .else PLIST_SUB+= WWWDATA="" .endif .if defined(NO_ERROR) MAKE_ENV+= NO_ERROR=yes PLIST_SUB+= ERROR="@comment " .else PLIST_SUB+= ERROR="" .endif PORTDOCS= * #don't blame me ;-) diff --git a/www/apache20/Makefile.modules b/www/apache20/Makefile.modules index c83d8a6804b5..009a0d3ba607 100644 --- a/www/apache20/Makefile.modules +++ b/www/apache20/Makefile.modules @@ -1,117 +1,117 @@ # Makefile.modules # Author: Clement Laforet # # This file is used to build modules list, DBM dependencies and MPM selection. # I hope it can easily handle external modules (such as mod_perl) or MPMs, like # muxmpm. # # Note to myself: (to generate PLIST_SUB entries for modules) # gsed 's/^\(.*\)mod\(.*\)\.so/%%\MOD\U\2%%\L\1mod\2\.so/' pkg-plist > tmp # mv tmp pkg-plist # # $FreeBSD$ # # MPM section: # WITH_MPM: prefork worker perchild threadpool itk .if ${WITH_MPM:L} == "prefork" PLIST_SUB+= WORKER="@comment " THREADPOOL="@comment " .elif ${WITH_MPM:L} == "worker" PLIST_SUB+= WORKER="" THREADPOOL="@comment " .elif ${WITH_MPM:L} == "threadpool" PLIST_SUB+= WORKER="@comment " THREADPOOL="" .elif ${WITH_MPM:L} == "perchild" PLIST_SUB+= WORKER="@comment " THREADPOOL="@comment " .elif ${WITH_MPM:L} == "itk" PLIST_SUB+= WORKER="@comment " THREADPOOL="@comment " EXTRA_PATCHES+= ${PATCHDIR}/mpm-itk-${MPM_ITK_VERSION} .else IGNORE= "Unknown MPM: ${WITH_MPM}" .endif # MPM prefork .if ${WITH_MPM:L} != "prefork" PKGNAMESUFFIX= -${WITH_MPM:L} .endif .if ${WITH_MPM:L} == "worker" || ${WITH_MPM:L} == "perchild" || ${WITH_MPM:L} == "threadpool" WITH_THREADS= yes WITH_THREADS_MODULES= yes -WITHOUT_MODULES+= cgi +WITHOUT_MODULES+= CGI .endif # xDBM section # .if !defined(WITH_DBM) . if defined(WITH_BDB) || defined(WITH_BDB_BASE) || defined(WITH_BERKELEYDB) WITH_DBM= bdb . endif .endif .if defined(WITH_BERKELEYDB) && !defined(WITH_BDB_VER) . if ${WITH_BERKELEYDB} == "FreeBSD" -WITH_BDB_BASE=YES +WITH_BDB_BASE= yes . else -WITH_BDB_VER=${WITH_BERKELEYDB:S/db//} +WITH_BDB_VER= ${WITH_BERKELEYDB:S/db//} . endif .endif .if defined(WITH_DBM) . if ${WITH_DBM:L} == "sdbm" CONFIGURE_ARGS+= --with-dbm=sdbm . elif ${WITH_DBM:L} == "ndbm" CONFIGURE_ARGS+= --with-ndbm . elif ${WITH_DBM:L} == "gdbm" LIB_DEPENDS+= gdbm:${PORTSDIR}/databases/gdbm CONFIGURE_ARGS+= --with-gdbm=${LOCALBASE} . elif ${WITH_DBM:L} == "db" || ${WITH_DBM:L} == "bdb" . if defined(WITH_BDB_BASE) CONFIGURE_ARGS+= --with-dbm=db185 \ --with-berkeley-db=/usr . else USE_BDB= yes INVALID_BDB_VER= 46 47 CONFIGURE_ARGS+= --with-dbm=db${BDB_VER:S/40/4/} \ --with-berkeley-db=${LOCALBASE} . endif . else . else IGNORE= "Unknown DBM" . endif .else CONFIGURE_ARGS+= --with-dbm=sdbm .endif .if !defined(WITHOUT_SSL) WITH_SSL_MODULES= yes CONFIGURE_ARGS+= --with-ssl=${OPENSSLBASE} .endif -AUTH_MODULES= access auth auth_anon auth_dbm auth_digest -DAV_MODULES= dav dav_fs -EXPERIMENTAL_MODULES= bucketeer case_filter case_filter_in ext_filter charset_lite \ - optional_hook_export optional_hook_import \ - optional_fn_import optional_fn_export \ - cache file_cache disk_cache mem_cache \ - dumpio -LDAP_MODULES= ldap auth_ldap -MISC_MODULES= actions alias asis autoindex cache cern_meta \ - cgi charset_lite deflate dir disk_cache env expires \ - file_cache headers imap include info log_config logio mime \ - mime_magic negotiation rewrite setenvif speling status \ - unique_id userdir usertrack vhost_alias -PROXY_MODULES= proxy proxy_connect proxy_ftp proxy_http -SSL_MODULES= ssl -SUEXEC_MODULES= suexec -THREADS_MODULES= cgid +AUTH_MODULES= ACCESS AUTH AUTH_ANON AUTH_DBM AUTH_DIGEST +DAV_MODULES= DAV DAV_FS +EXPERIMENTAL_MODULES= BUCKETEER CASE_FILTER CASE_FILTER_IN EXT_FILTER CHARSET_LITE \ + OPTIONAL_HOOK_EXPORT OPTIONAL_HOOK_IMPORT \ + OPTIONAL_FN_IMPORT OPTIONAL_FN_EXPORT \ + CACHE FILE_CACHE DISK_CACHE MEM_CACHE \ + DUMPIO +LDAP_MODULES= LDAP AUTH_LDAP +MISC_MODULES= ACTIONS ALIAS ASIS AUTOINDEX CACHE CERN_META \ + CGI CHARSET_LITE DEFLATE DIR DISK_CACHE ENV EXPIRES \ + FILE_CACHE HEADERS IMAP INCLUDE INFO LOG_CONFIG LOGIO MIME \ + MIME_MAGIC NEGOTIATION REWRITE SETENVIF SPELING STATUS \ + UNIQUE_ID USERDIR USERTRACK VHOST_ALIAS +PROXY_MODULES= PROXY PROXY_CONNECT PROXY_FTP PROXY_HTTP +SSL_MODULES= SSL +SUEXEC_MODULES= SUEXEC +THREADS_MODULES= CGID DEFAULT_MODULES_CATEGORIES= \ AUTH DAV MISC ALL_MODULES_CATEGORIES= AUTH DAV EXPERIMENTAL LDAP MISC PROXY SSL \ SUEXEC THREADS diff --git a/www/apache22/Makefile b/www/apache22/Makefile index 8e4b6e7c8e4b..625ec8a88088 100644 --- a/www/apache22/Makefile +++ b/www/apache22/Makefile @@ -1,199 +1,191 @@ # New ports collection makefile for: apache22 # Date created: Dec 11 2004 # Whom: Clement Laforet # # $FreeBSD$ # # For more information, please read Makefile.doc # PORTNAME= apache PORTVERSION= 2.2.22 PORTREVISION= 6 CATEGORIES= www MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD} DISTNAME= httpd-${PORTVERSION} DIST_SUBDIR= apache22 MAINTAINER?= apache@FreeBSD.org COMMENT?= Version 2.2.x of Apache web server with ${WITH_MPM:L} MPM. LIB_DEPENDS= expat:${PORTSDIR}/textproc/expat2 \ apr-1:${PORTSDIR}/devel/apr1 \ pcre:${PORTSDIR}/devel/pcre MAKE_JOBS_SAFE= yes LATEST_LINK?= apache22 CONFLICTS= caudium14-1.* \ apache-2.0.* apache-*-2.0.* \ apache-*-2.2.* USE_APACHE= common22 USE_BZIP2= yes USE_ICONV= yes USE_AUTOTOOLS= autoconf libtool USE_PERL5= yes USE_RC_SUBR= apache22 htcacheclean LIBTOOLFILES= configure.in USERS= www GROUPS= www MPM_ITK_VERSION?= 20110321-01 # for slave ports .if !defined(MASTERDIR) APACHEDIR= ${.CURDIR} .else APACHEDIR= ${MASTERDIR} .endif .if !defined(WITHOUT_APACHE_OPTIONS) .include "${APACHEDIR}/Makefile.options" .endif .if defined(WITH_SUEXEC_RSRCLIMIT) EXTRA_PATCHES+= ${FILESDIR}/extra-patch-suexec_rsrclimit .if !defined(WITH_SUEXEC) IGNORE= suEXEC resource limit patch requires mod_suexec.\ Please (re)run 'make config' and choose SUEXEC option also .endif .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} \ --with-apr=${LOCALBASE}/bin/apr-1-config \ --with-apr-util=${LOCALBASE}/bin/apu-1-config CONFIGURE_ENV= \ CONFIG_SHELL="${SH}" \ LOCALBASE="${LOCALBASE}" PREFIX_RELDEST= ${PREFIX:S,^${DESTDIR},,} MAKE_ENV+= EXPR_COMPAT=yes \ INSTALL_MAN="${INSTALL_MAN}" 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 +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 # 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_LDAP) || defined (WITH_LDAP_MODULES) USE_OPENLDAP= yes CONFIGURE_ARGS+= --enable-ldap=shared --with-ldap --enable-authnz-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 .if defined(WITH_AUTH_DIGEST) WITH_DEVRANDOM= yes .endif .if defined(WITH_DEVRANDOM) CONFIGURE_ARGS+= --with-devrandom .endif CONFIGURE_ARGS+= --with-mpm=${WITH_MPM:L} pre-everything:: @${ECHO_MSG} "" - @${ECHO_MSG} " To enable a module category: WITH__MODULES" - @${ECHO_MSG} " To disable a module category: WITHOUT__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} " You can check your modules configuration by using make show-modules" @${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 post-patch: @${RM} -f ${WRKSRC}/docs/docroot/*.bak @${REINPLACE_CMD} -e 's," PLATFORM ",FreeBSD,' ${WRKSRC}/server/core.c @${INSTALL_DATA} ${WRKSRC}/NOTICE ${WRKSRC}/docs/manual 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}," -e "s,%%WWWGRP%%,${WWWGRP}," ${WRKSRC}/docs/conf/httpd.conf @${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX}," ${WRKSRC}/support/envvars-std 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(WITH_LOG_FORENSIC) @${INSTALL_SCRIPT} ${WRKSRC}/support/check_forensic ${PREFIX}/sbin .endif .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 diff --git a/www/apache22/Makefile.doc b/www/apache22/Makefile.doc index 7e3c9c083325..5ac1d8abdcd0 100644 --- a/www/apache22/Makefile.doc +++ b/www/apache22/Makefile.doc @@ -1,108 +1,108 @@ # Makefile.doc # Author: Clement Laforet # # This files contains: # - make options output # - apache22 man/docs routines # # $FreeBSD$ # ## Available knobs: ## WITHOUT_APACHE_OPTIONS: Don't use OPTIONS and will allow you to use ## those knobs directly to select modules. ## Knobs with (*) are working only if ## WITHOUT_APACHE_OPTIONS is defined. ## ## By default, modules are compiled as dynamically loadable modules (DSO). ## ## Modules knobs philosophy: ## Modules are split in categories, "make show-categories" shows you ## which modules they contain. You can enable/disable/customize a category (*): ## - To enable a category: WITH__MODULES=yes ## [WITH_PROXY_MODULES=yes] ## - To disable a category: WITHOUT__MODULES=yes ## [WITHOUT_DAV_MODULES=yes] ## - To customize a category: WITH_CUSTOM_ ## [WITH_CUSTOM_PROXY="proxy proxy_http"] ## ## Apache-related ## WITH_MPM: prefork (default) ## worker ## event ## itk ## WITH_HTTP_PORT: default: 80 ## WITH_LDAP: Enable LDAP support (mod_auth_ldap) (implies WITH_LDAP_MODULES) ## WITH_(MYSQL|PGSQL|SQLITE): Enable SQL backend for dbd and apr_dbd. ## When MySQL is chosen, threads are enabled. ## WITHOUT_V4MAPPED ## WITH_IPV6_V6ONLY: Don't allow IPv6 sockets to handle IPv4 ## connections ## WITHOUT_SSL: Disable SSL support ## WITH_THREADS: Enable threads support ## WITH_DBM: Choose your DBM: bdb (Berkeley DB), gdbm or ## ndbm (default) ## WITH_BDB: Define to select bdb via bsd.database.mk ## desired version may be set with ## WITH_BDB_VER or APACHE22_WITH_BDB_VER ## WITH_BDB_BASE: Define to use bdb from base (1.85) ## WITH_STATIC_SUPPORT: Build statically linked support binaries ## WITH_STATIC_APACHE: Build a static version of httpd (implies ## WITH_STATIC_MODULES) ## WITH_ALL_STATIC_MODULES: All modules will be statically linked. ## WITH_STATIC_MODULES (*): List of modules to build modules statics ## (usefull for slave ports) ## (They must be already enabled (i.e. ## WITH_MODULES or with default configuration ## use 'make show-modules', to check if they are ## enabled) ## WITH_MODULES (*): List of modules you choose ## WITHOUT_MODULES (*): Disable selected modules ## WITH_SUEXEC: Enable suExec support ## SUEXEC_DOCROOT: SuExec root directory ## SUEXEC_USERDIR: User subdirectory (default public_html) ## SUEXEC_SAFEPATH: Set the safepath ## SUEXEC_LOGFILE: Set log file for suexec (default: /var/log/httpd-suexec.log) ## SUEXEC_UIDMIN: Minimal allowed UID (default 1000) ## SUEXEC_GIDMIN: Minimal allowed GID (default 1000) ## SUEXEC_CALLER: User allowed to call SuExec (default ## ${WWWOWN} (www)) ## SUEXEC_UMASK: Defines umask for suexec'd process(default: ## unset) ## WITH_DEBUG: Build a debug versoin of apache (set CFLAGS ## to "-O0 -g -ggdb3" or ${DEBUG_FLAGS} and ## defines WITH_EXCEPTION_HOOK too) ## WITH_EXCEPTION_HOOK: Enable fatal exception hook ## ## Optional patches: ## WITH_EXPERIMENTAL_PATCHES Add performance patches (generally backported ## from apr/httpd SVN repositories) ## WITH_ITK_PERDIR_REGEX Add the per-directory setting AssignUserFromPath for mpm-itk ## as described on http://www.pvv.ntnu.no/~knuta/mpm-itk/ ## ## Available make targets: ## show-options: prints this message ## show-modules: prints list of available modules ## show-categories: prints list of modules sorted by category ## ## Examples (*): -## make WITH_STATIC_MODULES="ssl rewrite include" WITH_EXPERIMENTAL_MODULES=yes \ -## WITH_CUSTOM_AUTH="auth auth_dbm" -## make WITHOUT_MODULES="access speling status" WITH_PROXY_MODULES=yes -## make WITH_MODULES="include rewrite auth" +## make WITH_STATIC_MODULES="SSL REWRITE INCLUDE" WITH_EXPERIMENTAL_MODULES=yes \ +## WITH_CUSTOM_AUTH="AUTH AUTH_DBM" +## make WITHOUT_MODULES="ACCESS SPELING STATUS" WITH_PROXY_MODULES=yes +## make WITH_MODULES="INCLUDE REWRITE AUTH" ## Note: If you define your custom options in /etc/make.conf, don't forget ## to do not use quotes. ## DOCSDIR= ${PREFIX}/share/doc/apache22 EXAMPLESDIR= ${PREFIX}/share/examples/apache22 MAKE_ENV+= EXAMPLESDIR=${EXAMPLESDIR} .if defined(NOPORTDOCS) MAKE_ENV+= NOPORTDOCS=yes .endif MAN1= ab.1 apxs.1 dbmmanage.1 htdbm.1 htdigest.1 htpasswd.1 httxt2dbm.1 logresolve.1 MAN8= apachectl.8 htcacheclean.8 httpd.8 rotatelogs.8 suexec.8 PORTDOCS= * #don't blame me ;-) diff --git a/www/apache22/Makefile.modules b/www/apache22/Makefile.modules index 183cca09a320..41794a5408a0 100644 --- a/www/apache22/Makefile.modules +++ b/www/apache22/Makefile.modules @@ -1,161 +1,163 @@ # Makefile.modules # Author: Clement Laforet # # This file is used to build modules list, DBM dependencies and MPM selection. # I hope it can easily handle external modules (such as mod_perl) or MPMs, like # muxmpm. # # Note to myself: (to generate PLIST_SUB entries for modules) # gsed 's/^\(.*\)mod\(.*\)\.so/%%\MOD\U\2%%\L\1mod\2\.so/' pkg-plist > tmp # mv tmp pkg-plist # # $FreeBSD$ # .if !defined(Module_inc) Module_inc= done -AUTH_MODULES= auth_basic auth_digest -AUTHN_MODULES= authn_file authn_dbd authn_dbm authn_anon authn_default \ - authn_alias -AUTHZ_MODULES= authz_host authz_groupfile authz_user authz_dbm \ - authz_owner authz_default -CACHE_MODULES= cache disk_cache file_cache mem_cache -DAV_MODULES= dav dav_fs -EXPERIMENTAL_MODULES= bucketeer case_filter case_filter_in ext_filter \ - log_forensic optional_hook_export optional_hook_import \ - optional_fn_import optional_fn_export -LDAP_MODULES= ldap authnz_ldap -MISC_MODULES+= actions alias asis autoindex cern_meta \ - cgi charset_lite dbd deflate dir dumpio env expires \ - headers imagemap include info log_config logio mime \ - mime_magic negotiation rewrite setenvif speling status substitute \ - unique_id userdir usertrack vhost_alias filter version reqtimeout -PROXY_MODULES= proxy proxy_connect proxy_ftp proxy_http proxy_ajp proxy_balancer proxy_scgi -SSL_MODULES= ssl -SUEXEC_MODULES= suexec -THREADS_MODULES= cgid +AUTH_MODULES= AUTH_BASIC AUTH_DIGEST +AUTHN_MODULES= AUTHN_FILE AUTHN_DBD AUTHN_DBM AUTHN_ANON AUTHN_DEFAULT \ + AUTHN_ALIAS +AUTHZ_MODULES= AUTHZ_HOST AUTHZ_GROUPFILE AUTHZ_USER AUTHZ_DBM \ + AUTHZ_OWNER AUTHZ_DEFAULT +CACHE_MODULES= CACHE DISK_CACHE FILE_CACHE MEM_CACHE +DAV_MODULES= DAV DAV_FS +EXPERIMENTAL_MODULES= BUCKETEER CASE_FILTER CASE_FILTER_IN EXT_FILTER \ + LOG_FORENSIC OPTIONAL_HOOK_EXPORT OPTIONAL_HOOK_IMPORT \ + OPTIONAL_FN_IMPORT OPTIONAL_FN_EXPORT +LDAP_MODULES= LDAP AUTHNZ_LDAP +MISC_MODULES+= ACTIONS ALIAS ASIS AUTOINDEX CERN_META \ + CGI CHARSET_LITE DBD DEFLATE DIR DUMPIO ENV EXPIRES \ + HEADERS IMAGEMAP INCLUDE INFO LOG_CONFIG LOGIO MIME \ + MIME_MAGIC NEGOTIATION REWRITE SETENVIF SPELING STATUS SUBSTITUTE \ + UNIQUE_ID USERDIR USERTRACK VHOST_ALIAS FILTER VERSION REQTIMEOUT +PROXY_MODULES= PROXY PROXY_CONNECT PROXY_FTP PROXY_HTTP PROXY_AJP PROXY_BALANCER PROXY_SCGI +SSL_MODULES= SSL +SUEXEC_MODULES= SUEXEC +THREADS_MODULES= CGID DEFAULT_MODULES_CATEGORIES= \ AUTH AUTHN AUTHZ DAV CACHE MISC ALL_MODULES_CATEGORIES= AUTH AUTHN AUTHZ CACHE DAV EXPERIMENTAL LDAP \ MISC PROXY SSL SUEXEC THREADS .endif # ============================================= .if defined(_PREMKINCLUDED) # MPM's: prefork worker event itk peruser .if ${WITH_MPM:L} == "prefork" PLIST_SUB+= WORKER="@comment " EVENT="@comment " .elif ${WITH_MPM:L} == "worker" PLIST_SUB+= WORKER="" EVENT="@comment " .elif ${WITH_MPM:L} == "event" PLIST_SUB+= WORKER="@comment " EVENT="" .elif ${WITH_MPM:L} == "peruser" PLIST_SUB+= WORKER="@comment " EVENT="@comment " .elif ${WITH_MPM:L} == "itk" PLIST_SUB+= WORKER="@comment " EVENT="@comment " EXTRA_PATCHES+= ${PATCHDIR}/mpm-itk-${MPM_ITK_VERSION} . if defined (WITH_ITK_PERDIR_REGEX) EXTRA_PATCHES+= ${PATCHDIR}/mpm-itk-perdir-regex . endif .else IGNORE= "Unknown MPM: ${WITH_MPM}" .endif # MPM prefork .if ${WITH_MPM:L} != "prefork" PKGNAMESUFFIX= -${WITH_MPM:L} LATEST_LINK= apache22-${WITH_MPM:L}-mpm .endif .if ${WITH_MPM:L} == "worker" || ${WITH_MPM:L} == "event" WITH_THREADS= yes WITH_THREADS_MODULES= yes -WITHOUT_MODULES+= cgi +WITHOUT_MODULES+= CGI .endif # xDBM section # +# XXX WITH_BERKELEYDB is deprecated +# this section need rewrite .if !defined(WITH_DBM) . if defined(WITH_BDB) || defined(WITH_BDB_BASE) || defined(WITH_BERKELEYDB) WITH_DBM= bdb PLIST_SUB+= BDB="" . else PLIST_SUB+= BDB="@comment " . endif .endif .if defined(WITH_BERKELEYDB) && !defined(WITH_BDB_VER) . if ${WITH_BERKELEYDB} == "FreeBSD" -WITH_BDB_BASE=YES +WITH_BDB_BASE= yes . else -WITH_BDB_VER=${WITH_BERKELEYDB:S/db//} +WITH_BDB_VER= ${WITH_BERKELEYDB:S/db//} . endif .endif .if defined(WITH_DBM) . if ${WITH_DBM:L} == "sdbm" CONFIGURE_ARGS+= --with-dbm=sdbm . elif ${WITH_DBM:L} == "gdbm" LIB_DEPENDS+= gdbm:${PORTSDIR}/databases/gdbm CONFIGURE_ARGS+= --with-gdbm=${LOCALBASE} . elif ${WITH_DBM:L} == "db" || ${WITH_DBM:L} == "bdb" . if defined(WITH_BDB_BASE) CONFIGURE_ARGS+= --with-dbm=db185 \ --with-berkeley-db=/usr . else USE_BDB= yes CONFIGURE_ARGS+= --with-dbm=db${BDB_VER:S/40/4/} \ --with-berkeley-db=${LOCALBASE} . endif . else IGNORE= "Unknown DBM" . endif .else CONFIGURE_ARGS+= --with-dbm=sdbm .endif .if defined(WITH_MYSQL) -USE_MYSQL= YES -WITH_THREADS= YES +USE_MYSQL= yes +WITH_THREADS= yes .endif .if defined(WITH_PGSQL) -USE_PGSQL= YES +USE_PGSQL= yes .endif .if defined(WITH_SQLITE) -USE_SQLITE= YES +USE_SQLITE= yes .endif .if !defined(WITHOUT_SSL) WITH_SSL_MODULES= yes CONFIGURE_ARGS+= --with-ssl=${OPENSSLBASE} .endif .if !defined(WITH_THREADS) -WITHOUT_MODULES+= mem_cache +WITHOUT_MODULES+= MEM_CACHE . if !defined(WITHOUT_APACHE_OPTIONS) && defined(WITH_MEM_CACHE) IGNORE+= mod_mem_cache requires WITH_THREADS . endif .else CFLAGS+= ${PTHREAD_CFLAGS} LDFLAGS+= ${PTHREAD_LIBS} .endif .if !defined(WITH_MYSQL) && !defined(WITH_PGSQL) && !defined(WITH_SQLITE) -WITHOUT_MODULES+= authn_dbd dbd +WITHOUT_MODULES+= AUTHN_DBD DBD . if !defined(WITHOUT_APACHE_OPTIONS) && (defined(WITH_DBD) || defined(WITH_AUTHN_DBD)) IGNORE+= You need to enable at least one DBD backend . endif .endif .endif # _PREMKINCLUDED