aboutsummaryrefslogtreecommitdiff
path: root/www/apache24/Makefile.modules
diff options
context:
space:
mode:
authorOlli Hauer <ohauer@FreeBSD.org>2013-03-26 21:35:33 +0000
committerOlli Hauer <ohauer@FreeBSD.org>2013-03-26 21:35:33 +0000
commitfa82723bda8f0f26cb7b0e8e87cdb033580eb829 (patch)
treec487958f2e8f9eba4952b4df7dbd03d4cdb3e121 /www/apache24/Makefile.modules
parent8c480b5a8eec5e1fb85912cb167c9627a5ce8fca (diff)
- new port www/apache24
The Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for various modern desktop and server operating systems, such as UNIX and Windows NT. The goal of this project is to provide a secure, efficient and extensible server which provides HTTP services in sync with the current HTTP standards. The 2.x branch of Apache Web Server includes several improvements like threading, use of APR, native IPv6 and SSL support, and many more. WWW: http://httpd.apache.org/ Note: Since apache24 does not enable every module by default in httpd.conf the list of modules to build was preselected to match build param --enable-modules=most MPM selection is now an OPTION also if the MPM is build statically or dynamically. In the later case all modules are build/installed but only the selected MPM has an entry in httpd.conf (see apache issue 53882) Per default the MPM prefork (static) will be build, to get the best compatibility. Custom variants like itk/peruser are not supported at the moment. Port based on my work prototype from the apache@ list and patch from PR 174617 with hat apache@ PR: 174617 Submitted by: <swall@redcom.com>
Notes
Notes: svn path=/head/; revision=315335
Diffstat (limited to 'www/apache24/Makefile.modules')
-rw-r--r--www/apache24/Makefile.modules197
1 files changed, 197 insertions, 0 deletions
diff --git a/www/apache24/Makefile.modules b/www/apache24/Makefile.modules
new file mode 100644
index 000000000000..c9c7c95b1d8b
--- /dev/null
+++ b/www/apache24/Makefile.modules
@@ -0,0 +1,197 @@
+# $FreeBSD$
+#
+# Note by Clement Laforet: (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
+#
+
+# =============================================
+# Maintainer note for OPTION handling:
+# To set additional option use
+# PORT_OPTIONS+=
+# To unset an OPTION, even the OPTION is set in OPTIONSFILE use
+# WITHOUT_MODULES+=
+# Using OPTIONS_EXCLUDE and OPTIONS_OVERRIDE do not work as expected
+# if the OPTION is enabled by the user, therefore we calculate
+# them in bsd.apache.mk with help of WITHOUT_MODULES
+# The other methode is to set IGNORE's and force the user to adjust OPTIONS
+
+.if defined(_PREMKINCLUDED)
+
+# check if APR was build with thread support
+.if exists(${APR_CONFIG})
+APR_LIBS!= ${SH} ${APR_CONFIG} --libs | ${SED} -e 's/-//g'
+. if defined(APR_LIBS) && !empty(APR_LIBS)
+_T=pthread
+. for lib in ${APR_LIBS}
+. if ${_T:M${lib}}
+APR_HAS_THREADS= yes
+. endif
+. endfor
+. endif
+.endif # exists APR_CONFIG
+
+# check if APR-util module exists
+.if exists(${APU_CONFIG})
+. if ${PORT_OPTIONS:MLDAP} || ${PORT_OPTIONS:MAUTHNZ_LDAP}
+. if !exists(${APU_LDAP})
+IGNORE= LDAP and AUTHNZ_LDAP requires APR-util to have LDAP support built in.\
+ Please rebuild APR with LDAP support
+. endif
+. endif
+
+. if ${PORT_OPTIONS:MSESSION_CRYPTO}
+. if !exists(${APU_CRYPTO_OPENSSL})
+IGNORE= SESSION_CRYPTO requires APR-util to have crypto openssl support build in.\
+ Please rebuild APR with crypto openssl support
+. endif
+. endif
+
+# XXX apache24 needs only the apu-header
+# perhaps we get in future the possibility to package dedicated APU modules
+#
+#. if ${PORT_OPTIONS:MDBD} || ${PORT_OPTIONS:MAUTHN_DBD}
+#. if !exists(${APU_DBD_MYSQL}) && !exists(${APU_DBD_PGSQL}) && !exists(${APU_DBD_SQLITE3})
+#IGNORE= AUTHN_DBD and DBD requires APR-util to have DBD support build in.\
+# Please rebuild APR at last with one DBD backend
+#. endif
+#. endif
+.endif # exists APU_CONFIG
+
+# =============================================
+# if build with shared MPM the last module will be activated
+# see apache issue 53882
+
+# XXX in case we use OPTIONS for MPM
+# we do not have a WITH_MPM variable
+.if ${PORT_OPTIONS:MMPM_SHARED}
+PLIST_SUB+= MPM_SHARED=""
+CONFIGURE_ARGS+= --enable-mpms-shared=all
+.else
+PLIST_SUB+= MPM_SHARED="@comment "
+.endif
+
+# XXX LATEST_LINK overwrites OPTIONSFILE ...
+# maybe use NO_LATEST_LINK in future
+.if ${PORT_OPTIONS:MMPM_PREFORK}
+CONFIGURE_ARGS+= --with-mpm=prefork
+.elif ${PORT_OPTIONS:MMPM_WORKER}
+CONFIGURE_ARGS+= --with-mpm=worker
+.elif ${PORT_OPTIONS:MMPM_EVENT}
+CONFIGURE_ARGS+= --with-mpm=event
+.else
+IGNORE= Unknown MPM:
+.endif
+
+.if ${PORT_OPTIONS:MMPM_WORKER} || ${PORT_OPTIONS:MMPM_EVENT}
+. if exists(${APR_CONFIG}) && !defined(APR_HAS_THREADS)
+IGNORE= requires APR threads. Please rebuild APR with THREAD support
+. endif
+.endif
+# =============================================
+
+# build develop/example modules only with additional confirmation
+.for DEVMOD in ${EXAMPLE_MODULES}
+. if ${PORT_OPTIONS:M${DEVMOD}}
+WITH_DEVMODS= yes
+. endif
+.endfor
+
+.if defined(WITH_DEVMODS) && !defined(IAMADEVELOPER )
+IGNORE= to build the develop/example modules specify -DIAMADEVELOPER on the command line.\
+ Do not use the this modules in production environment
+.endif
+
+# The next three params are not converted to an option,
+# they should be used only for special builds.
+.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
+
+# watchdog modules
+.if ! ${PORT_OPTIONS:MWATCHDOG} || ! ${PORT_OPTIONS:MSTATUS}
+. if ${PORT_OPTIONS:MHEARTBEAT}
+IGNORE= HEARTBEAT requires WATCHDOG and STATUS
+. elif ${PORT_OPTIONS:MHEARTMONITOR}
+IGNORE= HEARTMONITOR requires WATCHDOG and STATUS
+. endif
+.endif
+.if ${PORT_OPTIONS:MLBMETHOD_HEARTBEAT} && ! ${PORT_OPTIONS:MHEARTMONITOR}
+IGNORE= LBMETHOD_HEARTBEAT requires WATCHDOG, STATUS and HEARTMONITOR
+.endif
+
+.if ${PORT_OPTIONS:MAUTH_BASIC} || ${PORT_OPTIONS:MAUTH_DIGEST}
+. if !${APACHE_MODULES:MAUTHN*}
+IGNORE= AUTH_BASIC and AUTH_DIGEST need at least one AUTHN provider
+. endif
+.endif
+
+. if ${PORT_OPTIONS:MAUTHN_DBD} && ! ${PORT_OPTIONS:MDBD}
+IGNORE= AUTHN_DBD requires DBD
+. endif
+
+.if ${PORT_OPTIONS:MAUTH_BASIC}
+. if !${APACHE_MODULES:MAUTHZ*}
+IGNORE= AUTH_BASIC need at least one AUTHZ provider
+. endif
+.endif
+
+.if ${PORT_OPTIONS:MSSL}
+CFLAGS+= -I${OPENSSLINC}
+LDFLAGS+= -L${OPENSSLLIB}
+CONFIGURE_ARGS+= --with-ssl=${OPENSSLBASE}
+.endif
+
+.if ${PORT_OPTIONS:MSOCACHE_DC}
+CONFIGURE_ARGS+= --with-distcache=${LOCALBASE}
+.endif
+
+.if ${PORT_OPTIONS:MLUA}
+CONFIGURE_ARGS+= --with-lua=${LOCALBASE}
+.else
+CONFIGURE_ARGS+= --without-lua
+.endif
+
+.if ${PORT_OPTIONS:MXML2ENC} || ${PORT_OPTIONS:MPROXY_HTML}
+CONFIGURE_ARGS+= --with-libxml2=${LOCALBASE}/include/libxml2
+.else
+CONFIGURE_ARGS+= --without-libxml2
+.endif
+
+.if ${PORT_OPTIONS:MAUTHNZ_LDAP}
+CONFIGURE_ARGS+= --enable-authnz-ldap
+.endif
+
+.if ${PORT_OPTIONS:MLDAP}
+CONFIGURE_ARGS+= --enable-ldap=shared
+.endif
+
+.if defined(APR_HAS_THREADS)
+CFLAGS+= ${PTHREAD_CFLAGS}
+LDFLAGS+= ${PTHREAD_LIBS}
+.else
+. if exists(${APR_CONFIG}) && ${PORT_OPTIONS:MMEM_CACHE}
+IGNORE= MEM_CACHE requires APR threads. Please rebuild APR with THREAD support
+. endif
+.endif
+
+# http://httpd.apache.org/docs/2.4/bind.html
+.if ${PORT_OPTIONS:MIPV4_MAPPED}
+CONFIGURE_ARGS+= --enable-v4-mapped
+.else
+CONFIGURE_ARGS+= --disable-v4-mapped
+.endif
+
+.endif # _PREMKINCLUDED