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.41 2008/02/06 13:16:17 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: |
… | |
… | |
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" |
… | |
… | |
226 | return |
225 | return |
227 | fi |
226 | fi |
228 | |
227 | |
229 | local myflag="${1:-threads}" |
228 | local myflag="${1:-threads}" |
230 | |
229 | |
231 | if ! use ${myflag}; then |
230 | if ! use ${myflag} ; then |
232 | echo |
231 | echo |
233 | eerror "You need to enable USE flag '${myflag}' to build a thread-safe version" |
232 | eerror "You need to enable USE flag '${myflag}' to build a thread-safe version" |
234 | eerror "of ${CATEGORY}/${PN} for use with www-servers/apache" |
233 | eerror "of ${CATEGORY}/${PN} for use with www-servers/apache" |
235 | die "Need missing USE flag '${myflag}'" |
234 | die "Need missing USE flag '${myflag}'" |
236 | fi |
235 | fi |
237 | } |
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. |
|
|
244 | check_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 | } |