summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenedikt Boehm <hollow@gentoo.org>2008-02-03 14:12:44 +0000
committerBenedikt Boehm <hollow@gentoo.org>2008-02-03 14:12:44 +0000
commit70004fbda124a824ec72b34afedce9d5fa761c73 (patch)
tree1a0906d98700303188b020ab1b17415d238bfe20 /eclass/depend.apache.eclass
parentVersion bump with only a translation update (diff)
downloadgentoo-2-70004fbda124a824ec72b34afedce9d5fa761c73.tar.gz
gentoo-2-70004fbda124a824ec72b34afedce9d5fa761c73.tar.bz2
gentoo-2-70004fbda124a824ec72b34afedce9d5fa761c73.zip
do not hardcode USE flag for optional apache support
Diffstat (limited to 'eclass/depend.apache.eclass')
-rw-r--r--eclass/depend.apache.eclass39
1 files changed, 14 insertions, 25 deletions
diff --git a/eclass/depend.apache.eclass b/eclass/depend.apache.eclass
index 2fd82136c72e..806b8e2c4880 100644
--- a/eclass/depend.apache.eclass
+++ b/eclass/depend.apache.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/depend.apache.eclass,v 1.38 2008/02/03 11:51:36 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/depend.apache.eclass,v 1.39 2008/02/03 14:12:44 hollow Exp $
# @ECLASS: depend.apache.eclass
# @MAINTAINER: apache-devs@gentoo.org
@@ -69,21 +69,6 @@ APACHE2_DEPEND="=www-servers/apache-2*"
# Dependencies for Apache 2.2.x
APACHE2_2_DEPEND="=www-servers/apache-2.2*"
-# @ECLASS-VARIABLE: WANT_APACHE_DEPEND
-# @DESCRIPTION:
-# Dependency magic based on useflag to use the right DEPEND
-WANT_APACHE_DEPEND="apache2? ( ${APACHE_DEPEND} )"
-
-# @ECLASS-VARIABLE: WANT_APACHE2_DEPEND
-# @DESCRIPTION:
-# Dependency magic based on useflag to use the right DEPEND
-WANT_APACHE2_DEPEND="apache2? ( ${APACHE2_DEPEND} )"
-
-# @ECLASS-VARIABLE: WANT_APACHE2_2_DEPEND
-# @DESCRIPTION:
-# Dependency magic based on useflag to use the right DEPEND
-WANT_APACHE2_2_DEPEND="apache2? ( ${APACHE2_2_DEPEND} )"
-
# ==============================================================================
# INTERNAL FUNCTIONS
# ==============================================================================
@@ -122,11 +107,12 @@ _init_no_apache() {
want_apache2() {
debug-print-function $FUNCNAME $*
- IUSE="${IUSE} apache2"
- DEPEND="${DEPEND} ${WANT_APACHE2_DEPEND}"
- RDEPEND="${RDEPEND} ${WANT_APACHE2_DEPEND}"
+ local myiuse=${1:-apache2}
+ IUSE="${IUSE} ${myiuse}"
+ DEPEND="${DEPEND} ${myiuse}? ( ${APACHE2_DEPEND} )"
+ RDEPEND="${RDEPEND} ${myiuse}? ( ${APACHE2_DEPEND} )"
- if use apache2 ; then
+ if use ${myiuse} ; then
_init_apache2
else
_init_no_apache
@@ -140,11 +126,12 @@ want_apache2() {
want_apache2_2() {
debug-print-function $FUNCNAME $*
- IUSE="${IUSE} apache2"
- DEPEND="${DEPEND} ${WANT_APACHE2_2_DEPEND}"
- RDEPEND="${RDEPEND} ${WANT_APACHE2_2_DEPEND}"
+ local myiuse=${1:-apache2}
+ IUSE="${IUSE} ${myiuse}"
+ DEPEND="${DEPEND} ${myiuse}? ( ${APACHE2_2_DEPEND} )"
+ RDEPEND="${RDEPEND} ${myiuse}? ( ${APACHE2_2_DEPEND} )"
- if use apache2 ; then
+ if use ${myiuse} ; then
_init_apache2
else
_init_no_apache
@@ -156,7 +143,8 @@ want_apache2_2() {
# An ebuild calls this to get the dependency information for optional apache
# support.
want_apache() {
- want_apache2
+ debug-print-function $FUNCNAME $*
+ want_apache2 "$@"
}
# @FUNCTION: need_apache2
@@ -190,5 +178,6 @@ need_apache2_2() {
# to happen seamlessly. All an ebuild needs to do is include the line
# need_apache somewhere.
need_apache() {
+ debug-print-function $FUNCNAME $*
need_apache2
}