/[gentoo-x86]/eclass/depend.apache.eclass
Gentoo

Diff of /eclass/depend.apache.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.40 Revision 1.42
1# Copyright 1999-2007 Gentoo Foundation 1# Copyright 1999-2007 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/depend.apache.eclass,v 1.40 2008/02/06 08:33:47 hollow Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/depend.apache.eclass,v 1.42 2008/02/06 21:20:41 hollow Exp $
4 4
5# @ECLASS: depend.apache.eclass 5# @ECLASS: depend.apache.eclass
6# @MAINTAINER: apache-devs@gentoo.org 6# @MAINTAINER: apache-devs@gentoo.org
7# @BLURB: Functions to allow ebuilds to depend on apache 7# @BLURB: Functions to allow ebuilds to depend on apache
8# @DESCRIPTION: 8# @DESCRIPTION:
46# Stores the version of apache we are going to be ebuilding. 46# Stores the version of apache we are going to be ebuilding.
47# This variable is set by the want/need_apache functions. 47# This variable is set by the want/need_apache functions.
48 48
49# @ECLASS-VARIABLE: APXS 49# @ECLASS-VARIABLE: APXS
50# @DESCRIPTION: 50# @DESCRIPTION:
51# Paths to the apxs tool. 51# Path to the apxs tool.
52# This variable is set by the want/need_apache functions. 52# This variable is set by the want/need_apache functions.
53 53
54# @ECLASS-VARIABLE: APACHE_BIN 54# @ECLASS-VARIABLE: APACHE_BIN
55# @DESCRIPTION: 55# @DESCRIPTION:
56# Path to the apache binary. 56# Path to the apache binary.
112 # into the dependency cache (DEPEND/RDEPEND/etc) 112 # into the dependency cache (DEPEND/RDEPEND/etc)
113 APACHE_VERSION="2" 113 APACHE_VERSION="2"
114 APXS="/usr/sbin/apxs2" 114 APXS="/usr/sbin/apxs2"
115 APACHE_BIN="/usr/sbin/apache2" 115 APACHE_BIN="/usr/sbin/apache2"
116 APACHE_CTL="/usr/sbin/apache2ctl" 116 APACHE_CTL="/usr/sbin/apache2ctl"
117 # legacy alias 117 APACHE_INCLUDEDIR="/usr/include/apache2"
118 APACHECTL="${APACHE_CTL}"
119 APACHE_BASEDIR="/usr/$(get_libdir)/apache2" 118 APACHE_BASEDIR="/usr/$(get_libdir)/apache2"
120 APACHE_CONFDIR="/etc/apache2" 119 APACHE_CONFDIR="/etc/apache2"
121 APACHE_MODULES_CONFDIR="${APACHE_CONFDIR}/modules.d" 120 APACHE_MODULES_CONFDIR="${APACHE_CONFDIR}/modules.d"
122 APACHE_VHOSTS_CONFDIR="${APACHE_CONFDIR}/vhosts.d" 121 APACHE_VHOSTS_CONFDIR="${APACHE_CONFDIR}/vhosts.d"
123 APACHE_MODULESDIR="${APACHE_BASEDIR}/modules" 122 APACHE_MODULESDIR="${APACHE_BASEDIR}/modules"
210 209
211 DEPEND="${DEPEND} ${APACHE2_2_DEPEND}" 210 DEPEND="${DEPEND} ${APACHE2_2_DEPEND}"
212 RDEPEND="${RDEPEND} ${APACHE2_2_DEPEND}" 211 RDEPEND="${RDEPEND} ${APACHE2_2_DEPEND}"
213 _init_apache2 212 _init_apache2
214} 213}
214
215# @FUNCTION: check_apache_threads
216# @USAGE: [myflag]
217# @DESCRIPTION:
218# An ebuild calls this to make sure thread-safety is enabled if apache has been
219# built with a threaded MPM. If the myflag parameter is not given it defaults to
220# threads.
221check_apache_threads() {
222 debug-print-function $FUNCNAME $*
223
224 if ! built_with_use www-servers/apache threads ; then
225 return
226 fi
227
228 local myflag="${1:-threads}"
229
230 if ! use ${myflag} ; then
231 echo
232 eerror "You need to enable USE flag '${myflag}' to build a thread-safe version"
233 eerror "of ${CATEGORY}/${PN} for use with www-servers/apache"
234 die "Need missing USE flag '${myflag}'"
235 fi
236}
237
238# @FUNCTION: check_apache_threads_in
239# @USAGE: <myforeign> [myflag]
240# @DESCRIPTION:
241# An ebuild calls this to make sure thread-safety is enabled in a foreign
242# package if apache has been built with a threaded MPM. If the myflag parameter
243# is not given it defaults to threads.
244check_apache_threads_in() {
245 debug-print-function $FUNCNAME $*
246
247 if ! built_with_use www-servers/apache threads ; then
248 return
249 fi
250
251 local myforeign="$1"
252 local myflag="${2:-threads}"
253
254 if ! built_with_use ${myforeign} ${myflag} ; then
255 echo
256 eerror "You need to enable USE flag '${myflag}' in ${myforeign} to"
257 eerror "build a thread-safe version of ${CATEGORY}/${PN} for use"
258 eerror "with www-servers/apache"
259 die "Need missing USE flag '${myflag}' in ${myforeign}"
260 fi
261}

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.42

  ViewVC Help
Powered by ViewVC 1.1.20